Make WordPress Core

Ticket #17357: 17357.3.diff

File 17357.3.diff, 3.3 KB (added by sbressler, 14 years ago)

Updated diff with Jane's text

  • wp-content/themes/twentyeleven/inc/theme-options.php

     
    7474add_filter( 'option_page_capability_twentyeleven_options', 'twentyeleven_option_page_capability' );
    7575
    7676/**
    77  * Add our theme options page to the admin menu.
     77 * Add our theme options page to the admin menu, including some help documentation.
    7878 *
    7979 * This function is attached to the admin_menu action hook.
    8080 *
    8181 * @since Twenty Eleven 1.0
    8282 */
    8383function twentyeleven_theme_options_add_page() {
    84         add_theme_page(
     84        $theme_page = add_theme_page(
    8585                __( 'Theme Options', 'twentyeleven' ), // Name of page
    8686                __( 'Theme Options', 'twentyeleven' ), // Label in menu
    8787                'edit_theme_options',                  // Capability required
    8888                'theme_options',                       // Menu slug, used to uniquely identify the page
    8989                'theme_options_render_page'            // Function that renders the options page
    9090        );
     91        $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:' ) . '</p>' .
     92                        '<ol>' .
     93                                '<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.' ) . '</li>' .
     94                                '<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.' ) . '</li>' .
     95                                '<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.' ) . '</li>' .
     96                        '</ol>' .
     97                        '<p>' . __( 'Remember to click "Save Changes" to save any changes you have made to the theme options.' ) . '</p>' .
     98                        '<p><strong>' . __('For more information:') . '</strong></p>' .
     99                        '<p>' . __( '<a href="http://codex.wordpress.org/Appearance_Theme_Options_Screen" target="_blank">Documentation on Theme Options</a>' ) . '</p>' .
     100                        '<p>' . __( '<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>' ) . '</p>';
     101
     102        add_contextual_help( $theme_page, $help );
    91103}
    92104add_action( 'admin_menu', 'twentyeleven_theme_options_add_page' );
    93105
     
    132144                ),
    133145                'content' => array(
    134146                        'value' => 'content',
    135                         'label' => __( 'One-column, no Sidebar', 'twentyeleven' ),
     147                        'label' => __( 'One-column, no sidebar', 'twentyeleven' ),
    136148                        'thumbnail' => get_template_directory_uri() . '/inc/images/content.png',
    137149                ),
    138150        );
     
    220232                                        </td>
    221233                                </tr>
    222234
    223                                 <tr valign="top" class="image-radio-option"><th scope="row"><?php _e( 'Layout', 'twentyeleven' ); ?></th>
     235                                <tr valign="top" class="image-radio-option"><th scope="row"><?php _e( 'Default Layout', 'twentyeleven' ); ?></th>
    224236                                        <td>
    225237                                                <fieldset><legend class="screen-reader-text"><span><?php _e( 'Color Scheme', 'twentyeleven' ); ?></span></legend>
    226238                                                <?php