Don't require use of options whitelisting. Will give plugins more notice.
git-svn-id: https://develop.svn.wordpress.org/trunk@9250 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
f38fd1b3b6
commit
5502674e40
@ -41,8 +41,14 @@ if ( !current_user_can('manage_options') )
|
||||
switch($action) {
|
||||
|
||||
case 'update':
|
||||
if ( isset($_POST[ 'option_page' ]) ) {
|
||||
$option_page = $_POST[ 'option_page' ];
|
||||
check_admin_referer( $option_page . '-options' );
|
||||
} else {
|
||||
// This is for back compat and will eventually be removed.
|
||||
$option_page = 'options';
|
||||
check_admin_referer( 'update-options' );
|
||||
}
|
||||
|
||||
if ( !isset( $whitelist_options[ $option_page ] ) )
|
||||
wp_die( __( 'Error! Options page not found.' ) );
|
||||
|
Loading…
Reference in New Issue
Block a user