Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
16 changes: 13 additions & 3 deletions inc/admin/class-flash-dashboard.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand All @@ -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();
}
?>
<div class="wrap">
<div class="flash-header">
<h1>
<?php
/* translators: %s: Theme version. */
echo sprintf( esc_html__( 'Flash %s', 'flash' ), FLASH_THEME_VERSION );
echo sprintf( esc_html__( 'Flash %s', 'flash' ), $theme->Version );
?>
</h1>
</div>
Expand Down