WordPress.org

Make WordPress Core

Changeset 42155


Ignore:
Timestamp:
11/11/2017 08:42:04 PM (6 months ago)
Author:
westonruter
Message:

Theme Editor: Fix styling of child theme notice.

Props westonruter, melchoyce, ndiego.
See #24048.
Fixes #42491 for trunk.

Location:
trunk/src/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/css/common.css

    r41999 r42155  
    32413241}
    32423242
    3243 #templateside li a,
     3243#templateside li:not(.howto) a,
    32443244.theme-editor-php .highlight {
    32453245    display: block;
     
    32483248}
    32493249
    3250 #templateside li > a:first-of-type {
     3250#templateside li:not(.howto) > a:first-of-type {
    32513251    padding-top: 0;
     3252}
     3253
     3254#templateside li.howto {
     3255    padding: 6px 12px 12px 12px;
    32523256}
    32533257
     
    37763780    }
    37773781
    3778     #templateside li a {
     3782    #templateside li:not(.howto) a {
    37793783        display: block;
    37803784        padding: 5px;
     3785    }
     3786    #templateside li.howto {
     3787        padding: 12px;
    37813788    }
    37823789
  • trunk/src/wp-admin/theme-editor.php

    r42014 r42155  
    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">
Note: See TracChangeset for help on using the changeset viewer.