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

Fix is_amp_endpoint() on `wp-login.php`, `wp-signup.php` and `wp-activate.php` #1250

Merged
merged 3 commits into from Jul 5, 2018

Conversation

Projects
None yet
2 participants
@felixarntz
Copy link
Collaborator

commented Jul 5, 2018

When calling is_amp_endpoint() from one of the special WordPress files wp-login.php, wp-signup.php and wp-activate.php, it currently triggers the notice that it was called too early - which makes sense because no query is run on these pages, however it should instead bail before and simply return false. This is in line how it currently works in the admin or for REST requests.

The plugin itself calls is_amp_endpoint() from wp-login.php (from the AMP_Editor_Blocks class), so that currently causes a permanent notice to display.

felixarntz added some commits Jul 5, 2018

Fix is_amp_endpoint() triggering a notice when checked on special WP …
…templates for login, signup or activate.

@westonruter westonruter added this to the v1.0 milestone Jul 5, 2018

@westonruter
Copy link
Member

left a comment

Good catch!

@westonruter westonruter merged commit 364e03b into ampproject:develop Jul 5, 2018

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
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.