Themes: Add an indication of whether a theme is a child theme on network admin Themes screen.

This shows the parent theme name in a child theme's metadata section in the list table, in a similar way it is displayed in the theme details modal on the single site Themes screen.

Props dpik, Mista-Flo, seanchayes, poena, johnbillion, jeremyfelt, bradt, jacklenox, helen, Travel_girl, karmatosed, Presskopp, joyously, SergeyBiryukov.
Fixes #30240.
Built from https://develop.svn.wordpress.org/trunk@50978


git-svn-id: http://core.svn.wordpress.org/trunk@50587 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2021-05-24 19:04:56 +00:00
parent 9b67649f40
commit 209074f5e1
2 changed files with 9 additions and 1 deletions

View File

@ -728,6 +728,14 @@ class WP_MS_Themes_List_Table extends WP_List_Table {
);
}
if ( $theme->parent() ) {
$theme_meta[] = sprintf(
/* translators: %s: Theme name. */
__( 'Child theme of %s' ),
'<strong>' . $theme->parent()->display( 'Name' ) . '</strong>'
);
}
/**
* Filters the array of row meta for each theme in the Multisite themes
* list table.

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.8-alpha-50977';
$wp_version = '5.8-alpha-50978';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.