[wp-trac] [WordPress Trac] #22739: wp_register_script/wp_enqueue_script problem
WordPress Trac
noreply at wordpress.org
Tue Dec 4 18:51:01 UTC 2012
#22739: wp_register_script/wp_enqueue_script problem
--------------------------------------+--------------------------
Reporter: tigusigalpa | Type: defect (bug)
Status: new | Priority: normal
Milestone: Awaiting Review | Component: General
Version: 3.4.2 | Severity: minor
Keywords: needs-patch dev-feedback |
--------------------------------------+--------------------------
First of all: sorry for my bad English.
Hi, i've seen may be a bug while programming a plugin (Len Slider).
I have some handle-scripts like jquery, jquery-ui to enqueue, its ok. Also
I have my known js-files to enqueue, ok too. BUT! When I want to enqueue
dynamic js (gets from folders via glob), it enqueue too BUT BEFORE jquery,
jquery-ui itc. When I enqueue script with custom handle and in foreach
loop, BUT with deps parameter as array of jquery, jquery-ui etc. And this
dynamic js-file loads BEFORE jquery or jquery-ui! Now I solve the problem
by load known handles jquery, jquery-ui in header and my own in footer,
but i think we need to look for core to solve it.
You can see it on Len Slider in len-slider/lib/lenslider.class.php:313 -
lenslider_make_skins_files_wp_head method
Also I think about parameter like priority for
wp_register_script/wp_enqueue_script(style) functions to load it by this
range.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/22739>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list