Skip to content

Commit

Permalink
Twenty Twelve: better logic for on/off setting to be translated to tu…
Browse files Browse the repository at this point in the history
…rn off the font if translators explicitly say so. Also minor fixes to spelling and to use yoda comparison. Fixes #21751.

git-svn-id: http://core.svn.wordpress.org/trunk@22066 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
lancewillett committed Sep 27, 2012
1 parent 115d539 commit 1692675
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions wp-content/themes/twentytwelve/functions.php
Expand Up @@ -115,20 +115,18 @@ function twentytwelve_scripts_styles() {

/* translators: If there are characters in your language that are not supported
by Open Sans, translate this to 'off'. Do not translate into your own language. */
if ( 'off' == _x( 'on', 'Open Sans font: on or off', 'twentytwelve' ) ) {

if ( 'off' !== _x( 'on', 'Open Sans font: on or off', 'twentytwelve' ) ) {
$subsets = 'latin,latin-ext';

/* translators: To add an additional Open Sans character subset specific to your language, translate
this to 'greek', 'cyrillic' or 'vietnamese'. Do not translate into your own language. */
$subset = _x( 'no-subset', 'Open Sans font: add new subset (greek, cyrillic, vietnamese)', 'twentytwelve' );

$subset = _x( ' ', 'Open Sans font: add new subset (greek, cyrllic, vietnamese)', 'twentytwelve' );

if ( $subset == 'cyrillic' )
if ( 'cyrillic' == $subset )
$subsets .= ',cyrillic,cyrillic-ext';
elseif ( $subset == 'greek' )
elseif ( 'greek' == $subset )
$subsets .= ',greek,greek-ext';
elseif ( $subsets == 'vietnamese' )
elseif ( 'vietnamese' == $subset )
$subsets .= ',vietnamese';

$protocol = is_ssl() ? 'https' : 'http';
Expand Down

0 comments on commit 1692675

Please sign in to comment.