Make WordPress Core

Changeset 61654


Ignore:
Timestamp:
02/16/2026 10:38:01 PM (3 months ago)
Author:
SergeyBiryukov
Message:

Twenty Twenty-One: 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 WPThemeReview annotations carried over from upstream.

Follow-up to [49216].

Props rodrigosprimo.
See #64627.

Location:
trunk/src/wp-content/themes/twentytwentyone
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentytwentyone/classes/class-twenty-twenty-one-customize.php

    r60537 r61654  
    114114            // Background color.
    115115            // Include the custom control class.
    116             require_once get_theme_file_path( 'classes/class-twenty-twenty-one-customize-color-control.php' ); // phpcs:ignore WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound
     116            require_once get_theme_file_path( 'classes/class-twenty-twenty-one-customize-color-control.php' );
    117117
    118118            // Register the custom control.
  • trunk/src/wp-content/themes/twentytwentyone/classes/class-twenty-twenty-one-dark-mode.php

    r61500 r61654  
    138138
    139139        // Custom notice control.
    140         require_once get_theme_file_path( 'classes/class-twenty-twenty-one-customize-notice-control.php' ); // phpcs:ignore WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound
     140        require_once get_theme_file_path( 'classes/class-twenty-twenty-one-customize-notice-control.php' );
    141141
    142142        $wp_customize->add_setting(
  • trunk/src/wp-content/themes/twentytwentyone/image.php

    r60537 r61654  
    8282                    '<span class="full-size-link"><span class="screen-reader-text">%1$s</span><a href="%2$s">%3$s &times; %4$s</a></span>',
    8383                    /* translators: Hidden accessibility text. */
    84                     esc_html_x( 'Full size', 'Used before full size attachment link.', 'twentytwentyone' ), // phpcs:ignore WordPress.Security.EscapeOutput
     84                    esc_html_x( 'Full size', 'Used before full size attachment link.', 'twentytwentyone' ),
    8585                    esc_url( wp_get_attachment_url() ),
    8686                    absint( $metadata['width'] ),
  • trunk/src/wp-content/themes/twentytwentyone/inc/back-compat.php

    r60537 r61654  
    8080 */
    8181function twenty_twenty_one_preview() {
    82     if ( isset( $_GET['preview'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
     82    if ( isset( $_GET['preview'] ) ) {
    8383        wp_die(
    8484            sprintf(
  • trunk/src/wp-content/themes/twentytwentyone/inc/custom-css.php

    r61302 r61654  
    3737         * malicious attempts to close </style> and open a <script>.
    3838         */
    39         echo wp_strip_all_tags( $css ); // phpcs:ignore WordPress.Security.EscapeOutput
     39        echo wp_strip_all_tags( $css );
    4040    }
    4141    return $css;
  • trunk/src/wp-content/themes/twentytwentyone/inc/template-functions.php

    r61302 r61654  
    336336    // Include file if function doesn't exist.
    337337    if ( ! function_exists( 'twenty_twenty_one_generate_css' ) ) {
    338         require_once get_theme_file_path( 'inc/custom-css.php' ); // phpcs:ignore WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound
     338        require_once get_theme_file_path( 'inc/custom-css.php' );
    339339    }
    340340
     
    406406    if ( $blocks_content ) {
    407407        /** This filter is documented in wp-includes/post-template.php */
    408         echo apply_filters( 'the_content', $blocks_content ); // phpcs:ignore WordPress.Security.EscapeOutput
     408        echo apply_filters( 'the_content', $blocks_content );
    409409        return true;
    410410    }
  • trunk/src/wp-content/themes/twentytwentyone/inc/template-tags.php

    r61091 r61654  
    2828            /* translators: %s: Publish date. */
    2929            esc_html__( 'Published %s', 'twentytwentyone' ),
    30             $time_string // phpcs:ignore WordPress.Security.EscapeOutput
     30            $time_string
    3131        );
    3232        echo '</span>';
     
    8080            $post_format = get_post_format();
    8181            if ( 'aside' === $post_format || 'status' === $post_format ) {
    82                 echo '<p><a href="' . esc_url( get_permalink() ) . '">' . twenty_twenty_one_continue_reading_text() . '</a></p>'; // phpcs:ignore WordPress.Security.EscapeOutput
     82                echo '<p><a href="' . esc_url( get_permalink() ) . '">' . twenty_twenty_one_continue_reading_text() . '</a></p>';
    8383            }
    8484
     
    106106                        /* translators: %s: List of categories. */
    107107                        '<span class="cat-links">' . esc_html__( 'Categorized as %s', 'twentytwentyone' ) . ' </span>',
    108                         $categories_list // phpcs:ignore WordPress.Security.EscapeOutput
     108                        $categories_list
    109109                    );
    110110                }
     
    115115                        /* translators: %s: List of tags. */
    116116                        '<span class="tags-links">' . esc_html__( 'Tagged %s', 'twentytwentyone' ) . '</span>',
    117                         $tags_list // phpcs:ignore WordPress.Security.EscapeOutput
     117                        $tags_list
    118118                    );
    119119                }
     
    148148                        /* translators: %s: List of categories. */
    149149                        '<span class="cat-links">' . esc_html__( 'Categorized as %s', 'twentytwentyone' ) . ' </span>',
    150                         $categories_list // phpcs:ignore WordPress.Security.EscapeOutput
     150                        $categories_list
    151151                    );
    152152                }
     
    157157                        /* translators: %s: List of tags. */
    158158                        '<span class="tags-links">' . esc_html__( 'Tagged %s', 'twentytwentyone' ) . '</span>',
    159                         $tags_list // phpcs:ignore WordPress.Security.EscapeOutput
     159                        $tags_list
    160160                    );
    161161                }
  • trunk/src/wp-content/themes/twentytwentyone/searchform.php

    r49826 r61654  
    2121$twentytwentyone_aria_label = ! empty( $args['aria_label'] ) ? 'aria-label="' . esc_attr( $args['aria_label'] ) . '"' : '';
    2222?>
    23 <form role="search" <?php echo $twentytwentyone_aria_label; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Escaped above. ?> method="get" class="search-form" action="<?php echo esc_url( home_url( '/' ) ); ?>">
     23<form role="search" <?php echo $twentytwentyone_aria_label; ?> method="get" class="search-form" action="<?php echo esc_url( home_url( '/' ) ); ?>">
    2424    <label for="<?php echo esc_attr( $twentytwentyone_unique_id ); ?>"><?php _e( 'Search&hellip;', 'twentytwentyone' ); // phpcs:ignore: WordPress.Security.EscapeOutput.UnsafePrintingFunction -- core trusts translations ?></label>
    2525    <input type="search" id="<?php echo esc_attr( $twentytwentyone_unique_id ); ?>" class="search-field" value="<?php echo get_search_query(); ?>" name="s" />
  • trunk/src/wp-content/themes/twentytwentyone/template-parts/header/site-branding.php

    r59907 r61654  
    3737    <?php if ( $description && true === get_theme_mod( 'display_title_and_tagline', true ) ) : ?>
    3838        <p class="site-description">
    39             <?php echo $description; // phpcs:ignore WordPress.Security.EscapeOutput ?>
     39            <?php echo $description; ?>
    4040        </p>
    4141    <?php endif; ?>
  • trunk/src/wp-content/themes/twentytwentyone/template-parts/header/site-nav.php

    r53880 r61654  
    1515            <button id="primary-mobile-menu" class="button" aria-controls="primary-menu-list" aria-expanded="false">
    1616                <span class="dropdown-icon open"><?php esc_html_e( 'Menu', 'twentytwentyone' ); ?>
    17                     <?php echo twenty_twenty_one_get_icon_svg( 'ui', 'menu' ); // phpcs:ignore WordPress.Security.EscapeOutput ?>
     17                    <?php echo twenty_twenty_one_get_icon_svg( 'ui', 'menu' ); ?>
    1818                </span>
    1919                <span class="dropdown-icon close"><?php esc_html_e( 'Close', 'twentytwentyone' ); ?>
    20                     <?php echo twenty_twenty_one_get_icon_svg( 'ui', 'close' ); // phpcs:ignore WordPress.Security.EscapeOutput ?>
     20                    <?php echo twenty_twenty_one_get_icon_svg( 'ui', 'close' ); ?>
    2121                </span>
    2222            </button><!-- #primary-mobile-menu -->
Note: See TracChangeset for help on using the changeset viewer.