Twenty Twelve: use is_ssl() to load the correct protocol for Google font CSS file. Fixes #21399, props obenland.

git-svn-id: http://core.svn.wordpress.org/trunk@21391 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
lancewillett 2012-08-01 15:36:44 +00:00
parent 409214d1be
commit c899eae2ae
1 changed files with 5 additions and 3 deletions

View File

@ -111,8 +111,10 @@ function twentytwelve_scripts_styles() {
* Depends on Theme Options setting.
*/
$options = $twentytwelve_options->get_theme_options();
if ( $options['enable_fonts'] )
wp_enqueue_style( 'twentytwelve-fonts', 'http://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700' );
if ( $options['enable_fonts'] ) {
$protocol = is_ssl() ? 'https' : 'http';
wp_enqueue_style( 'twentytwelve-fonts', "$protocol://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700" );
}
/**
* Load our main CSS file.