Make WordPress Core

Changeset 57850


Ignore:
Timestamp:
03/18/2024 03:44:25 PM (4 weeks ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Use strict comparison in wp-includes/class-walker-comment.php.

Follow-up to [8869], [9207], [23694], [47887].

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-walker-comment.php

    r56549 r57850  
    279279        $show_pending_links = ! empty( $commenter['comment_author'] );
    280280
    281         if ( $comment && '0' == $comment->comment_approved && ! $show_pending_links ) {
     281        if ( $comment && '0' === $comment->comment_approved && ! $show_pending_links ) {
    282282            $comment_text = wp_kses( $comment_text, array() );
    283283        }
     
    321321        <div class="comment-author vcard">
    322322            <?php
    323             if ( 0 != $args['avatar_size'] ) {
     323            if ( 0 !== $args['avatar_size'] ) {
    324324                echo get_avatar( $comment, $args['avatar_size'] );
    325325            }
     
    328328            $comment_author = get_comment_author_link( $comment );
    329329
    330             if ( '0' == $comment->comment_approved && ! $show_pending_links ) {
     330            if ( '0' === $comment->comment_approved && ! $show_pending_links ) {
    331331                $comment_author = get_comment_author( $comment );
    332332            }
     
    339339            ?>
    340340        </div>
    341         <?php if ( '0' == $comment->comment_approved ) : ?>
     341        <?php if ( '0' === $comment->comment_approved ) : ?>
    342342        <em class="comment-awaiting-moderation"><?php echo $moderation_note; ?></em>
    343343        <br />
     
    424424                    <div class="comment-author vcard">
    425425                        <?php
    426                         if ( 0 != $args['avatar_size'] ) {
     426                        if ( 0 !== $args['avatar_size'] ) {
    427427                            echo get_avatar( $comment, $args['avatar_size'] );
    428428                        }
     
    431431                        $comment_author = get_comment_author_link( $comment );
    432432
    433                         if ( '0' == $comment->comment_approved && ! $show_pending_links ) {
     433                        if ( '0' === $comment->comment_approved && ! $show_pending_links ) {
    434434                            $comment_author = get_comment_author( $comment );
    435435                        }
     
    461461                    </div><!-- .comment-metadata -->
    462462
    463                     <?php if ( '0' == $comment->comment_approved ) : ?>
     463                    <?php if ( '0' === $comment->comment_approved ) : ?>
    464464                    <em class="comment-awaiting-moderation"><?php echo $moderation_note; ?></em>
    465465                    <?php endif; ?>
     
    471471
    472472                <?php
    473                 if ( '1' == $comment->comment_approved || $show_pending_links ) {
     473                if ( '1' === $comment->comment_approved || $show_pending_links ) {
    474474                    comment_reply_link(
    475475                        array_merge(
Note: See TracChangeset for help on using the changeset viewer.