Make WordPress Core

Changeset 21391


Ignore:
Timestamp:
08/01/2012 03:36:44 PM (14 years ago)
Author:
lancewillett
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-content/themes/twentytwelve/functions.php

    r21389 r21391  
    112112         */
    113113        $options = $twentytwelve_options->get_theme_options();
    114         if ( $options['enable_fonts'] )
    115                 wp_enqueue_style( 'twentytwelve-fonts', 'http://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700' );
    116 
     114        if ( $options['enable_fonts'] ) {
     115                $protocol = is_ssl() ? 'https' : 'http';
     116                wp_enqueue_style( 'twentytwelve-fonts', "$protocol://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700" );
     117        }
     118       
    117119        /**
    118120         * Load our main CSS file.
Note: See TracChangeset for help on using the changeset viewer.