# xspeed/1.1.2/includes/modules/Settings/SettingsModule.php

xSpeed Cache: AI-Powered Performance Hub with MCP, Caching &amp; CDN, version 1.1.2. 82 lines.

- Page: https://pluginprobe.com/plugins/xspeed/1.1.2/code/includes/modules/Settings/SettingsModule.php
- Raw: https://pluginprobe.com/plugins/xspeed/1.1.2/raw/includes/modules/Settings/SettingsModule.php
- Modified: 2026-07-16T11:41:06+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/xspeed/1.1.2/code/includes/modules/Settings/SettingsModule.php#L10-L20`.

```php
<?php
/**
 * Settings module — the host page for account + platform settings
 * (FBS-83633 restructure).
 *
 * A thin Free container: it owns no settings of its own. Its custom
 * panel (SettingsPanel) renders four tabs, each embedding the module
 * that actually owns the settings:
 *
 *   AI & Agents — AI Provider (Pro) + AI Privacy (Free) + MCP Server (Free)
 *   License     — xSpeed Pro license (Pro)
 *   Branding    — White Label (Pro)
 *   Multisite   — network-wide settings (Pro)
 *
 * This gives the reachable-but-homeless AI Privacy off-switch a stable
 * home, and folds the old "AI" + "Pro Add-ons" sidebar groups into one
 * Settings destination — the sidebar no longer changes on upgrade;
 * tabs unlock in place.
 *
 * Tier: Free. The container is always present; individual tabs unlock
 * with Pro (via the in-panel LockedSection), so the Settings row itself
 * is never a locked dead-end.
 *
 * @package XSpeed
 */

declare(strict_types=1);

namespace XSpeed\Modules\Settings;

defined( 'ABSPATH' ) || exit;

use XSpeed\Module;

final class SettingsModule extends Module {

	public const SLUG    = 'settings';
	public const TIER    = self::TIER_FREE;
	public const VERSION = '1.0.0';

	public function ui_metadata(): array {
		return array(
			'label'        => 'Settings',
			'icon'         => 'Settings',
			'description'  => 'License, branding, and network settings.',
			'custom_panel' => 'SettingsPanel',
		);
	}

	/**
	 * The container owns no settings — each tab persists through the
	 * module it embeds. Empty schema so the base class doesn't register
	 * generic settings routes.
	 */
	public function settings_schema(): array {
		return array();
	}

	public function cli_commands(): array {
		return array(
			array(
				'name'      => 'xspeed settings',
				'callback'  => array( $this, 'cli_handler' ),
				'shortdesc' => 'Show which Settings tabs are available (License / Branding / Multisite).',
				'synopsis'  => array(),
			),
		);
	}

	public function cli_handler( array $args, array $assoc ): void {
		$tabs = array(
			'license'     => 'License',
			'white-label' => 'Branding',
			'multisite'   => 'Multisite',
		);
		foreach ( $tabs as $slug => $label ) {
			$present = \XSpeed\Module_Registry::has( $slug ) ? 'available' : 'locked';
			\WP_CLI::log( sprintf( '%-14s %-14s %s', $slug, $present, $label ) );
		}
	}
}

```
