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

@donnchawp donnchawp commented Jun 28, 2017

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 Automattic/wp-super-cache#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 Automattic/wp-super-cache#237 for further
discussion.
Copy link
Contributor

@eliorivero eliorivero left a comment

LGTM 🐑

@eliorivero eliorivero added this to the 5.1 milestone Jul 1, 2017
@dereksmart
Copy link
Member

@dereksmart dereksmart commented Jul 1, 2017

thanks @donnapep!

@dereksmart dereksmart merged commit bfc70e0 into master Jul 1, 2017
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@dereksmart dereksmart deleted the fix/make-sitemap-a-feed branch Jul 1, 2017
eliorivero added 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 Automattic/wp-super-cache#237 for further
discussion.
@eliorivero
Copy link
Contributor

@eliorivero eliorivero commented Jul 1, 2017

Cherry picked to 5.1 in 0c9e922

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants
You can’t perform that action at this time.