Skip to content

Instantly share code, notes, and snippets.

@thezenmonkey
Created April 3, 2018 18:39
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thezenmonkey/641db16e5fe99317939a6048c696a7d9 to your computer and use it in GitHub Desktop.
Save thezenmonkey/641db16e5fe99317939a6048c696a7d9 to your computer and use it in GitHub Desktop.
Visual Composer Overide Google Font List
add_filter('vc_google_fonts_get_fonts_filter','custom_fonts');
// $font_list from js_composer/include/params/google_fonts/google_fonts.php
function custom_fonts( $fonts_list ) {
$fonts_list = array();
$open_sans = new stdClass();
$open_sans->font_family = 'Open Sans';
$open_sans->font_styles = '300,300italic,regular,italic,600,600italic,700,700italic,800,800italic';
$open_sans->font_types = '300 light regular:300:normal,300 light italic:300:italic,400 regular:400:normal,400 italic:400:italic,600 bold regular:600:normal,600 bold italic:600:italic,700 bold regular:700:normal,700 bold italic:700:italic,800 bold regular:800:normal,800 bold italic:800:italic';
$fonts_list[] = $open_sans;
return $fonts_list;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment