Make WordPress Core


Ignore:
Timestamp:
02/09/2020 04:52:28 PM (5 years ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Use Yoda conditions where appropriate.

See #49222.

File:
1 edited

Legend:

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

    r47198 r47219  
    4444        $key = wp_unslash( $key );
    4545        $val = wp_unslash( $val );
    46         if ( $key === 0 || is_array( $val ) || in_array( $key, $skip_options ) ) {
     46        if ( 0 === $key || is_array( $val ) || in_array( $key, $skip_options ) ) {
    4747            continue; // Avoids "0 is a protected WP option and may not be modified" error when edit blog options.
    4848        }
     
    125125        $options     = $wpdb->get_results( $query );
    126126        foreach ( $options as $option ) {
    127             if ( $option->option_name == 'default_role' ) {
     127            if ( 'default_role' === $option->option_name ) {
    128128                $editblog_default_role = $option->option_value;
    129129            }
Note: See TracChangeset for help on using the changeset viewer.