Description
Bug Description
In legacy Reader mode, I noticed that when Jetpack is active and I add a block that enqueues a stylesheet, the stylesheet shows as the AMP plugin being the source as opposed to Jetpack:
When a Reader theme is selected, it shows Gutenberg as the source:
When Gutenberg is deactivated, it shows wp-includes
as the source:
The same happens for scripts which are enqueued from a block.
When a script is enqueued due by a block, make sure it is attributed as the source. The Bad Block plugin is an example of this, specifically for a script which is registered and enqueued in the render_callback
:
Interesting, if it is registered beforehand then its attribution is correctly identified.
Expected Behaviour
The plugin responsible for enqueueing a block should be shown as the source.
Steps to reproduce
- Activate Jetpack.
- Add the Eventbrite block.
- Validate the AMP page.
- Look at the Stylesheets metabox.
And:
- Activate the Bad Block plugin
- Add the block to a post
- Save and validate
- See that the script source is not shown to be bad-block.
Do not alter or remove anything below. The following sections will be managed by moderators only.