WordPress.org

Make WordPress Core

Ticket #21751: 21751.4.diff

File 21751.4.diff, 1.4 KB (added by lancewillett, 6 years ago)

Better off logic, no-subset as default extra subset string

  • wp-content/themes/twentytwelve/functions.php

     
    115115
    116116        /* translators: If there are characters in your language that are not supported
    117117           by Open Sans, translate this to 'off'. Do not translate into your own language. */
    118         if ( 'off' == _x( 'on', 'Open Sans font: on or off', 'twentytwelve' ) ) {
    119 
     118        if ( 'off' !== _x( 'on', 'Open Sans font: on or off', 'twentytwelve' ) ) {
    120119                $subsets = 'latin,latin-ext';
    121120
    122121                /* translators: To add an additional Open Sans character subset specific to your language, translate
    123122                   this to 'greek', 'cyrillic' or 'vietnamese'. Do not translate into your own language. */
     123                $subset = _x( 'no-subset', 'Open Sans font: add new subset (greek, cyrillic, vietnamese)', 'twentytwelve' );
    124124
    125                 $subset = _x( ' ', 'Open Sans font: add new subset (greek, cyrllic, vietnamese)', 'twentytwelve' );
    126 
    127                 if ( $subset == 'cyrillic' )
     125                if ( 'cyrillic' == $subset )
    128126                        $subsets .= ',cyrillic,cyrillic-ext';
    129                 elseif ( $subset == 'greek' )
     127                elseif ( 'greek' == $subset )
    130128                        $subsets .= ',greek,greek-ext';
    131                 elseif ( $subsets == 'vietnamese' )
     129                elseif ( 'vietnamese' == $subset )
    132130                        $subsets .= ',vietnamese';
    133131
    134132                $protocol = is_ssl() ? 'https' : 'http';