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:
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user