[wp-trac] [WordPress Trac] #14853: wp_add_inline_script()

WordPress Trac noreply at wordpress.org
Sun Feb 21 22:11:26 UTC 2016


#14853: wp_add_inline_script()
--------------------------------------+-------------------------
 Reporter:  mattwiebe                 |       Owner:  swissspidy
     Type:  enhancement               |      Status:  accepted
 Priority:  normal                    |   Milestone:  4.5
Component:  Script Loader             |     Version:  3.1
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+-------------------------

Comment (by swissspidy):

 [attachment:14853.5.diff] implements the suggestion by @ocean90. When a
 script has some inline scripts added after it, it's not concatenated
 together with the other sources, but instead printed before it (using
 `$wp_scripts->print_html_before`).

 If someone wants to add some tests for this, feel free to do so. I'm
 currently stuck, but I'll try to have another look in the upcoming days.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/14853#comment:42>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list