Changeset 47853 for trunk/src/wp-admin/network/site-settings.php
- Timestamp:
- 05/24/2020 09:14:21 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/network/site-settings.php
r47550 r47853 35 35 $is_main_site = is_main_site( $id ); 36 36 37 if ( isset( $_REQUEST['action'] ) && 'update-site' == $_REQUEST['action'] && is_array( $_POST['option'] ) ) {37 if ( isset( $_REQUEST['action'] ) && 'update-site' === $_REQUEST['action'] && is_array( $_POST['option'] ) ) { 38 38 check_admin_referer( 'edit-site' ); 39 39 … … 45 45 $val = wp_unslash( $val ); 46 46 if ( 0 === $key || is_array( $val ) || in_array( $key, $skip_options, true ) ) { 47 continue; // Avoids "0 is a protected WP option and may not be modified" error when edit blog options.47 continue; // Avoids "0 is a protected WP option and may not be modified" error when editing blog options. 48 48 } 49 49 update_option( $key, $val ); … … 75 75 if ( isset( $_GET['update'] ) ) { 76 76 $messages = array(); 77 if ( 'updated' == $_GET['update'] ) {77 if ( 'updated' === $_GET['update'] ) { 78 78 $messages[] = __( 'Site options updated.' ); 79 79 } … … 124 124 ); 125 125 $options = $wpdb->get_results( $query ); 126 126 127 foreach ( $options as $option ) { 127 128 if ( 'default_role' === $option->option_name ) { 128 129 $editblog_default_role = $option->option_value; 129 130 } 131 130 132 $disabled = false; 131 133 $class = 'all-options'; 134 132 135 if ( is_serialized( $option->option_value ) ) { 133 136 if ( is_serialized_string( $option->option_value ) ) { … … 139 142 } 140 143 } 144 141 145 if ( strpos( $option->option_value, "\n" ) !== false ) { 142 146 ?> … … 159 163 } 160 164 } // End foreach. 165 161 166 /** 162 167 * Fires at the end of the Edit Site form, before the submit button.
Note: See TracChangeset
for help on using the changeset viewer.