Fix checks for serving AMP response and improve AMP compatibility#10918
Fix checks for serving AMP response and improve AMP compatibility#10918westonruter wants to merge 3 commits intoAutomattic:masterfrom
Conversation
This is automated check which relies on |
gravityrail
left a comment
There was a problem hiding this comment.
I get a lot of errors like is_amp_endpoint was called incorrectly, caused by some of these hooked functions which are run during init, before parse_query.
Culprits:
invoked directly in likes.php line 272
filter jp_carousel_maybe_disable invoked in jetpack-carousel.php line 102
probably more...
|
I made a modified version of this PR in #10945 |
Jetpack stats are currently broken for sites running 1.0 of the AMP plugin. See ampproject/amp-wp#1722 and https://wordpress.org/support/topic/v1-0-has-broken-jetpack-stats-tracking/
The problem is that the plugin was not updated after ampproject/amp-wp#1148 (comment) was done during the AMP plugin's beta releases.
To fix, Jetpack needs to wait until after
parse_queryaction has happened in order to determine whether an AMP response is being served.This PR also:
Closes #9588.
See also #9730.
/cc @gravityrail