[wp-trac] [WordPress Trac] #14853: WP_Scripts::do_item filter
WordPress Trac
noreply at wordpress.org
Fri Dec 11 21:42:41 UTC 2015
#14853: WP_Scripts::do_item filter
-------------------------------------------------+-------------------------
Reporter: mattwiebe | Owner: westi
Type: enhancement | Status: accepted
Priority: normal | Milestone: Future
Component: Script Loader | Release
Severity: normal | Version: 3.1
Keywords: has-patch has-unit-tests dev- | Resolution:
feedback | Focuses:
-------------------------------------------------+-------------------------
Changes (by swissspidy):
* keywords: has-patch needs-unit-tests => has-patch has-unit-tests dev-
feedback
Comment:
[attachment:14853.diff] is a renewed patch that mirrors the functionality
of `WP_Styles` for adding a `wp_add_inline_script()` function.
I've added a `$position` parameter to it as mentioned earlier in the
ticket. This would be helpful when you need to set some variables before
the script is loaded. What do other devs think about that?
Note that we can always remove that param in a further patch if it seems
not worth doing.
Adds unit tests.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/14853#comment:23>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list