You either use the admin_*/wp_print_scripts hook or the admin_*/wp_print_styles hook. The styles hook comes before the print scripts hook, so maybe it fits better than just using a priority of 0 for the *_print_scripts hook (there might be function with a name that’s hooked in earlier on priority 0).
function wpse61635_remove_all_scripts()
{
global $wp_scripts;
$leave_alone = array(
// Put the scripts you don't want to remove in here.
);
foreach ( $wp_scripts->queue as $handle )
{
// Here we skip/leave-alone those, that we added above ↑
if ( in_array( $handle, $leave_alone ) )
continue;
$wp_scripts->remove( $handle );
}
}
add_action( 'wp_print_styles', 'wpse61635_remove_all_scripts', 0 );
Related Posts:
- Custom Post Type Templates from Plugin Folder?
- How to maintain W3C standards compliance of a theme
- Difference between a theme and a plugin?
- Plugin (or Theme) containing its own Plugins?
- All shortcodes not working on custom theme
- Disable plugins on cron and ajax page
- Is it good practice to remove redundant plugins and themes?
- Declare a function before plugin does on the theme functions.php file
- Why users disable the WordPress update?
- Whats the difference between Page Builder Plugins and Theme Builder Softwares? [closed]
- How to use load_plugin_textdomain from within a theme
- I can’t upload a new wordpress theme from a zipped file
- Theme and Plugins sharing common libraries
- Is there a quick way to inject i18n domain into theme/plugin files?
- How to avoid redefining requirejs in plugin when another plugin also uses requirejs
- Get list of sites that uses specific plugin or theme
- Set WordPress Featured Image For All Post Slugs Matching Image File Name in Specified Directory
- Is there a reliable way to keep track of how long a WordPress theme has been active?
- Woocommerce sidebar not loading in theme
- Include Max mega menu Plugin into theme
- How can I list recent posts excerpts?
- Theme or Plugin: Where should I write my code?
- Plugin Deactivate Self on Activation Errors
- Is it possible to use WordPress as an online portfolio for text content? What kind of theme would I look for?
- Do I still need a theme to use page builders?
- Two (or more) looks, with one set of content
- Can I make a super plugin that also has a theme?
- Prevent WordPress installing plugins and themes via Admin
- Plugin Handle URL With Custom Theme
- How to read individual user’s directory and display content to that specific user?
- WSOD after upgrading to 3.1
- Check for security updates
- Plugin-generated pages use Not Found or Pages Archive templates?
- Is there any kind of theme on WordPress to sell my own movies?
- All sites themes functions.php have been changed
- Overwrite category head title
- How to check if my wordpress websiste is nulled or not?
- Remove specific plugins and themes from the Dashboard->Updates page [duplicate]
- Create custom pages with a plugin
- Does heavy theme and plugins affect server’s response time? [closed]
- Proper way to use plugin functions in functions.php
- Theme Custom Pages
- how remove font to increase site speed load
- Use $variable from file1.php in file2.php (different file paths)
- How to get theme’s info from wordpress.org/themes using api.wordpress.org?
- How to find the list of custom post type where logged in user is author
- What is the purpose of WP_CONTENT_URL?
- How can I use my custom wordpress theme on two websites? [closed]
- why need theme,if page builder is there in wordpress [closed]
- speed up pagination for huge database
- Can I filter a function created by a theme or a plugin?
- How to check homepage contain blog post?
- how to design change in woocommerce cart page and all other page also by theme? [closed]
- Is it possible for a plugin to prevent certain plugins from being installed?
- How do you create a re-useable HTML fragment in wordpress
- plugin inside a wordpress theme
- Identify current wordpress theme
- Share plugins, themes, and multi post in a multidomain network
- Removing the custom_image_header from wp_head
- Gantry Framework: new page loads homepage content instead of page content
- Upgrade not working & themes not supporting
- Plugin Admin panel checkbox unchecked after submit
- use EDD Content Restriction for restricting php in template
- Elementor pro page editing gives error There has been a critical error on this website. Please check your site admin email inbox for instructions
- Can’t load the the canges of field groups [duplicate]
- Javascript console errors and WSOD on edit post pages
- How Can I Create A Form In WordPress For Subscribers To Alert Them about new Listing posted?
- What plugin would make this happen? If is the theme
- WordPress site hamburger menu toggle not working
- WordPress wp get_temp_dir return non exiting folder, thus failing plugin & themes update
- Link custom post type to page
- How to disable a widget area of a specific page?
- when i activate my WordPress plugin cannot see customizer options or preview
- Writing SEO for Homepage when homepage is set to display latest posts
- Showing different js file for different theme in wordpress customizer api
- Getting unknown text in footer of email
- Seeking specific WordPress Layout
- Description: Too much time has passed without sending any data for document
- How can I make the search bar in my wordpress site search all of the pages rather than just the blog posts?
- WordPress Theme/Plugin Install (about FTP Connection)
- WordPress core update fails – no issues with plugin updates
- Why the output of an image gallery plugin is not displayed into a page of my custom theme?
- How to add the functionality of WordPress needed to be installed to be mandatory while installing themes
- Incentive theme – Getting ’You do not have sufficient permissions’ while trying to install plugins
- How do I make the selected layout display for all MarketPress pages?
- Issues with Post 2 Post Plugin
- Disqus plugin outputs script as literal text
- Can’t get custom user meta to show in header
- How to get current template file used by WordPress?
- How to make only selected posts appear on a selected wordpress page
- How to work email subscribe in WordPress?
- Terms id wordpress error
- How to make wordpress backend mobile optimized.?
- wordpress illegal string offset ‘parameter’ error
- What is phpBB? Is it something like a plugin which I can use in WordPress? [closed]
- Is there a way to stop the theme and especially plugins listed?
- Issue with customizer and widget page
- WordPress menu dissapear when I add a parameter to custom post archive
- WordPress theme is not displaying the correct home page in the Pages section
- Newspaper theme, custom query vars, & custom rewrite rules