HEX
Server: Apache
System: Linux webm005.cluster121.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
User: adventp (418412)
PHP: 7.4.33
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/adventp/www/wp-content/plugins/js_composer/modules/ai/class-vc-ai-module-settings.php
<?php
if ( ! defined( 'ABSPATH' ) ) {
	die( '-1' );
}

/**
 * Module settings.
 * @since 7.8
 */
class Vc_Ai_Module_Settings
{
	/**
	 * Init point.
	 *
	 * @since 7.8
	 */
	public function init() {
		add_filter( 'vc_settings_tabs', [$this, 'set_setting_tab'], 15 );

		add_filter( 'vc_settings-render-tab-vc-ai', [$this, 'render_setting_tab_html'] );

		add_action( 'vc-settings-render-tab-vc-ai', [$this, 'load_module_settings_assets'] );
	}

	/**
	 * Add module tab to settings.
	 *
	 * since 7.8
	 * @param array $tabs
	 * @return array
	 */
	public function set_setting_tab( $tabs ) {
		if ( vc_settings()->showConfigurationTabs() ) {
			$tabs['vc-ai'] = esc_html__( 'WPBakery AI', 'js_composer' );
		}

		return $tabs;
	}

	/**
	 * Render tab content.
	 *
	 * since 7.8
	 */
	public function render_setting_tab_html() {
		return '/pages/vc-settings/vc-ai.php';
	}

	/**
	 * Load assets related to module settings.
	 *
	 * since 7.8
	 */
	public function load_module_settings_assets() {
		wp_enqueue_style( 'wpb_ai_module', vc_asset_url( '../modules/ai/assets/dist/module.min.css' ), false, WPB_VC_VERSION );
	}
}