Skip to content

Commit

Permalink
Coding Standards: Use strict comparison in `wp_xmlrpc_server::_prepar…
Browse files Browse the repository at this point in the history
…e_comment()`.

Follow-up to [20856].

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

git-svn-id: https://develop.svn.wordpress.org/trunk@59710 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
SergeyBiryukov committed Jan 26, 2025
1 parent de504a6 commit e41f4f9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/wp-includes/class-wp-xmlrpc-server.php
Original file line number Diff line number Diff line change
Expand Up @@ -1179,11 +1179,11 @@ protected function _prepare_comment( $comment ) {
// Format page date.
$comment_date_gmt = $this->_convert_date_gmt( $comment->comment_date_gmt, $comment->comment_date );

if ( '0' == $comment->comment_approved ) {
if ( '0' === $comment->comment_approved ) {
$comment_status = 'hold';
} elseif ( 'spam' === $comment->comment_approved ) {
$comment_status = 'spam';
} elseif ( '1' == $comment->comment_approved ) {
} elseif ( '1' === $comment->comment_approved ) {
$comment_status = 'approve';
} else {
$comment_status = $comment->comment_approved;
Expand Down

0 comments on commit e41f4f9

Please sign in to comment.