I would like to know how to get the list of scripts enqueued in wordpress via wp_enqueue_script. I have done some research and checked the wp core itself but the closest I can get is something like:
add_options_page('Wp Sysinfo', 'Wp Sysinfo', 'manage_options', 'wp-sysinfo', 'sysinfo_page');
function sysinfo_page(){
global $wp_scripts;
print_r($wp_scripts->queue);
}
However it only show scripts in the admin pages not the front end.
FYI: Im building a plugin to display system information in wordpress. This is to provide plugin/theme authors useful info to troubleshoot problems reported by users.
Edit:
In short, I need a way to get all scripts and styles enqueued in both admin and frontend, and view them within a custom admin page.