In WordPress version 6.3, create a transient named "_transient_wp_core_block_css_files" (~0.4MB) in the wp_options table to store the list of CSS files to load when using WordPress' blocks. When the site loads and needs to use the block, WordPress checks this transient to determine if the CSS files need to be loaded.
I don't use the block. I tried to set autoload from "yes" to "no" but failed:
- I try to change yes to no in phpmyadmin but no success.
- I try this in funtions.php but no success. add_filter( 'block_styles_should_load', '__return_false' ); delete_transient( '_transient_wp_core_block_css_files' );
Do you know any better way?
wp_core_block
it's for all core blocks, be that headings, paragraphs, etc etc, by changing this to autoload false you'll be reducing performance by making it do a second small DB query to fetch its value. I know you're hoping to reduce weight and make things faster/cleaner but you're actually doing the opposite unintentionally!