Make WordPress Core

Ticket #50199: 50199.diff

File 50199.diff, 1.0 KB (added by dboy1988, 5 years ago)
  • src/wp-admin/theme-editor.php

    diff --git src/wp-admin/theme-editor.php src/wp-admin/theme-editor.php
    index cc0c1f4c0d..bab7b69a92 100644
    if ( $theme->errors() && 'theme_no_stylesheet' == $theme->errors()->get_error_co 
    7575
    7676$allowed_files = array();
    7777$style_files   = array();
    78 $has_templates = false;
    7978
    8079$file_types = wp_get_theme_file_editable_extensions( $theme );
    8180
    foreach ( $file_types as $type ) { 
    8382        switch ( $type ) {
    8483                case 'php':
    8584                        $allowed_files += $theme->get_files( 'php', -1 );
    86                         $has_templates  = ! empty( $allowed_files );
    8785                        break;
    8886                case 'css':
    8987                        $style_files                = $theme->get_files( 'css', -1 );
    if ( $theme->errors() ) { 
    252250<div id="templateside">
    253251        <h2 id="theme-files-label"><?php _e( 'Theme Files' ); ?></h2>
    254252        <ul role="tree" aria-labelledby="theme-files-label">
    255                 <?php if ( ( $has_templates || $theme->parent() ) && $theme->parent() ) : ?>
     253                <?php if ($theme->parent()) : ?>
    256254                        <li class="howto">
    257255                                <?php
    258256                                printf(