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.

git-svn-id: http://svn.automattic.com/wordpress/trunk@20558 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2012-04-21 21:00:24 +00:00
parent f73524c272
commit a5a13979bd
1 changed files with 1 additions and 1 deletions

View File

@ -164,7 +164,7 @@ if ( $allowed_files ) :
if ( $has_templates || $theme->is_child_theme() ) :
?>
<h3><?php _e('Templates'); ?></h3>
<?php if ( $theme->is_child_theme() ) : ?>
<?php if ( $theme->is_child_theme() && $theme->parent() ) : ?>
<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>
<?php endif; ?>
<ul>