From 7e0e1ac42de80c143ea534c3a900c1a64c8d4ee0 Mon Sep 17 00:00:00 2001 From: ryan Date: Mon, 20 Oct 2008 00:40:36 +0000 Subject: [PATCH] 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 --- wp-admin/options.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/wp-admin/options.php b/wp-admin/options.php index 235410a65..62eeb3dd1 100644 --- a/wp-admin/options.php +++ b/wp-admin/options.php @@ -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.' ) );