|Reported by:||tigusigalpa||Owned by:|
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.
Change History (6)
comment:2 follow-up: ↓ 3 @SergeyBiryukov — 2 years ago
- Keywords reporter-feedback added; needs-patch dev-feedback removed