Skip to content

Instantly share code, notes, and snippets.

@yanknudtskov
Last active September 15, 2017 06:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yanknudtskov/6429f7c8cca2fda4d2be64cb6cfeab24 to your computer and use it in GitHub Desktop.
Save yanknudtskov/6429f7c8cca2fda4d2be64cb6cfeab24 to your computer and use it in GitHub Desktop.
<?php
/**
* Remove Enfold Google Web Fonts
*/
add_action( 'init', 'enfold_customization_switch_fonts' );
function enfold_customization_switch_fonts() {
global $avia;
$avia->style->print_extra_output = false;
}
/**
* Enqueue Google Web Fonts in Footer
*/
function yanco_footer_scripts() {
if( !is_admin() ) {
$query_args = array(
'family' => 'Lato:300,400,700|Open+Sans:400,700',
'subset' => 'latin,latin-ext',
);
wp_register_style( 'yanco-google-fonts', add_query_arg( $query_args, "//fonts.googleapis.com/css" ), array(), null );
wp_enqueue_style('yanco-google-fonts' );
}
}
add_action( 'wp_footer', 'yanco_footer_scripts' );
/**
* Remove Google Fonts from Monarch
*/
function yanco_et_monarch_disable_fonts() {
wp_dequeue_style( 'et-gf-open-sans' );
}
add_action( 'wp_enqueue_scripts', 'yanco_et_monarch_disable_fonts', 99 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment