Skip to content
Snippets Groups Projects
Commit 11555206 authored by lucha's avatar lucha Committed by agata
Browse files

removed googleapis font support from path theme

parent eff044d5
No related branches found
No related tags found
1 merge request!3Noblogs 5.4
...@@ -274,64 +274,7 @@ final class Theme_Fonts { ...@@ -274,64 +274,7 @@ final class Theme_Fonts {
* @return void * @return void
*/ */
protected function get_style_uri() { protected function get_style_uri() {
/* Get the theme-specified settings for the 'theme-fonts' feature. */
$supports = get_theme_support( 'theme-fonts' );
/* Set up an empty string for the font string. */
$font_string = '';
/* Loop through each of the font settings and queue the fonts associated with them. */
foreach ( $this->settings as $name => $setting ) {
$font_handle = get_theme_mod( "theme_font_{$name}", $setting['default'] );
$this->queue_font( $font_handle );
}
if ( empty( $this->font_queue ) )
return ''; return '';
/* Loop through each of the queued fonts and add them to the font string. */
foreach ( $this->font_queue as $family => $args ) {
$font_string .= !empty( $font_string ) ? "|{$family}" : $family;
/* If any font styles (weight, style) were specified, add them to the string. */
if ( isset( $args['styles'] ) && is_array( $args['styles'] ) ) {
$font_styles = array_unique( $args['styles'] );
$font_string .= ':' . join( ',', $font_styles );
}
}
/* Set up the query arguments and add the font family. */
$query_args = array( 'family' => $font_string );
/* If the theme registered support for other font settings, add them. */
if ( !empty( $supports[0] ) ) {
/* Get the defined subset. */
$subset = isset( $supports[0]['subset'] ) ? $supports[0]['subset'] : array();
/* Allow devs and theme users to override the subset. */
$subset = apply_filters( 'theme_fonts_subset', $subset );
/* If a subset was defined, add it to the query args. */
if ( !empty( $subset ) )
$query_args['subset'] = urlencode( join( ',', $subset ) );
/* If specific text is requested, add it to the query args. */
if ( isset( $supports[0]['text'] ) )
$query_args['text'] = urlencode( $supports[0]['text'] );
}
/* Set up the stylesheet URI. */
$style_uri = ( is_ssl() ? 'https' : 'http' ) . '://fonts.googleapis.com/css';
/* Return the stylesheet URI with added query args. */
return add_query_arg( $query_args, $style_uri );
} }
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment