How can I get a list of all enqueued scripts and styles?
I’m creating a plugin and I want to get the list of all scripts and CSS used by other plugins. This is my function: function crunchify_print_scripts_styles() { $result = []; $result[‘scripts’] = []; $result[‘styles’] = []; // Print all loaded Scripts global $wp_scripts; foreach( $wp_scripts->queue as $script ) : $result[‘scripts’][] = $wp_scripts->registered[$script]->src . “;”; endforeach; … Read more