/**
  * Enqueues the JavaScript needed for displaying the videos page.
  *
  * @access private
  * @since 0.1
  */
 public function _add_playlist_page_scripts()
 {
     nxt_register_script($this->get_uid(), ClassBlogs_Utils::get_base_js_url() . 'youtube-class-playlist.js', array('jquery'), ClassBlogs_Settings::VERSION);
     nxt_enqueue_script($this->get_uid());
 }
Example #2
0
 /**
  * Adds the plugin's admin JavaScript to the page.
  *
  * This uses the value of the `$admin_media` member variable to determine
  * which admin files should be added.
  *
  * @access private
  * @since 0.1
  */
 public function _add_admin_js()
 {
     if (array_key_exists('js', $this->admin_media) && !empty($this->admin_media['js'])) {
         $js_url = ClassBlogs_Utils::get_base_js_url();
         foreach ($this->admin_media['js'] as $js_file) {
             nxt_register_script($this->get_uid(), $js_url . $js_file, array('jquery'), ClassBlogs_Settings::VERSION, true);
         }
         nxt_print_scripts($this->get_uid());
     }
 }