From 209074f5e1f12b78e40714c6fbb9ae8a964be96a Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 24 May 2021 19:04:56 +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. Built from https://develop.svn.wordpress.org/trunk@50978 git-svn-id: http://core.svn.wordpress.org/trunk@50587 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/class-wp-ms-themes-list-table.php | 8 ++++++++ wp-includes/version.php | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/wp-admin/includes/class-wp-ms-themes-list-table.php b/wp-admin/includes/class-wp-ms-themes-list-table.php index 2091603cf0..d7d20e238a 100644 --- a/wp-admin/includes/class-wp-ms-themes-list-table.php +++ b/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. diff --git a/wp-includes/version.php b/wp-includes/version.php index da714fd513..9c08cebb5f 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -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.