Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Add support for AMP Dev Mode in Notes module #13450
As noted in ampproject/amp-wp#1921, AMP now supports a dev mode (ampproject/amphtml#20974, ampproject/amp-wp#3187) which allows a document to mark certain elements as being excluded for AMP validation. This is exactly what the AMP plugin has needed to allow the admin bar without fighting against the 50KB CSS limit. It also opens up the door to using scripts on AMP pages to add interactivity to the admin bar without worrying about AMP compatibility. This is exactly what Jetpack has needed for its admin bar integration on AMP pages (e.g. Stats and Notes).
This PR begins to implement support for that. Any markup that is being added by Jetpack to the frontend which is used by an authenticated user for administration should be amended with the
For more information on this, see Integrating with AMP Dev Mode in WordPress.
Support implemented in these modules:
Notice the Notes admin menu item is not broken any longer after the changes are applied.
To revisit later:
Changes proposed in this Pull Request:
Is this a new feature or does it add/remove features to an existing part of Jetpack?
Proposed changelog entry for your changes:
Thank you for the great PR description!
When this PR is ready for review, please apply the
Scheduled Jetpack release: November 5, 2019.
Here's a writeup of Dev Mode in the AMP plugin and how to integrate with it: https://weston.ruter.net/2019/09/24/integrating-with-amp-dev-mode-in-wordpress/