# hello-plus/1.4.0/modules/theme/components/theme-dependency.php

Hello Plus, version 1.4.0. 44 lines.

- Page: https://pluginprobe.com/plugins/hello-plus/1.4.0/code/modules/theme/components/theme-dependency.php
- Raw: https://pluginprobe.com/plugins/hello-plus/1.4.0/raw/modules/theme/components/theme-dependency.php
- Modified: 2025-01-14T16:57:24+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/hello-plus/1.4.0/code/modules/theme/components/theme-dependency.php#L10-L20`.

```php
<?php

namespace HelloPlus\Modules\Theme\Components;

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly
}

use HelloPlus\Includes\Utils;

class Theme_Dependency {
	public function activate() {
		if ( ! Utils::has_hello_biz() ) {
			deactivate_plugins( HELLOPLUS_PLUGIN_BASE );

			wp_die(
				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' ) ),
					[
						'a' => [
							'href' => [],
						],
					]
				),
				esc_html__( 'Plugin Activation Error', 'hello-plus' ),
				[ 'back_link' => true ]
			);
		}

		if ( Utils::is_elementor_active() && ! Utils::is_active_elementor_version_supported() ) {
			deactivate_plugins( HELLOPLUS_PLUGIN_BASE );

			wp_die(
				esc_html( Utils::get_update_elementor_message() ),
				esc_html__( 'Plugin Activation Error', 'hello-plus' ),
				[ 'back_link' => true ]
			);
		}
	}

	public function __construct() {
		add_action( 'hello-plus/activate', [ $this, 'activate' ] );
	}
}

```
