I’m not really sure why you’d want to do this…but the only thing I can think of that might work is something like this:
function prefix_block_resources(){
if(is_admin())return; //I can't imagine any scenario where blocking scripts in the admin area would be wise.
global $wp_scripts;
global $wp_styles;
$wp_scripts->queue = array();
$wp_styles->queue = array();
return;
}
add_action('wp_head', 'prefix_block_resources');
That will block any styles and scripts that have been loaded using the WordPress API, it won’t do anything about styles/scripts that have been hardcoded into the theme.
Related Posts:
- How can I reduce the amount of files loaded/included per plugin?
- How can I make content disappear when a user logs in?
- Prevent CSS/JS loading when plugin is not used
- W3 Total Cache: Load CSS asynchronously for better PageSpeed score? [closed]
- Is there an earlier hook than login_head or login_enqueue_scripts?
- Can someone please tell me what is wrong with my plugin?
- How to get DEFER or ASYNC attribute to appear when I add a stylesheet with wp_enqueue_style from a plugin? [duplicate]
- Redirect to another page using contact form 7? [closed]
- How to execute a plugin on a single page only?
- get specific value of a array | PHP
- CSS/JS files in WordPress
- How do I override all stylesheets and scripts without a plugin
- uncaught TypeError: Cannot read properties of null (reading ‘classList’) custom plugin
- How do I minify a plugins CSS/JS code?
- Custom Plugin scripts from admin working in frontend
- Overriding inline !important CSS with Javscript code snippet with media query
- Speeding up WordPress on a Local Network
- Caching of combined CSS and JS fails because of losing MIME types through combining by PHP
- Speed issues because of CSS & JavaScript
- Best use adding user generated JS/CSS to a theme with a plugin
- How to set up php,javascript and css to allow for our finished product to be displayed within a page?
- Possible jquery / library conflict in plugin usage
- contact 7 plugin stops some pages from working properly
- Element works, but not on wordpress site [duplicate]
- Eliminate Render blocking CSS?
- Sudden ERR_HTTP2_PROTOCOL_ERROR on every JS and CSS files loads
- Why does wp_enqueue_style() in plugin not load stylesheet?
- Why my browser keeps loading old version of custom JavaScript files in \divi\js? [closed]
- Add CSS animation as Preloader to WordPress
- How to use wp-ajax in wp-cron
- Add extra parameter in tag using script_loader_tag
- Insert code after tag without using functions.php?
- Adding with javascript to admin bar. Works in Chrome/Safari, not Firefox
- Unable to load stylesheets and scripts to plugin settings page
- How to avoid redefining requirejs in plugin when another plugin also uses requirejs
- Passing select control value to block
- Is it possible to use Snap Scrolling? [closed]
- Reuse javascripts from plugins within the theme
- Image resizing on home page (product category) [closed]
- WP-Cufon adding extra space in my paragraphs in Firefox and Chrome
- Problem in loading javascript in footer
- Custom CSS for plugin form
- How do I modify the position of a plugin?
- How to disable CSS rule in Twentythirteen style.css?
- Theme’s default styles are overriding my plugin’s custom CSS
- Remove ALL css for a specific plugin page
- Best approach to fetch data from wp options to js file or php file
- Scripts at the end of the page
- wordpress site | All-in-one-cufon IE Issue
- Enqueue WordPress plugin scripts below all other JS
- How to add Internationalization in WordPress using Javascript/React?
- How to get the element ID from new menu list that added with add_filter()?
- Modifying a .js Function for Print [QZ Tray, WooCommerce POS]
- Is there a standard way to listen for an on change event of a posts featured image
- WordPress plugin output formatting
- What would I need to write into a custom plugin in order to add a switch for a custom string of CSS to the edit page?
- Ajax Search Lite: Customize Autoscroll
- How to insert HTML/JavaScript form into WordPress page? [closed]
- Using window.onload with Ubermenu
- Stop Plugin from Getting Styles from Other Plugin
- How to apply next/previous classes to LIs for pagination links?
- wordpress add_action() issue in ajax call
- Localizing methods for jQuery append prepend wrap parent
- Wooslider custom css
- Minimizing scripts & css files that plugins add
- Which plugin can do horizontal scrolling of RSS feeds in WordPress [closed]
- How to make a dynamic css class whose name changes every visit to confuse scraper
- Flickering sidebar when scrolling page [closed]
- Is wp_deregister_script the best way to deal with unneeded plugins in a page?
- Block wordpress style for my plugin admin page
- how to request a script more than once in wordpress
- How to turn off automatic operation for Nivo Slider?
- Wp-minify doesn’t seem to minify my JS code
- Ajax call not working in wordpress through a plugin
- Want to create custom design of progress indicator in wpforms
- Strange admin-ajax / CSS / $_SESSION issue
- Cannot run script properly with my custom plugin
- Performing CRUD operations on front end in wordpress
- How to add specific script to WordPress webpage that will working with user input and databases
- Apply only the css in my style.css file
- SASS not showing in customized preloader plugin
- Add external javascript to post template
- Why can I not deregister my style and script on custom post type?
- AJAX update fails for public/non-admin users
- Conditional Fields depending on checkboxes
- Adding javascript to header of MetroMagazine theme
- Jetpack Comments Change Placeholder Text
- Media Playlist Plugin
- Adding an onchange event to a custom dropdown menu in WordPress
- Like/Dislike Bar not working when updating
- Plugin and javascript placement
- Why won’t the Comprehensive Google Map Plugin load?
- making a simple plugin
- Javascript as Jquery Function Call?
- Content expands beyond its column container [closed]
- how to show selected options drop down menu values in attributes field in after saving post.php
- Is there a membership plugin which offers the ability to hide content based on css rules?
- How to add an active state class to my info box
- How to get selected variation from URL?
- How to change css poperty through webhook in wordpress