bricks already has a feature to disable the default icon libs but sometimes some styles still persists and creates network call.
anyway if anyone needs to or wants to remove default icons this is the snippet to use
a bit of extreme way but they best way as aswell since this methodology just KILLS those sources and styles for good 🙂
/**
* Dequeue and deregister Bricks icon fonts (Late Execution)
*/
function my_custom_dequeue_bricks_icons_late() {
// 1. Font Awesome 6
wp_dequeue_style( 'bricks-font-awesome-6' );
wp_deregister_style( 'bricks-font-awesome-6' );
// 2. Font Awesome 6 Brands
wp_dequeue_style( 'bricks-font-awesome-6-brands' );
wp_deregister_style( 'bricks-font-awesome-6-brands' );
// 3. Ionicons
wp_dequeue_style( 'bricks-ionicons' );
wp_deregister_style( 'bricks-ionicons' );
// 4. Themify Icons
wp_dequeue_style( 'bricks-themify-icons' );
wp_deregister_style( 'bricks-themify-icons' );
}
// Run extremely late (priority 9999) to ensure it overrides Bricks
add_action( 'enqueue_block_editor_assets', 'my_custom_dequeue_bricks_icons_late', 9999 );
add_action( 'wp_enqueue_scripts', 'my_custom_dequeue_bricks_icons_late', 9999 );
add_action( 'admin_enqueue_scripts', 'my_custom_dequeue_bricks_icons_late', 9999 );