Elementor: Disable Font Awesome 4 Compatibility Shim
Prevents Elementor from loading the FA4 backward-compatibility shim, reducing page weight on sites that only use Font Awesome 5 or 6 icons.
PHPby SnipCraft
php
<?php
/**
* Disable Elementor's Font Awesome 4 shim (fa-* class aliases for FA5+).
* Only apply this if your theme and all installed Elementor widgets use
* FA5+ icon class names exclusively. Removes ~30 KB of extra JS/CSS.
*/
add_action( 'plugins_loaded', function() {
if ( ! defined( 'ELEMENTOR_VERSION' ) ) {
return;
}
add_filter( 'pre_option_elementor_load_fa_4_shim', '__return_empty_string' );
} );#assets#elementor#font-awesome#icons#performance