Make WordPress Core


Ignore:
Timestamp:
11/18/2013 09:39:22 PM (10 years ago)
Author:
iammattthomas
Message:

Load the correct subset of Open Sans for cyrillic, greek, and vietnamese in addition to latin and latin-ext; following the example of Twenty Twelve. See #26063, props SergeyBiryukov.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/script-loader.php

    r26243 r26254  
    560560    $styles->add_data( 'ie', 'conditional', 'lte IE 7' );
    561561
     562    $subsets = 'latin,latin-ext';
     563
     564    /* translators: To add an additional Open Sans character subset specific to your language,
     565     * translate this to 'greek', 'cyrillic' or 'vietnamese'. Do not translate into your own language.
     566     */
     567    $subset = _x( 'no-subset', 'Open Sans font: add new subset (greek, cyrillic, vietnamese)' );
     568
     569    if ( 'cyrillic' == $subset )
     570        $subsets .= ',cyrillic,cyrillic-ext';
     571    elseif ( 'greek' == $subset )
     572        $subsets .= ',greek,greek-ext';
     573    elseif ( 'vietnamese' == $subset )
     574        $subsets .= ',vietnamese';
     575
    562576    // Hotlink Open Sans, for now
    563     $styles->add( 'open-sans', '//fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,300,400,600&subset=latin-ext,latin' );
     577    $styles->add( 'open-sans', "//fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,300,400,600&subset=$subsets" );
    564578
    565579    // Dashicons
Note: See TracChangeset for help on using the changeset viewer.