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
The source column should indicate the theme/plugin that is actually responsible for the style or script being added to the page.
The case of the inline stylesheet is a tricky one, since it is one stylesheet with multiple sources. At the very least it should have the same source information as the stylesheet it is being added inline for. Best case is for it to include all themes/plugins that added inline styles to it.
Steps to reproduce
Enable Standard or Transitional mode in the AMP plugin.
When active (and #4026 checked out) the validated URL screen looks like the following, with the red entries erroneously saying they are from wp-includes when they should actually be from “Add Assets before wp_enqueue_scripts”.
Additional context
WordPress version:
Plugin version:
Gutenberg plugin version (if applicable):
AMP plugin template mode:
PHP version:
OS:
Browser: [e.g. chrome, safari]
Device: [e.g. iPhone6]
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
Implementation brief
This may be resolved simply by adding the validation hooks earlier. Origination is also a solution, perhaps long-term.
QA testing instructions
Demo
Changelog entry
The text was updated successfully, but these errors were encountered:
westonruter
changed the title
Scripts and styles enqueued before wp_enqueue_scripts (and inline styles) fail to get sources identified
Scripts and styles enqueued before wp_enqueue_scripts fail to get sources identified
Jan 19, 2020
Bug Description
Scripts and stylesheets enqueued at
init
do not get sourcing information. The same goes for assets registered atwp_default_styles
andwp_scripts
.See demo plugin which demonstrates the issue.
(Additionally, inline styles added via
wp_add_inline_style()
do not get their source attributed.)The
wp-includes
source is erroneous for 2 scripts and 3 stylesheets shown on the page.Related: #4134
Expected Behaviour
The source column should indicate the theme/plugin that is actually responsible for the style or script being added to the page.
The case of the inline stylesheet is a tricky one, since it is one stylesheet with multiple sources. At the very least it should have the same source information as the stylesheet it is being added inline for. Best case is for it to include all themes/plugins that added inline styles to it.
Steps to reproduce
wp-includes
mentioned unexpectedly.Screenshots
When active (and #4026 checked out) the validated URL screen looks like the following, with the red entries erroneously saying they are from
wp-includes
when they should actually be from “Add Assets before wp_enqueue_scripts”.Additional context
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
Implementation brief
This may be resolved simply by adding the validation hooks earlier. Origination is also a solution, perhaps long-term.
QA testing instructions
Demo
Changelog entry
The text was updated successfully, but these errors were encountered: