WordPress.org

Make WordPress Core

Changeset 8040


Ignore:
Timestamp:
06/03/2008 05:17:45 PM (10 years ago)
Author:
ryan
Message:

Use WP_CONTENT_DIR and URL when linking to theme screenshots. Props sambauers. see #6938

Location:
trunk
Files:
2 edited

Legend:

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

    r7998 r8040  
    5858<div id="current-theme">
    5959<?php if ( $ct->screenshot ) : ?>
    60 <img src="<?php echo site_url($ct->stylesheet_dir . '/' . $ct->screenshot); ?>" alt="<?php _e('Current theme preview'); ?>" />
     60<img src="<?php echo WP_CONTENT_URL . $ct->stylesheet_dir . '/' . $ct->screenshot; ?>" alt="<?php _e('Current theme preview'); ?>" />
    6161<?php endif; ?>
    6262<h3><?php printf(_c('%1$s %2$s by %3$s|1: theme title, 2: theme version, 3: theme author'), $ct->title, $ct->version, $ct->author) ; ?></h3>
     
    127127        <a href="<?php echo $activate_link; ?>" class="<?php echo $thickbox_class; ?> screenshot">
    128128<?php if ( $screenshot ) : ?>
    129             <img src="<?php echo ( $tpage == 'stage' ) ? $screenshot : site_url($stylesheet_dir . '/' . $screenshot); ?>" alt="" />
     129            <img src="<?php echo WP_CONTENT_URL . $stylesheet_dir . '/' . $screenshot; ?>" alt="" />
    130130<?php endif; ?>
    131131        </a>
  • trunk/wp-includes/theme.php

    r7999 r8040  
    129129    $wp_broken_themes = array();
    130130    $theme_loc = $theme_root = get_theme_root();
    131     if ( '/' != ABSPATH ) // don't want to replace all forward slashes, see Trac #4541
    132         $theme_loc = str_replace(ABSPATH, '', $theme_root);
     131    if ( '/' != WP_CONTENT_DIR ) // don't want to replace all forward slashes, see Trac #4541
     132        $theme_loc = str_replace(WP_CONTENT_DIR, '', $theme_root);
    133133
    134134    // Files in wp-content/themes directory and one subdir down
Note: See TracChangeset for help on using the changeset viewer.