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-includes/class-wp-user.php

    r47122 r47219  
    494494    public function get_role_caps() {
    495495        $switch_site = false;
    496         if ( is_multisite() && $this->site_id != get_current_blog_id() ) {
     496        if ( is_multisite() && get_current_blog_id() != $this->site_id ) {
    497497            $switch_site = true;
    498498
     
    591591     */
    592592    public function set_role( $role ) {
    593         if ( 1 == count( $this->roles ) && $role == current( $this->roles ) ) {
     593        if ( 1 == count( $this->roles ) && current( $this->roles ) == $role ) {
    594594            return;
    595595        }
Note: See TracChangeset for help on using the changeset viewer.