Customizer: use the correct `X-Robots-Tag` header.
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
This commit is contained in:
parent
ee4230d5f8
commit
553f886d61
|
@ -1909,6 +1909,7 @@ final class WP_Customize_Manager {
|
||||||
if ( ! headers_sent() ) {
|
if ( ! headers_sent() ) {
|
||||||
nocache_headers();
|
nocache_headers();
|
||||||
header( 'X-Robots: noindex, nofollow, noarchive' );
|
header( 'X-Robots: noindex, nofollow, noarchive' );
|
||||||
|
header( 'X-Robots-Tag: noindex, nofollow, noarchive' );
|
||||||
}
|
}
|
||||||
add_filter( 'wp_robots', 'wp_robots_no_robots' );
|
add_filter( 'wp_robots', 'wp_robots_no_robots' );
|
||||||
add_filter( 'wp_headers', array( $this, 'filter_iframe_security_headers' ) );
|
add_filter( 'wp_headers', array( $this, 'filter_iframe_security_headers' ) );
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @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.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue