/home/techb158/public_html/wp-content/plugins/wpforms-lite/src/Integrations/AI
Edit: /home/techb158/public_html/wp-content/plugins/wpforms-lite/src/Integrations/AI/AI.php (2518B)
init();
}
return ! Helpers::is_disabled();
}
/**
* Load the integration classes.
*
* @since 1.9.1
*
* @noinspection ReturnTypeCanBeDeclaredInspection
*/
public function load() {
if ( wpforms_is_admin_page( 'builder' ) ) {
( new Enqueues() )->init();
( new FieldOption() )->init();
( new FormsEnqueues() )->init();
( new FormEditorBuilder() )->init();
}
if ( wpforms_is_admin_page( 'templates' ) ) {
( new TemplatesPage() )->init();
}
// Chat::init() registers default-scope/surface filter callbacks. The singleton registries
// auto-init on first access from the AJAX handler, so Chat must also run on AJAX requests
// to attach those callbacks before the handler triggers the boot.
if ( wpforms_is_admin_page() || wpforms_is_admin_ajax() ) {
( new ChatPage() )->init();
}
if ( wpforms_is_admin_ajax() ) {
$this->load_ajax_classes();
}
}
/**
* Load AJAX classes.
*
* @since 1.9.1
*/
protected function load_ajax_classes(): void {
( new FieldOption() )->init();
( new ChoicesAjax() )->init();
( new FormsAjax() )->init();
( new FormEditorAjax() )->init();
( new ChatAjax() )->init();
}
}