Make WordPress Core

Changeset 30832


Ignore:
Timestamp:
12/12/2014 06:25:30 PM (10 years ago)
Author:
lancewillett
Message:

Twenty Fifteen: remove fonts as a style dependency.

Props obenland, SergeyBiryukov. Fixes #30678.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentyfifteen/functions.php

    r30790 r30832  
    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.