Skip to content

Commit 12ea2da

Browse files
committed
Merge pull request #1395 from SiR-DanieL/master
Sysinfo now shows proper informations about active theme
2 parents 8a648bc + 622a67a commit 12ea2da

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

ReduxCore/inc/sysinfo.php

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,9 @@ public function get( $show_inactive = false, $id = 'system-info-box', $class = n
5757
$browser = new Browser();
5858

5959
// Get theme info for this WordPress version
60-
$theme_data = wp_get_theme();
61-
$theme = $theme_data->Name . ' ' . $theme_data->Version;
60+
$theme_data = wp_get_theme();
61+
$theme = $theme_data->Name . ' ' . $theme_data->Version;
62+
$is_child = is_child_theme() ? ' (child theme)' : '';
6263

6364
$return = '<textarea readonly="readonly" onclick="this.focus(); this.select()" id="' . $id . '"' . ( $class != null ? ' class="' . $class . '"' : '' ) . ' title="To copy the system info, click below and press Ctrl+C (PC) or Cmd+C (Mac).">';
6465

@@ -88,7 +89,13 @@ public function get( $show_inactive = false, $id = 'system-info-box', $class = n
8889
$return .= "\n" . '-- WordPress Configuration' . "\n\n";
8990
$return .= 'Version: ' . get_bloginfo( 'version' ) . "\n";
9091
$return .= 'Permalink Structure: ' . ( get_option( 'permalink_structure' ) ? get_option( 'permalink_structure' ) : 'Default' ) . "\n";
91-
$return .= 'Active Theme: ' . $theme . "\n";
92+
$return .= 'Active Theme: ' . $theme . $is_child . "\n";
93+
94+
if( !empty( $is_child ) ) {
95+
$parent_theme = wp_get_theme( $theme_data->Template );
96+
$return .= 'Parent Theme: ' . $parent_theme->Name . ' ' . $parent_theme->Version . "\n";
97+
}
98+
9299
$return .= 'Show On Front: ' . get_option( 'show_on_front' ) . "\n";
93100

94101
// Only show page specs if frontpage is set to 'page'

0 commit comments

Comments
 (0)