Make WordPress Core


Ignore:
Timestamp:
04/29/2013 12:26:49 AM (13 years ago)
Author:
SergeyBiryukov
Message:

Remove extraneous function parameters in the network admin. props rlerdorf. see #24210.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/network/site-settings.php

    r23567 r24120  
    5050        switch_to_blog( $id );
    5151
    52         $c = 1;
    53         $count = count( $_POST['option'] );
    5452        $skip_options = array( 'allowedthemes' ); // Don't update these options since they are handled elsewhere in the form.
    5553        foreach ( (array) $_POST['option'] as $key => $val ) {
     
    5856                if ( $key === 0 || is_array( $val ) || in_array($key, $skip_options) )
    5957                        continue; // Avoids "0 is a protected WP option and may not be modified" error when edit blog options
    60                 if ( $c == $count )
    61                         update_option( $key, $val );
    62                 else
    63                         update_option( $key, $val, false ); // no need to refresh blog details yet
    64                 $c++;
     58                update_option( $key, $val );
    6559        }
    6660
     
    124118                        if ( is_serialized( $option->option_value ) ) {
    125119                                if ( is_serialized_string( $option->option_value ) ) {
    126                                         $option->option_value = esc_html( maybe_unserialize( $option->option_value ), 'single' );
     120                                        $option->option_value = esc_html( maybe_unserialize( $option->option_value ) );
    127121                                } else {
    128122                                        $option->option_value = 'SERIALIZED DATA';
Note: See TracChangeset for help on using the changeset viewer.