WordPress.org

Make WordPress Core

Changeset 20558


Ignore:
Timestamp:
04/21/2012 09:00:24 PM (10 years ago)
Author:
nacin
Message:

A child theme with a missing parent might be is_child_theme() but not have a valid parent() object, so we need to check parent() too. see #20103.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/theme-editor.php

    r20557 r20558  
    165165?>
    166166    <h3><?php _e('Templates'); ?></h3>
    167     <?php if ( $theme->is_child_theme() ) : ?>
     167    <?php if ( $theme->is_child_theme() && $theme->parent() ) : ?>
    168168    <p class="howto"><?php printf( __( 'This child theme inherits templates from a parent theme, %s.' ), '<a href="' . self_admin_url('theme-editor.php?theme=' . urlencode( $theme->get_template() ) ) . '">' . $theme->parent()->display('Name') . '</a>' ); ?></p>
    169169    <?php endif; ?>
Note: See TracChangeset for help on using the changeset viewer.