From 9d945f2eed3b7cef3e77e200427cccac9568a2de 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 --- functions.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/functions.php b/functions.php index 8ec2dc547..f1b0e33b4 100644 --- a/functions.php +++ b/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. */