WordPress: Printout enqueued styles and scripts via their $handle.
function my_inspect_styles() {
global $wp_styles;
echo '<!-- Styles: ';
foreach( $wp_styles->queue as $handle ) {
echo $handle . ' | ';
}
echo '-->';
}
function my_inspect_scripts() {
global $wp_scripts;
echo '<!-- Scripts: ';
foreach( $wp_scripts->queue as $handle ) {
echo $handle . ' | ';
}
echo '-->';
}
add_action( 'wp_print_styles', 'my_inspect_styles' );
add_action( 'wp_print_scripts', 'my_inspect_scripts' );