Make WordPress Core

Ticket #26063: 26063.2.patch

File 26063.2.patch, 2.2 KB (added by dimadin, 11 years ago)
  • wp-includes/script-loader.php

     
    559559        $styles->add( 'ie', "/wp-admin/css/ie$suffix.css" );
    560560        $styles->add_data( 'ie', 'conditional', 'lte IE 7' );
    561561
    562         $subsets = 'latin,latin-ext';
     562        $open_sans_font_url = '';
    563563
    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.
     564        /* translators: If there are characters in your language that are not supported
     565         * by Open Sans, translate this to 'off'. Do not translate into your own language.
    566566         */
    567         $subset = _x( 'no-subset', 'Open Sans font: add new subset (greek, cyrillic, vietnamese)' );
     567        if ( 'off' !== _x( 'on', 'Open Sans font: on or off' ) ) {
     568                $subsets = 'latin,latin-ext';
    568569
    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';
     570                /* translators: To add an additional Open Sans character subset specific to your language,
     571                 * translate this to 'greek', 'cyrillic' or 'vietnamese'. Do not translate into your own language.
     572                 */
     573                $subset = _x( 'no-subset', 'Open Sans font: add new subset (greek, cyrillic, vietnamese)' );
    575574
    576         // Hotlink Open Sans, for now
    577         $styles->add( 'open-sans', "//fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,300,400,600&subset=$subsets" );
     575                if ( 'cyrillic' == $subset ) {
     576                        $subsets .= ',cyrillic,cyrillic-ext';
     577                } elseif ( 'greek' == $subset ) {
     578                        $subsets .= ',greek,greek-ext';
     579                } elseif ( 'vietnamese' == $subset ) {
     580                        $subsets .= ',vietnamese';
     581                }
    578582
     583                $query_args = array(
     584                        'family' => 'Open+Sans:300italic,400italic,600italic,300,400,600',
     585                        'subset' => $subsets,
     586                );
     587                // Hotlink Open Sans, for now
     588                $open_sans_font_url = add_query_arg( $query_args, '//fonts.googleapis.com/css' );
     589        }
     590
     591        $styles->add( 'open-sans', $open_sans_font_url );
     592
    579593        // Dashicons
    580594        $styles->add( 'dashicons', '/wp-includes/css/dashicons.css' );
    581595