Skip to content

Commit

Permalink
Always use the parent theme for statistics
Browse files Browse the repository at this point in the history
  • Loading branch information
TorbenLundsgaard committed Jan 15, 2024
1 parent 75350fb commit 9146c1b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Common/Util.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'] = ( ucfirst( wp_get_theme()->get( 'Template' ) ) ) ?: \wp_get_theme()->get( 'Name' );

Check failure on line 86 in src/Common/Util.php

View workflow job for this annotation

GitHub Actions / PHPCS check

Using short ternaries is not allowed as they are rarely used correctly
$data['active_plugins'] = $this->get_active_plugins();
$data['multisite'] = \is_multisite();

Expand Down Expand Up @@ -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' =>( ucfirst( wp_get_theme()->get( 'Template' ) ) ) ?: \wp_get_theme()->get( 'Name' ),

Check failure on line 125 in src/Common/Util.php

View workflow job for this annotation

GitHub Actions / PHPCS check

Expected 1 space after "=>"; 0 found

Check failure on line 125 in src/Common/Util.php

View workflow job for this annotation

GitHub Actions / PHPCS check

Using short ternaries is not allowed as they are rarely used correctly
'tag' => 'code',
],
6 => [
Expand Down

0 comments on commit 9146c1b

Please sign in to comment.