Ticket #6938: theme_screenshots_fix.patch
File theme_screenshots_fix.patch, 1.9 KB (added by , 17 years ago) |
---|
-
wp-includes/theme.php
128 128 $themes = array(); 129 129 $wp_broken_themes = array(); 130 130 $theme_loc = $theme_root = get_theme_root(); 131 if ( '/' != ABSPATH) // don't want to replace all forward slashes, see Trac #4541132 $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); 133 133 134 134 // Files in wp-content/themes directory and one subdir down 135 135 $themes_dir = @ opendir($theme_root); -
wp-admin/themes.php
57 57 <h2><?php _e('Current Theme'); ?></h2> 58 58 <div id="current-theme"> 59 59 <?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'); ?>" /> 61 61 <?php endif; ?> 62 62 <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> 63 63 <p class="description"><?php echo $ct->description; ?></p> … … 126 126 ?> 127 127 <a href="<?php echo $activate_link; ?>" class="<?php echo $thickbox_class; ?> screenshot"> 128 128 <?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="" /> 130 130 <?php endif; ?> 131 131 </a> 132 132 <h3><a class="<?php echo $thickbox_class; ?>" href="<?php echo $activate_link; ?>"><?php echo $title; ?></a></h3>