[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
Fri Apr 8 21:06:43 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  |     Focuses:
--------------------------------------+-------------------------

Comment (by azaozz):

 Replying to [comment:24 gitlost]:
 > One can't add inline script to scripts in the `$default_dirs` (which in
 standard use are '/wp-admin/js/' and '/wp-includes/js/') if those scripts
 have dependencies on each other.

 Pretty much all default scripts are dependent on each other, so the
 limitation should probably be "The `before` and `after` inline scripts
 cannot be added to default scripts".

 However I'm pretty sure someone will "not see" the inline docs or try it
 anyways. Perhaps we will also need a "Doing it wrong" when that is
 attempted.

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


More information about the wp-trac mailing list