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: https://develop.svn.wordpress.org/trunk@21882 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Lance Willett 2012-09-17 22:07:51 +00:00
parent 930d3b2a99
commit 97355aebf0

View File

@ -103,14 +103,21 @@ function twentytwelve_scripts_styles() {
/*
* Loads our special font CSS file.
*
* To disable in a child theme, use wp_dequeue_style()
* function mytheme_dequeue_fonts() {
* wp_dequeue_style( 'twentytwelve-fonts' );
* }
* The use of Open Sans by default is localized. For languages that use
* characters not supported by the font, the font can be disabled.
*
* 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 );
*/
$protocol = is_ssl() ? 'https' : 'http';
wp_enqueue_style( 'twentytwelve-fonts', "$protocol://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700", array(), null );
*/
/* translators: If there are characters in your language that are not supported by Open Sans,
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.