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:
ryan 2008-10-20 00:40:36 +00:00
parent 91f0787cfb
commit 7e0e1ac42d
1 changed files with 8 additions and 2 deletions

View File

@ -41,8 +41,14 @@ if ( !current_user_can('manage_options') )
switch($action) {
case 'update':
$option_page = $_POST[ 'option_page' ];
check_admin_referer( $option_page . '-options' );
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.' ) );