Make WordPress Core

Changeset 30881


Ignore:
Timestamp:
12/15/2014 10:57:18 PM (9 years ago)
Author:
johnbillion
Message:

Twenty Fifteen: remove fonts as a style dependency.

Merges [30832] to the 4.1 branch.

Props obenland, SergeyBiryukov.
Fixes #30678.

Location:
branches/4.1
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.1

  • branches/4.1/src/wp-content/themes/twentyfifteen/functions.php

    r30790 r30881  
    151151 */
    152152function twentyfifteen_fonts_url() {
    153     $fonts   = array();
    154     $subsets = 'latin,latin-ext';
     153    $fonts_url = '';
     154    $fonts     = array();
     155    $subsets   = 'latin,latin-ext';
    155156
    156157    /* translators: If there are characters in your language that are not supported by Noto Sans, translate this to 'off'. Do not translate into your own language. */
     
    182183    }
    183184
    184     return add_query_arg( array(
    185         'family' => urlencode( implode( '|', $fonts ) ),
    186         'subset' => urlencode( $subsets ),
    187     ), '//fonts.googleapis.com/css' );
     185    if ( $fonts ) {
     186        $fonts_url = add_query_arg( array(
     187            'family' => urlencode( implode( '|', $fonts ) ),
     188            'subset' => urlencode( $subsets ),
     189        ), '//fonts.googleapis.com/css' );
     190    }
     191
     192    return $fonts_url;
    188193}
    189194endif;
     
    202207
    203208    // Load our main stylesheet.
    204     wp_enqueue_style( 'twentyfifteen-style', get_stylesheet_uri(), array( 'twentyfifteen-fonts', 'genericons' ) );
     209    wp_enqueue_style( 'twentyfifteen-style', get_stylesheet_uri(), array( 'genericons' ) );
    205210
    206211    // Load the Internet Explorer specific stylesheet.
Note: See TracChangeset for help on using the changeset viewer.