From 2676491ceb08e3afbd58c1d3385b980b8bc88b22 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: http://core.svn.wordpress.org/trunk@21816 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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' ) ); + } + ?>