mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@56462 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -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' ) );
|
||||
|
||||
Reference in New Issue
Block a user