Don't require use of options whitelisting. Will give plugins more notice.
git-svn-id: http://svn.automattic.com/wordpress/trunk@9250 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
91f0787cfb
commit
7e0e1ac42d
|
@ -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