From c899eae2aea6a023978ceddc14eb506c2ab2e15e Mon Sep 17 00:00:00 2001 From: lancewillett 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: http://core.svn.wordpress.org/trunk@21391 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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. */