From 921d31fb54b0dd14bbe0633b69325ae5bef16200 Mon Sep 17 00:00:00 2001 From: Andrew Ozz Date: Wed, 10 Jun 2009 06:55:29 +0000 Subject: [PATCH] Fix insecure content warnings when Manage Themes is loaded via https, props peaceablewhale, fixes #10080 git-svn-id: https://develop.svn.wordpress.org/trunk@11539 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/themes.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/wp-admin/themes.php b/wp-admin/themes.php index 6550dfda95..f008307ebb 100644 --- a/wp-admin/themes.php +++ b/wp-admin/themes.php @@ -129,7 +129,7 @@ function theme_update_available( $theme ) {

screenshot ) : ?> -<?php _e('Current theme preview'); ?> +<?php _e('Current theme preview'); ?>

$theme_name ) { $stylesheet_dir = $themes[$theme_name]['Stylesheet Dir']; $template_dir = $themes[$theme_name]['Template Dir']; $parent_theme = $themes[$theme_name]['Parent Theme']; - $preview_link = esc_url( get_option('home') . '/'); + $preview_link = esc_url(get_option('home') . '/'); + if ( is_ssl() ) + $preview_link = str_replace( 'http://', 'https://', $preview_link ); $preview_link = htmlspecialchars( add_query_arg( array('preview' => 1, 'template' => $template, 'stylesheet' => $stylesheet, 'TB_iframe' => 'true' ), $preview_link ) ); $preview_text = esc_attr( sprintf( __('Preview of “%s”'), $title ) ); $tags = $themes[$theme_name]['Tags']; @@ -218,7 +220,7 @@ foreach ( $cols as $col => $theme_name ) { ?> - +