Make WordPress Core

Ticket #19020: 19020.diff

File 19020.diff, 3.2 KB (added by ryan, 14 years ago)
  • wp-content/themes/twentyeleven/inc/theme-options.php

     
    107107        if ( ! $theme_page )
    108108                return;
    109109
    110         $help = '<p>' . __( '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' ) . '</p>' .
     110        add_action( "load-$theme_page", 'twentyeleven_theme_options_help' );
     111}
     112add_action( 'admin_menu', 'twentyeleven_theme_options_add_page' );
     113
     114function twentyeleven_theme_options_help() {
     115        get_current_screen()->add_help_tab( array(
     116                'title' => __( 'Help' ),
     117                'id' => 'theme-options-help',
     118                'content' =>
     119                        '<p>' . __( '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' ) . '</p>' .
    111120                        '<ol>' .
    112121                                '<li>' . __( '<strong>Color Scheme</strong>: You can choose a color palette of "Light" (light background with dark text) or "Dark" (dark background with light text) for your site.', 'twentyeleven' ) . '</li>' .
    113122                                '<li>' . __( '<strong>Link Color</strong>: 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' ) . '</li>' .
    114123                                '<li>' . __( '<strong>Default Layout</strong>: You can choose if you want your site&#8217;s default layout to have a sidebar on the left, the right, or not at all.', 'twentyeleven' ) . '</li>' .
    115124                        '</ol>' .
    116                         '<p>' . __( 'Remember to click "Save Changes" to save any changes you have made to the theme options.', 'twentyeleven' ) . '</p>' .
    117                         '<p><strong>' . __( 'For more information:', 'twentyeleven' ) . '</strong></p>' .
    118                         '<p>' . __( '<a href="http://codex.wordpress.org/Appearance_Theme_Options_Screen" target="_blank">Documentation on Theme Options</a>', 'twentyeleven' ) . '</p>' .
    119                         '<p>' . __( '<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>', 'twentyeleven' ) . '</p>';
     125                        '<p>' . __( 'Remember to click "Save Changes" to save any changes you have made to the theme options.', 'twentyeleven' ) . '</p>'
     126                )
     127        );
    120128
    121         add_contextual_help( $theme_page, $help );
     129        get_current_screen()->set_help_sidebar(
     130                '<p><strong>' . __( 'For more information:', 'twentyeleven' ) . '</strong></p>' .
     131                '<p>' . __( '<a href="http://codex.wordpress.org/Appearance_Theme_Options_Screen" target="_blank">Documentation on Theme Options</a>', 'twentyeleven' ) . '</p>' .
     132                '<p>' . __( '<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>', 'twentyeleven' ) . '</p>'
     133        );
    122134}
    123 add_action( 'admin_menu', 'twentyeleven_theme_options_add_page' );
    124135
    125136/**
    126137 * Returns an array of color schemes registered for Twenty Eleven.