From 5502674e403ada9852fc1fae3004aee0d629bd92 Mon Sep 17 00:00:00 2001 From: Ryan Boren 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: https://develop.svn.wordpress.org/trunk@9250 602fd350-edb4-49c9-b593-d223f7449a82 --- 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 235410a654..62eeb3dd18 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.' ) );