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:
Sergey Biryukov
2020-02-09 16:52:28 +00:00
parent 40ffe0ef06
commit 130751cda3
124 changed files with 554 additions and 554 deletions

View File

@@ -101,7 +101,7 @@ switch ( $action ) {
}
// No need to re-approve/re-trash/re-spam a comment.
if ( $action == str_replace( '1', 'approve', $comment->comment_approved ) ) {
if ( str_replace( '1', 'approve', $comment->comment_approved ) == $action ) {
wp_redirect( admin_url( 'edit-comments.php?same=' . $comment_id ) );
die();
}
@@ -137,7 +137,7 @@ switch ( $action ) {
break;
}
if ( $comment->comment_approved != '0' ) { // If not unapproved.
if ( '0' != $comment->comment_approved ) { // If not unapproved.
$message = '';
switch ( $comment->comment_approved ) {
case '1':