Advanced Customizations

Below you’ll find advanced customizations. These customizations can be added to a child theme functions.php file, a custom plugin, or the Code Snippets plugin.

Prevent the Widgets Bundle From Importing Google Fonts

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' );