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/network/users.php

    r47198 r47219  
    2828
    2929                        $id = intval( $_GET['id'] );
    30                         if ( $id != '0' && $id != '1' ) {
     30                        if ( '0' != $id && '1' != $id ) {
    3131                                $_POST['allusers'] = array( $id ); // confirm_delete_users() can only handle arrays.
    3232                                $title             = __( 'Users' );
     
    5050                                check_admin_referer( 'bulk-users-network' );
    5151
    52                                 $doaction     = $_POST['action'] != -1 ? $_POST['action'] : $_POST['action2'];
     52                                $doaction     = -1 != $_POST['action'] ? $_POST['action'] : $_POST['action2'];
    5353                                $userfunction = '';
    5454
     
    8585
    8686                                                                foreach ( (array) $blogs as $details ) {
    87                                                                         if ( $details->userblog_id != get_network()->site_id ) { // Main blog is not a spam!
     87                                                                        if ( get_network()->site_id != $details->userblog_id ) { // Main blog is not a spam!
    8888                                                                                update_blog_status( $details->userblog_id, 'spam', '1' );
    8989                                                                        }
     
    177177                        }
    178178
    179                         if ( $i == 1 ) {
     179                        if ( 1 == $i ) {
    180180                                $deletefunction = 'delete';
    181181                        } else {
     
    240240require_once ABSPATH . 'wp-admin/admin-header.php';
    241241
    242 if ( isset( $_REQUEST['updated'] ) && $_REQUEST['updated'] == 'true' && ! empty( $_REQUEST['action'] ) ) {
     242if ( isset( $_REQUEST['updated'] ) && 'true' == $_REQUEST['updated'] && ! empty( $_REQUEST['action'] ) ) {
    243243        ?>
    244244        <div id="message" class="updated notice is-dismissible"><p>
Note: See TracChangeset for help on using the changeset viewer.