Created
January 5, 2018 21:44
-
-
Save matthijs166/1b208dabab1826d964caa9192b6b60b2 to your computer and use it in GitHub Desktop.
add font and style to wigiy editor
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
//add font to wigiy editor | |
add_editor_style( '/css/editor.css' ); | |
add_filter( 'tiny_mce_before_init', 'wpex_mce_google_fonts_array' ); | |
function wpex_mce_google_fonts_array( $initArray ) { | |
$theme_advanced_fonts = 'futura=futura;'; | |
$theme_advanced_fonts .= 'futura_b=futura_b;'; | |
$theme_advanced_fonts .= 'avenir_Bold=avenir_b;'; | |
$theme_advanced_fonts .= 'avenir_Regular=avenir_r'; | |
$initArray['font_formats'] = $theme_advanced_fonts; | |
return $initArray; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment