You can use the global $wp_scripts
and global $wp_styles;
to get all registerd scripts and styles.
Eg.
All Scripts
// All Scripts
global $wp_scripts;
$all_scripts = array();
foreach( $wp_scripts->registered as $script ) :
$all_scripts[$script->handle] = $script->src;
endforeach;
// echo '<pre>';
// print_r( $all_scripts );
// echo '</pre>';
All Styles
// All Styles
global $wp_styles;
$all_styles = array();
foreach( $wp_styles->registered as $style ) :
$all_styles[$style->handle] = $style->src;
endforeach;
// echo '<pre>';
// print_r( $all_styles );
// echo '</pre>';
Related Posts:
- Where is the right place to register/enqueue scripts & styles
- How do I implement the WordPress Iris picker into my plugin on the front-end?
- Why does wp_enqueue_script ignore my ‘wp_head’ hook?
- Hook after wp_enqueue_scripts
- WP CLI Get all Enqueued Scripts and Styles
- customize_controls_enqueue_scripts doesn’t fire from within my plugin
- Where is the right place to register/enqueue scripts & styles
- PHP Notice: wp_enqueue_script was called incorrectly. Scripts and styles should not be registered
- Hook ‘wp_enqueue_scripts’ priority has no effect
- What can I hook into after_setup_theme?
- wp_enqueue_script before wp_head
- Use an array of page template slugs and $hook
- “admin_enqueue_scripts” hook or $_GET[‘page’]?
- “Intercept” enqueing of 3rd party’s JS file
- Moving Javascript from footer to header
- Dequeue styles with query doesn’t work
- Enqueue assets from multiple directories using add_action/do_action
- Call a single function on two different methods with hooks
- How do I ensure I can loop through every enqueued script and CSS?
- Stylesheet is getting removed/deregistered automatically
- Remove “enqueued” script from array
- The enqueue_block_assets is changing the styles of the editor interface
- How do I Enqueue styles/scripts on Certain /wp-admin Pages?
- Is there a way to send HTML formatted emails with WordPress’ wp_mail() function?
- How to get WordPress’ hooks/actions run sequence?
- Where can I find a list of WordPress hooks?
- Is there a save_post hook for custom post types?
- Conditionally Loading JavaScript/CSS for Shortcodes
- How to know what functions are hooked to an action/filter?
- How do I dequeue a parent theme’s CSS file?
- Check if a script/style was enqueued/registered
- How to hook update_post_meta and delete_post_meta?
- wp enqueue style on specific page templates
- Are there any hooks that alter the 404 logic?
- Is there a hook that runs after a user logs in?
- How to enqueue scripts on custom post add/edit pages?
- Difference between do_action and add_action
- How to load css in the footer [duplicate]
- How can I get a list of all enqueued scripts and styles?
- WP Cron Doesn’t Execute When Time Elapses
- WooCommerce: change display order of product short description and price [closed]
- Load CSS/Javascript in frontend conditionally if block is used
- Prevent Version URL Parameter (?ver=X.X.X) on Enqueued Styles & Scripts
- Why do some hooks not work inside class context?
- How to load Widget javascript + css files only if used?
- Difference between after_setup_theme and init action hooks?
- get $post in init filter or action?
- Use wp init hook to call other hooks?
- How to load scripts/styles specific for a page
- How many times can I hook into the same action?
- How to intercept a 404 error
- Move excerpt meta box to above content editor
- Action hook for custom tax edit
- Trigger custom action when setting button pressed
- What is “all” in isset($wp_filter[‘all’])
- Whats worth using add_action when we can simply use add_filter?
- How can I de-register ALL styles all at once? And same with Javascript?
- Is there a limit to hook priority?
- How to add stylesheets only to pages with specific shortcode?
- Please explain how these hooks work
- Add_action to wp_head via functions.php
- Hook after image is uploaded and image sizes generated
- Is there a hook before the user is authenticated?
- How to remove the Theme Customization Button from the dashboard and themes options page?
- Hook that fires when admin setting is saved
- Enqueue custom font file with rel=”preload”
- How do I force wp_enqueue_scripts to load at the END of ?
- add_action(‘wp_ajax_[action name]’, myfunction) problem
- What is the difference between update_post_meta and update_postmeta hooks?
- Hook on trash post
- Load js/css files only on specific admin UI pages
- Hook *after* user password change?
- Auto-retrieve YouTube Image for Thumbnail?
- Which hook if user profile information is updated?
- How to remove action hook done in a plugin from functions.php in my theme?
- Hooks for trashing, deleting, saving, restoring custom post type
- Get list of scripts / styles and show file which enqueued them
- Is there a WordPress core & plugins update action hook?
- Hook into WordPress update?
- trigger save_post event programmatically
- Implementing advanced add_* function wrappers
- Adding onload to body
- My add_action (wp_footer, ‘method’) is not calling?
- Why I can’t add a CSS style in this WordPress theme?
- Do WordPress Core Filenames Work as Hooks?
- What is the earliest possible hook for safely using `is_front_page`?
- Removing specific style from wp_head
- switch_to_blog(): Load textdomain
- How to dequeue / deregister any theme styles and scripts
- How to call a REST endpoint when a post is published?
- __NAMESPACE__ with register_activation_hook
- When can you get current page ID and initialize hooks right after?
- Can I hook inside another hook?
- Adding function directly vs using hook in function.php
- Are hooks called synchronously?
- How to check if which hook triggered the call to a function?
- The difference between calling wp_enqueue_scripts to load scripts and styles in custom theme
- How can I send to multiple Contact Form 7 recipients based on form input? [closed]
- Hook into wp_head(); in a plugin
- Notice that the wp_enqueue_style is not being called correctly!