diff --git a/wp-content/themes/twentyeleven/inc/theme-options.php b/wp-content/themes/twentyeleven/inc/theme-options.php index de375d1497..e5acbf2b39 100644 --- a/wp-content/themes/twentyeleven/inc/theme-options.php +++ b/wp-content/themes/twentyeleven/inc/theme-options.php @@ -107,20 +107,34 @@ function twentyeleven_theme_options_add_page() { if ( ! $theme_page ) return; - $help = '

' . __( 'Some themes provide customization options that are grouped together on a Theme Options screen. If you change themes, options may change or disappear, as they are theme-specific. Your current theme, Twenty Eleven, provides the following Theme Options:', 'twentyeleven' ) . '

' . + add_action( "load-$theme_page", 'twentyeleven_theme_options_help' ); +} +add_action( 'admin_menu', 'twentyeleven_theme_options_add_page' ); + +function twentyeleven_theme_options_help() { + if ( ! method_exists( get_current_screen(), 'add_help_tab' ) ) + return; + + get_current_screen()->add_help_tab( array( + 'title' => __('Screen Info'), + 'id' => 'theme-options-help', + 'content' => + '

' . __( 'Some themes provide customization options that are grouped together on a Theme Options screen. If you change themes, options may change or disappear, as they are theme-specific. Your current theme, Twenty Eleven, provides the following Theme Options:', 'twentyeleven' ) . '

' . '
    ' . '
  1. ' . __( 'Color Scheme: You can choose a color palette of "Light" (light background with dark text) or "Dark" (dark background with light text) for your site.', 'twentyeleven' ) . '
  2. ' . '
  3. ' . __( 'Link Color: You can choose the color used for text links on your site. You can enter the HTML color or hex code, or you can choose visually by clicking the "Select a Color" button to pick from a color wheel.', 'twentyeleven' ) . '
  4. ' . '
  5. ' . __( 'Default Layout: You can choose if you want your site’s default layout to have a sidebar on the left, the right, or not at all.', 'twentyeleven' ) . '
  6. ' . '
' . - '

' . __( 'Remember to click "Save Changes" to save any changes you have made to the theme options.', 'twentyeleven' ) . '

' . - '

' . __( 'For more information:', 'twentyeleven' ) . '

' . - '

' . __( 'Documentation on Theme Options', 'twentyeleven' ) . '

' . - '

' . __( 'Support Forums', 'twentyeleven' ) . '

'; + '

' . __( 'Remember to click "Save Changes" to save any changes you have made to the theme options.', 'twentyeleven' ) . '

' + ) + ); - add_contextual_help( $theme_page, $help ); + get_current_screen()->set_help_sidebar( + '

' . __( 'For more information:', 'twentyeleven' ) . '

' . + '

' . __( 'Documentation on Theme Options', 'twentyeleven' ) . '

' . + '

' . __( 'Support Forums', 'twentyeleven' ) . '

' + ); } -add_action( 'admin_menu', 'twentyeleven_theme_options_add_page' ); /** * Returns an array of color schemes registered for Twenty Eleven.