[wp-trac] [WordPress Trac] #36791: Set load order when enqueuing scripts and styles

WordPress Trac noreply at wordpress.org
Tue May 10 13:24:30 UTC 2016


#36791: Set load order when enqueuing scripts and styles
--------------------------------------+------------------------------
 Reporter:  logistiker                |       Owner:
     Type:  enhancement               |      Status:  new
 Priority:  normal                    |   Milestone:  Awaiting Review
Component:  Script Loader             |     Version:  trunk
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+------------------------------

Comment (by logistiker):

 In addition, another reason for controlling the script or style queue
 directly is to prevent the same script or style from being loaded again.
 For example, if I used the priority in action as you suggested, I would
 effectively have a different script queue from the main one (via
 wp_enqueue_script).  If the main one loaded jquery and my action that
 contained a script that also needed to load jquery, I would effectively
 load jquery twice.

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


More information about the wp-trac mailing list