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

    r47156 r47219  
    7171                if (
    7272                        ( is_multisite() && current_user_can( 'manage_network_users' ) ) ||
    73                         $user_id !== get_current_user_id() ||
     73                        get_current_user_id() !== $user_id ||
    7474                        ( $potential_role && $potential_role->has_cap( 'promote_users' ) )
    7575                ) {
     
    8282        }
    8383        if ( isset( $_POST['url'] ) ) {
    84                 if ( empty( $_POST['url'] ) || $_POST['url'] == 'http://' ) {
     84                if ( empty( $_POST['url'] ) || 'http://' === $_POST['url'] ) {
    8585                        $user->user_url = '';
    8686                } else {
     
    144144
    145145        /* checking that username has been typed */
    146         if ( $user->user_login == '' ) {
     146        if ( '' == $user->user_login ) {
    147147                $errors->add( 'user_login', __( '<strong>Error</strong>: Please enter a username.' ) );
    148148        }
Note: See TracChangeset for help on using the changeset viewer.