getEditionURL() . 'tour/joyride/jquery.joyride-2.1.js', array( 'jquery' ) , UBERMENU_VERSION , true ); wp_enqueue_style( 'joyride' , $uberMenu->getEditionURL() . 'tour/joyride/joyride-2.1.css' ); } } add_action( 'admin_enqueue_scripts' , 'ubermenu_tour_load_assets' ); function ubermenu_tour_print_steps(){ $restart = false; //$restart = true; //umssd( $_REQUEST ); if( isset( $_POST['restart-tour-uberMenu'] ) ) { update_option( 'tiptour_on_uberMenu' , 1 ); $restart = true; } if( get_option( 'tiptour_on_uberMenu' , 1 ) == 0 ) return; $screen = get_current_screen(); $screen_id = $screen->id; //echo "[[[$screen_id]]]"; $steps = array(); $pause = array(); $k = 0; //So that we can dynamically set pauses if( $screen_id == 'nav-menus' ){ $steps[$k++] = array( 'idclass' => 'welcome', 'title' => __( 'Welcome to UberMenu!', 'ubermenu' ), 'desc' => __( 'Thank you for installing UberMenu - WordPress Mega Menu Plugin by SevenSpark! Click "Start Tour" to view a quick introduction', 'ubermenu'), 'button' => __( 'Start Tour' , 'ubermenu' ), ); } else{ $steps[$k++] = array( 'idclass' => 'welcome-go', 'title' => __( 'Welcome to UberMenu!', 'ubermenu' ), 'desc' => __( 'Thank you for installing UberMenu - WordPress Mega Menu Plugin by SevenSpark! Click "Start Tour" to view a quick introduction', 'ubermenu'). 'Start Tour', //'button' => __( 'Start Tour' , 'ubermenu' ), ); } $steps[$k++] = array( 'idclass' => 'create-menu', 'title' => __( 'Create a Menu', 'ubermenu' ), 'desc' => __( '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'), 'screen' => 'nav-menus', 'id' => 'nav-menu-header', 'ops' => 'tipAdjustmentY:-40', //tipLocation:right; ); $steps[$k++] = array( 'idclass' => 'activate', 'title' => __( 'Activate UberMenu Theme Locations', 'ubermenu' ), 'desc' => __( '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. If your theme does not support theme locations, you can use UberMenu Easy Integration instead.', 'ubermenu'), 'screen' => 'nav-menus', 'id' => 'nav-menu-theme-megamenus', 'ops' => 'tipLocation:right;', ); $pause[] = $k; $steps[$k++] = array( 'idclass' => 'manage_locations', 'title' => __( 'Go to Manage Locations', 'ubermenu' ), 'desc' => __( 'Click the Manage Locations tab to assign your menu to a theme location. (The tab appears after you have created a menu).', 'ubermenu'). 'Assign theme locations', 'screen' => 'nav-menus', 'class' => 'nav-tab-wrapper', 'ops' => 'tipAdjustmentY:-40;tipAdjustmentX:140;nextButton:false', ); $steps[$k++] = array( 'idclass' => 'assign_menu', 'title' => __( 'Assign Menu to Theme Location', 'ubermenu' ), 'desc' => __( 'Next, set your menu in the appropriate theme location. ', 'ubermenu'), 'screen' => 'nav-menus', 'id' => 'menu-locations-wrap', ); $pause[] = $k; $steps[$k++] = array( 'idclass' => 'control_panel', 'title' => __( 'Next, configure UberMenu' , 'ubermenu' ), 'desc' => __( 'Navigate to Appearance > UberMenu to configure UberMenu\'s settings' , 'ubermenu' ). 'UberMenu Control Panel', 'screen' => 'themes', 'id' => 'menu-appearance', 'ops' => 'tipLocation:right;', ); $steps[$k++] = array( 'idclass' => 'orientation', 'title' => __( 'Select your menu orientation', 'ubermenu' ), 'desc' => __( 'Decide whether your menu should be vertically or horizontally oriented' , 'ubermenu' ), 'screen' => 'themes', 'id' => 'container-wpmega-orientation', 'ops' => 'tipAdjustmentY:-40', ); $steps[$k++] = array( 'idclass' => 'resources', 'title' => __( 'Resources: Knowledgebase, Video Tutorials, Support Forum', 'ubermenu' ), 'desc' => __( 'Access the Knowledgebase, Video Tutorials, Troubleshooter, Customization Assistant, and Support Forum right from the Control Panel.' , 'ubermenu' ), 'screen' => 'themes', 'class' => 'spark-nav-footer', 'ops' => 'tipLocation:right;', ); $steps[$k++] = array( 'idclass' => 'extensions', 'title' => __( 'Get more out of UberMenu', 'ubermenu' ), 'desc' => __( 'Extend the functionality of UberMenu with free and premium Extensions like Sticky Menus, Icons, Skin Packs, and more.' , 'ubermenu' ), 'screen' => 'themes', 'id' => 'spark-panel-extensions', 'ops' => 'tipLocation:right;tipAdjustmentY:-50;', ); $steps[$k++] = array( 'idclass' => 'goodbye', 'title' => __( 'Thanks for using UberMenu!', 'ubermenu' ), 'desc' => __( 'Have a question? Don\'t forget to check out all the resources in the Knowledgebase for instant answers! If you get stuck, visit us in the Support Forum' , 'ubermenu' ), 'screen' => 'themes', 'button' => __( 'End Tour' , 'ubermenu' ), ); $screen_start_index = 0; if( $screen_id == 'nav-menus' ){ if( isset( $_GET['action'] ) && $_GET['action'] == 'locations' ){ $screen_start_index = 4; } else{ $screen_start_index = 0; } } else if( $screen_id == 'appearance_page_uber-menu' ){ $screen_start_index = 6; } ?>