Improve handling of URLs and location redirects in AMP#1203
Improve handling of URLs and location redirects in AMP#1203westonruter merged 7 commits intodevelopfrom
Conversation
…ed amp theme support
…nical() Deprecate amp-frontend-actions.php in favor of adding function to amp-helper-functions.php.
…s change * Fix validation when switching between native and paired modes. * Only store canonical URLs for amp_invalid_url posts. * Fix issue with get_current_screen() not returning an object.
…ss private/drafted posts Partially reverts 90eff4f
I'm not able to reproduce this behaviour. I tried with/without |
|
@gravityrail humm, the I just double-checked and it's working for me: 😕 |
|
Ah! Now I'm able to reproduce the desired behaviour. The trick is to enable paired mode, which requires specifying a theme directory to AMP-ify: Then you ALSO need to make sure you accept any validation errors that have been generated (otherwise it always redirects from AMP to non-AMP versions of page) |
|
Hi! Will |
|
@artkanna Can you give an example of pages that were previously redirected? |
/amp/endpoint to?ampwhenamptheme support is present. This is important for plugins to be able to reliably callis_amp_endpoint(). See Discontinue use of amp endpoint in favor of query var when amp theme support is present #1148.amp_get_current_url()helper function.amp_add_amphtml_link()replace the poorly-namedamp_frontend_add_canonical()function and improve how it is referenced.old_slug_redirect_urlhandling for AMP theme support. This ensures that AMP URLs redirect properly when changing a post's slug.amp_invalid_urlposts.get_current_screen()not returning an object.Fixes #1166.