From d699dd2ae7d364e5b40b09a093c76515d059ba2e Mon Sep 17 00:00:00 2001 From: Lance Willett Date: Wed, 1 Aug 2012 15:36:44 +0000 Subject: [PATCH] Twenty Twelve: use is_ssl() to load the correct protocol for Google font CSS file. Fixes #21399, props obenland. git-svn-id: https://develop.svn.wordpress.org/trunk@21391 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-content/themes/twentytwelve/functions.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/wp-content/themes/twentytwelve/functions.php b/wp-content/themes/twentytwelve/functions.php index 8ec2dc547e..f1b0e33b4e 100644 --- a/wp-content/themes/twentytwelve/functions.php +++ b/wp-content/themes/twentytwelve/functions.php @@ -111,9 +111,11 @@ 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. */