Twenty Twelve: allow Open Sans to be disabled per language, since it does not support all languages, and some odd combinations of OS and browser versions don't support any non-Latin language very well.
Props obenland and SergeyBiryukov for patches, fixes #21751. git-svn-id: http://core.svn.wordpress.org/trunk@21882 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
7d8078a215
commit
1e33842a84
|
@ -103,14 +103,21 @@ function twentytwelve_scripts_styles() {
|
||||||
/*
|
/*
|
||||||
* Loads our special font CSS file.
|
* Loads our special font CSS file.
|
||||||
*
|
*
|
||||||
* To disable in a child theme, use wp_dequeue_style()
|
* The use of Open Sans by default is localized. For languages that use
|
||||||
* function mytheme_dequeue_fonts() {
|
* characters not supported by the font, the font can be disabled.
|
||||||
* wp_dequeue_style( 'twentytwelve-fonts' );
|
*
|
||||||
* }
|
* To disable in a child theme, use wp_dequeue_style()
|
||||||
|
* function mytheme_dequeue_fonts() {
|
||||||
|
* wp_dequeue_style( 'twentytwelve-fonts' );
|
||||||
|
* }
|
||||||
* add_action( 'wp_enqueue_scripts', 'mytheme_dequeue_fonts', 11 );
|
* add_action( 'wp_enqueue_scripts', 'mytheme_dequeue_fonts', 11 );
|
||||||
*/
|
*/
|
||||||
$protocol = is_ssl() ? 'https' : 'http';
|
/* translators: If there are characters in your language that are not supported by Open Sans,
|
||||||
wp_enqueue_style( 'twentytwelve-fonts', "$protocol://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700", array(), null );
|
enter 'disable-open-sans'. Otherwise enter 'enable-open-sans'. Do not translate into your own language. */
|
||||||
|
if ( false === strpos( _x( 'enable-open-sans', 'Open Sans font: enable or disable', 'twentytwelve' ), 'disable' ) ) {
|
||||||
|
$protocol = is_ssl() ? 'https' : 'http';
|
||||||
|
wp_enqueue_style( 'twentytwelve-fonts', "$protocol://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700", array(), null );
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Loads our main stylesheet.
|
* Loads our main stylesheet.
|
||||||
|
|
Loading…
Reference in New Issue