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
This commit is contained in:
@@ -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' );
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -81,7 +81,7 @@ while ( have_posts() ) {
|
||||
printf(
|
||||
'<span class="full-size-link"><span class="screen-reader-text">%1$s</span><a href="%2$s">%3$s × %4$s</a></span>',
|
||||
/* 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'] )
|
||||
|
||||
@@ -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. */
|
||||
|
||||
@@ -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 </style> and open a <script>.
|
||||
*/
|
||||
echo wp_strip_all_tags( $css ); // phpcs:ignore WordPress.Security.EscapeOutput
|
||||
echo wp_strip_all_tags( $css );
|
||||
}
|
||||
return $css;
|
||||
}
|
||||
|
||||
@@ -335,7 +335,7 @@ function twenty_twenty_one_get_non_latin_css( $type = 'front-end' ) {
|
||||
|
||||
// Include file if function doesn't exist.
|
||||
if ( ! function_exists( 'twenty_twenty_one_generate_css' ) ) {
|
||||
require_once get_theme_file_path( 'inc/custom-css.php' ); // phpcs:ignore WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound
|
||||
require_once get_theme_file_path( 'inc/custom-css.php' );
|
||||
}
|
||||
|
||||
// Return the specified styles.
|
||||
@@ -405,7 +405,7 @@ function twenty_twenty_one_print_first_instance_of_block( $block_name, $content
|
||||
|
||||
if ( $blocks_content ) {
|
||||
/** This filter is documented in wp-includes/post-template.php */
|
||||
echo apply_filters( 'the_content', $blocks_content ); // phpcs:ignore WordPress.Security.EscapeOutput
|
||||
echo apply_filters( 'the_content', $blocks_content );
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ if ( ! function_exists( 'twenty_twenty_one_posted_on' ) ) {
|
||||
printf(
|
||||
/* translators: %s: Publish date. */
|
||||
esc_html__( 'Published %s', 'twentytwentyone' ),
|
||||
$time_string // phpcs:ignore WordPress.Security.EscapeOutput
|
||||
$time_string
|
||||
);
|
||||
echo '</span>';
|
||||
}
|
||||
@@ -79,7 +79,7 @@ if ( ! function_exists( 'twenty_twenty_one_entry_meta_footer' ) ) {
|
||||
|
||||
$post_format = get_post_format();
|
||||
if ( 'aside' === $post_format || 'status' === $post_format ) {
|
||||
echo '<p><a href="' . esc_url( get_permalink() ) . '">' . twenty_twenty_one_continue_reading_text() . '</a></p>'; // phpcs:ignore WordPress.Security.EscapeOutput
|
||||
echo '<p><a href="' . esc_url( get_permalink() ) . '">' . twenty_twenty_one_continue_reading_text() . '</a></p>';
|
||||
}
|
||||
|
||||
// Posted on.
|
||||
@@ -105,7 +105,7 @@ if ( ! function_exists( 'twenty_twenty_one_entry_meta_footer' ) ) {
|
||||
printf(
|
||||
/* translators: %s: List of categories. */
|
||||
'<span class="cat-links">' . esc_html__( 'Categorized as %s', 'twentytwentyone' ) . ' </span>',
|
||||
$categories_list // phpcs:ignore WordPress.Security.EscapeOutput
|
||||
$categories_list
|
||||
);
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@ if ( ! function_exists( 'twenty_twenty_one_entry_meta_footer' ) ) {
|
||||
printf(
|
||||
/* translators: %s: List of tags. */
|
||||
'<span class="tags-links">' . esc_html__( 'Tagged %s', 'twentytwentyone' ) . '</span>',
|
||||
$tags_list // phpcs:ignore WordPress.Security.EscapeOutput
|
||||
$tags_list
|
||||
);
|
||||
}
|
||||
echo '</div>';
|
||||
@@ -147,7 +147,7 @@ if ( ! function_exists( 'twenty_twenty_one_entry_meta_footer' ) ) {
|
||||
printf(
|
||||
/* translators: %s: List of categories. */
|
||||
'<span class="cat-links">' . esc_html__( 'Categorized as %s', 'twentytwentyone' ) . ' </span>',
|
||||
$categories_list // phpcs:ignore WordPress.Security.EscapeOutput
|
||||
$categories_list
|
||||
);
|
||||
}
|
||||
|
||||
@@ -156,7 +156,7 @@ if ( ! function_exists( 'twenty_twenty_one_entry_meta_footer' ) ) {
|
||||
printf(
|
||||
/* translators: %s: List of tags. */
|
||||
'<span class="tags-links">' . esc_html__( 'Tagged %s', 'twentytwentyone' ) . '</span>',
|
||||
$tags_list // phpcs:ignore WordPress.Security.EscapeOutput
|
||||
$tags_list
|
||||
);
|
||||
}
|
||||
echo '</div>';
|
||||
|
||||
@@ -20,7 +20,7 @@ $twentytwentyone_unique_id = wp_unique_id( 'search-form-' );
|
||||
|
||||
$twentytwentyone_aria_label = ! empty( $args['aria_label'] ) ? 'aria-label="' . esc_attr( $args['aria_label'] ) . '"' : '';
|
||||
?>
|
||||
<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( '/' ) ); ?>">
|
||||
<form role="search" <?php echo $twentytwentyone_aria_label; ?> method="get" class="search-form" action="<?php echo esc_url( home_url( '/' ) ); ?>">
|
||||
<label for="<?php echo esc_attr( $twentytwentyone_unique_id ); ?>"><?php _e( 'Search…', 'twentytwentyone' ); // phpcs:ignore: WordPress.Security.EscapeOutput.UnsafePrintingFunction -- core trusts translations ?></label>
|
||||
<input type="search" id="<?php echo esc_attr( $twentytwentyone_unique_id ); ?>" class="search-field" value="<?php echo get_search_query(); ?>" name="s" />
|
||||
<input type="submit" class="search-submit" value="<?php echo esc_attr_x( 'Search', 'submit button', 'twentytwentyone' ); ?>" />
|
||||
|
||||
@@ -36,7 +36,7 @@ $header_class = $show_title ? 'site-title' : 'screen-reader-text';
|
||||
|
||||
<?php if ( $description && true === get_theme_mod( 'display_title_and_tagline', true ) ) : ?>
|
||||
<p class="site-description">
|
||||
<?php echo $description; // phpcs:ignore WordPress.Security.EscapeOutput ?>
|
||||
<?php echo $description; ?>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
</div><!-- .site-branding -->
|
||||
|
||||
@@ -14,10 +14,10 @@
|
||||
<div class="menu-button-container">
|
||||
<button id="primary-mobile-menu" class="button" aria-controls="primary-menu-list" aria-expanded="false">
|
||||
<span class="dropdown-icon open"><?php esc_html_e( 'Menu', 'twentytwentyone' ); ?>
|
||||
<?php echo twenty_twenty_one_get_icon_svg( 'ui', 'menu' ); // phpcs:ignore WordPress.Security.EscapeOutput ?>
|
||||
<?php echo twenty_twenty_one_get_icon_svg( 'ui', 'menu' ); ?>
|
||||
</span>
|
||||
<span class="dropdown-icon close"><?php esc_html_e( 'Close', 'twentytwentyone' ); ?>
|
||||
<?php echo twenty_twenty_one_get_icon_svg( 'ui', 'close' ); // phpcs:ignore WordPress.Security.EscapeOutput ?>
|
||||
<?php echo twenty_twenty_one_get_icon_svg( 'ui', 'close' ); ?>
|
||||
</span>
|
||||
</button><!-- #primary-mobile-menu -->
|
||||
</div><!-- .menu-button-container -->
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '7.0-alpha-61653';
|
||||
$wp_version = '7.0-alpha-61654';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
||||
Reference in New Issue
Block a user