Fix branching, and correct deprecated version numbers. see #11730

git-svn-id: https://develop.svn.wordpress.org/trunk@13721 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2010-03-16 20:59:26 +00:00
parent d504e9c257
commit 3b60c95996

View File

@ -107,12 +107,13 @@ if ( 'update' == $action ) {
if ( !isset( $whitelist_options[ $option_page ] ) ) if ( !isset( $whitelist_options[ $option_page ] ) )
wp_die( __( 'Error: options page not found.' ) ); wp_die( __( 'Error: options page not found.' ) );
if ( 'options' == $option_page ) if ( 'options' == $option_page ) {
$options = explode(',', stripslashes( $_POST[ 'page_options' ] ));
if ( is_multisite() && ! is_super_admin() ) if ( is_multisite() && ! is_super_admin() )
wp_die( __( 'You do not have sufficient permissions to modify unregistered settings for this site.' ) ); wp_die( __( 'You do not have sufficient permissions to modify unregistered settings for this site.' ) );
else $options = explode( ',', stripslashes( $_POST[ 'page_options' ] ) );
} else {
$options = $whitelist_options[ $option_page ]; $options = $whitelist_options[ $option_page ];
}
// Handle custom date/time formats // Handle custom date/time formats
if ( 'general' == $option_page ) { if ( 'general' == $option_page ) {
@ -134,11 +135,11 @@ if ( 'update' == $action ) {
$whitelist_check = true; $whitelist_check = true;
} else { } else {
$whitelist_check = false; $whitelist_check = false;
_deprecated_argument( 'options.php', '2.6', __( 'Unregistered settings are deprecated. Register your theme/plugin settings.' ) ); _deprecated_argument( 'options.php', '2.7', __( 'Unregistered settings are deprecated. Register your theme/plugin settings.' ) );
} }
foreach ( $options as $option ) { foreach ( $options as $option ) {
if ( $whitelist_check && !in_array( $option, $registered ) ) { if ( $whitelist_check && !in_array( $option, $registered ) ) {
_deprecated_argument( 'options.php', '2.6', __( 'Unregistered settings are deprecated. Register your theme/plugin settings.' ) ); _deprecated_argument( 'options.php', '2.7', __( 'Unregistered settings are deprecated. Register your theme/plugin settings.' ) );
$whitelist_check = false; $whitelist_check = false;
} }
$option = trim($option); $option = trim($option);