Make WordPress Core


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

Coding Standards: Use Yoda conditions where appropriate.

See #49222.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-network-query.php

    r47122 r47219  
    546546
    547547                $parsed = false;
    548                 if ( $orderby == 'network__in' ) {
     548                if ( 'network__in' === $orderby ) {
    549549                        $network__in = implode( ',', array_map( 'absint', $this->query_vars['network__in'] ) );
    550550                        $parsed      = "FIELD( {$wpdb->site}.id, $network__in )";
    551                 } elseif ( $orderby == 'domain_length' || $orderby == 'path_length' ) {
     551                } elseif ( 'domain_length' === $orderby || 'path_length' === $orderby ) {
    552552                        $field  = substr( $orderby, 0, -7 );
    553553                        $parsed = "CHAR_LENGTH($wpdb->site.$field)";
Note: See TracChangeset for help on using the changeset viewer.