Ticket #25229: options.patch
File options.patch, 1.5 KB (added by , 11 years ago) |
---|
-
options.php
29 29 if ( empty($option_page) ) // This is for back compat and will eventually be removed. 30 30 $option_page = 'options'; 31 31 else 32 33 /** 34 * Filter the capability required when using the Settings API. 35 * 36 * By default, the options groups for all registered settings require the manage_options capability. 37 * This filter is required to change the capability required for a certain options page. 38 * 39 * @since 3.2.0 40 * 41 * @param string $capability The capability used for the page, which is manage_options by default. 42 */ 32 43 $capability = apply_filters( "option_page_capability_{$option_page}", $capability ); 33 44 34 45 if ( !current_user_can( $capability ) ) … … 95 106 } else { 96 107 $whitelist_options['general'][] = 'new_admin_email'; 97 108 $whitelist_options['general'][] = 'WPLANG'; 98 109 110 /** 111 * Toggle post-by-email functionality. 112 * 113 * @since 3.0.0 114 * 115 * @param bool True or false, based on whether post-by-email configuration is enabled or not. 116 */ 99 117 if ( apply_filters( 'enable_post_by_email_configuration', true ) ) 100 118 $whitelist_options['writing'] = array_merge($whitelist_options['writing'], $mail_options); 101 119 } 102 120 121 /** 122 * Filter the options white list. 123 * 124 * @since 2.7.0 125 * 126 * @param array White list options. 127 */ 103 128 $whitelist_options = apply_filters( 'whitelist_options', $whitelist_options ); 104 129 105 130 /*