editionURL = plugins_url().'/'.str_replace(basename( __FILE__ ),"",plugin_basename( __FILE__ ) ); parent::__construct(); //ADMIN if( is_admin() ){ //Save Style Generator add_action( 'sparkoptions_update_settings_'.UBERMENU_SETTINGS , array( $this , 'saveStyleGenerator' ) , 10 , 1 ); //Create the welcome tour //$this->createTour(); //Add "Settings" and "Support Guide" links to the Plugins page add_filter( 'plugin_action_links', array( $this , 'pluginActionLinks' ), 10, 2); //AJAX clear of show thanks box add_action( 'wp_ajax_ubermenu_showThanksCleared', array( $this , 'showThanksCleared_callback' ) ); //UberMenu Thank You panel add_action( 'sparkoptions_before_settings_panel_'. UBERMENU_SETTINGS , array( $this , 'showThanks' ) ); //Media on nav panel //add_action( 'admin_enqueue_scripts-nav-menus.php' , array( $this , 'enqueueMedia' ) ); add_action( 'admin_enqueue_scripts' , array( $this , 'enqueueMedia' ) ); } //Add Thumbnail Support add_action( 'after_setup_theme', array( $this , 'addThumbnailSupport' ), 500 ); //go near the end, so we don't get overridden //Add Sidebars add_action( 'init', array( $this , 'registerSidebars' ), 500); //Note that on the admin side, this runs before settings are updated //UberMenu Easy Integration add_shortcode( 'uberMenu_easyIntegrate' , array( 'UberMenuStandard' , 'easyIntegrate' ) ); if( $this->settings->op( 'wpmega-easyintegrate' ) ){ add_action( 'init', array( $this , 'registerThemeLocation' ) ); } } function init(){ parent::init(); //Filters add_filter( 'wp_nav_menu_args' , array( $this , 'megaMenuFilter' ), 2000 ); //filters arguments passed to wp_nav_menu //load_plugin_textdomain( 'ubermenu' ); } /** * Handle loading the CSS and JS assets. * * In addition to core functionality, handle Style Generator CSS, loading on login pages, * and optional IE Fix * */ function loadAssets(){ parent::loadAssets(); if( !is_admin() && ( $this->settings->op( 'wpmega-load-on-login' ) || !in_array( $GLOBALS['pagenow'], array( 'wp-login.php', 'wp-register.php' ) ) ) ) { //CSS in HEAD add_action( 'wp_head', array( $this , 'insertCSS' ), 100 ); //IE Fix if( $this->settings->op( 'wpmega-iefix' ) ) add_action( 'wp_head', array( $this , 'ieFix' ) ); //You can safely disable this if you are including it elsewhere } } /** * In addition to preset, load custom stylesheet or Style Generator */ function loadCSS(){ parent::loadCSS(); //Load Custom stylesheet if( $this->settings->op( 'wpmega-style' ) == 'custom' ){ wp_enqueue_style('ubermenu-custom', $this->baseURL.'custom/custom.css', false, UBERMENU_VERSION, 'all'); } // Load Generated Stylesheet else if( $this->settings->op( 'wpmega-style' ) == 'inline' //Using Generator && $this->settings->op( 'save-style-gen-to-file' ) //Saving to file && $this->settings->op( 'use-gen-skin' ) ){ //File Generated Successfully wp_enqueue_style('ubermenu-generated-skin', $this->editionURL.'stylegenerator/skin.css', false, UBERMENU_VERSION, 'all'); } } /* Load additional javascript */ function loadJS(){ parent::loadJS(); if( $this->settings->op( 'load-google-maps') ) wp_enqueue_script( 'google-maps', 'http://maps.googleapis.com/maps/api/js?sensor=false' , array( 'jquery' ), false, true ); //Load Custom stylesheet if( $this->settings->op( 'custom-js' ) ){ wp_enqueue_script('ubermenu-custom', $this->baseURL.'custom/custom.js', array( 'jquery' ), false, true ); } } /* * Insert StyleGenerator-generated CSS in the site head */ function insertCSS(){ $css = ''; $from = array(); //Gather special CSS settings $menuW = $this->settings->op( 'wpmega-container-w' ); if( !empty( $menuW ) ) { $css.= "\n\n/* Menu Width - UberMenu Advanced Settings */\n"; $css.= '#megaMenu{ width: '.$menuW.'px; max-width:100%; }'; } $innerMenuW = $this->settings->op( 'inner-menu-width' ); if( !empty( $innerMenuW ) ){ $css.= "\n\n/* Inner Menu Width - used for centering - UberMenu Advanced Settings */\n"; $css.= '#megaMenu ul.megaMenu{ max-width: '.$innerMenuW.'px; }'; } $verticalSubmenuWidth = $this->settings->op( 'vertical-submenu-w'); if( !empty( $verticalSubmenuWidth ) ){ $css.= "\n/* Vertical Submenu Width */\n"; $css.= '#megaMenu.megaMenuVertical ul.megaMenu li.ss-nav-menu-mega.ss-nav-menu-item-depth-0 ul.sub-menu-1{ width: '.$verticalSubmenuWidth.'px; max-width: '.$verticalSubmenuWidth. 'px; }'; } $imagePadding = $this->settings->op( 'wpmega-image-width' ); if( is_numeric( $imagePadding ) ){ $imagePadding+= apply_filters( 'ubermenu_image_text_padding' , 7 ); $css.= "\n/* Image Text Padding */\n"; $css.= "#megaMenu .ss-nav-menu-with-img > a > .wpmega-link-title, #megaMenu .ss-nav-menu-with-img > a > .wpmega-link-description, #megaMenu .ss-nav-menu-with-img > a > .wpmega-item-description, #megaMenu .ss-nav-menu-with-img > span.um-anchoremulator > .wpmega-link-title, #megaMenu .ss-nav-menu-with-img > span.um-anchoremulator > .wpmega-link-description, #megaMenu .ss-nav-menu-with-img > span.um-anchoremulator > .wpmega-item-description{\n"; $css.= " padding-left: {$imagePadding}px;\n"; $css.= "}\n"; } /* //Using clearfix instead $imageHeight = $this->settings->op( 'wpmega-image-height'); if( !empty( $imageHeight ) ){ $css.= "\n/* Image item min-height *//*\n"; $css.= "#megaMenu ul.megaMenu ul.sub-menu .ss-nav-menu-with-img > a, #megaMenu ul.megaMenu ul.sub-menu .ss-nav-menu-with-img > span.um-anchoremulator { min-height: {$imageHeight}px; }"; } */ $customTweaks = $this->settings->op( 'wpmega-css-tweaks' ); if( !empty( $customTweaks ) ) { $css.= "\n\n/* Custom Tweaks - UberMenu Style Configuration Settings */\n"; $css.= stripslashes( $customTweaks ); } //Append CSS from Generator, if using inline style & no external stylesheet if( $this->settings->op( 'wpmega-style' ) == 'inline' && !$this->settings->op( 'use-gen-skin' ) ){ $css = "/* Style Generator Styles */\n". $this->getGeneratorCSS() . "\n\n".$css; } $css = apply_filters( 'uberMenu_insertCSS' , $css ); $css = trim( $css ); //If we've got anything to print, print it! if( !empty($css) ){ ?> 'true', ), $atts)); $echo = $echo == 'false' ? false : true; $menu = uberMenu_direct( 'ubermenu' , false, $echo , array( 'megaMenu' => true ) ); //$menu = wp_nav_menu( array( 'theme_location' => 'ubermenu' , 'megaMenu' => true , 'echo' => $echo ) ); if( !$echo ) return $menu; } function getGeneratorCSS(){ $styles = get_option( UBERMENU_STYLES ); if( is_array( $styles ) ) $styles = $styles['wpmega-style-css-code']; //This is how it worked in 1.x, but now it's just the CSS return stripslashes( $styles ); } /* * Add Support for Thumbnails on Menu Items * * This function adds support without override the theme's support for thumbnails * Note we could just call add_theme_support('post-thumbnails') without specifying a post type, * but this would make it look like users could set featured images on themes that don't support it * so we don't want that. */ function addThumbnailSupport(){ global $_wp_theme_features; $post_types = array( 'nav_menu_item' ); $alreadySet = false; //Check to see if some features are already supported so that we don't override anything if( isset( $_wp_theme_features['post-thumbnails'] ) && is_array( $_wp_theme_features['post-thumbnails'][0] ) ){ $post_types = array_merge($post_types, $_wp_theme_features['post-thumbnails'][0]); } //If they already tuned it on for EVERY type, then we don't need to do anything more elseif( isset( $_wp_theme_features['post-thumbnails'] ) && $_wp_theme_features['post-thumbnails'] == 1 ){ $alreadySet = true; } if(!$alreadySet) add_theme_support( 'post-thumbnails' , $post_types ); add_post_type_support( 'nav_menu_item' , 'thumbnail' ); //wp33 } function getWalker(){ return new UberMenuWalker(); } function getMenuArgs( $args ){ $args = parent::getMenuArgs( $args ); if( $this->settings->op( 'wpmega-html5' ) ) $args['container'] = 'nav'; else $args['container'] = 'div'; if( $this->settings->op( 'wpmega-menubar-full' ) ) $args['container_class'].= ' megaFullWidth'; //if( $this->settings->op( 'wpmega-orientation' ) == 'vertical' ) $args['container_class'].= ' megaMenuVertical'; //else $args['container_class'].= ' megaMenuHorizontal'; if( $this->settings->op( 'wpmega-autoAlign' ) ) $args['container_class'].= ' wpmega-autoAlign'; if( $this->settings->op( 'wpmega-remove-conflicts' ) ) $args['container_class'].= ' wpmega-noconflict'; if( $this->settings->op( 'center-menuitems' ) ) $args['container_class'].= ' megaCenterMenuItems'; if( $this->settings->op( 'center-menubar' ) ) $args['container_class'].= ' megaCenterMenubar'; if( $this->settings->op( 'enable-clearfix' ) ) $args['container_class'].= ' megaClear'; if( $this->settings->op( 'center-inner-menu' ) ) $args['container_class'].= ' megaCenterInner'; if( $this->settings->op( 'wpmega-minimizeresidual' ) ){ $args['menu_id'] = 'megaUber'; $args['container_class'].= ' megaMinimizeResiduals'; } if( $this->settings->op( 'reset-div-span-styling' ) ) $args['container_class'].= ' megaResetStyles'; $location = isset( $args['theme_location'] ) ? $args['theme_location'] : 'none'; $args['container_class'].= ' themeloc-'.$location; return $args; } /* * Apply options to the Menu via the filter */ function megaMenuFilter( $args ){ //Only print the menu once if( $this->count > 0 ) return $args; //Current location check instance $location = isset( $args['theme_location'] ) ? $args['theme_location'] : ''; if( $location ){ //if location is present if( !isset( $this->instances[$location] ) ) $this->instances[$location] = 0; //initialize instance count $this->instances[$location]++; //increment instance count $target_instance = $this->settings->op( 'theme-loc-instance' ); //get the target instance number if( !is_numeric( $target_instance ) ) $target_instance = 1; //make sure our value is valid if( $this->instances[$location] != $target_instance ) return $args; //If we're not on the specific instance of this theme location, quit } if( isset( $args['responsiveSelectMenu'] ) ) return $args; if( isset( $args['filter'] ) && $args['filter'] === false ) return $args; //Don't do anything in IE6 if( $this->settings->op( 'no-ie6' ) && strpos( $_SERVER['HTTP_USER_AGENT'], 'MSIE 6') !== false ) return $args; //Check to See if this Menu Should be Megafied $activeLocs = get_option( UBERMENU_NAV_LOCS, array() ); if( !isset( $args['preview'] ) ){ //preview automatically passes through //STRICT if( $this->settings->op( 'wpmega-strict' ) ) { //Strict Mode requires the location to be set and for that location to be activated //If location is empty or location is not activated, return if( ( empty( $location ) || !in_array( $location, $activeLocs ) ) && ( !isset( $args['megaMenu'] ) || $args['megaMenu'] != true ) ){ return $args; } //Check to make sure the menu exists $nav_menu_locations = get_nav_menu_locations(); if( !isset( $nav_menu_locations[ $location ] ) ){ //If this was supposed to be a Mega Menu, explain the problem to the user. $locmap = get_registered_nav_menus(); if( isset( $args['megaMenu'] ) && $args['megaMenu'] == true ) printf( __( "Please activate UberMenu Easy Integration and set a menu in the %s theme location in Appearance > Menus" , 'ubermenu' ), $locmap[ $location ] ); return $args; } } //LENIENT else{ //In the Event that the LOCATION is empty, that means the theme author has not //created the menu using the theme_location parameter properly, so we'll go ahead and megafy the menu if( isset( $args['megaMenu'] ) && $args['megaMenu'] != true && !empty( $location ) && !in_array( $location, $activeLocs ) ){ return $args; //megaMenu setting for manual wp_nav_menu } } } //$this->count++; $items_wrap = '
<?php uberMenu_easyIntegrate(); ?> in your header.php file, or [uberMenu_easyIntegrate echo="false"] in a text widget to place your menu.', 'ubermenu' ),
'off'
);
$sparkOps->addCheckbox( $themeIntegration,
'wpmega-remove-conflicts',
__( 'Remove Theme Conflicts', 'ubermenu' ),
__( 'This attempts to remove previously registered javascript acting on the menu.', 'ubermenu' ),
'on'
);
$sparkOps->addCheckbox( $themeIntegration,
'wpmega-minimizeresidual',
__( 'Minimize Residual Styling', 'ubermenu' ),
__( 'This will change the ID of the menu\'s top level UL. If you still have residual styling, you likely need
to manually edit the ID or class of the elements surrounding the wp_nav_menu call in your header.php.', 'ubermenu' ),
'on'
);
$sparkOps->addCheckbox( $themeIntegration,
'reset-div-span-styling',
__( 'Reset Div & Span Styling', 'ubermenu' ),
__( 'Reset margins, padding, etc, on divs & spans within the menu. This will strip styling from some widgets or shortcodes that you add to the menu.', 'ubermenu' ),
'on'
);
$sparkOps->addCheckbox( $themeIntegration,
'wpmega-iefix',
__( 'Use IE Fix Script', 'ubermenu' ),
//'Disable this only if it is causing problems or if you are already including it elsewhere.',
__( 'Depending on how your theme is coded, some themes will require this for the menu to work properly while others will not. IE is a fickle bitch, so try it both ways and see which works better for your theme.', 'ubermenu' ),
'off'
);
$sparkOps->addCheckbox( $themeIntegration,
'wpmega-jquery-noconflict',
__( 'Run jQuery in noConflict Mode', 'ubermenu' ),
__( 'If your theme does not load the default WordPress jQuery library, turn this on.', 'ubermenu' ),
'off'
);
$sparkOps->addCheckbox( $themeIntegration,
'wpmega-load-on-login',
__( 'Load UberMenu on Login and Registration Pages', 'ubermenu' ),
__( 'Since WordPress login and registration pages do not include a menu by default, UberMenu won\'t load there. If you are styling your login/registration page, turn this on - otherwise UberMenu will be completely unstyled.', 'ubermenu' ),
'off'
);
$sparkOps->addCheckbox( $themeIntegration,
'wpmega-include-jquery',
__( 'Include jQuery', 'ubermenu' ),
__( 'This is REQUIRED. Only disable this if your theme or another plugin already is not properly enqueueing jQuery. DO NOT DISABLE UNLESS YOU KNOW WHAT YOU ARE DOING!', 'ubermenu' ),
'on'
);
$sparkOps->addCheckbox( $themeIntegration,
'wpmega-include-hoverintent',
__( 'Include Hover Intent', 'ubermenu' ),
__( 'This is REQUIRED. Only this if your theme or another plugin already includes hoverIntent.js. DO NOT DISABLE UNLESS YOU ARE CERTAIN!', 'ubermenu' ),
'on'
);
$sparkOps->addCheckbox( $themeIntegration,
'no-ie6',
__( 'Default to theme menu in IE6', 'ubermenu' ),
__( 'UberMenu is not compatible with IE6, as noted in the product description. Enabing this setting will mean UberMenu will not load in IE6, in an effort to fall back to the default theme menu, which may or may not be IE6-compatible. ', 'ubermenu' ),
'off'
);
/* ADVANCED */
$advanced = 'advanced-config';
$sparkOps->registerPanel( $advanced, __( 'Advanced Settings', 'ubermenu' ) , 70 );
$sparkOps->addInfobox( $advanced ,
'advanced-panel-warning' ,
__( 'Warning', 'ubermenu' ),
__( 'Do not change advanced settings unless you are certain of what you are doing.', 'ubermenu' ),
'spark-infobox-warning'
);
$sparkOps->addTextInput( $advanced,
'theme-loc-instance',
__( 'Theme Location Instance', 'ubermenu' ),
__( 'By default, UberMenu will attach to the first instance of the activated theme_location that it encounters. If you have a theme that reuses a theme location, you can tell UberMenu to attach to a different instance. The valid values here are almost always either 1 or 2. Keep in mind this will affect ALL theme location instances; so if you have multiple theme locations as UberMenus\'s, you\'ll probably need to manage your theme\'s locations appropriately rather than just changing this setting.', 'ubermenu' ),
'1',
'spark-minitext',
''
);
$sparkOps->addTextInput( $advanced,
'wpmega-container-w',
__( 'Menu Bar Width', 'ubermenu' ),
__( 'Enter a width in pixels. UberMenu automatically sizes to its container, so you only need to use this if you want UberMenu '.
'to be a different size. It will automatically be centered when possible.'.
'Remember, your submenu\'s maximum width is restricted to the width of your menu bar by default.'.
'Be sure to disable the Expand Menu Bar Full Width option in basic settings if you intend to use this', 'ubermenu' ),
'',
'spark-minitext',
'px'
);
$sparkOps->addCheckbox( $advanced,
'center-menubar',
__( 'Center Menu Bar', 'ubermenu' ),
__( 'Coupled with the Menu Bar Width above, this will center your menu within its container. Be sure to enable the Clearfix option below as well', 'ubermenu' ),
'off'
);
$sparkOps->addCheckbox( $advanced,
'enable-clearfix',
__( 'Enable Clearfix', 'ubermenu' ),
__( 'Important for centering.', 'ubermenu' ),
'off'
);
$sparkOps->addTextInput( $advanced,
'inner-menu-width',
__( 'Inner Menu Width', 'ubermenu' ),
__( 'Enter a width in pixels (most common: 960). This is useful for centering the menu items while allowing the menu bar to span the entire window.', 'ubermenu' ),
'',
'spark-minitext',
'px'
);
$sparkOps->addCheckbox( $advanced,
'center-inner-menu',
__( 'Center Inner Menu', 'ubermenu' ),
__( 'Coupled with the Inner Menu Width above, this will center your inner menu within the menu bar.'.
'You must set an explicit width above to center the menu.', 'ubermenu' ),
'off'
);
$sparkOps->addCheckbox( $advanced,
'center-menuitems',
__( 'Center Menu Items', 'ubermenu' ),
__( 'Center the menu items within the menu bar. Note that using images, widgets or content overrides in the top level may break your layout with this option enabled. '.
'Works best with basic text menu items.', 'ubermenu' ),
'off'
);
/*$sparkOps->addTextInput( $advanced,
'wpmega-max-submenu-w',
'Maximum Submenu Width',
'Normally, a submenu can only be as wide as the top level menu bar. If you want it to be wider, set the value here.',
'',
'spark-minitext',
'px'
);*/
$sparkOps->addCheckbox( $advanced,
'wpmega-html5',
__( 'HTML5', 'ubermenu' ),
__( 'Use the HTML5 <nav> element as the menu container. Only enable this if your theme supports HTML5! Otherwise it\'ll break Internet Explorer', 'ubermenu' )
);
$sparkOps->addCheckbox( $advanced,
'include-basic-css',
__( 'Include basic.css', 'ubermenu' ),
__( 'UberMenu\'s basic.css contains all the structural code for the menu. Without this code, the menu will not work. Only disable this if you are going to manually include it elsewhere.', 'ubermenu' ),
'on'
);
/*
$sparkOps->addCheckbox( $advanced,
'custom-basic-css',
__( 'Use custom/basic.css', 'ubermenu' ),
__( 'If you want to use a custom version of basic.css, enable this (keep the above option enabled as well).', 'ubermenu' ),
'off'
);
*/
$sparkOps->addCheckbox( $advanced,
'wpmega-debug', //'Debug' is legacy
__( 'Development Mode', 'ubermenu' ),
__( 'Run in Development mode. This will load the .dev.js ubermenu script rather than the minified version. Easier for testing customizations and debugging.', 'ubermenu' )
);
$sparkOps->addResetButton( $advanced,
'wpmega-reset-options',
__( 'Reset Options', 'ubermenu' ),
__( 'Reset UberMenu Settings to the factory defaults.', 'ubermenu' )
);
$sparkOps->addCheckbox( $advanced,
'wpmega-autoAlign',
__( 'Auto Align (Deprecated)', 'ubermenu' ),
__( 'Automatically align the second-level menu items by setting all widths the width of the widest item in each submenu. '.
'<style> tags to <head>' , 'ubermenu' ).'';
$ops['custom'] = __( 'Custom', 'ubermenu' ).
''.__( 'Load ubermenu/custom/custom.css. Always use this file for customizations!', 'ubermenu' ).'';
$ops['none'] = $nothing;
return $ops;
}
function getOptionsMenuLinks(){
//Links
$links = array(
1 => array(
'href' => 'http://goo.gl/YV7aw', //'http://j.mp/dPmJ8m',
'class' => 'spark-outlink-hl',
'title' => __( 'Read the Support Manual', 'ubermenu' ),
'text' => __( 'Knowledgebase →', 'ubermenu' ),
),
2 => array(
'href' => 'http://goo.gl/G8b3r',
'class' => 'spark-outlink-hl',
'title' => __( 'Watch Video Tutorials', 'ubermenu' ),
'text' => __( 'Video Tutorials →', 'ubermenu' ),
),
3 => array(
'href' => 'http://goo.gl/0OIDQ',
'class' => 'spark-outlink-hl',
'title' => __( 'Troubleshoot problems you encounter', 'ubermenu' ),
'text' => __( 'Troubleshooter →', 'ubermenu' ),
),
4 => array(
'href' => 'http://goo.gl/KdXgk',
'class' => 'spark-outlink-hl',
'title' => __( 'Customization Assistant', 'ubermenu' ),
'text' => __( 'Customization Assistant →', 'ubermenu' ),
),
5 => array(
'href' => 'http://sevenspark.com/out/support',
'class' => 'spark-outlink',
'title' => __( 'Submit a support request', 'ubermenu' ),
'text' => __( 'Support Forum →', 'ubermenu' ),
),
6 => array(
'href' => 'http://goo.gl/6J72a',
'class' => 'spark-outlink',
'title' => __( 'Frequently Asked Questions', 'ubermenu' ),
'text' => __( 'FAQs →', 'ubermenu' ),
),
7 => array(
'href' => 'http://j.mp/fDpVkP',
'class' => 'spark-outlink',
'title' => __( 'Purchase a license for use on a second installation', 'ubermenu' ),
'text' => __( 'Additional License →', 'ubermenu' )
)
);
return $links;
}
function showThanks(){
if( isset($_GET['cleared'] ) ){
update_option( 'ubermenu-thanks', 2 );
}
if( isset($_GET['reset'] ) ){
update_option( 'ubermenu-thanks', 1 );
}
//Pre //Done //Kill
$status = get_option( 'ubermenu-thanks', 1 );
if($status == 2) return;
?>
".__( 'Thank you for your purchase!' , 'ubermenu' )."";
$this->JSONresponse($data);
}
function pluginActionLinks( $links, $file ) {
if ( $file == 'ubermenu/ubermenu.php' ){
$links[] = ''.__( 'Settings' , 'ubermenu' ).'';
$links[] = ''.__( 'UberMenu Knowledgebase' , 'ubermenu' ).'';
}
return $links;
}
/*
* Setup the ToolTip Tour for UberMenu
*/
function createTour(){
global $pagenow;
$this->tour = $uberTour = new TipTour( 'uberMenu' );
if( $uberTour->tourOn() ){
//build & load
$page_slug = '_';
if ( isset($_GET['page']) ) $page_slug = $_GET['page'];
$uberTour->addStep( new TipTourStep(
$pagenow, //load anywhere
$page_slug,
'#menu-appearance > a.menu-top',
__( 'Welcome to UberMenu!', 'ubermenu' ),
''.__( 'Thank you for installing UberMenu - WordPress Mega Menu Plugin by SevenSpark! Click "Start Tour" to view a quick introduction', 'ubermenu').'
', 'top', '0 0', 'Start Tour' )); $uberTour->addStep( new TipTourStep( 'nav-menus.php', '', '#nav-menu-header', __( '1. Create a Menu', 'ubermenu' ), ''.__( 'Start off by creating a menu using the WordPress 3 Menu System. Each menu item has new options based on its level. To create a mega menu drop down, be sure to check "Activate Mega Menu" in the UberMenu Options', 'ubermenu').'
', 'top' )); $uberTour->addStep( new TipTourStep( 'nav-menus.php', //load anywhere '', '#nav-menu-theme-locations', __( '2. Set Theme Location', 'ubermenu' ), ''.__( 'Next, set your menu in the appropriate theme location. If your theme does not support theme locations, you can use UberMenu Easy Integration instead.', 'ubermenu').'
', 'left' )); $uberTour->addStep( new TipTourStep( 'nav-menus.php', //load anywhere '', '#nav-menu-theme-megamenus', __( '3. Activate UberMenu Theme Locations', 'ubermenu' ), ''.__( 'Now, activate UberMenu on the appropriate theme location. This tells UberMenu which menus it should affect, so you can have 1 UberMenu and multiple non-UberMenus.', 'ubermenu').'
', 'left' )); $uberTour->addStep( new TipTourStep( 'themes.php', //load anywhere 'uber-menu', '#container-wpmega-orientation', __( '4. Pick your Orientation', 'ubermenu' ), ''.__( 'Decide whether your menu should be vertically or horizontally aligned.', 'ubermenu').'
', 'left top', '0 -50' )); $uberTour->addStep( new TipTourStep( 'themes.php', //load anywhere 'uber-menu', '#container-wpmega-transition', __( '5. jQuery', 'ubermenu' ), ''.__( 'Decide whether you want your menu to be jQuery-Enhanced or pure CSS. Pure CSS mega submenus will all be full-width unless customized with CSS.', 'ubermenu').'
', 'left top', '0 -50' )); $uberTour->addStep( new TipTourStep( 'themes.php', //load anywhere 'uber-menu', '.spark-nav-footer a:first', __( 'Have a question?', 'ubermenu' ), ''.__( 'You can always access the latest version of the support manual by clicking this link.', 'ubermenu').'
Thank you for your purchase. Enjoy UberMenu!
', 'left', '0 -75' )); $uberTour->loadTour(); } $this->settings->addTour( $this->tour ); } /* Here is where the Presets are registered */ function registerStylePresets(){ parent::registerStylePresets(); $this->registerStylePreset('shiny-black', __( 'Shiny Black' , 'ubermenu' ), $this->editionURL.'styles/skins/shinyblack.css'); $this->registerStylePreset('simple-green', __( 'Simple Green' , 'ubermenu' ), $this->editionURL.'styles/skins/simplegreen.css'); $this->registerStylePreset('earthy', __( 'Earthy' , 'ubermenu' ), $this->editionURL.'styles/skins/earthy.css'); $this->registerStylePreset('silver-tabs', __( 'Silver Tabs (No Menu Bar)' , 'ubermenu' ), $this->editionURL.'styles/skins/silvertabs.css'); $this->registerStylePreset('black-silver', __( 'Black and Silver' , 'ubermenu' ), $this->editionURL.'styles/skins/blacksilver.css'); $this->registerStylePreset('blue-silver', __( 'Blue and Silver' , 'ubermenu' ), $this->editionURL.'styles/skins/bluesilver.css'); $this->registerStylePreset('red-black', __( 'Red and Black' , 'ubermenu' ), $this->editionURL.'styles/skins/redblack.css'); $this->registerStylePreset('orange', __( 'Burnt Orange' , 'ubermenu' ), $this->editionURL.'styles/skins/orange.css'); $this->registerStylePreset('clean-white', __( 'Clean White' , 'ubermenu' ), $this->editionURL.'styles/skins/cleanwhite.css'); $this->registerStylePreset('trans-black', __( 'Transparent Black' , 'ubermenu' ), $this->editionURL.'styles/skins/trans_black.css'); $this->registerStylePreset('trans-black-hov', __( 'Transparent Black Hover' , 'ubermenu' ), $this->editionURL.'styles/skins/trans_black_hover.css'); $this->registerStylePreset('blank', '', '' ); $this->registerStylePreset('unsupported', __( '--- Legacy Skins: for Non-Responsive Sites Only: ---' , 'ubermenu' ), ''); $this->registerStylePreset('tt-silver', __( 'Two Tone Silver & Black' , 'ubermenu' ), $this->editionURL.'styles/skins/twotone_silver_black.css'); $this->registerStylePreset('tt-black', __( 'Two Tone Black & Black' , 'ubermenu' ), $this->editionURL.'styles/skins/twotone_black_black.css'); $this->registerStylePreset('tt-red', __( 'Two Tone Red & Black' , 'ubermenu' ), $this->editionURL.'styles/skins/twotone_red_black.css'); $this->registerStylePreset('tt-blue', __( 'Two Tone Blue & Black' , 'ubermenu' ), $this->editionURL.'styles/skins/twotone_blue_black.css'); $this->registerStylePreset('tt-green', __( 'Two Tone Green & Black' , 'ubermenu' ), $this->editionURL.'styles/skins/twotone_green_black.css'); $this->registerStylePreset('tt-purple', __( 'Two Tone Purple & Black' , 'ubermenu' ), $this->editionURL.'styles/skins/twotone_purple_black.css'); $this->registerStylePreset('tt-orange', __( 'Two Tone Orange & Black' , 'ubermenu' ), $this->editionURL.'styles/skins/twotone_orange_black.css'); $this->registerStylePreset('tt-silver-s', __( 'Two Tone Silver & Silver' , 'ubermenu' ), $this->editionURL.'styles/skins/twotone_silver_silver.css'); $this->registerStylePreset('custom', __( 'Custom - (Legacy Use)' , 'ubermenu' ), $this->editionURL.'custom/custom.css'); } }