--- a/wp/wp-includes/sitemaps/class-wp-sitemaps-renderer.php Thu Sep 29 08:06:27 2022 +0200
+++ b/wp/wp-includes/sitemaps/class-wp-sitemaps-renderer.php Fri Sep 05 18:40:08 2025 +0200
@@ -14,6 +14,7 @@
*
* @since 5.5.0
*/
+#[AllowDynamicProperties]
class WP_Sitemaps_Renderer {
/**
* XSL stylesheet for styling a sitemap for web browsers.
@@ -122,7 +123,7 @@
* @param array $sitemaps Array of sitemap URLs.
*/
public function render_index( $sitemaps ) {
- header( 'Content-type: application/xml; charset=UTF-8' );
+ header( 'Content-Type: application/xml; charset=UTF-8' );
$this->check_for_simple_xml_availability();
@@ -130,7 +131,6 @@
if ( ! empty( $index_xml ) ) {
// All output is escaped within get_sitemap_index_xml().
- // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
echo $index_xml;
}
}
@@ -187,7 +187,7 @@
* @param array $url_list Array of URLs for a sitemap.
*/
public function render_sitemap( $url_list ) {
- header( 'Content-type: application/xml; charset=UTF-8' );
+ header( 'Content-Type: application/xml; charset=UTF-8' );
$this->check_for_simple_xml_availability();
@@ -195,7 +195,6 @@
if ( ! empty( $sitemap_xml ) ) {
// All output is escaped within get_sitemap_xml().
- // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
echo $sitemap_xml;
}
}