From 0cbb3f5744ee10d141100558f2ec7591dc4ada3f Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 16 Feb 2026 22:38:42 +0000 Subject: [PATCH] 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. Built from https://develop.svn.wordpress.org/trunk@61654 git-svn-id: http://core.svn.wordpress.org/trunk@60965 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- .../classes/class-twenty-twenty-one-customize.php | 2 +- .../classes/class-twenty-twenty-one-dark-mode.php | 2 +- wp-content/themes/twentytwentyone/image.php | 2 +- .../themes/twentytwentyone/inc/back-compat.php | 2 +- wp-content/themes/twentytwentyone/inc/custom-css.php | 2 +- .../twentytwentyone/inc/template-functions.php | 4 ++-- .../themes/twentytwentyone/inc/template-tags.php | 12 ++++++------ wp-content/themes/twentytwentyone/searchform.php | 2 +- .../template-parts/header/site-branding.php | 2 +- .../template-parts/header/site-nav.php | 4 ++-- wp-includes/version.php | 2 +- 11 files changed, 18 insertions(+), 18 deletions(-) diff --git a/wp-content/themes/twentytwentyone/classes/class-twenty-twenty-one-customize.php b/wp-content/themes/twentytwentyone/classes/class-twenty-twenty-one-customize.php index 3ed6b637af..53db8dffb2 100644 --- a/wp-content/themes/twentytwentyone/classes/class-twenty-twenty-one-customize.php +++ b/wp-content/themes/twentytwentyone/classes/class-twenty-twenty-one-customize.php @@ -113,7 +113,7 @@ if ( ! class_exists( 'Twenty_Twenty_One_Customize' ) ) { // Background color. // Include the custom control class. - require_once get_theme_file_path( 'classes/class-twenty-twenty-one-customize-color-control.php' ); // phpcs:ignore WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound + require_once get_theme_file_path( 'classes/class-twenty-twenty-one-customize-color-control.php' ); // Register the custom control. $wp_customize->register_control_type( 'Twenty_Twenty_One_Customize_Color_Control' ); diff --git a/wp-content/themes/twentytwentyone/classes/class-twenty-twenty-one-dark-mode.php b/wp-content/themes/twentytwentyone/classes/class-twenty-twenty-one-dark-mode.php index c5643ade65..d5672c4054 100644 --- a/wp-content/themes/twentytwentyone/classes/class-twenty-twenty-one-dark-mode.php +++ b/wp-content/themes/twentytwentyone/classes/class-twenty-twenty-one-dark-mode.php @@ -137,7 +137,7 @@ class Twenty_Twenty_One_Dark_Mode { } // Custom notice control. - require_once get_theme_file_path( 'classes/class-twenty-twenty-one-customize-notice-control.php' ); // phpcs:ignore WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound + require_once get_theme_file_path( 'classes/class-twenty-twenty-one-customize-notice-control.php' ); $wp_customize->add_setting( 'respect_user_color_preference_notice', diff --git a/wp-content/themes/twentytwentyone/image.php b/wp-content/themes/twentytwentyone/image.php index 06cf60d279..4b3abcca2a 100644 --- a/wp-content/themes/twentytwentyone/image.php +++ b/wp-content/themes/twentytwentyone/image.php @@ -81,7 +81,7 @@ while ( have_posts() ) { printf( '%1$s%3$s × %4$s', /* translators: Hidden accessibility text. */ - esc_html_x( 'Full size', 'Used before full size attachment link.', 'twentytwentyone' ), // phpcs:ignore WordPress.Security.EscapeOutput + esc_html_x( 'Full size', 'Used before full size attachment link.', 'twentytwentyone' ), esc_url( wp_get_attachment_url() ), absint( $metadata['width'] ), absint( $metadata['height'] ) diff --git a/wp-content/themes/twentytwentyone/inc/back-compat.php b/wp-content/themes/twentytwentyone/inc/back-compat.php index 7e547e1502..d5214803ca 100644 --- a/wp-content/themes/twentytwentyone/inc/back-compat.php +++ b/wp-content/themes/twentytwentyone/inc/back-compat.php @@ -79,7 +79,7 @@ add_action( 'load-customize.php', 'twenty_twenty_one_customize' ); * @return void */ function twenty_twenty_one_preview() { - if ( isset( $_GET['preview'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification + if ( isset( $_GET['preview'] ) ) { wp_die( sprintf( /* translators: %s: WordPress Version. */ diff --git a/wp-content/themes/twentytwentyone/inc/custom-css.php b/wp-content/themes/twentytwentyone/inc/custom-css.php index e212cfd606..3e1542862e 100644 --- a/wp-content/themes/twentytwentyone/inc/custom-css.php +++ b/wp-content/themes/twentytwentyone/inc/custom-css.php @@ -36,7 +36,7 @@ function twenty_twenty_one_generate_css( $selector, $style, $value, $prefix = '' * Using wp_strip_all_tags() here is sufficient escaping to avoid * malicious attempts to close and open a