Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
Set is_feed/feed so sitemap can be identified later in shutdown #7397
Identify sitemaps as a "sitemap" feed for the purposes of caching or further analysis of an output buffer.
Caching plugins use output buffering to capture the page so even though the sitemap function dies immediately after the content is pushed out, the content is still captured. However, in my testing the Content-Type header was not captured (even when using
…ions. Caching plugins will be able to query is_feed() and then check the query variable "feed" for the type of feed before creating a cache file of the sitemap. See Automattic/wp-super-cache#237 for further discussion.