title: Loading scripts only for certain admin page
body: <p>I am trying to add a date and time-picker for option-tree framework on my current project. I am using <code>global $pagenow;</code> but was wondering if there is another way of loading the scripts on certain  admin page?</p>
  
  <p>Here is my code:</p>
  
  <pre><code>global $pagenow;
  
  //Check if current admin page is Option Tree settings
  if ( $pagenow == 'themes.php' &amp;&amp; $_GET['page'] == 'ot-theme-options' ) {
  
      // Register and Enqueue Date &amp; Time Picker Scripts
      function orn_admin_register() {
  
              wp_enqueue_script( 'jquery-date-timepicker', get_template_directory_uri()."/inc/backend/datetimepicker/jquery.datetimepicker.js", array('jquery'),'1.4.2',true);
  
              wp_enqueue_style('jquery-date-timepicker-style', get_template_directory_uri().'/inc/backend/datetimepicker/jquery.datetimepicker.css', false);
      }
  
      add_action( 'admin_enqueue_scripts', 'orn_admin_register' ); 
  
      //Add Inline script to trigger Date &amp; Timepicker
      function admin_inline_js(){
          echo "&lt;script type='text/javascript'&gt;\n";
          echo "jQuery(document).ready(function($) {";
          echo "\n$('#orn_days_underc').datetimepicker()";
          echo "\n})\n&lt;/script&gt;";
  
      }
      add_action( 'admin_print_scripts', 'admin_inline_js', 20 );
  
  }
  </code></pre>