PluginProbe
xSpeed Cache: AI-Powered Performance Hub with MCP, Caching & CDN / 1.3.7
xSpeed Cache: AI-Powered Performance Hub with MCP, Caching & CDN v1.3.7
1.3.7 1.3.6 1.3.5 1.3.4 1.3.3 1.3.2 1.3.1 1.3.0 1.2.4 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 All 33 releases
← All changes | includes/modules/AIPrivacy/AIPrivacyModule.php +20 -6 1.0.1 → 1.3.7 View file →
@@ -24,8 +24,10 @@
24 24 declare(strict_types=1);
25 25
26 26 namespace XSpeed\Modules\AIPrivacy;
27 27
28 +defined( 'ABSPATH' ) || exit;
29 +
28 30 use XSpeed\Module;
29 31 use XSpeed\Settings_Manager;
30 32
31 33 final class AIPrivacyModule extends Module {
@@ -43,27 +45,38 @@
43 45 public const CONSENT_COOKIE = 'xspeed_ai_consent';
44 46
45 47 public function ui_metadata(): array {
46 48 return array(
47 - 'label' => 'AI Privacy',
49 + 'label' => __( 'AI Privacy', 'xspeed' ),
48 50 'icon' => 'Shield',
49 - 'description' => 'Govern whether AI-powered features (Pro) may collect data from your visitors. The off-switch is here in Free because privacy is a fundamental right, not a paid feature.',
51 + 'description' => __( 'Choose whether AI features may use visitor data, with or without Pro.', 'xspeed' ),
52 + 'group' => 'ai-agents',
50 53 );
51 54 }
52 55
56 + /**
57 + * @inheritDoc
58 + *
59 + * OFF here would mean asking for less consent than the user configured, which
60 + * is the one direction this profile must never move.
61 + */
62 + public function conflict_safe_exempt(): array {
63 + return array( 'gdpr_consent_required' );
64 + }
65 +
53 66 public function settings_schema(): array {
54 67 return array(
55 68 'gdpr_consent_required' => array(
56 69 'type' => 'bool',
57 70 'default' => true,
58 - 'label' => 'Require consent before AI data collection',
59 - 'description' => 'When ON, AI-powered features only record data after a visitor accepts the consent banner. When OFF, they collect from every visitor — only legal in regions without GDPR-style consent rules. The setting applies even if Pro is not installed (so a later Pro upgrade respects whichever choice you made).',
71 + 'label' => __( 'Ask visitors for consent', 'xspeed' ),
72 + 'description' => __( 'When on, AI features only record a visitor\'s data after they accept the consent banner. Turn it off only where the law does not require consent, as GDPR does.', 'xspeed' ),
60 73 ),
61 74 'consent_banner_text' => array(
62 75 'type' => 'string',
63 76 'default' => 'We collect anonymized navigation and performance data to make this site faster. Accept to help us optimize your experience.',
64 - 'label' => 'Consent banner text',
65 - 'description' => 'Shown in the cookie consent banner. Keep it factual — what you collect (page navigation, performance metrics) and why.',
77 + 'label' => __( 'Consent banner text', 'xspeed' ),
78 + 'description' => __( 'The text of the consent banner. Say plainly what you collect, such as page visits and speed data, and why.', 'xspeed' ),
66 79 ),
67 80 );
68 81 }
69 82
@@ -99,8 +112,9 @@
99 112 array(
100 113 'name' => 'xspeed ai-privacy',
101 114 'callback' => array( $this, 'cli_handler' ),
102 115 'shortdesc' => 'Show whether AI data collection is allowed for the current request context (CLI = no cookie).',
116 + 'ai_hint' => 'May xSpeed send this site\'s data to an AI provider? Check before invoking any AI-backed feature — it reports the user\'s opt-in state, not a setting to change casually.',
103 117 'synopsis' => array(),
104 118 ),
105 119 );
106 120 }