From 553f886d618a83a4e312771668a1ea2d1aa02e75 Mon Sep 17 00:00:00 2001 From: Adam Silverstein Date: Thu, 24 Aug 2023 20:50:17 +0000 Subject: [PATCH] Customizer: use the correct `X-Robots-Tag` header. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix an issue where the `X-Robots` header was used instead of the `X-Robots-Tag` header. Using `X-Robots-Tag` yields the correct behavior that the original code intended to add. `X-Robots` is left in place for backward compatibility. Props michelleblanchette, dhruvishah2203, rajinsharwar, jorbin, hztyfoon, elrae.  Fixes #58865. Built from https://develop.svn.wordpress.org/trunk@56462 git-svn-id: http://core.svn.wordpress.org/trunk@55974 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-customize-manager.php | 1 + wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/wp-includes/class-wp-customize-manager.php b/wp-includes/class-wp-customize-manager.php index 4f8aae8fbd..77176609bc 100644 --- a/wp-includes/class-wp-customize-manager.php +++ b/wp-includes/class-wp-customize-manager.php @@ -1909,6 +1909,7 @@ final class WP_Customize_Manager { if ( ! headers_sent() ) { nocache_headers(); header( 'X-Robots: noindex, nofollow, noarchive' ); + header( 'X-Robots-Tag: noindex, nofollow, noarchive' ); } add_filter( 'wp_robots', 'wp_robots_no_robots' ); add_filter( 'wp_headers', array( $this, 'filter_iframe_security_headers' ) ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 719ab8b74d..9ea54c11f4 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.4-alpha-56461'; +$wp_version = '6.4-alpha-56462'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.