Make WordPress Core

Ticket #21399: 21399.2.diff

File 21399.2.diff, 793 bytes (added by obenland, 14 years ago)

Adds is_ssl() check

  • wp-content/themes/twentytwelve/functions.php

     
    112112         * Depends on Theme Options setting.
    113113         */
    114114        $options = $twentytwelve_options->get_theme_options();
    115         if ( $options['enable_fonts'] )
    116                 wp_enqueue_style( 'twentytwelve-fonts', 'http://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700' );
    117 
     115        if ( $options['enable_fonts'] ) {
     116                $protocol = is_ssl() ? 'https' : 'http';
     117                wp_enqueue_style( 'twentytwelve-fonts', "$protocol://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700" );
     118        }
     119       
    118120        /**
    119121         * Load our main CSS file.
    120122         */