HEX
Server: LiteSpeed
System: Linux server902.web-hosting.com 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
User: deshuvsd (2181)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: /home/deshuvsd/www/wp-content/plugins/jetformbuilder/compatibility/litespeed/litespeed.php
<?php


namespace JFB_Compatibility\Litespeed;

// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
	die;
}

use JFB_Modules\Security\Wp_Nonce;
use JFB_Components\Module\Base_Module_It;

class Litespeed implements Base_Module_It {

	public function rep_item_id() {
		return 'litespeed';
	}

	public function condition(): bool {
		return defined( 'LSCWP_V' );
	}

	public function init_hooks() {
		add_filter(
			'jet-form-builder/after-start-form',
			array( $this, 'on_render_form' ),
			9
		);
	}

	public function remove_hooks() {
		remove_filter(
			'jet-form-builder/after-start-form',
			array( $this, 'on_render_form' ),
			9
		);
	}

	public function on_render_form( string $html ): string {
		do_action( 'litespeed_nonce', Wp_Nonce\Module::NONCE_ACTION_PREF . '*' );

		$this->remove_hooks();

		return $html;
	}
}