Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set is_feed/feed so sitemap can be identified later in shutdown #7397

Merged
merged 1 commit into from Jul 1, 2017

Conversation

donnchawp
Copy link
Contributor

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 apache_get_header_list or headers_list) in the output buffer callback. With this change the caching plugin can identify a sitemap and then use the right caching and/or content type. This is how WP Super Cache does that.
See https://github.com/Automattic/wp-super-cache/issues/237 for further
discussion.

…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 https://github.com/Automattic/wp-super-cache/issues/237 for further
discussion.
@dereksmart dereksmart added [Feature] Sitemaps [Status] Needs Review To request a review from Crew. Label will be renamed soon. [Type] Bug When a feature is broken and / or not performing as intended labels Jun 28, 2017
Copy link
Contributor

@eliorivero eliorivero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🐑

@eliorivero eliorivero added this to the 5.1 milestone Jul 1, 2017
@eliorivero eliorivero added [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Review To request a review from Crew. Label will be renamed soon. labels Jul 1, 2017
@dereksmart
Copy link
Member

thanks @donnapep!

@dereksmart dereksmart merged commit bfc70e0 into master Jul 1, 2017
@dereksmart dereksmart deleted the fix/make-sitemap-a-feed branch July 1, 2017 13:37
eliorivero pushed a commit that referenced this pull request Jul 1, 2017
…ions. (#7397)

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 https://github.com/Automattic/wp-super-cache/issues/237 for further
discussion.
@eliorivero
Copy link
Contributor

Cherry picked to 5.1 in 0c9e922

@kraftbj kraftbj removed the [Status] Ready to Merge Go ahead, you can push that green button! label Oct 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Sitemaps Touches WP.com Files [Type] Bug When a feature is broken and / or not performing as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants