Make WordPress Core

Ticket #42491: 42491.0.diff

File 42491.0.diff, 2.1 KB (added by westonruter, 7 years ago)
  • src/wp-admin/css/common.css

    diff --git src/wp-admin/css/common.css src/wp-admin/css/common.css
    index 038c6c8280..7ead1b65a7 100644
    img { 
    32403240        margin: 4px 0;
    32413241}
    32423242
    3243 #templateside li a,
     3243#templateside li:not(.howto) a,
    32443244.theme-editor-php .highlight {
    32453245        display: block;
    32463246        padding: 3px 0 3px 12px;
    32473247        text-decoration: none;
    32483248}
    32493249
    3250 #templateside li > a:first-of-type {
     3250#templateside li:not(.howto) > a:first-of-type {
    32513251        padding-top: 0;
    32523252}
    32533253
     3254#templateside li.howto {
     3255        padding: 3px 12px 12px 12px;
     3256}
     3257
    32543258.theme-editor-php .highlight {
    32553259        margin: -3px 3px -3px -12px;
    32563260}
  • src/wp-admin/theme-editor.php

    diff --git src/wp-admin/theme-editor.php src/wp-admin/theme-editor.php
    index e31748d2c5..22c201e01e 100644
    if ( $theme->errors() ) 
    229229?>
    230230<div id="templateside">
    231231        <h2 id="theme-files-label"><?php _e( 'Theme Files' ); ?></h2>
    232         <?php
    233         if ( $has_templates || $theme->parent() ) :
    234                 if ( $theme->parent() ) {
    235                         /* translators: %s: link to edit parent theme */
    236                         echo '<p class="howto">' . sprintf( __( 'This child theme inherits templates from a parent theme, %s.' ),
    237                                 sprintf( '<a href="%s">%s</a>',
    238                                         self_admin_url( 'theme-editor.php?theme=' . urlencode( $theme->get_template() ) ),
    239                                         $theme->parent()->display( 'Name' )
    240                                 )
    241                         ) . "</p>\n";
    242                 }
    243         endif;
    244         ?>
    245232        <ul role="tree" aria-labelledby="theme-files-label">
     233                <?php if ( ( $has_templates || $theme->parent() ) && $theme->parent() ) : ?>
     234                        <li class="howto">
     235                                <?php
     236                                /* translators: %s: link to edit parent theme */
     237                                echo sprintf( __( 'This child theme inherits templates from a parent theme, %s.' ),
     238                                        sprintf( '<a href="%s">%s</a>',
     239                                                self_admin_url( 'theme-editor.php?theme=' . urlencode( $theme->get_template() ) ),
     240                                                $theme->parent()->display( 'Name' )
     241                                        )
     242                                );
     243                                ?>
     244                        </li>
     245                <?php endif; ?>
    246246                <li role="treeitem" tabindex="-1" aria-expanded="true" aria-level="1" aria-posinset="1" aria-setsize="1">
    247247                        <ul role="group">
    248248                                <?php wp_print_theme_file_tree( wp_make_theme_file_tree( $allowed_files ) ); ?>