Let query var always be used and always be 'amp' when theme support is added #1194
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
amp_get_slug()
andamp_get_permalink()
to always useamp
query var when theme support added (and not endpoint). Whenamp
theme support is present, theamphtml
URLs will always end in?amp
as opposed to/amp/
. Theamp_pre_get_permalink
andamp_get_permalink
filters thus no longer apply, though the/amp/
endpoint will continue to be added for back-compat. If a theme addsamp
theme support and yet a theme also definesAMP_QUERY_VAR
to something other thanamp
then a notice is raised.pre_amp_render_post
action as deprecated in favor of thetemplate_redirect
action with a check tois_amp_endpoint()
. The legacyamp_render()
function is updated to run attemplate_redirect
priority 11 instead of 10 to make it easier on themers to use the default priority of 10.amp
theme support present) as deprecated (without raising notice).Fixes #1148.
Fixes #1129.
Fixes #945.