'Version'))['version']); define('AGENT_MOD_URL', rtrim(plugin_dir_url(__FILE__), '/') . '/'); define('AGENT_MOD_PATH', plugin_dir_path(__FILE__)); //Activation if (! function_exists('agentModInitActivation')) { /** * @throws DependencyException * @throws NotFoundException * @throws Exception * @since 1.0.0 */ function agentModInitActivation(): void { $activation_service = new ActivationService(); $activation_service->activate(); } register_activation_hook(__FILE__, 'agentModInitActivation'); } //Deactivation if (! function_exists('agentModInitDeactivation')) { /** * @throws DependencyException * @throws NotFoundException * @throws Exception * @since 1.0.0 */ function agentModInitDeactivation(): void { $deactivation_service = new DeactivationService(); $deactivation_service->deactivate(); } register_deactivation_hook(__FILE__, 'agentModInitDeactivation'); } //Run plugin if (class_exists(App::class)) { /** * @throws DependencyException * @throws NotFoundException * @throws Exception * @since 1.0.0 */ try { $agent_mod_app = new App(); $agent_mod_app->run(); } catch (DependencyException | Exception $e) { wp_die(esc_html($e->getMessage())); } }