Index: wp-admin/includes/template.php =================================================================== --- wp-admin/includes/template.php (revision 21635) +++ wp-admin/includes/template.php (working copy) @@ -1707,10 +1707,12 @@ */ $registered_pointers = array( - 'index.php' => 'wp330_toolbar', - 'post-new.php' => 'wp330_media_uploader', - 'post.php' => 'wp330_media_uploader', - 'themes.php' => array( 'wp330_saving_widgets', 'wp340_customize_current_theme_link' ), + 'index.php' => array( 'wp330_toolbar', 'wp350_add_images', 'wp350_edit_menu', 'wp350_widgets' ), + 'post-new.php' => array( 'wp330_media_uploader', 'wp350_add_images_2' ), + 'post.php' => 'wp330_media_uploader', + 'themes.php' => array( 'wp330_saving_widgets', 'wp340_customize_current_theme_link', 'wp350_change_theme' ), + 'widgets.php' => 'wp350_widgets_2', + 'nav-menus.php' => 'wp350_edit_menu_2', 'appearance_page_custom-header' => 'wp340_choose_image_from_library', 'appearance_page_custom-background' => 'wp340_choose_image_from_library', ); @@ -1726,6 +1728,7 @@ 'wp330_saving_widgets' => array( 'edit_theme_options', 'switch_themes' ), 'wp340_customize_current_theme_link' => array( 'edit_theme_options' ), 'wp340_choose_image_from_library' => array( 'edit_theme_options' ), + 'wp350_change_theme' => array( 'install_themes' ) ); // Get dismissed pointers @@ -1775,24 +1778,37 @@ if ( ! options ) return; - options = $.extend( options, { - close: function() { - $.post( ajaxurl, { - pointer: '', - action: 'dismiss-wp-pointer' - }); - } - }); + + options = $.extend( options, { + close: function() { + $.post( ajaxurl, { + pointer: '', + action: 'dismiss-wp-pointer' + }); + } + }); + + + setup = function() { $('').pointer( options ).pointer('open'); + return false; }; - if ( options.position && options.position.defer_loading ) - $(window).bind( 'load.wp-pointers', setup ); - else - $(document).ready( setup ); + + if ( options.position && options.position.defer_loading ) + $(window).bind( 'load.wp-pointers', setup ); + else + $(document).ready( setup ); + + + + $('').click( setup ); + + + })( jQuery ); //]]> @@ -1873,6 +1889,90 @@ ) ); } + public static function pointer_wp350_add_images() { + $content = '
' . __( 'Select “Post” from the add new menu.' ) . '
'; + + WP_Internal_Pointers::print_js( 'pointer_wp350_add_images', '#wp-admin-bar-new-content', array( + 'content' => $content, + 'position' => array( 'edge' => 'top', 'align' => is_rtl() ? 'right' : 'left' ), + 'persistent' => true, + 'onclick_element' => '#wp350_add_images', + ) ); + } + + public static function pointer_wp350_add_images_2() { + $content = '' . __( 'You can add images, videos, pdfs, and other documents to your posts and pages by clicking this button.' ) . '
'; + + WP_Internal_Pointers::print_js( 'pointer_wp350_add_images_2', '#wp-content-media-buttons a', array( + 'content' => $content, + 'position' => array( 'edge' => is_rtl() ? 'right' : 'left', 'align' => is_rtl() ? 'right' : 'left' ), + 'persistent' => true, + ) ); + } + + public static function pointer_wp350_change_theme() { + $content = '' . __( 'Optionally, select the “Install Themes” tab to select new themes.' ) . '
'; + + WP_Internal_Pointers::print_js( 'pointer_wp350_change_theme_2', '.nav-tab:not(.nav-tab-active)', array( + 'content' => $content, + 'position' => array( 'edge' => 'top', 'align' => is_rtl() ? 'right' : 'left' ), + 'persistent' => true, + ) ); + } + + public static function pointer_wp350_widgets() { + $content = '' . __( 'Click the “Widgets” link under the appearance menu.' ) . '
'; + + WP_Internal_Pointers::print_js( 'pointer_wp350_widgets', '#menu-appearance', array( + 'content' => $content, + 'position' => array( 'edge' => is_rtl() ? 'right' : 'left', 'align' => is_rtl() ? 'right' : 'left' ), + 'persistent' => true, + 'onclick_element' => '#wp350_widgets', + ) ); + } + + public static function pointer_wp350_widgets_2() { + + $content = '' . __( 'To add new widgets, drag them from "Available widgets" to this container. Remove widgets by dragging them from this container.' ) . '
'; + + WP_Internal_Pointers::print_js( 'pointer_wp350_widgets_2', 'div.widget-liquid-right', array( + 'content' => $content, + 'position' => array( 'edge' => is_rtl() ? 'left' : 'right', 'align' => is_rtl() ? 'left' : 'right', 'offset' => '0 -200' ), + 'persistent' => true, + ) ); + } + + public static function pointer_wp350_edit_menu() { + $content = '' . __( 'Click the “Menus” link under the appearance menu.' ) . '
'; + + WP_Internal_Pointers::print_js( 'pointer_wp350_edit_menu', '#menu-appearance', array( + 'content' => $content, + 'position' => array( 'edge' => is_rtl() ? 'right' : 'left', 'align' => is_rtl() ? 'right' : 'left' ), + 'persistent' => true, + 'onclick_element' => '#wp350_edit_menu', + ) ); + } + + public static function pointer_wp350_edit_menu_2() { + if( isset( $_GET['menu'] ) && intval( $_GET['menu'] ) ) + return; + + $content = '' . __( 'Give your new menu a name, and then click the “Create Menu” button.' ) . '
'; + + WP_Internal_Pointers::print_js( 'pointer_wp350_edit_menu_2', '#menu-name', array( + 'content' => $content, + 'position' => array( 'edge' => 'top', 'align' => is_rtl() ? 'right' : 'left' ), + 'persistent' => true, + ) ); + } + /** * Prevents new users from seeing existing 'new feature' pointers. * Index: wp-admin/includes/dashboard.php =================================================================== --- wp-admin/includes/dashboard.php (revision 21635) +++ wp-admin/includes/dashboard.php (working copy) @@ -1249,75 +1249,44 @@ ?>First Steps with WordPress. If you’d rather dive right in, here are a few things most people do first when they set up a new WordPress site. If you need help, use the Help tabs in the upper right corner to get information on how to use your current screen and where to go for more assistance.' ); ?>
+ +' . __( 'change your theme completely' ) . '', esc_url( admin_url( 'themes.php?tooltip=true' ) ) ); ?>
'; - printf( __( 'Install a theme to get started customizing your site.' ), esc_url( admin_url( 'themes.php' ) ) ); - echo '
'; - else: - $customize_links = array(); - if ( 'twentyeleven' == $theme->get_stylesheet() ) - $customize_links[] = sprintf( __( 'Choose light or dark' ), esc_url( admin_url( 'themes.php?page=theme_options' ) ) ); - - if ( current_theme_supports( 'custom-background' ) ) - $customize_links[] = sprintf( __( 'Set a background color' ), esc_url( admin_url( 'themes.php?page=custom-background' ) ) ); - - if ( current_theme_supports( 'custom-header' ) ) - $customize_links[] = sprintf( __( 'Select a new header image' ), esc_url( admin_url( 'themes.php?page=custom-header' ) ) ); - - if ( current_theme_supports( 'widgets' ) ) - $customize_links[] = sprintf( __( 'Add some widgets' ), esc_url( admin_url( 'widgets.php' ) ) ); - - if ( ! empty( $customize_links ) ) { - echo ''; - printf( __( 'Use the current theme — %1$s — or choose a new one. If you stick with %1$s, here are a few ways to make your site look unique.' ), $theme->display('Name'), esc_url( admin_url( 'themes.php' ) ) ); - echo '
'; - ?> -Dismiss this message.' ), esc_url( admin_url( '?welcome=0' ) ) ); ?>