function so_dont_import_google_fonts() { if ( ! is_admin() ) { add_filter( 'siteorigin_widgets_google_webfonts', '__return_false' ); add_filter( 'siteorigin_widget_get_custom_font_family', function ( $font ) { if ( strpos( $font['family'], ':') ) { $font['family'] = explode( ':', $font['family'] )[0]; } return $font; } ); } } add_action( 'init', 'so_dont_import_google_fonts' );
Zum Inhalt springen