Changeset 47808 for trunk/src/wp-admin/options.php
- Timestamp:
- 05/16/2020 06:40:52 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/options.php
r47550 r47808 65 65 wp_redirect( admin_url( $redirect ) ); 66 66 exit; 67 } elseif ( ! empty( $_GET['dismiss'] ) && 'new_admin_email' == $_GET['dismiss'] ) {67 } elseif ( ! empty( $_GET['dismiss'] ) && 'new_admin_email' === $_GET['dismiss'] ) { 68 68 check_admin_referer( 'dismiss-' . get_current_blog_id() . '-new_admin_email' ); 69 69 delete_option( 'adminhash' ); … … 205 205 $whitelist_options = apply_filters( 'whitelist_options', $whitelist_options ); 206 206 207 if ( 'update' == $action ) { // We are saving settings sent from a settings page.208 if ( 'options' == $option_page && ! isset( $_POST['option_page'] ) ) { // This is for back compat and will eventually be removed.207 if ( 'update' === $action ) { // We are saving settings sent from a settings page. 208 if ( 'options' === $option_page && ! isset( $_POST['option_page'] ) ) { // This is for back compat and will eventually be removed. 209 209 $unregistered = true; 210 210 check_admin_referer( 'update-options' ); … … 224 224 } 225 225 226 if ( 'options' == $option_page ) {226 if ( 'options' === $option_page ) { 227 227 if ( is_multisite() && ! current_user_can( 'manage_network_options' ) ) { 228 228 wp_die( __( 'Sorry, you are not allowed to modify unregistered settings for this site.' ) ); … … 233 233 } 234 234 235 if ( 'general' == $option_page ) {235 if ( 'general' === $option_page ) { 236 236 // Handle custom date/time formats. 237 if ( ! empty( $_POST['date_format'] ) && isset( $_POST['date_format_custom'] ) && '\c\u\s\t\o\m' == wp_unslash( $_POST['date_format'] ) ) { 237 if ( ! empty( $_POST['date_format'] ) && isset( $_POST['date_format_custom'] ) 238 && '\c\u\s\t\o\m' === wp_unslash( $_POST['date_format'] ) 239 ) { 238 240 $_POST['date_format'] = $_POST['date_format_custom']; 239 241 } 240 if ( ! empty( $_POST['time_format'] ) && isset( $_POST['time_format_custom'] ) && '\c\u\s\t\o\m' == wp_unslash( $_POST['time_format'] ) ) { 242 243 if ( ! empty( $_POST['time_format'] ) && isset( $_POST['time_format_custom'] ) 244 && '\c\u\s\t\o\m' === wp_unslash( $_POST['time_format'] ) 245 ) { 241 246 $_POST['time_format'] = $_POST['time_format_custom']; 242 247 } 248 243 249 // Map UTC+- timezones to gmt_offsets and set timezone_string to empty. 244 250 if ( ! empty( $_POST['timezone_string'] ) && preg_match( '/^UTC[+-]/', $_POST['timezone_string'] ) ) { … … 336 342 foreach ( (array) $options as $option ) : 337 343 $disabled = false; 338 if ( '' == $option->option_name ) { 344 345 if ( '' === $option->option_name ) { 339 346 continue; 340 347 } 348 341 349 if ( is_serialized( $option->option_value ) ) { 342 350 if ( is_serialized_string( $option->option_value ) ) { … … 355 363 $class = 'all-options'; 356 364 } 365 357 366 $name = esc_attr( $option->option_name ); 358 367 ?>
Note: See TracChangeset
for help on using the changeset viewer.