twentyeleven_theme_options_help

The Twenty Eleven twentyeleven theme options help function.

Description

twentyeleven_theme_options_help(); 

Usage

  1. if ( !function_exists( 'twentyeleven_theme_options_help' ) ) { 
  2. require_once '/inc/theme-options.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = twentyeleven_theme_options_help(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/inc/theme-options.php  
  1. function twentyeleven_theme_options_help() { 
  2.  
  3. $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>' . 
  4. '<ol>' . 
  5. '<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>' . 
  6. '<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>' . 
  7. '<li>' . __( '<strong>Default Layout</strong>: 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' ) . '</li>' . 
  8. '</ol>' . 
  9. '<p>' . __( 'Remember to click "Save Changes" to save any changes you have made to the theme options.', 'twentyeleven' ) . '</p>'; 
  10.  
  11. $sidebar = '<p><strong>' . __( 'For more information:', 'twentyeleven' ) . '</strong></p>' . 
  12. '<p>' . __( '<a href="https://codex.wordpress.org/Appearance_Theme_Options_Screen" target="_blank">Documentation on Theme Options</a>', 'twentyeleven' ) . '</p>' . 
  13. '<p>' . __( '<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>', 'twentyeleven' ) . '</p>'; 
  14.  
  15. $screen = get_current_screen(); 
  16.  
  17. if ( method_exists( $screen, 'add_help_tab' ) ) { 
  18. // WordPress 3.3.0 
  19. $screen->add_help_tab( array( 
  20. 'title' => __( 'Overview', 'twentyeleven' ),  
  21. 'id' => 'theme-options-help',  
  22. 'content' => $help,  
  23. ); 
  24.  
  25. $screen->set_help_sidebar( $sidebar ); 
  26. } else { 
  27. // WordPress 3.2.0 
  28. add_contextual_help( $screen, $help . $sidebar );