mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 15:50:09 +00:00
Coding Standards: Use Yoda conditions where appropriate.
See #49222. git-svn-id: https://develop.svn.wordpress.org/trunk@47219 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -27,7 +27,7 @@ if ( isset( $_GET['action'] ) ) {
|
||||
check_admin_referer( 'deleteuser' );
|
||||
|
||||
$id = intval( $_GET['id'] );
|
||||
if ( $id != '0' && $id != '1' ) {
|
||||
if ( '0' != $id && '1' != $id ) {
|
||||
$_POST['allusers'] = array( $id ); // confirm_delete_users() can only handle arrays.
|
||||
$title = __( 'Users' );
|
||||
$parent_file = 'users.php';
|
||||
@@ -49,7 +49,7 @@ if ( isset( $_GET['action'] ) ) {
|
||||
if ( ( isset( $_POST['action'] ) || isset( $_POST['action2'] ) ) && isset( $_POST['allusers'] ) ) {
|
||||
check_admin_referer( 'bulk-users-network' );
|
||||
|
||||
$doaction = $_POST['action'] != -1 ? $_POST['action'] : $_POST['action2'];
|
||||
$doaction = -1 != $_POST['action'] ? $_POST['action'] : $_POST['action2'];
|
||||
$userfunction = '';
|
||||
|
||||
foreach ( (array) $_POST['allusers'] as $user_id ) {
|
||||
@@ -84,7 +84,7 @@ if ( isset( $_GET['action'] ) ) {
|
||||
$blogs = get_blogs_of_user( $user_id, true );
|
||||
|
||||
foreach ( (array) $blogs as $details ) {
|
||||
if ( $details->userblog_id != get_network()->site_id ) { // Main blog is not a spam!
|
||||
if ( get_network()->site_id != $details->userblog_id ) { // Main blog is not a spam!
|
||||
update_blog_status( $details->userblog_id, 'spam', '1' );
|
||||
}
|
||||
}
|
||||
@@ -176,7 +176,7 @@ if ( isset( $_GET['action'] ) ) {
|
||||
}
|
||||
}
|
||||
|
||||
if ( $i == 1 ) {
|
||||
if ( 1 == $i ) {
|
||||
$deletefunction = 'delete';
|
||||
} else {
|
||||
$deletefunction = 'all_delete';
|
||||
@@ -239,7 +239,7 @@ get_current_screen()->set_screen_reader_content(
|
||||
|
||||
require_once ABSPATH . 'wp-admin/admin-header.php';
|
||||
|
||||
if ( isset( $_REQUEST['updated'] ) && $_REQUEST['updated'] == 'true' && ! empty( $_REQUEST['action'] ) ) {
|
||||
if ( isset( $_REQUEST['updated'] ) && 'true' == $_REQUEST['updated'] && ! empty( $_REQUEST['action'] ) ) {
|
||||
?>
|
||||
<div id="message" class="updated notice is-dismissible"><p>
|
||||
<?php
|
||||
|
||||
Reference in New Issue
Block a user