Make WordPress Core


Ignore:
Timestamp:
02/09/2020 04:52:28 PM (5 years ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Use Yoda conditions where appropriate.

See #49222.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/comment.php

    r47198 r47219  
    102102
    103103        // No need to re-approve/re-trash/re-spam a comment.
    104         if ( $action == str_replace( '1', 'approve', $comment->comment_approved ) ) {
     104        if ( str_replace( '1', 'approve', $comment->comment_approved ) == $action ) {
    105105            wp_redirect( admin_url( 'edit-comments.php?same=' . $comment_id ) );
    106106            die();
     
    138138        }
    139139
    140         if ( $comment->comment_approved != '0' ) { // If not unapproved.
     140        if ( '0' != $comment->comment_approved ) { // If not unapproved.
    141141            $message = '';
    142142            switch ( $comment->comment_approved ) {
Note: See TracChangeset for help on using the changeset viewer.