[wp-trac] [WordPress Trac] #36392: wp_add_inline_script() breaks script dependency order when using script loader (no SCRIPT_DEBUG)
WordPress Trac
noreply at wordpress.org
Thu Apr 7 21:34:09 UTC 2016
#36392: wp_add_inline_script() breaks script dependency order when using script
loader (no SCRIPT_DEBUG)
---------------------------------------------+-------------------------
Reporter: westonruter | Owner: swissspidy
Type: defect (bug) | Status: assigned
Priority: high | Milestone: 4.5
Component: Script Loader | Version: trunk
Severity: major | Resolution:
Keywords: has-unit-tests has-patch commit | Focuses:
---------------------------------------------+-------------------------
Changes (by ocean90):
* keywords: has-unit-tests needs-patch => has-unit-tests has-patch commit
Comment:
[attachment:36392.4.patch] seems the way to go. Enqueuing the script
'''after''' the concatenated scripts is the current behavior anyway.
Replying to [comment:13 gitlost]:
> However!.... there is a pre-4.5 issue here with the use of `$print_html`
in that dependencies will not be honoured for handles which use it (ie
those using conditionals or inline scripts), for instance this test (using
pre-4.5 `wp_script_add_data()`):
> Should I just open a new ticket for this?
Yes please.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36392#comment:16>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list