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. Built from https://develop.svn.wordpress.org/trunk@61643 git-svn-id: http://core.svn.wordpress.org/trunk@60954 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -327,7 +327,6 @@ if ( ! class_exists( 'TwentyTwenty_SVG_Icons' ) ) {
|
||||
'whatsapp' => '<svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M16.75,13.96C17,14.09 17.16,14.16 17.21,14.26C17.27,14.37 17.25,14.87 17,15.44C16.8,16 15.76,16.54 15.3,16.56C14.84,16.58 14.83,16.92 12.34,15.83C9.85,14.74 8.35,12.08 8.23,11.91C8.11,11.74 7.27,10.53 7.31,9.3C7.36,8.08 8,7.5 8.26,7.26C8.5,7 8.77,6.97 8.94,7H9.41C9.56,7 9.77,6.94 9.96,7.45L10.65,9.32C10.71,9.45 10.75,9.6 10.66,9.76L10.39,10.17L10,10.59C9.88,10.71 9.74,10.84 9.88,11.09C10,11.35 10.5,12.18 11.2,12.87C12.11,13.75 12.91,14.04 13.15,14.17C13.39,14.31 13.54,14.29 13.69,14.13L14.5,13.19C14.69,12.94 14.85,13 15.08,13.08L16.75,13.96M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22C10.03,22 8.2,21.43 6.65,20.45L2,22L3.55,17.35C2.57,15.8 2,13.97 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12C4,13.72 4.54,15.31 5.46,16.61L4.5,19.5L7.39,18.54C8.69,19.46 10.28,20 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4Z" />
|
||||
</svg>',
|
||||
|
||||
// phpcs:disable WordPress.WP.CapitalPDangit.Misspelled
|
||||
'wordpress' => '<svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M12.158,12.786L9.46,20.625c0.806,0.237,1.657,0.366,2.54,0.366c1.047,0,2.051-0.181,2.986-0.51 c-0.024-0.038-0.046-0.079-0.065-0.124L12.158,12.786z M3.009,12c0,3.559,2.068,6.634,5.067,8.092L3.788,8.341 C3.289,9.459,3.009,10.696,3.009,12z M18.069,11.546c0-1.112-0.399-1.881-0.741-2.48c-0.456-0.741-0.883-1.368-0.883-2.109 c0-0.826,0.627-1.596,1.51-1.596c0.04,0,0.078,0.005,0.116,0.007C16.472,3.904,14.34,3.009,12,3.009 c-3.141,0-5.904,1.612-7.512,4.052c0.211,0.007,0.41,0.011,0.579,0.011c0.94,0,2.396-0.114,2.396-0.114 C7.947,6.93,8.004,7.642,7.52,7.699c0,0-0.487,0.057-1.029,0.085l3.274,9.739l1.968-5.901l-1.401-3.838 C9.848,7.756,9.389,7.699,9.389,7.699C8.904,7.67,8.961,6.93,9.446,6.958c0,0,1.484,0.114,2.368,0.114 c0.94,0,2.397-0.114,2.397-0.114c0.485-0.028,0.542,0.684,0.057,0.741c0,0-0.488,0.057-1.029,0.085l3.249,9.665l0.897-2.996 C17.841,13.284,18.069,12.316,18.069,11.546z M19.889,7.686c0.039,0.286,0.06,0.593,0.06,0.924c0,0.912-0.171,1.938-0.684,3.22 l-2.746,7.94c2.673-1.558,4.47-4.454,4.47-7.771C20.991,10.436,20.591,8.967,19.889,7.686z M12,22C6.486,22,2,17.514,2,12 C2,6.486,6.486,2,12,2c5.514,0,10,4.486,10,10C22,17.514,17.514,22,12,22z"></path></svg>',
|
||||
|
||||
'yelp' => '<svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M12.271,16.718v1.417q-.011,3.257-.067,3.4a.707.707,0,0,1-.569.446,4.637,4.637,0,0,1-2.024-.424A4.609,4.609,0,0,1,7.8,20.565a.844.844,0,0,1-.19-.4.692.692,0,0,1,.044-.29,3.181,3.181,0,0,1,.379-.524q.335-.412,2.019-2.409.011,0,.669-.781a.757.757,0,0,1,.44-.274.965.965,0,0,1,.552.039.945.945,0,0,1,.418.324.732.732,0,0,1,.139.468Zm-1.662-2.8a.783.783,0,0,1-.58.781l-1.339.435q-3.067.981-3.257.981a.711.711,0,0,1-.6-.4,2.636,2.636,0,0,1-.19-.836,9.134,9.134,0,0,1,.011-1.857,3.559,3.559,0,0,1,.335-1.389.659.659,0,0,1,.625-.357,22.629,22.629,0,0,1,2.253.859q.781.324,1.283.524l.937.379a.771.771,0,0,1,.4.34A.982.982,0,0,1,10.609,13.917Zm9.213,3.313a4.467,4.467,0,0,1-1.021,1.8,4.559,4.559,0,0,1-1.512,1.417.671.671,0,0,1-.7-.078q-.156-.112-2.052-3.2l-.524-.859a.761.761,0,0,1-.128-.513.957.957,0,0,1,.217-.513.774.774,0,0,1,.926-.29q.011.011,1.327.446,2.264.736,2.7.887a2.082,2.082,0,0,1,.524.229.673.673,0,0,1,.245.68Zm-7.5-7.049q.056,1.137-.6,1.361-.647.19-1.272-.792L6.237,4.08a.7.7,0,0,1,.212-.691,5.788,5.788,0,0,1,2.314-1,5.928,5.928,0,0,1,2.5-.352.681.681,0,0,1,.547.5q.034.2.245,3.407T12.327,10.181Zm7.384,1.2a.679.679,0,0,1-.29.658q-.167.112-3.67.959-.747.167-1.015.257l.011-.022a.769.769,0,0,1-.513-.044.914.914,0,0,1-.413-.357.786.786,0,0,1,0-.971q.011-.011.836-1.137,1.394-1.908,1.673-2.275a2.423,2.423,0,0,1,.379-.435A.7.7,0,0,1,17.435,8a4.482,4.482,0,0,1,1.372,1.489,4.81,4.81,0,0,1,.9,1.868v.034Z"></path></svg>',
|
||||
|
||||
@@ -37,7 +37,7 @@ if ( ! class_exists( 'TwentyTwenty_Walker_Comment' ) ) {
|
||||
$tag = ( 'div' === $args['style'] ) ? 'div' : 'li';
|
||||
|
||||
?>
|
||||
<<?php echo $tag; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- static output ?> id="comment-<?php comment_ID(); ?>" <?php comment_class( $this->has_children ? 'parent' : '', $comment ); ?>>
|
||||
<<?php echo $tag; ?> id="comment-<?php comment_ID(); ?>" <?php comment_class( $this->has_children ? 'parent' : '', $comment ); ?>>
|
||||
<article id="div-comment-<?php comment_ID(); ?>" class="comment-body">
|
||||
<footer class="comment-meta">
|
||||
<div class="comment-author vcard">
|
||||
@@ -49,7 +49,7 @@ if ( ! class_exists( 'TwentyTwenty_Walker_Comment' ) ) {
|
||||
if ( empty( $comment_author_url ) ) {
|
||||
echo wp_kses_post( $avatar );
|
||||
} else {
|
||||
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/
|
||||
printf( '<a href="%s" rel="external nofollow" class="url">', $comment_author_url );
|
||||
echo wp_kses_post( $avatar );
|
||||
}
|
||||
}
|
||||
@@ -131,7 +131,7 @@ if ( ! class_exists( 'TwentyTwenty_Walker_Comment' ) ) {
|
||||
|
||||
<?php
|
||||
if ( $comment_reply_link ) {
|
||||
echo $comment_reply_link; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Link is escaped in https://developer.wordpress.org/reference/functions/get_comment_reply_link/
|
||||
echo $comment_reply_link;
|
||||
}
|
||||
if ( $by_post_author ) {
|
||||
echo '<span class="by-post-author">' . __( 'By Post Author', 'twentytwenty' ) . '</span>';
|
||||
|
||||
@@ -85,7 +85,7 @@ if ( $comments ) {
|
||||
}
|
||||
?>
|
||||
|
||||
<nav class="comments-pagination pagination<?php echo $pagination_classes; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- static output ?>" aria-label="<?php esc_attr_e( 'Comments', 'twentytwenty' ); ?>">
|
||||
<nav class="comments-pagination pagination<?php echo $pagination_classes; ?>" aria-label="<?php esc_attr_e( 'Comments', 'twentytwenty' ); ?>">
|
||||
<?php echo wp_kses_post( $comment_pagination ); ?>
|
||||
</nav>
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ if ( ! function_exists( 'twentytwenty_generate_css' ) ) {
|
||||
|
||||
if ( $display ) {
|
||||
|
||||
echo $return; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- We need to double check this, but for now, we want to pass PHPCS ;)
|
||||
echo $return;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ if ( ! function_exists( 'twentytwenty_the_theme_svg' ) ) {
|
||||
* @param string $color Color code.
|
||||
*/
|
||||
function twentytwenty_the_theme_svg( $svg_name, $group = 'ui', $color = '' ) {
|
||||
echo twentytwenty_get_theme_svg( $svg_name, $group, $color ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Escaped in twentytwenty_get_theme_svg().
|
||||
echo twentytwenty_get_theme_svg( $svg_name, $group, $color );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@ function twentytwenty_site_logo( $args = array(), $display = true ) {
|
||||
return $html;
|
||||
}
|
||||
|
||||
echo $html; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
echo $html;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -135,7 +135,7 @@ function twentytwenty_site_description( $display = true ) {
|
||||
return $html;
|
||||
}
|
||||
|
||||
echo $html; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
echo $html;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -201,7 +201,7 @@ add_filter( 'comment_reply_link', 'twentytwenty_filter_comment_reply_link' );
|
||||
*/
|
||||
function twentytwenty_the_post_meta( $post_id = null, $location = 'single-top' ) {
|
||||
|
||||
echo twentytwenty_get_post_meta( $post_id, $location ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Escaped in twentytwenty_get_post_meta().
|
||||
echo twentytwenty_get_post_meta( $post_id, $location );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -23,7 +23,7 @@ if ( empty( $twentytwenty_aria_label ) && ! empty( $args['label'] ) ) {
|
||||
$twentytwenty_aria_label = 'aria-label="' . esc_attr( $args['label'] ) . '"';
|
||||
}
|
||||
?>
|
||||
<form role="search" <?php echo $twentytwenty_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 $twentytwenty_aria_label; ?> method="get" class="search-form" action="<?php echo esc_url( home_url( '/' ) ); ?>">
|
||||
<label for="<?php echo esc_attr( $twentytwenty_unique_id ); ?>">
|
||||
<span class="screen-reader-text">
|
||||
<?php
|
||||
|
||||
@@ -44,10 +44,10 @@
|
||||
$color_overlay_classes .= ' opacity-' . $color_overlay_opacity;
|
||||
?>
|
||||
|
||||
<div class="cover-header <?php echo $cover_header_classes; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- static output ?>"<?php echo $cover_header_style; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- We need to double check this, but for now, we want to pass PHPCS ;) ?>>
|
||||
<div class="cover-header <?php echo $cover_header_classes; ?>"<?php echo $cover_header_style; ?>>
|
||||
<div class="cover-header-inner-wrapper screen-height">
|
||||
<div class="cover-header-inner">
|
||||
<div class="cover-color-overlay color-accent<?php echo esc_attr( $color_overlay_classes ); ?>"<?php echo $color_overlay_style; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- We need to double check this, but for now, we want to pass PHPCS ;) ?>></div>
|
||||
<div class="cover-color-overlay color-accent<?php echo esc_attr( $color_overlay_classes ); ?>"<?php echo $color_overlay_style; ?>></div>
|
||||
|
||||
<header class="entry-header has-text-align-center">
|
||||
<div class="entry-header-inner section-inner medium">
|
||||
|
||||
@@ -64,7 +64,7 @@ if ( is_singular() ) {
|
||||
if ( has_excerpt() && is_singular() ) {
|
||||
?>
|
||||
|
||||
<div class="intro-text section-inner max-percentage<?php echo $intro_text_width; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- static output ?>">
|
||||
<div class="intro-text section-inner max-percentage<?php echo $intro_text_width; ?>">
|
||||
<?php the_excerpt(); ?>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ if ( has_post_thumbnail() && ! post_password_required() ) {
|
||||
|
||||
<figure class="featured-media">
|
||||
|
||||
<div class="featured-media-inner section-inner<?php echo $featured_media_inner_classes; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- static output ?>">
|
||||
<div class="featured-media-inner section-inner<?php echo $featured_media_inner_classes; ?>">
|
||||
|
||||
<?php
|
||||
the_post_thumbnail();
|
||||
|
||||
@@ -31,7 +31,7 @@ if ( $has_footer_menu || $has_social_menu || $has_sidebar_1 || $has_sidebar_2 )
|
||||
|
||||
if ( $has_footer_menu || $has_social_menu ) {
|
||||
?>
|
||||
<div class="footer-top<?php echo $footer_top_classes; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- static output ?>">
|
||||
<div class="footer-top<?php echo $footer_top_classes; ?>">
|
||||
<?php if ( $has_footer_menu ) { ?>
|
||||
|
||||
<nav aria-label="<?php esc_attr_e( 'Footer', 'twentytwenty' ); ?>" class="footer-menu-wrapper">
|
||||
|
||||
@@ -58,7 +58,7 @@ if ( $posts_pagination ) { ?>
|
||||
|
||||
<hr class="styled-separator pagination-separator is-style-wide" aria-hidden="true" />
|
||||
|
||||
<?php echo $posts_pagination; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- already escaped during generation. ?>
|
||||
<?php echo $posts_pagination; ?>
|
||||
|
||||
</div><!-- .pagination-wrapper -->
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '7.0-alpha-61642';
|
||||
$wp_version = '7.0-alpha-61643';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
||||
Reference in New Issue
Block a user