PluginProbe
Hello Plus / 1.7.3
Hello Plus v1.7.3
trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 1.1.2 1.1.3 1.2.0 1.2.1 1.3.0 1.4.0 1.4.1 1.5.0 1.5.1 1.5.2 1.5.3 1.6.0 1.6.1 1.6.2 1.7.0 1.7.1 1.7.2 1.7.3 All 30 releases
hello-plus / modules / theme / components / theme-dependency.php

theme-dependency.php in Hello Plus 1.7.3, at modules/theme/components/theme-dependency.php

42 lines 1.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace HelloPlus\Modules\Theme\Components;
4
5 if ( ! defined( 'ABSPATH' ) ) {
6 exit; // Exit if accessed directly
7 }
8
9 use HelloPlus\Includes\Utils;
10
11 class Theme_Dependency {
12 public function activate() {
13 if ( ! Utils::has_hello_biz() ) {
14 deactivate_plugins( HELLOPLUS_PLUGIN_BASE );
15
16 wp_die(
17 wp_kses( __( '<strong>Hello+ needs an active Hello suite theme to work</strong>. Install and activate a theme from the Elementor Hello suite to start using the plugin.', 'hello-plus' ),
18 [
19 'strong' => [],
20 ]
21 ),
22 esc_html__( 'Plugin Activation Error', 'hello-plus' ),
23 [ 'back_link' => true ]
24 );
25 }
26
27 if ( Utils::is_elementor_active() && ! Utils::is_active_elementor_version_supported() ) {
28 deactivate_plugins( HELLOPLUS_PLUGIN_BASE );
29
30 wp_die(
31 esc_html( Utils::get_update_elementor_message() ),
32 esc_html__( 'Plugin Activation Error', 'hello-plus' ),
33 [ 'back_link' => true ]
34 );
35 }
36 }
37
38 public function __construct() {
39 add_action( 'hello-plus/activate', [ $this, 'activate' ] );
40 }
41 }
42