[wp-trac] [WordPress Trac] #20971: Delaying wp_default_scripts() prevents enqueing

WordPress Trac wp-trac at lists.automattic.com
Fri Jun 15 18:21:49 UTC 2012


#20971: Delaying wp_default_scripts() prevents enqueing
--------------------------+--------------------
 Reporter:  nacin         |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  3.4.1
Component:  General       |     Version:  3.4
 Severity:  major         |  Resolution:
 Keywords:                |
--------------------------+--------------------

Comment (by azaozz):

 wp_enqueue_script() does both: `$wp_scripts->add()` and then
 `$wp_scripts->enqueue()`. When it's called too early, wondering if we
 could delay these two calls until the right time, i.e. the
 'wp_enqueue_scripts' or 'admin_enqueue_scripts' actions.

 Another way to fix this would be to have a "default order" for some of the
 core scripts like Prototype before jQuery, libraries first, etc. Been
 thinking to add this to WP_Scripts and possibly to WP_Styles (and get rid
 of `wp_prototype_before_jquery()`).

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/20971#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list