From 1e34690bf24dc0ea8d6695e9a918a34f07564b5b Mon Sep 17 00:00:00 2001 From: Torben Lundsgaard Date: Mon, 15 Jan 2024 16:56:40 +0100 Subject: [PATCH] converts the first character of each word in a string to uppercase --- 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 7880191..a4f6bad 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( 'Template' ) ) ? ucfirst( wp_get_theme()->get( 'Template' ) ) : \wp_get_theme()->get( 'Name' ); + $data['current_theme'] = ( wp_get_theme()->get( 'Template' ) ) ? ucwords( 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( 'Template' ) ) ? ucfirst( wp_get_theme()->get( 'Template' ) ) : \wp_get_theme()->get( 'Name' ), + 'value' => ( wp_get_theme()->get( 'Template' ) ) ? ucwords( wp_get_theme()->get( 'Template' ) ) : \wp_get_theme()->get( 'Name' ), 'tag' => 'code', ], 6 => [