with chat GPT i found solution.
add_filter(‘use_block_editor_for_post_type’, ‘__return_false’, 99999);
add_action( ‘wp_enqueue_scripts’, ‘remove_block_css’, 99999 );
function remove_block_css() {
wp_dequeue_style( ‘wp-block-library’ );
wp_dequeue_style( ‘wp-block-library-theme’ );
wp_dequeue_style( ‘wc-block-style’ );
wp_dequeue_style( ‘jet-engine-frontend’ );
wp_dequeue_style( ‘rank-math’ );
wp_dequeue_style( ‘bricks-404’ );
wp_dequeue_style( ‘bricks-admin’ );
}
function remove_bricks_frontend_style() {
wp_deregister_style( ‘bricks-frontend’ );
wp_dequeue_style( ‘bricks-frontend’ );
}
add_action( ‘wp_enqueue_scripts’, ‘remove_bricks_frontend_style’, 999 );
I with this code i disable all Bricks CSS file they don’t load without enabling the WooCommerce plugin (even the bricks WooCommerce file won’t load).
With your stroke of code
add_filter(‘use_block_editor_for_post_type’, ‘__return_false’, 99999);
add_action( ‘wp_enqueue_scripts’, ‘remove_block_css’, 99999 );
function remove_block_css() {
wp_deregister_style( ‘wp-block-library’ );
wp_dequeue_style( ‘wp-block-library’ );
wp_dequeue_style( ‘wp-block-library-theme’ );
wp_dequeue_style( ‘wc-block-style’ );
wp_dequeue_style( ‘jet-engine-frontend’ );
wp_dequeue_style( ‘rank-math’ );
wp_dequeue_style( ‘bricks-404’ );
wp_dequeue_style( ‘bricks-admin’ );
}
Bricks file continue to upload. With GPT solution, all bricks CSS file not uploaded what I ideally want in the future, when I rewrite all the files for my design system. But this solution may not suit someone, and they want to limit only some brick files. For me personally, GPT has already given a solution for CSS files, but this may be a problem for others. I also want to note that this did not break the work of JS bricks files, and it turned into half of the option that I would like to see in the builder, this is to disable file uploads + remove default CSS brick selectors (with the latter, I understand that this can cause problems with js)