Add braces missed while adding docs for the option_page_capability_{$option_page}
hook.
See [25372]. See #25229. git-svn-id: https://develop.svn.wordpress.org/trunk@28833 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
1c947d9ef1
commit
8130335b9d
@ -26,9 +26,10 @@ wp_reset_vars(array('action', 'option_page'));
|
||||
|
||||
$capability = 'manage_options';
|
||||
|
||||
if ( empty($option_page) ) // This is for back compat and will eventually be removed.
|
||||
// This is for back compat and will eventually be removed.
|
||||
if ( empty($option_page) ) {
|
||||
$option_page = 'options';
|
||||
else
|
||||
} else {
|
||||
|
||||
/**
|
||||
* Filter the capability required when using the Settings API.
|
||||
@ -41,6 +42,7 @@ else
|
||||
* @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 ) )
|
||||
wp_die(__('Cheatin’ uh?'));
|
||||
|
Loading…
Reference in New Issue
Block a user