How to show queued header scripts before they were printed?
-
Hello,
i would like to modify the script handling, before they were printed into the header. I’ve tried several hooks and prioritys, but the queue always included only the footer scripts.
If i print out “$wp_scripts” like this, the [queue] array includes only footer scripts, no jquery or buddypress scripts etc., which goes into header.
add_action( 'wp_enqueue_scripts', 'show_wp_scripts', 999 ); function show_wp_scripts() { global $wp_scripts; echo '<pre>'; print_r( $wp_scripts ); echo '<pre>'; }
the arrays [to_do], [done] or [groups] are empty. It’s all the same with the hooks “wp_print_scripts” or “wp_head” up to a priority of 8. At priority 9 the [queue] array hasn’t changed, but [done] holds all header scripts, which makes sense, because the action “wp_print_head_scripts” runs immediately before.
So, how can i get the complete list of queued scripts, BEFORE they were printed. Is this not possible?
Thx for help ??
- The topic ‘How to show queued header scripts before they were printed?’ is closed to new replies.