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
merged 2 commits into from
Jun 3, 2018

Conversation

westonruter
Copy link
Member

  • 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.

…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
@amedina amedina self-requested a review June 3, 2018 01:02
Copy link
Member

@amedina amedina left a comment

Choose a reason for hiding this comment

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

LGTM; ship it!

@westonruter westonruter merged commit c8d56ed into develop Jun 3, 2018
@westonruter westonruter deleted the query-var branch June 3, 2018 01:04
@mor10
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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants