From 533217f3ba8f5288553df59c79f615e872210315 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Tue, 11 Sep 2012 19:12:37 +0000 Subject: [PATCH] Indicate on themes.php when a theme is a child that requires a parent theme. fixes #17944. git-svn-id: https://develop.svn.wordpress.org/trunk@21816 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/includes/class-wp-themes-list-table.php | 5 +++++ wp-admin/themes.php | 9 ++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/wp-admin/includes/class-wp-themes-list-table.php b/wp-admin/includes/class-wp-themes-list-table.php index fecddfd50d..5bfed52714 100644 --- a/wp-admin/includes/class-wp-themes-list-table.php +++ b/wp-admin/includes/class-wp-themes-list-table.php @@ -181,6 +181,11 @@ class WP_Themes_List_Table extends WP_List_Table {

display('Description'); ?>

+ parent() ) { + printf( '

' . __( 'This child theme requires its parent theme, %2$s.' ) . '

', + __( 'http://codex.wordpress.org/Child_Themes' ), + $theme->parent()->display( 'Name' ) ); + } ?>
diff --git a/wp-admin/themes.php b/wp-admin/themes.php index 5a78fe3ddd..2c6c4bba33 100644 --- a/wp-admin/themes.php +++ b/wp-admin/themes.php @@ -146,7 +146,14 @@ $customize_title = sprintf( __( 'Customize “%s”' ), $ct->display('Na
  • display('Author') ); ?>
  • display('Version') ); ?>
  • -

    display('Description'); ?>

    +

    display('Description'); + if ( $ct->parent() ) { + printf( '

    ' . __( 'This child theme requires its parent theme, %2$s.' ) . '

    ', + __( 'http://codex.wordpress.org/Child_Themes' ), + $ct->parent()->display( 'Name' ) ); + } + ?>