Skip to content

Commit 776a192

Browse files
fix: stop removing consent categories globally; use __() to prevent double-escaping
Co-authored-by: MaximillianGroup <34328348+MaximillianGroup@users.noreply.github.com> Agent-Logs-Url: https://github.com/Starisian-Technologies/sparxstar-gluon/sessions/b54bd0d9-ee8d-45cb-bcd9-1658e69dcdaa
1 parent 794ed1c commit 776a192

2 files changed

Lines changed: 10 additions & 8 deletions

File tree

sparxstar-gluon.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ private function gluonIsPluginCompatible(): bool {
233233

234234
if ( version_compare( PHP_VERSION, $min_php, '<' ) ) {
235235
$this->gluonAdminNotice(
236-
esc_html__(
236+
__(
237237
'SPARXSTAR Gluon requires PHP 8.2+ and WordPress 6.8+. Please update your environment.',
238238
'sparxstar-gluon'
239239
)
@@ -243,7 +243,7 @@ private function gluonIsPluginCompatible(): bool {
243243

244244
if ( version_compare( get_bloginfo( 'version' ), $min_wp, '<' ) ) {
245245
$this->gluonAdminNotice(
246-
esc_html__(
246+
__(
247247
'SPARXSTAR Gluon requires PHP 8.2+ and WordPress 6.8+. Please update your environment.',
248248
'sparxstar-gluon'
249249
)
@@ -253,7 +253,7 @@ private function gluonIsPluginCompatible(): bool {
253253

254254
if ( ! class_exists( 'WP_Ability' ) ) {
255255
$this->gluonAdminNotice(
256-
esc_html__(
256+
__(
257257
'SPARXSTAR Gluon requires the Abilities API plugin to be installed and activated.',
258258
'sparxstar-gluon'
259259
)

src/integrations/SparxstarGluonRules.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -313,17 +313,19 @@ public function gluonSetConsentType( string $type ): string {
313313
}
314314

315315
/**
316-
* Filter callback to modify consent categories.
316+
* Filter callback to declare this plugin's consent categories.
317317
*
318-
* Allows customization of which consent categories are available.
319-
* Currently removes the 'preferences' category.
318+
* Returns the incoming categories unchanged. This plugin does not remove or
319+
* add global consent categories — category management belongs to the site
320+
* owner (or a dedicated consent/cookie-management plugin). The hook is kept
321+
* so extension code can override this method to add plugin-specific
322+
* categories without touching the Consent API filter directly.
320323
*
321324
* @since 1.0.0
322325
* @param array<string, mixed> $consentcategories The available consent categories.
323-
* @return array<string, mixed> Modified consent categories.
326+
* @return array<string, mixed> Unchanged consent categories.
324327
*/
325328
public function gluonSetConsentCategories( array $consentcategories ): array {
326-
unset( $consentcategories['preferences'] );
327329
return $consentcategories;
328330
}
329331
}

0 commit comments

Comments
 (0)