Make WordPress Core

Changeset 13646


Ignore:
Timestamp:
03/10/2010 05:44:32 PM (17 years ago)
Author:
wpmuguru
Message:

Display a warning when processing an unregistered setting, see #11730

File:
1 edited

Legend:

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

    r13627 r13646  
    121121
    122122        if ( $options ) {
     123                if ( is_array( $whitelist_options[ $option_page ] ) ) {
     124                        $registered = $whitelist_options[ $option_page ];
     125                        $whitelist_check = true;
     126                } else {
     127                        $whitelist_check = false;
     128                        _deprecated_argument( 'options.php', '2.6', __( 'Unregistered settings are deprecated. Register your theme/plugin settings.' ) );
     129                }
    123130                foreach ( $options as $option ) {
     131                        if ( $whitelist_check && !in_array( $option, $registered ) ) {
     132                                _deprecated_argument( 'options.php', '2.6', __( 'Unregistered settings are deprecated. Register your theme/plugin settings.' ) );
     133                                $whitelist_check = false;
     134                        }
    124135                        $option = trim($option);
    125136                        $value = null;
Note: See TracChangeset for help on using the changeset viewer.