Make WordPress Core


Ignore:
Timestamp:
02/14/2026 11:45:50 PM (8 weeks ago)
Author:
SergeyBiryukov
Message:

Twenty Twenty: Remove EscapeOutput annotations.

These are from the WordPress-Extra standard, which is not included in the phpcs.xml.dist configuration (the repository uses WordPress-Core).

Includes removing unnecessary WordPress.WP.CapitalPDangit.Misspelled annotation on the wordpress array key, as the CapitalPDangit sniff skips array definitions by design.

Follow-up to [46271], [46445].

Props rodrigosprimo.
See #64627.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentytwenty/classes/class-twentytwenty-walker-comment.php

    r55276 r61643  
    3838
    3939            ?>
    40             <<?php echo $tag; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- static output ?> id="comment-<?php comment_ID(); ?>" <?php comment_class( $this->has_children ? 'parent' : '', $comment ); ?>>
     40            <<?php echo $tag; ?> id="comment-<?php comment_ID(); ?>" <?php comment_class( $this->has_children ? 'parent' : '', $comment ); ?>>
    4141                <article id="div-comment-<?php comment_ID(); ?>" class="comment-body">
    4242                    <footer class="comment-meta">
     
    5050                                    echo wp_kses_post( $avatar );
    5151                                } else {
    52                                     printf( '<a href="%s" rel="external nofollow" class="url">', $comment_author_url ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped --Escaped in https://developer.wordpress.org/reference/functions/get_comment_author_url/
     52                                    printf( '<a href="%s" rel="external nofollow" class="url">', $comment_author_url );
    5353                                    echo wp_kses_post( $avatar );
    5454                                }
     
    132132                            <?php
    133133                            if ( $comment_reply_link ) {
    134                                 echo $comment_reply_link; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Link is escaped in https://developer.wordpress.org/reference/functions/get_comment_reply_link/
     134                                echo $comment_reply_link;
    135135                            }
    136136                            if ( $by_post_author ) {
Note: See TracChangeset for help on using the changeset viewer.