Make WordPress Core

Changeset 50978


Ignore:
Timestamp:
05/24/2021 07:03:26 PM (4 years ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-ms-themes-list-table.php

    r49582 r50978  
    729729        }
    730730
     731        if ( $theme->parent() ) {
     732            $theme_meta[] = sprintf(
     733                /* translators: %s: Theme name. */
     734                __( 'Child theme of %s' ),
     735                '<strong>' . $theme->parent()->display( 'Name' ) . '</strong>'
     736            );
     737        }
     738
    731739        /**
    732740         * Filters the array of row meta for each theme in the Multisite themes
Note: See TracChangeset for help on using the changeset viewer.