Skip to content

Conversation

@Loubal70
Copy link
Collaborator

@Loubal70 Loubal70 commented Jan 5, 2026

This PR introduces customizable consent banner placeholders for blocked shortcodes with full i18n (internationalization) support, along with UX improvements for the extension subpage.

Features

  • Customizable Consent Banner: Administrators can now customize the placeholder content displayed when a shortcode is blocked:
    • Custom title
    • Custom description (supports {plugin_name} placeholder)
    • Custom button text
    • Option to hide decoration (cookie icon and background shape)
  • i18n Support: All placeholder texts support multilingual configurations. When a multilingual plugin (WPML, Polylang, etc.) is detected, a language selector allows setting different messages per language.
  • Extension Subpage UX Improvements:
    • Unified color scheme
    • Smooth transitions between states
    • Auto-scroll into the drawer when opened

⚠️ Important: Translations are missing for the new strings. This PR should be merged after #41 to avoid conflicts on translation files.


Summary by cubic

Introduces a customizable, multilingual consent banner for blocked shortcodes and improves the extension subpage UX.

  • New Features

    • Custom banner for blocked shortcodes: title, description (supports {plugin_name}), button text, and option to hide decoration.
    • Full i18n for banner texts with per-language values when WPML/Polylang is detected; frontend uses the current language.
    • Extension subpage UX: unified amber theme, smoother transitions, and drawer auto-scroll.
  • Migration

    • Adds DB columns for shortcode_placeholder_button_text and shortcode_placeholder_hide_decoration; runs automatically on upgrade.

Written for commit f4f3193. Summary will update on new commits.

Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 issues found across 14 files

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="includes/classes/models/class-plugins.php">

<violation number="1" location="includes/classes/models/class-plugins.php:427">
P2: Missing fallback to &#39;default&#39; key in JSON. The docblock documents support for `{&quot;default&quot;: &quot;...&quot;, &quot;fr&quot;: &quot;...&quot;}` format, but the implementation returns empty string when the requested language doesn&#39;t exist instead of falling back to `$decoded[&#39;default&#39;]`.</violation>
</file>

<file name="templates/admin/common/fields/toggle.php">

<violation number="1" location="templates/admin/common/fields/toggle.php:19">
P1: Using `hidden` (display: none) on the checkbox breaks keyboard accessibility. Users cannot Tab to this toggle control. Use `sr-only` or keep the visually-hidden-but-accessible pattern instead.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants