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/sites.php

    r47198 r47219  
    142142
    143143            $updated_action = 'not_deleted';
    144             if ( $id != '0' && $id != get_network()->site_id && current_user_can( 'delete_site', $id ) ) {
     144            if ( '0' != $id && get_network()->site_id != $id && current_user_can( 'delete_site', $id ) ) {
    145145                wpmu_delete_blog( $id, true );
    146146                $updated_action = 'delete';
     
    154154                $site_id = (int) $site_id;
    155155
    156                 if ( $site_id == get_network()->site_id ) {
     156                if ( get_network()->site_id == $site_id ) {
    157157                    continue;
    158158                }
     
    179179        case 'allblogs':
    180180            if ( ( isset( $_POST['action'] ) || isset( $_POST['action2'] ) ) && isset( $_POST['allblogs'] ) ) {
    181                 $doaction = $_POST['action'] != -1 ? $_POST['action'] : $_POST['action2'];
     181                $doaction = -1 != $_POST['action'] ? $_POST['action'] : $_POST['action2'];
    182182
    183183                foreach ( (array) $_POST['allblogs'] as $key => $val ) {
    184                     if ( $val != '0' && $val != get_network()->site_id ) {
     184                    if ( '0' != $val && get_network()->site_id != $val ) {
    185185                        switch ( $doaction ) {
    186186                            case 'delete':
Note: See TracChangeset for help on using the changeset viewer.