Inline documentation for hooks in wp-admin/options.php.
props siobhyb. see #25229. Built from https://develop.svn.wordpress.org/trunk@25372 git-svn-id: http://core.svn.wordpress.org/trunk@25322 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
8359c66176
commit
f2391051c7
|
@ -29,6 +29,17 @@ $capability = 'manage_options';
|
|||
if ( empty($option_page) ) // This is for back compat and will eventually be removed.
|
||||
$option_page = 'options';
|
||||
else
|
||||
|
||||
/**
|
||||
* Filter the capability required when using the Settings API.
|
||||
*
|
||||
* By default, the options groups for all registered settings require the manage_options capability.
|
||||
* This filter is required to change the capability required for a certain options page.
|
||||
*
|
||||
* @since 3.2.0
|
||||
*
|
||||
* @param string $capability The capability used for the page, which is manage_options by default.
|
||||
*/
|
||||
$capability = apply_filters( "option_page_capability_{$option_page}", $capability );
|
||||
|
||||
if ( !current_user_can( $capability ) )
|
||||
|
@ -96,10 +107,24 @@ if ( !is_multisite() ) {
|
|||
$whitelist_options['general'][] = 'new_admin_email';
|
||||
$whitelist_options['general'][] = 'WPLANG';
|
||||
|
||||
/**
|
||||
* Toggle post-by-email functionality.
|
||||
*
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param bool True or false, based on whether post-by-email configuration is enabled or not.
|
||||
*/
|
||||
if ( apply_filters( 'enable_post_by_email_configuration', true ) )
|
||||
$whitelist_options['writing'] = array_merge($whitelist_options['writing'], $mail_options);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the options white list.
|
||||
*
|
||||
* @since 2.7.0
|
||||
*
|
||||
* @param array White list options.
|
||||
*/
|
||||
$whitelist_options = apply_filters( 'whitelist_options', $whitelist_options );
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue