Ticket #17357: 17357.diff
File 17357.diff, 4.5 KB (added by , 14 years ago) |
---|
-
wp-admin/includes/plugin.php
1063 1063 * The function which is hooked in to handle the output of the page must check 1064 1064 * that the user has the required capability as well. 1065 1065 * 1066 * This sub menu page is bundled with some help documentation that can be overriden by specific themes. 1067 * 1068 * @see add_contextual_help() 1069 * 1066 1070 * @param string $page_title The text to be displayed in the title tags of the page when the menu is selected 1067 1071 * @param string $menu_title The text to be used for the menu 1068 1072 * @param string $capability The capability required for this menu to be displayed to the user. … … 1072 1076 * @return string The resulting page's hook_suffix 1073 1077 */ 1074 1078 function add_theme_page( $page_title, $menu_title, $capability, $menu_slug, $function = '' ) { 1075 return add_submenu_page( 'themes.php', $page_title, $menu_title, $capability, $menu_slug, $function ); 1079 $theme_page = add_submenu_page( 'themes.php', $page_title, $menu_title, $capability, $menu_slug, $function ); 1080 add_contextual_help( $theme_page, 1081 '<p>' . __( 'Theme options allow you to customize certain settings available for an individual theme, such as its look and feel.' ) . '</p>' . 1082 '<p><strong>' . __( 'For more information:' ) . '</strong></p>' . 1083 '<p>' . __( '<a href="http://codex.wordpress.org/Appearance_Theme_Options_Screen" target="_blank">Documentation on Theme Options</a>' ) . '</p>' . 1084 '<p>' . __( '<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>' ) . '</p>' 1085 ); 1086 return $theme_page; 1076 1087 } 1077 1088 1078 1089 /** -
wp-content/themes/twentyeleven/inc/theme-options.php
55 55 add_action( 'admin_init', 'twentyeleven_theme_options_init' ); 56 56 57 57 /** 58 * Add our theme options page to the admin menu .58 * Add our theme options page to the admin menu, including some help documentation. 59 59 * 60 60 * This function is attached to the admin_menu action hook. 61 61 * 62 62 * @since Twenty Eleven 1.0 63 63 */ 64 64 function twentyeleven_theme_options_add_page() { 65 add_theme_page(65 $theme_page = add_theme_page( 66 66 __( 'Theme Options', 'twentyeleven' ), // Name of page 67 67 __( 'Theme Options', 'twentyeleven' ), // Label in menu 68 68 'edit_theme_options', // Capability required 69 69 'theme_options', // Menu slug, used to uniquely identify the page 70 70 'theme_options_render_page' // Function that renders the options page 71 71 ); 72 $help = '<p>' . __( 'This Theme Options screen, as enabled by your theme, Twenty Eleven, allows you to change some settings regarding the theme’s color and layout.') . '</p>' . 73 '<p>' . __( 'You can toggle between Light or Dark text areas for your site in Color Scheme, with contrasting letters. Colors could be further changed or examined in the theme’s CSS via Appearance > Editor. The color for links can be set to specific values or using a color wheel by clicking on the color patch or "Select a Color" button.' ) . '</p>' . 74 '<p>' . __( 'There are three options for the theme’s layout (each containing the same header):' ) . '</p>' . 75 '<ol>' . 76 '<li>' . __( 'Main content on left, sidebar on right' ) . '</li>' . 77 '<li>' . __( 'Main content on right, sidebar on left' ) . '</li>' . 78 '<li>' . __( 'Main content spans the entire site’s width, no sidebar' ) . '</li>' . 79 '</ol>' . 80 '<p>' . __( 'Remember to click "Save Changes" to save any changes you have made to the theme’s options.' ) . '</p>' . 81 '<p><strong>' . __('For more information:') . '</strong></p>' . 82 '<p>' . __( '<a href="http://codex.wordpress.org/Appearance_Theme_Options_Screen" target="_blank">Documentation on Theme Options</a>' ) . '</p>' . 83 '<p>' . __( '<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>' ) . '</p>'; 84 85 add_contextual_help( $theme_page, $help ); 72 86 } 73 87 add_action( 'admin_menu', 'twentyeleven_theme_options_add_page' ); 74 88 … … 113 127 ), 114 128 'content' => array( 115 129 'value' => 'content', 116 'label' => __( 'One-column, no Sidebar', 'twentyeleven' ),130 'label' => __( 'One-column, no sidebar', 'twentyeleven' ), 117 131 'thumbnail' => get_template_directory_uri() . '/inc/images/content.png', 118 132 ), 119 133 );