Coding Standards: Remove redundant ignore annotations, take 4.

This removes ignore annotations related to sniffs which are not used by WP Core (like sniffs in the `WordPress-Extra` ruleset).

Follow-up to [48072], [51003], [55204], [56714].

Props jrf.
See #59161.
Built from https://develop.svn.wordpress.org/trunk@56752


git-svn-id: http://core.svn.wordpress.org/trunk@56264 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2023-10-01 00:22:27 +00:00
parent 97cb448897
commit aaba77b577
6 changed files with 4 additions and 10 deletions

View File

@ -2764,7 +2764,6 @@ function wp_opcache_invalidate_directory( $dir ) {
__( '%s expects a non-empty string.' ), __( '%s expects a non-empty string.' ),
'<code>wp_opcache_invalidate_directory()</code>' '<code>wp_opcache_invalidate_directory()</code>'
); );
// phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_trigger_error
trigger_error( $error_message ); trigger_error( $error_message );
} }
return; return;

View File

@ -2011,11 +2011,8 @@ function wp_autosave_post_revisioned_meta_fields( $new_autosave ) {
* *
* Ignoring sanitization to avoid altering meta. Ignoring the nonce check because * Ignoring sanitization to avoid altering meta. Ignoring the nonce check because
* this is hooked on inner core hooks where a valid nonce was already checked. * this is hooked on inner core hooks where a valid nonce was already checked.
*
* @phpcs:disable WordPress.Security
*/ */
$posted_data = isset( $_POST['data']['wp_autosave'] ) ? $_POST['data']['wp_autosave'] : $_POST; $posted_data = isset( $_POST['data']['wp_autosave'] ) ? $_POST['data']['wp_autosave'] : $_POST;
// phpcs:enable
$post_type = get_post_type( $new_autosave['post_parent'] ); $post_type = get_post_type( $new_autosave['post_parent'] );

View File

@ -131,7 +131,6 @@ class WP_Sitemaps_Renderer {
if ( ! empty( $index_xml ) ) { if ( ! empty( $index_xml ) ) {
// All output is escaped within get_sitemap_index_xml(). // All output is escaped within get_sitemap_index_xml().
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
echo $index_xml; echo $index_xml;
} }
} }
@ -196,7 +195,6 @@ class WP_Sitemaps_Renderer {
if ( ! empty( $sitemap_xml ) ) { if ( ! empty( $sitemap_xml ) ) {
// All output is escaped within get_sitemap_xml(). // All output is escaped within get_sitemap_xml().
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
echo $sitemap_xml; echo $sitemap_xml;
} }
} }

View File

@ -25,12 +25,12 @@ class WP_Sitemaps_Stylesheet {
header( 'Content-Type: application/xml; charset=UTF-8' ); header( 'Content-Type: application/xml; charset=UTF-8' );
if ( 'sitemap' === $type ) { if ( 'sitemap' === $type ) {
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- All content escaped below. // All content is escaped below.
echo $this->get_sitemap_stylesheet(); echo $this->get_sitemap_stylesheet();
} }
if ( 'index' === $type ) { if ( 'index' === $type ) {
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- All content escaped below. // All content is escaped below.
echo $this->get_sitemap_index_stylesheet(); echo $this->get_sitemap_index_stylesheet();
} }

View File

@ -20,7 +20,7 @@ $template_html = get_the_block_template_html();
<body <?php body_class(); ?>> <body <?php body_class(); ?>>
<?php wp_body_open(); ?> <?php wp_body_open(); ?>
<?php echo $template_html; // phpcs:ignore WordPress.Security.EscapeOutput ?> <?php echo $template_html; ?>
<?php wp_footer(); ?> <?php wp_footer(); ?>
</body> </body>

View File

@ -16,7 +16,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '6.4-beta1-56751'; $wp_version = '6.4-beta1-56752';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.