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:
Ryan Boren 2008-10-20 00:40:36 +00:00
parent f38fd1b3b6
commit 5502674e40
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.' ) );