mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 07:40:07 +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:
@@ -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':
|
||||
|
||||
Reference in New Issue
Block a user