WordPress.org

Make WordPress Core

Changeset 11539


Ignore:
Timestamp:
06/10/09 06:55:29 (5 years ago)
Author:
azaozz
Message:

Fix insecure content warnings when Manage Themes is loaded via https, props peaceablewhale, fixes #10080

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/themes.php

    r11525 r11539  
    130130<div id="current-theme"> 
    131131<?php if ( $ct->screenshot ) : ?> 
    132 <img src="<?php echo WP_CONTENT_URL . $ct->stylesheet_dir . '/' . $ct->screenshot; ?>" alt="<?php _e('Current theme preview'); ?>" /> 
     132<img src="<?php echo content_url($ct->stylesheet_dir . '/' . $ct->screenshot); ?>" alt="<?php _e('Current theme preview'); ?>" /> 
    133133<?php endif; ?> 
    134134<h4><?php 
     
    201201    $template_dir = $themes[$theme_name]['Template Dir']; 
    202202    $parent_theme = $themes[$theme_name]['Parent Theme']; 
    203     $preview_link = esc_url( get_option('home') . '/'); 
     203    $preview_link = esc_url(get_option('home') . '/'); 
     204    if ( is_ssl() ) 
     205        $preview_link = str_replace( 'http://', 'https://', $preview_link ); 
    204206    $preview_link = htmlspecialchars( add_query_arg( array('preview' => 1, 'template' => $template, 'stylesheet' => $stylesheet, 'TB_iframe' => 'true' ), $preview_link ) ); 
    205207    $preview_text = esc_attr( sprintf( __('Preview of &#8220;%s&#8221;'), $title ) ); 
     
    219221        <a href="<?php echo $preview_link; ?>" class="<?php echo $thickbox_class; ?> screenshot"> 
    220222<?php if ( $screenshot ) : ?> 
    221             <img src="<?php echo WP_CONTENT_URL . $stylesheet_dir . '/' . $screenshot; ?>" alt="" /> 
     223            <img src="<?php echo content_url($stylesheet_dir . '/' . $screenshot); ?>" alt="" /> 
    222224<?php endif; ?> 
    223225        </a> 
Note: See TracChangeset for help on using the changeset viewer.