Skip to content

Commit

Permalink
Google Fonts Error Fix Theme ver check - child #2
Browse files Browse the repository at this point in the history
  • Loading branch information
web-devise committed Aug 9, 2022
1 parent 6d4db16 commit 88ca1bf
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions ocean-extra.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,15 @@ public function __construct( $widget_areas = array() ) {
if ( ! is_child_theme() ) {
$current_theme_version = theme_version();
} else {
$current_theme_version = '3.3.3';
$parent = wp_get_theme()->parent();
// get parent version
if ( ! empty( $parent) ) {
$current_theme_version = $parent->Version;
}
}
$required_theme_version = '3.3.3';


require_once OE_PATH . '/includes/panel/theme-panel.php';
require_once OE_PATH . '/includes/panel/integrations-tab.php';
$oe_library_active_status = get_option( 'oe_library_active_status', 'yes' );
Expand All @@ -135,7 +140,7 @@ public function __construct( $widget_areas = array() ) {
require_once OE_PATH . '/includes/themepanel/theme-panel.php';


if ( ! empty( $current_theme_version ) && ! empty( $required_theme_version ) && version_compare( $current_theme_version, $required_theme_version , '>=' ) ) {
if ( ! empty( $current_theme_version ) && ! empty( $required_theme_version ) && version_compare( $current_theme_version, $required_theme_version , '>' ) ) {
require_once OE_PATH . '/includes/compatibility/ocean.php';
}

Expand Down

0 comments on commit 88ca1bf

Please sign in to comment.