PluginProbe
Hello Plus / 1.5.3
Hello Plus v1.5.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.5.3, at modules/theme/components/theme-dependency.php

44 lines 1.1 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( sprintf( __( 'The Hello Plus plugin requires the Hello Biz theme to be installed and active. <a href="%s">Check it out!</a>', 'hello-plus' ), admin_url( 'theme-install.php?theme=hello-biz' ) ),
18 [
19 'a' => [
20 'href' => [],
21 ],
22 ]
23 ),
24 esc_html__( 'Plugin Activation Error', 'hello-plus' ),
25 [ 'back_link' => true ]
26 );
27 }
28
29 if ( Utils::is_elementor_active() && ! Utils::is_active_elementor_version_supported() ) {
30 deactivate_plugins( HELLOPLUS_PLUGIN_BASE );
31
32 wp_die(
33 esc_html( Utils::get_update_elementor_message() ),
34 esc_html__( 'Plugin Activation Error', 'hello-plus' ),
35 [ 'back_link' => true ]
36 );
37 }
38 }
39
40 public function __construct() {
41 add_action( 'hello-plus/activate', [ $this, 'activate' ] );
42 }
43 }
44