Know JS handlers.
-
Hi, how are you?
I’m trying to enqueue all my js, to see if that improve my load speed.
When I try to get each handler with these lines in the functions.php (I don’t kwno another way):
function head_scripts_handle() {
global $wp_scripts;
foreach( $wp_scripts->queue as $handle ) :
echo $handle,’ ‘;
endforeach;
}
add_action( ‘wp_print_scripts’, ‘head_scripts_handle’ );I only get some handlers, about 23, and if I go to the source code of my site I see 32 js.
There is a way to get all the handlers? And for example:
JS Handle
script.js script handleSo, I will have the script X belong to the handler X (there are a few scripts that I can’t identify the handler).
Thanks in advance!
- The topic ‘Know JS handlers.’ is closed to new replies.