mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-22 08:11:52 +01:00
Remove extraneous function parameters in the network admin. props rlerdorf. see #24210.
git-svn-id: http://core.svn.wordpress.org/trunk@24120 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
45ccae1092
commit
a419c1810b
@ -49,19 +49,13 @@ if ( isset($_REQUEST['action']) && 'update-site' == $_REQUEST['action'] && is_ar
|
|||||||
|
|
||||||
switch_to_blog( $id );
|
switch_to_blog( $id );
|
||||||
|
|
||||||
$c = 1;
|
|
||||||
$count = count( $_POST['option'] );
|
|
||||||
$skip_options = array( 'allowedthemes' ); // Don't update these options since they are handled elsewhere in the form.
|
$skip_options = array( 'allowedthemes' ); // Don't update these options since they are handled elsewhere in the form.
|
||||||
foreach ( (array) $_POST['option'] as $key => $val ) {
|
foreach ( (array) $_POST['option'] as $key => $val ) {
|
||||||
$key = wp_unslash( $key );
|
$key = wp_unslash( $key );
|
||||||
$val = wp_unslash( $val );
|
$val = wp_unslash( $val );
|
||||||
if ( $key === 0 || is_array( $val ) || in_array($key, $skip_options) )
|
if ( $key === 0 || is_array( $val ) || in_array($key, $skip_options) )
|
||||||
continue; // Avoids "0 is a protected WP option and may not be modified" error when edit blog options
|
continue; // Avoids "0 is a protected WP option and may not be modified" error when edit blog options
|
||||||
if ( $c == $count )
|
|
||||||
update_option( $key, $val );
|
update_option( $key, $val );
|
||||||
else
|
|
||||||
update_option( $key, $val, false ); // no need to refresh blog details yet
|
|
||||||
$c++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
do_action( 'wpmu_update_blog_options' );
|
do_action( 'wpmu_update_blog_options' );
|
||||||
@ -123,7 +117,7 @@ if ( ! empty( $messages ) ) {
|
|||||||
$class = 'all-options';
|
$class = 'all-options';
|
||||||
if ( is_serialized( $option->option_value ) ) {
|
if ( is_serialized( $option->option_value ) ) {
|
||||||
if ( is_serialized_string( $option->option_value ) ) {
|
if ( is_serialized_string( $option->option_value ) ) {
|
||||||
$option->option_value = esc_html( maybe_unserialize( $option->option_value ), 'single' );
|
$option->option_value = esc_html( maybe_unserialize( $option->option_value ) );
|
||||||
} else {
|
} else {
|
||||||
$option->option_value = 'SERIALIZED DATA';
|
$option->option_value = 'SERIALIZED DATA';
|
||||||
$disabled = true;
|
$disabled = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user