Inspect all enqueued scripts

Arun - 02/06/2020 12:31 PM

Add this code to functions.php to see all enqueued scripts

Files 1

functions.php
php
function inspect_scripts() {
    global $wp_scripts;
    foreach( $wp_scripts->queue as $handle ) :
        echo $handle.'<br>';
    endforeach;
}
add_action( 'wp_print_scripts', 'inspect_scripts' ); //show all enqueued scripts