From 44e2c71fb54f68fc0baaa35ea6d6cb331f8e25c8 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 24 May 2021 19:03:26 +0000 Subject: [PATCH] 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 --- src/wp-admin/includes/class-wp-ms-themes-list-table.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/wp-admin/includes/class-wp-ms-themes-list-table.php b/src/wp-admin/includes/class-wp-ms-themes-list-table.php index 2091603cf0..d7d20e238a 100644 --- a/src/wp-admin/includes/class-wp-ms-themes-list-table.php +++ b/src/wp-admin/includes/class-wp-ms-themes-list-table.php @@ -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' ), + '' . $theme->parent()->display( 'Name' ) . '' + ); + } + /** * Filters the array of row meta for each theme in the Multisite themes * list table.