Skip to content

Commit 0668a91

Browse files
update a
1 parent 1614f1b commit 0668a91

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

inc/admin/dashboard.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ class WCF_Admin_Init
3838
* @var null
3939
*/
4040
private static $_instance = null;
41+
private $plugin_file = null;
4142

4243
/**
4344
* [instance] Initializes a singleton instance
@@ -55,6 +56,7 @@ public static function instance()
5556

5657
public function __construct()
5758
{
59+
$this->plugin_file = WP_PLUGIN_DIR . '/animation-addons-for-elementor-pro/animation-addons-for-elementor-pro.php';
5860
$this->remove_all_notices();
5961
$this->include();
6062
$this->init();
@@ -113,9 +115,9 @@ public function init()
113115
}
114116

115117
public function dashboard_widget(){
118+
116119

117-
$plugin_file = WP_PLUGIN_DIR . '/animation-addons-for-elementor-pro/animation-addons-for-elementor-pro.php';
118-
if ( file_exists( $plugin_file ) ) {
120+
if ( file_exists( $this->plugin_file ) ) {
119121
return;
120122
}
121123

@@ -380,7 +382,7 @@ public function enqueue_scripts($hook)
380382
'st_template_domain' => WCF_TEMPLATE_STARTER_BASE_URL,
381383
'home_url' => add_query_arg(['aae-cache' => 1], home_url('/')),
382384
'template_menu' => $this->get_template_menu_data(),
383-
'hero' => defined('WCF_ADDONS_PRO_VERSION') ? WCF_ADDONS_URL . 'assets/images/hero-banner.jpg' : 'no',
385+
'hero' => file_exists($this->plugin_file) ? WCF_ADDONS_URL . 'assets/images/hero-banner.jpg' : 'no',
384386
'video_link' => array(
385387
'desktop' => WCF_ADDONS_URL . 'assets/images/halloween-hero-banner-desktop.mp4',
386388
'mobile' => WCF_ADDONS_URL . 'assets/images/halloween-hero-banner-mobile.mp4',

0 commit comments

Comments
 (0)