WordPress.org

Make WordPress Core

Changeset 13789


Ignore:
Timestamp:
03/21/2010 07:38:10 AM (12 years ago)
Author:
nacin
Message:

Move unregistered check to proper branch of code. prevents options.php panel from throwing errors. see #11730

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/options.php

    r13785 r13789  
    9393}
    9494
    95 /**
     95/*
    9696 * If $_GET['action'] == 'update' we are saving settings sent from a settings page
    9797 */
    9898if ( 'update' == $action ) {
    99     if ( 'options' == $option_page && !isset($_POST['option_page']) ) // This is for back compat and will eventually be removed.
     99    if ( 'options' == $option_page && !isset( $_POST['option_page'] ) ) { // This is for back compat and will eventually be removed.
     100        $unregistered = true;
    100101        check_admin_referer( 'update-options' );
    101     else
     102    } else {
     103        $unregistered = false;
    102104        check_admin_referer( $option_page . '-options' );
     105    }
    103106
    104107    if ( !isset( $whitelist_options[ $option_page ] ) )
    105108        wp_die( __( 'Error: options page not found.' ) );
    106109
    107     if ( $unregistered = ( 'options' == $option_page ) ) {
     110    if ( 'options' == $option_page ) {
    108111        if ( is_multisite() && ! is_super_admin() )
    109112            wp_die( __( 'You do not have sufficient permissions to modify unregistered settings for this site.' ) );
Note: See TracChangeset for help on using the changeset viewer.