Coding Standards: Use Yoda conditions where appropriate.

See #49222.
Built from https://develop.svn.wordpress.org/trunk@47219


git-svn-id: http://core.svn.wordpress.org/trunk@47019 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov
2020-02-09 16:55:09 +00:00
parent 5e6c949861
commit 641c632b0c
125 changed files with 555 additions and 555 deletions

View File

@@ -141,7 +141,7 @@ if ( isset( $_GET['action'] ) ) {
}
$updated_action = 'not_deleted';
if ( $id != '0' && $id != get_network()->site_id && current_user_can( 'delete_site', $id ) ) {
if ( '0' != $id && get_network()->site_id != $id && current_user_can( 'delete_site', $id ) ) {
wpmu_delete_blog( $id, true );
$updated_action = 'delete';
}
@@ -153,7 +153,7 @@ if ( isset( $_GET['action'] ) ) {
foreach ( (array) $_POST['site_ids'] as $site_id ) {
$site_id = (int) $site_id;
if ( $site_id == get_network()->site_id ) {
if ( get_network()->site_id == $site_id ) {
continue;
}
@@ -178,10 +178,10 @@ if ( isset( $_GET['action'] ) ) {
case 'allblogs':
if ( ( isset( $_POST['action'] ) || isset( $_POST['action2'] ) ) && isset( $_POST['allblogs'] ) ) {
$doaction = $_POST['action'] != -1 ? $_POST['action'] : $_POST['action2'];
$doaction = -1 != $_POST['action'] ? $_POST['action'] : $_POST['action2'];
foreach ( (array) $_POST['allblogs'] as $key => $val ) {
if ( $val != '0' && $val != get_network()->site_id ) {
if ( '0' != $val && get_network()->site_id != $val ) {
switch ( $doaction ) {
case 'delete':
require_once ABSPATH . 'wp-admin/admin-header.php';