Make WordPress Core


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

Theme Editor: Fix styling of child theme notice.

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.