From fbe317f4065208af71c7de0331d2c2ade66e04f0 Mon Sep 17 00:00:00 2001 From: ryan Date: Mon, 7 May 2012 17:26:16 +0000 Subject: [PATCH] Contextual help updates for themes.php and theme-install.php. Props TomAuger. fixes #20515 git-svn-id: http://core.svn.wordpress.org/trunk@20736 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/theme-install.php | 19 +++++++++++++++---- wp-admin/themes.php | 20 +++++++++++++++++--- 2 files changed, 32 insertions(+), 7 deletions(-) diff --git a/wp-admin/theme-install.php b/wp-admin/theme-install.php index d405a588d..3534168b5 100644 --- a/wp-admin/theme-install.php +++ b/wp-admin/theme-install.php @@ -36,14 +36,25 @@ $body_id = $tab; do_action('install_themes_pre_' . $tab); //Used to override the general interface, Eg, install or theme information. -$help = '

' . sprintf(__('You can find additional themes for your site by using the Theme Browser/Installer on this screen, which will display themes from the WordPress.org Theme Directory. These themes are designed and developed by third parties, are available free of charge, and are compatible with the license WordPress uses.'), 'http://wordpress.org/extend/themes/') . '

'; -$help .= '

' . __('You can Search for themes by keyword, author, or tag, or can get more specific and search by criteria listed in the feature filter. Alternately, you can browse the themes that are Featured, Newest, or Recently Updated. When you find a theme you like, you can preview it or install it.') . '

'; -$help .= '

' . __('You can Upload a theme manually if you have already downloaded its ZIP archive onto your computer (make sure it is from a trusted and original source). You can also do it the old-fashioned way and copy a downloaded theme’s folder via FTP into your /wp-content/themes directory.') . '

'; +$help_overview = + '

' . sprintf(__('You can find additional themes for your site by using the Theme Browser/Installer on this screen, which will display themes from the WordPress.org Theme Directory. These themes are designed and developed by third parties, are available free of charge, and are compatible with the license WordPress uses.'), 'http://wordpress.org/extend/themes/') . '

' . + '

' . __('You can Search for themes by keyword, author, or tag, or can get more specific and search by criteria listed in the feature filter. Alternately, you can browse the themes that are Featured, Newest, or Recently Updated. When you find a theme you like, you can preview it or install it.') . '

' . + '

' . __('You can Upload a theme manually if you have already downloaded its ZIP archive onto your computer (make sure it is from a trusted and original source). You can also do it the old-fashioned way and copy a downloaded theme’s folder via FTP into your /wp-content/themes directory.') . '

'; get_current_screen()->add_help_tab( array( 'id' => 'overview', 'title' => __('Overview'), - 'content' => $help + 'content' => $help_overview +) ); + +$help_installing = + '

' . __('Once you have generated a list of themes, you can preview and install any of them. Click on the thumbnail of the theme you’re interested in previewing. It will open up in a full-screen Preview page to give you a better idea of how that theme will look.') . '

' . + '

' . __('To install the theme so you can preview it with your site’s content and customize its theme options, click the "Install" button at the top of the left-hand pane. The theme files will be downloaded to your website automatically. When this is complete, the theme is now available for activation, which you can do by clicking the "Activate" link, or by navigating to your Installed Themes page and clicking the "Customize" link under any installed theme’s thumbnail image.') . '

'; + +get_current_screen()->add_help_tab( array( + 'id' => 'installing', + 'title' => __('Previewing and Installing'), + 'content' => $help_installing ) ); get_current_screen()->set_help_sidebar( diff --git a/wp-admin/themes.php b/wp-admin/themes.php index 694ed0fca..8cf6d8709 100644 --- a/wp-admin/themes.php +++ b/wp-admin/themes.php @@ -38,12 +38,12 @@ $parent_file = 'themes.php'; if ( current_user_can( 'switch_themes' ) ) : $help_manage = '

' . __('Aside from the default theme included with your WordPress installation, themes are designed and developed by third parties.') . '

' . - '

' . __('You can see your active theme at the top of the screen. Below are the other themes you have installed that are not currently in use. You can see what your site would look like with one of these themes by clicking the Preview link. To change themes, click the Activate link.') . '

'; + '

' . __('You can see your active theme at the top of the screen. Below are the other themes you have installed that are not currently in use. You can see what your site would look like with one of these themes by clicking the Customize link (see "Previewing and Customizing", below). To change themes, click the Activate link.') . '

'; get_current_screen()->add_help_tab( array( 'id' => 'overview', 'title' => __('Overview'), - 'content' => $help_manage, + 'content' => $help_manage ) ); if ( current_user_can( 'install_themes' ) ) { @@ -56,7 +56,21 @@ if ( current_user_can( 'install_themes' ) ) { get_current_screen()->add_help_tab( array( 'id' => 'adding-themes', 'title' => __('Adding Themes'), - 'content' => $help_install, + 'content' => $help_install + ) ); +} + +if ( current_user_can( 'edit_theme_options' ) ) { + $help_customize = + '

' . __('Click on the "Customize" link under any theme to preview that theme and change theme options in a separate, full-screen view. Any installed theme can be previewed and customized in this way.') . '

'. + '

' . __('The theme being previewed is fully interactive — navigate to different pages to see how the theme handles posts, archives, and other page templates.') . '

' . + '

' . __('In the left-hand pane of the Theme Customizer you can edit the theme settings. The settings will differ, depending on what theme features the theme being previewed supports. To accept the new settings and activate the theme all in one step, click the "Save and Activate" button at the bottom of the left-hand sidebar.') . '

' . + '

' . __('When previewing on smaller monitors, you can use the "Collapse" icon at the bottom of the left-hand pane. This will hide the pane, giving you more room to preview your site in the new theme. To bring the pane back, click on the Collapse icon again.') . '

'; + + get_current_screen()->add_help_tab( array( + 'id' => 'customize-preview-themes', + 'title' => __('Previewing and Customizing'), + 'content' => $help_customize ) ); }