From 185d0f65d9ed9b70f3e6b60eb7d22a9bad71a3a8 Mon Sep 17 00:00:00 2001 From: Ashesh Thapa Date: Sat, 16 May 2020 17:24:45 +0545 Subject: [PATCH 1/2] Fix - theme page name and version issue in chlid theme --- inc/admin/class-flash-dashboard.php | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/inc/admin/class-flash-dashboard.php b/inc/admin/class-flash-dashboard.php index 5b4ac12..01eef8a 100644 --- a/inc/admin/class-flash-dashboard.php +++ b/inc/admin/class-flash-dashboard.php @@ -29,7 +29,12 @@ public function enqueue_scripts() { } public function create_menu() { - $theme = wp_get_theme(); + + if ( is_child_theme() ) { + $theme = wp_get_theme()->parent(); + } else { + $theme = wp_get_theme(); + } /* translators: %s: Theme Name. */ $theme_page_name = sprintf( esc_html__( '%s Options', 'flash' ), $theme->Name ); @@ -47,14 +52,19 @@ public function enqueue_styles() { } public function option_page() { - $theme = wp_get_theme(); + + if ( is_child_theme() ) { + $theme = wp_get_theme()->parent(); + } else { + $theme = wp_get_theme(); + } ?>

Version ); ?>

From 890b343aeabb0385ef0155a83e0efb0cd973638c Mon Sep 17 00:00:00 2001 From: Ashesh Thapa Date: Fri, 22 May 2020 16:31:07 +0545 Subject: [PATCH 2/2] Update - Changelog --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index d361120..fb40487 100644 --- a/README.md +++ b/README.md @@ -80,6 +80,9 @@ Source: https://pixabay.com/en/coffee-book-flowers-setting-2390136/ Unless otherwise specified, all the theme files, scripts and images including the screenshot image are licensed under [GNU GPL] (http://www.gnu.org/licenses/gpl-3.0.txt), version 3 or later. == Changelog == += TBD = +* Fix - Theme name and version in the admin dashboard while child theme active. + = Version 1.3.3 - 2020-02-27 = * Tweak - Refactor theme page according to WordPress theme guidelines