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.

git-svn-id: https://develop.svn.wordpress.org/trunk@50978 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2021-05-24 19:03:26 +00:00
parent 73bf1dab6b
commit 44e2c71fb5

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.