Make WordPress Core

Ticket #10080: 10080.2.patch

File 10080.2.patch, 1.6 KB (added by peaceablewhale, 15 years ago)
  • themes.php

     
    129129<h3><?php _e('Current Theme'); ?></h3>
    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
    135135        /* translators: 1: theme title, 2: theme version, 3: theme author */
     
    200200        $stylesheet_dir = $themes[$theme_name]['Stylesheet Dir'];
    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(preg_replace("/^https?\:/",'',get_option('home')).'/');
    204204        $preview_link = htmlspecialchars( add_query_arg( array('preview' => 1, 'template' => $template, 'stylesheet' => $stylesheet, 'TB_iframe' => 'true' ), $preview_link ) );
    205205        $preview_text = esc_attr( sprintf( __('Preview of &#8220;%s&#8221;'), $title ) );
    206206        $tags = $themes[$theme_name]['Tags'];
     
    218218?>
    219219                <a href="<?php echo $preview_link; ?>" class="<?php echo $thickbox_class; ?> screenshot">
    220220<?php if ( $screenshot ) : ?>
    221                         <img src="<?php echo WP_CONTENT_URL . $stylesheet_dir . '/' . $screenshot; ?>" alt="" />
     221                        <img src="<?php echo content_url($stylesheet_dir . '/' . $screenshot); ?>" alt="" />
    222222<?php endif; ?>
    223223                </a>
    224224<h3><?php