WordPress.org

Make WordPress Core

Changeset 18101


Ignore:
Timestamp:
06/01/11 19:28:42 (3 years ago)
Author:
ryan
Message:

Contextual help for twentyeleven's theme options screen. Props sbressler, dougwrites, jane. fixes #17357

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-content/themes/twentyeleven/inc/theme-options.php

    r18072 r18101  
    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. 
     
    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 
     
    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' ); 
     
    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        ), 
     
    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> 
Note: See TracChangeset for help on using the changeset viewer.