You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a theme enqueues a navigation.js that has jQuery as a dependency, currently this appears in the validated URL screen as “wp-includes” as the source. This is not very helpful. It would be helpful that if a theme or plugin enqueues a script or a style, that the original theme/plugin that enqueued it would be attributed as a source in some way. As an example, consider this demo plugin.
All of the scripts here should get “Enqueue assets with core dependencies” as the source, at least indirectly:
And for the stylesheets, the same goes for the circled stylesheets:
I believe that Origination already provides support here for this, so this should perhaps be deferred to the incorporation of that library.
Also: For each script/stylesheet, the asset which caused the dependency to be printed should be listed.
Additionally, inline styles added via wp_add_inline_style() do not get their source attributed.
Inline Scripts
Scripts added via wp_localize_script() and wp_add_inline_script() should all get properly identified. For this, see another example plugin.
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
Implementation brief
QA testing instructions
Demo
Changelog entry
The text was updated successfully, but these errors were encountered:
westonruter
changed the title
Core script and style dependencies should get enqueueing theme/plugin as source
Inline scripts/styles should have sources identified and core script/style dependencies should get enqueueing theme/plugin as source
Jan 23, 2020
Feature description
Related: #4133
If a theme enqueues a
navigation.js
that has jQuery as a dependency, currently this appears in the validated URL screen as “wp-includes” as the source. This is not very helpful. It would be helpful that if a theme or plugin enqueues a script or a style, that the original theme/plugin that enqueued it would be attributed as a source in some way. As an example, consider this demo plugin.All of the scripts here should get “Enqueue assets with core dependencies” as the source, at least indirectly:
And for the stylesheets, the same goes for the circled stylesheets:
I believe that Origination already provides support here for this, so this should perhaps be deferred to the incorporation of that library.
Also: For each script/stylesheet, the asset which caused the dependency to be printed should be listed.
Additionally, inline styles added via
wp_add_inline_style()
do not get their source attributed.Inline Scripts
Scripts added via
wp_localize_script()
andwp_add_inline_script()
should all get properly identified. For this, see another example plugin.Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
Implementation brief
QA testing instructions
Demo
Changelog entry
The text was updated successfully, but these errors were encountered: