[wp-trac] [WordPress Trac] #12415: wp_enqueue_style doesn't obeserve proper dependency order

WordPress Trac wp-trac at lists.automattic.com
Sat Feb 27 18:42:44 UTC 2010


#12415: wp_enqueue_style doesn't obeserve proper dependency order
--------------------------+-------------------------------------------------
 Reporter:  mtekk         |       Owner:             
     Type:  defect (bug)  |      Status:  new        
 Priority:  normal        |   Milestone:  3.0        
Component:  General       |     Version:  3.0        
 Severity:  normal        |    Keywords:  needs-patch
--------------------------+-------------------------------------------------
 Since load-styles.php blindly loads styles in the order they are requested
 from it, it is vital that these are requested in the proper order. If
 someone calls

 {{{
 wp_enqueue_style('media');
 }}}

 wp_enqueue_style will produce the following dependency load:

 load-styles.php?c=1&dir=ltr&load=media,global,wp-admin

 This is bad as media depends on global and wp-admin, and must be loaded
 after global and wp-admin. Otherwise the cascading nature of CSS causes
 media's styles to do nothing. It should produce something like:

 load-styles.php?c=1&dir=ltr&load=global,wp-admin,media

 This actually looks to be an issue with WP_Dependencies, possibly broken
 logic in WP_Dependencies::all_deps, though I'm not sure if this is the
 case as wp_enqueue_scripts doesn't seem to be broken. This behavior was
 observed in r13462.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/12415>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list