From 1db39d354129d15449e7412c1714aaba7787eb4f Mon Sep 17 00:00:00 2001 From: Torben Lundsgaard Date: Mon, 15 Jan 2024 16:48:48 +0100 Subject: [PATCH] Always use the parent theme for statistics --- src/Common/Util.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Common/Util.php b/src/Common/Util.php index 0a33ba4..7880191 100644 --- a/src/Common/Util.php +++ b/src/Common/Util.php @@ -83,7 +83,7 @@ private function set_site_data( array $data, array $options, string $wp_version, $data['web_server'] = $this->get_web_server(); $data['php_version'] = $this->shorten_version( phpversion() ); $data['wordpress_version'] = $this->shorten_version( $wp_version ); - $data['current_theme'] = \wp_get_theme()->get( 'Name' ); + $data['current_theme'] = ( wp_get_theme()->get( 'Template' ) ) ? ucfirst( wp_get_theme()->get( 'Template' ) ) : \wp_get_theme()->get( 'Name' ); $data['active_plugins'] = $this->get_active_plugins(); $data['multisite'] = \is_multisite(); @@ -122,7 +122,7 @@ private function add_shared_data( array $data, $wp_version ): array { ], 5 => [ 'label' => __( 'Current theme:', 'gtm-kit' ), - 'value' => \wp_get_theme()->get( 'Name' ), + 'value' => ( wp_get_theme()->get( 'Template' ) ) ? ucfirst( wp_get_theme()->get( 'Template' ) ) : \wp_get_theme()->get( 'Name' ), 'tag' => 'code', ], 6 => [