-
-
Save yanknudtskov/6429f7c8cca2fda4d2be64cb6cfeab24 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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