Example #1
0
 /**
  * Enqueue required CSS and JS for Mega Menu
  *
  * @since 1.0
  */
 public function enqueue_menu_page_scripts($hook)
 {
     if ('nav-menus.php' != $hook) {
         return;
     }
     // http://wordpress.org/plugins/image-widget/
     if (class_exists('Tribe_Image_Widget')) {
         $image_widget = new Tribe_Image_Widget();
         $image_widget->admin_setup();
     }
     wp_enqueue_style('colorbox', MEGAMENU_BASE_URL . 'js/colorbox/colorbox.css', false, MEGAMENU_VERSION);
     wp_enqueue_style('mega-menu', MEGAMENU_BASE_URL . 'css/admin-menus.css', false, MEGAMENU_VERSION);
     wp_enqueue_script('mega-menu', MEGAMENU_BASE_URL . 'js/admin.js', array('jquery', 'jquery-ui-core', 'jquery-ui-sortable', 'jquery-ui-accordion'), MEGAMENU_VERSION);
     wp_enqueue_script('colorbox', MEGAMENU_BASE_URL . 'js/colorbox/jquery.colorbox-min.js', array('jquery'), MEGAMENU_VERSION);
     wp_localize_script('mega-menu', 'megamenu', array('debug_launched' => __("Launched for Menu ID", "megamenu"), 'launch_lightbox' => __("Mega Menu", "megamenu"), 'saving' => __("Saving", "megamenu"), 'nonce' => wp_create_nonce('megamenu_edit'), 'nonce_check_failed' => __("Oops. Something went wrong. Please reload the page.", "megamenu")));
     do_action("megamenu_enqueue_admin_scripts");
 }
Example #2
0
 /**
  * Enqueue required CSS and JS for Mega Menu
  *
  * @since 1.0
  */
 public function enqueue_menu_page_scripts($hook)
 {
     if ('nav-menus.php' != $hook) {
         return;
     }
     // http://wordpress.org/plugins/image-widget/
     if (class_exists('Tribe_Image_Widget')) {
         $image_widget = new Tribe_Image_Widget();
         $image_widget->admin_setup();
     }
     // Compatibility fix for SlideDeck Pro
     wp_deregister_script('codemirror');
     wp_deregister_style('codemirror');
     // Compatibility fix for Pinboard Theme
     wp_deregister_script('colorbox');
     wp_deregister_style('colorbox');
     // Compatibility fix for AGP Font Awesome Collection
     wp_deregister_script('colorbox-js');
     wp_deregister_style('colorbox-css');
     wp_enqueue_style('colorbox', MEGAMENU_BASE_URL . 'js/colorbox/colorbox.css', false, MEGAMENU_VERSION);
     wp_enqueue_style('mega-menu', MEGAMENU_BASE_URL . 'css/admin/menus.css', false, MEGAMENU_VERSION);
     wp_enqueue_script('mega-menu', MEGAMENU_BASE_URL . 'js/admin.js', array('jquery', 'jquery-ui-core', 'jquery-ui-sortable', 'jquery-ui-accordion'), MEGAMENU_VERSION);
     wp_enqueue_script('colorbox', MEGAMENU_BASE_URL . 'js/colorbox/jquery.colorbox-min.js', array('jquery'), MEGAMENU_VERSION);
     wp_localize_script('mega-menu', 'megamenu', array('debug_launched' => __("Launched for Menu ID", "megamenu"), 'get_started' => __("Use these settings to enable Max Mega Menu", "megamenu"), 'launch_lightbox' => __("Mega Menu", "megamenu"), 'is_disabled_error' => __("Please enable Max Mega Menu using the settings on the left of this page.", "megamenu"), 'saving' => __("Saving", "megamenu"), 'nonce' => wp_create_nonce('megamenu_edit'), 'nonce_check_failed' => __("Oops. Something went wrong. Please reload the page.", "megamenu")));
     do_action("megamenu_enqueue_admin_scripts");
 }
Example #3
0
 /**
  * Enqueue required CSS and JS for Mega Menu
  *
  * @since 1.0
  */
 public function enqueue_menu_page_scripts($hook)
 {
     if ('nav-menus.php' != $hook) {
         return;
     }
     // http://wordpress.org/plugins/image-widget/
     if (class_exists('Tribe_Image_Widget')) {
         $image_widget = new Tribe_Image_Widget();
         $image_widget->admin_setup();
     }
     wp_enqueue_style('colorbox', MEGAMENU_BASE_URL . 'js/colorbox/colorbox.css', false, MEGAMENU_VERSION);
     wp_enqueue_style('mega-menu', MEGAMENU_BASE_URL . 'css/admin.css', false, MEGAMENU_VERSION);
     wp_enqueue_style('mega-menu-editor', MEGAMENU_BASE_URL . 'css/editor.css', false, MEGAMENU_VERSION);
     wp_enqueue_style('font-awesome', MEGAMENU_BASE_URL . 'css/font-awesome.min.css', false, MEGAMENU_VERSION);
     wp_enqueue_script('mega-menu', MEGAMENU_BASE_URL . 'js/admin.js', array('jquery', 'jquery-ui-core', 'jquery-ui-sortable', 'jquery-ui-accordion'), MEGAMENU_VERSION);
     wp_enqueue_script('colorbox', MEGAMENU_BASE_URL . 'js/colorbox/jquery.colorbox-min.js', array('jquery'), MEGAMENU_VERSION);
     wp_enqueue_script('ddslick', MEGAMENU_BASE_URL . 'js/ddslick/jquery.ddslick.js', array('jquery'), MEGAMENU_VERSION);
     wp_localize_script('mega-menu', 'megamenu', array('debug_launched' => __("Launched for Menu ID", "megamenu"), 'debug_added' => __("Added to list", "megamenu"), 'select_a_widget' => __("Select a widget to display in the Mega Panel", "megamenu"), 'nonce' => wp_create_nonce('megamenu_edit_widgets'), 'nonce_check_failed' => __("Oops. Something went wrong. Please reload the page.", "megamenu")));
     do_action("megamenu_enqueue_admin_scripts");
 }