Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Google fonts
- function consult_google_fonts() {
- $fonts_url = '';
- $OpenSans = _x('on', 'OpenSans font: on or off', 'consult');
- $Montserrat = _x('on', 'Montserrat font: on or off', 'consult');
- if ('off' !== $OpenSans || 'off' !== $Montserrat) {
- $font_families = array();
- if ('off' !== $OpenSans) {
- $font_families[] = 'OpenSans:300i,400,400i,600,700,800';
- }
- if ('off' !== $Montserrat) {
- $font_families[] = 'Montserrat:200,300,400,500,600,700,800,900';
- }
- }
- $query_args = array(
- 'family' => urlencode( implode( '|', $font_families ) ),
- // 'subset' => urlencode('cyrillic-ext,cyrillic', 'vietnamese', 'greek-ext,greek', 'latin,latin-ext'),
- 'subset' => urlencode('cyrillic-ext,cyrillic,vietnamese,greek-ext,greek,latin,latin-ext'),
- );
- $fonts_url = add_query_arg($query_args, 'https://fonts.googleapis.com/css');
- return esc_url_raw($fonts_url);
- }
Add Comment
Please, Sign In to add comment