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

Let query var always be used and always be 'amp' when theme support is added #1194

merged 2 commits into from Jun 3, 2018


None yet
3 participants
Copy link

westonruter commented Jun 2, 2018

  • Update amp_get_slug() and amp_get_permalink() to always use amp query var when theme support added (and not endpoint). When amp theme support is present, the amphtml URLs will always end in ?amp as opposed to /amp/. The amp_pre_get_permalink and amp_get_permalink filters thus no longer apply, though the /amp/ endpoint will continue to be added for back-compat. If a theme adds amp theme support and yet a theme also defines AMP_QUERY_VAR to something other than amp then a notice is raised.
  • Mark pre_amp_render_post action as deprecated in favor of the template_redirect action with a check to is_amp_endpoint(). The legacy amp_render() function is updated to run at template_redirect priority 11 instead of 10 to make it easier on themers to use the default priority of 10.
  • Mark all legacy functions (ones not run when amp theme support present) as deprecated (without raising notice).

Fixes #1148.
Fixes #1129.
Fixes #945.

westonruter added some commits Jun 2, 2018

Update amp_get_slug() and amp_get_permalink() to always use 'amp' que…
…ry var when theme support added (and not endpoint)

* Soft-deprecate functions that are for legacy functions.
* Add missing since tags.

@westonruter westonruter added this to the v1.0 milestone Jun 2, 2018

@westonruter westonruter requested review from gravityrail and kienstra Jun 2, 2018

@westonruter westonruter force-pushed the query-var branch from 77ea248 to ab99cd7 Jun 2, 2018

@amedina amedina self-requested a review Jun 3, 2018


amedina approved these changes Jun 3, 2018

Copy link

amedina left a comment

LGTM; ship it!

@westonruter westonruter merged commit c8d56ed into develop Jun 3, 2018

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
continuous-integration/travis-ci/push The Travis CI build passed

@westonruter westonruter deleted the query-var branch Jun 3, 2018


This comment has been minimized.

Copy link

mor10 commented Jun 3, 2018

What does this mean for themes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.