Allow Open Sans to be disabled per language. props dimadin. fixes #26063.
Built from https://develop.svn.wordpress.org/trunk@26376 git-svn-id: http://core.svn.wordpress.org/trunk@26276 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
d60fb050d7
commit
fcaa29f19b
|
@ -559,22 +559,36 @@ function wp_default_styles( &$styles ) {
|
|||
$styles->add( 'ie', "/wp-admin/css/ie$suffix.css" );
|
||||
$styles->add_data( 'ie', 'conditional', 'lte IE 7' );
|
||||
|
||||
$subsets = 'latin,latin-ext';
|
||||
$open_sans_font_url = '';
|
||||
|
||||
/* 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.
|
||||
/* 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.
|
||||
*/
|
||||
$subset = _x( 'no-subset', 'Open Sans font: add new subset (greek, cyrillic, vietnamese)' );
|
||||
if ( 'off' !== _x( 'on', 'Open Sans font: on or off' ) ) {
|
||||
$subsets = 'latin,latin-ext';
|
||||
|
||||
if ( 'cyrillic' == $subset )
|
||||
$subsets .= ',cyrillic,cyrillic-ext';
|
||||
elseif ( 'greek' == $subset )
|
||||
$subsets .= ',greek,greek-ext';
|
||||
elseif ( 'vietnamese' == $subset )
|
||||
$subsets .= ',vietnamese';
|
||||
/* 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)' );
|
||||
|
||||
// Hotlink Open Sans, for now
|
||||
$styles->add( 'open-sans', "//fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,300,400,600&subset=$subsets" );
|
||||
if ( 'cyrillic' == $subset ) {
|
||||
$subsets .= ',cyrillic,cyrillic-ext';
|
||||
} elseif ( 'greek' == $subset ) {
|
||||
$subsets .= ',greek,greek-ext';
|
||||
} elseif ( 'vietnamese' == $subset ) {
|
||||
$subsets .= ',vietnamese';
|
||||
}
|
||||
|
||||
$query_args = array(
|
||||
'family' => 'Open+Sans:300italic,400italic,600italic,300,400,600',
|
||||
'subset' => $subsets,
|
||||
);
|
||||
// Hotlink Open Sans, for now
|
||||
$open_sans_font_url = add_query_arg( $query_args, '//fonts.googleapis.com/css' );
|
||||
}
|
||||
|
||||
$styles->add( 'open-sans', $open_sans_font_url );
|
||||
|
||||
// Dashicons
|
||||
$styles->add( 'dashicons', '/wp-includes/css/dashicons.css' );
|
||||
|
|
Loading…
Reference in New Issue