Make WordPress Core

Changeset 59710


Ignore:
Timestamp:
01/26/2025 06:51:35 PM (22 months ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Use strict comparison in wp_xmlrpc_server::_prepare_comment().

Follow-up to [20856].

Props aristath, poena, afercia, SergeyBiryukov.
See #62279.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-xmlrpc-server.php

    r59707 r59710  
    11801180                $comment_date_gmt = $this->_convert_date_gmt( $comment->comment_date_gmt, $comment->comment_date );
    11811181
    1182                 if ( '0' == $comment->comment_approved ) {
     1182                if ( '0' === $comment->comment_approved ) {
    11831183                        $comment_status = 'hold';
    11841184                } elseif ( 'spam' === $comment->comment_approved ) {
    11851185                        $comment_status = 'spam';
    1186                 } elseif ( '1' == $comment->comment_approved ) {
     1186                } elseif ( '1' === $comment->comment_approved ) {
    11871187                        $comment_status = 'approve';
    11881188                } else {
Note: See TracChangeset for help on using the changeset viewer.