WordPress.org

Make WordPress Core

Ticket #16707: themes-patch.diff

File themes-patch.diff, 1.7 KB (added by ldebrouwer, 7 years ago)

Diff file to patch the bug

  • themes.php

     
    8282<?php echo esc_html( $title ); ?>
    8383<?php endif; ?>
    8484</h2>
    85 
     85<?php
     86if((isset($ct->template_dir) && $ct->template_dir) || (isset($wp_list_table->items) && $wp_list_table->items)) {
     87?>
    8688<h3><?php _e('Current Theme'); ?></h3>
     89<?php if(isset($ct->template_dir) && $ct->template_dir){ ?>
    8790<div id="current-theme">
    8891<?php if ( $ct->screenshot ) : ?>
    8992<img src="<?php echo $ct->theme_root_uri . '/' . $ct->stylesheet . '/' . $ct->screenshot; ?>" alt="<?php _e('Current theme preview'); ?>" />
     
    130133<?php theme_update_available($ct); ?>
    131134
    132135</div>
    133 
     136<?php } else { ?>
     137<p><?php _e('Your current theme seems to be removed or misplaced. Please choose from the available themes below to restore functionality to your WordPress installation.'); ?></p>
     138<?php } ?>
    134139<br class="clear" />
    135140<?php
    136141if ( ! current_user_can( 'switch_themes' ) ) {
     
    200205<?php $wp_list_table->display(); ?>
    201206
    202207</form>
     208<?php
     209} else {
     210?>
     211<p><?php sprintf(_e('Currently there are no themes installed which probably means that your WordPress installation is broken. Please install one to restore functionality. Click on the &#8220;Install Themes&#8221; tab and you will be able to browse or search for themes from the <a href="%s" target="_blank">WordPress.org Theme Directory</a>. Themes in the WordPress.org Theme Directory are designed and developed by third parties, and are licensed under the GNU General Public License, version 2, just like WordPress. Oh, and they&#8217;re free!'), 'http://wordpress.org/extend/themes/'); ?></p>
     212<?php
     213}
     214?>
    203215<br class="clear" />
    204216
    205217<?php