Make WordPress Core

Changeset 56462


Ignore:
Timestamp:
08/24/2023 08:48:40 PM (14 months ago)
Author:
adamsilverstein
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-customize-manager.php

    r56177 r56462  
    19101910            nocache_headers();
    19111911            header( 'X-Robots: noindex, nofollow, noarchive' );
     1912            header( 'X-Robots-Tag: noindex, nofollow, noarchive' );
    19121913        }
    19131914        add_filter( 'wp_robots', 'wp_robots_no_robots' );
Note: See TracChangeset for help on using the changeset viewer.