mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-22 00:01:27 +01:00
Use WP_CONTENT_DIR and URL when linking to theme screenshots. Props sambauers. see #6938
git-svn-id: http://svn.automattic.com/wordpress/trunk@8040 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
6e6f0e753a
commit
51591b778b
@ -57,7 +57,7 @@ $themes = array_slice( $themes, $start, $per_page );
|
||||
<h2><?php _e('Current Theme'); ?></h2>
|
||||
<div id="current-theme">
|
||||
<?php if ( $ct->screenshot ) : ?>
|
||||
<img src="<?php echo site_url($ct->stylesheet_dir . '/' . $ct->screenshot); ?>" alt="<?php _e('Current theme preview'); ?>" />
|
||||
<img src="<?php echo WP_CONTENT_URL . $ct->stylesheet_dir . '/' . $ct->screenshot; ?>" alt="<?php _e('Current theme preview'); ?>" />
|
||||
<?php endif; ?>
|
||||
<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>
|
||||
<p class="description"><?php echo $ct->description; ?></p>
|
||||
@ -126,7 +126,7 @@ foreach ( $cols as $col => $theme_name ) {
|
||||
?>
|
||||
<a href="<?php echo $activate_link; ?>" class="<?php echo $thickbox_class; ?> screenshot">
|
||||
<?php if ( $screenshot ) : ?>
|
||||
<img src="<?php echo ( $tpage == 'stage' ) ? $screenshot : site_url($stylesheet_dir . '/' . $screenshot); ?>" alt="" />
|
||||
<img src="<?php echo WP_CONTENT_URL . $stylesheet_dir . '/' . $screenshot; ?>" alt="" />
|
||||
<?php endif; ?>
|
||||
</a>
|
||||
<h3><a class="<?php echo $thickbox_class; ?>" href="<?php echo $activate_link; ?>"><?php echo $title; ?></a></h3>
|
||||
|
@ -128,8 +128,8 @@ function get_themes() {
|
||||
$themes = array();
|
||||
$wp_broken_themes = array();
|
||||
$theme_loc = $theme_root = get_theme_root();
|
||||
if ( '/' != ABSPATH ) // don't want to replace all forward slashes, see Trac #4541
|
||||
$theme_loc = str_replace(ABSPATH, '', $theme_root);
|
||||
if ( '/' != WP_CONTENT_DIR ) // don't want to replace all forward slashes, see Trac #4541
|
||||
$theme_loc = str_replace(WP_CONTENT_DIR, '', $theme_root);
|
||||
|
||||
// Files in wp-content/themes directory and one subdir down
|
||||
$themes_dir = @ opendir($theme_root);
|
||||
|
Loading…
Reference in New Issue
Block a user