Make WordPress Core

Ticket #27201: 27201.2.diff

File 27201.2.diff, 1.3 KB (added by Shelob9, 10 years ago)
  • wp-admin/theme-editor.php

    diff --git a/wp-admin/theme-editor.php b/wp-admin/theme-editor.php
    index 8d1775d..e4b68d2 100644
    a b if ( $allowed_files ) : 
    180180                        echo "\t</ul>\n\t<h3>" . _x( 'Styles', 'Theme stylesheets in theme editor' ) . "</h3>\n\t<ul>\n";
    181181
    182182                $file_description = get_file_description( $absolute_filename );
    183                 if ( $file_description != basename( $filename ) )
    184                         $file_description .= '<br /><span class="nonessential">(' . $filename . ')</span>';
     183                if ( $file_description != basename( $filename ) ) {
     184            $file_description .= '<br /><span class="nonessential">(' . $filename . ')</span>';
     185        }
     186
     187                if ( $absolute_filename == $file ) {
     188            $file_description = '<span class="highlight">' . $file_description . '</span>';
     189        }
     190
     191        if ( basename( $absolute_filename ) === 'index.php' && $filename !== 'index.php'  ) {
     192            $file_description = $filename;
     193        }
    185194
    186                 if ( $absolute_filename == $file )
    187                         $file_description = '<span class="highlight">' . $file_description . '</span>';
    188195?>
    189196                <li><a href="theme-editor.php?file=<?php echo urlencode( $filename ) ?>&amp;theme=<?php echo urlencode( $stylesheet ) ?>"><?php echo $file_description; ?></a></li>
    190197<?php