Changeset 17987
- Timestamp:
- 05/22/2011 09:32:44 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-content/themes/twentyeleven/inc/theme-options.php
r17959 r17987 54 54 } 55 55 add_action( 'admin_init', 'twentyeleven_theme_options_init' ); 56 57 /** 58 * Change the capability required to save the 'twentyeleven_options' options group. 59 * 60 * @see twentyeleven_theme_options_init() First parameter to register_setting() is the name of the options group. 61 * @see twentyeleven_theme_options_add_page() The edit_theme_options capability is used for viewing the page. 62 * 63 * By default, the options groups for all registered settings require the manage_options capability. 64 * This filter is required to change our theme options page to edit_theme_options instead. 65 * By default, only administrators have either of these capabilities, but the desire here is 66 * to allow for finer-grained control for roles and users. 67 * 68 * @param string $capability The capability used for the page, which is manage_options by default. 69 * @return string The capability to actually use. 70 */ 71 function twentyeleven_option_page_capability( $capability ) { 72 return 'edit_theme_options'; 73 } 74 add_filter( 'option_page_capability_twentyeleven_options', 'twentyeleven_option_page_capability' ); 56 75 57 76 /**
Note: See TracChangeset
for help on using the changeset viewer.