예제 #1
0
 public function enqueue_scripts($hook)
 {
     if ($hook !== 'settings_page_' . $this->_slug) {
         return;
     }
     // load the media library
     wp_enqueue_media();
     // load custom scripts
     $basepath = Cubiq_Add_To_Home::add_trailing_slash_to_url(plugins_url('assets', dirname(__FILE__)));
     wp_enqueue_script($this->_slug . '-admin-script', $basepath . 'admin.js', array('jquery'), $this->_version);
     wp_enqueue_script($this->_slug . '-flot', $basepath . 'jquery.flot.min.js', null, $this->_version);
     wp_enqueue_script($this->_slug . '-flot-categories', $basepath . 'jquery.flot.categories.min.js', null, $this->_version);
     wp_enqueue_script($this->_slug . '-flot-resize', $basepath . 'jquery.flot.resize.min.js', null, $this->_version);
     wp_enqueue_script($this->_slug . '-add-to-homescreen', $basepath . 'addtohomescreen.min.js', null, $this->_version);
     // load the dash icons
     wp_enqueue_style('dashicons');
     // needed by media library
     //wp_register_style('editor-buttons-classic', includes_url() . 'css/editor.min.css');
     //wp_enqueue_style('editor-buttons-classic');
 }
예제 #2
0
 public function enqueue_scripts()
 {
     wp_enqueue_script('jquery');
     $basepath = Cubiq_Add_To_Home::add_trailing_slash_to_url(plugins_url('assets', dirname(__FILE__)));
     wp_enqueue_script($this->_slug . '-main', $basepath . 'addtohomescreen.min.js', array(), $this->_version);
     wp_enqueue_style($this->_slug . '-style', $basepath . 'addtohomescreen.css', array(), $this->_version);
 }