Turn Cookie Notice tab into a FrontConsent promo panel - #314
Conversation
Cookie consent configuration moved to the new standalone FrontConsent plugin. The Cookie Notice settings tab no longer renders any config fields here; it explains the move and offers a one-click install of FrontConsent (or a "Manage in FrontConsent" link once it's active). The frontend banner keeps working during the transition and disables itself automatically once FrontConsent is detected (FRCN_VERSION). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 20144f461b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
That feature moved with the rest of cookie consent — its readme description now lives in FrontConsent's own readme.txt instead of being duplicated here. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The tests exercised FrontBlocks\Frontend\CookieNotice directly and had no dependency on anything removed from Settings.php in the previous commit — they now live in FrontConsent, ported to its own namespace, option names and hook prefixes, since that's where ongoing development of this code happens. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b2a38883a9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
This PR removed tests/js/cookie-notice-injection.test.js and its package.json script (moved to FrontConsent), but the JavaScript tests workflow still called npm run test:cookie-notice, failing every run with "Missing script". Swapped it for test:column-link, which exists (added by #296) but was never wired into this workflow either. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a30a546dee
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…ent) (#317) * Remove legacy Cookie Notice runtime module (hard cutover to FrontConsent) Cookie consent now lives entirely in the standalone FrontConsent plugin. FrontBlocks no longer ships its own banner, AJAX consent endpoints, or GTM/GA4/tracking integrations — only the FrontConsent promo/migration panel added in #314 remains. - Delete includes/Frontend/CookieNotice.php and its assets (assets/cookie-notice/frontblocks-cookie-notice.{js,css}). - Stop instantiating Frontend\CookieNotice from Plugin_Main::load_modules(). - Drop the now-inaccurate 'cookie-notice' entry from Admin\RedundantPlugins::get_default_entries() — FrontBlocks no longer makes GDPR Cookie Compliance/CookieYes redundant. - Remove the orphaned .frbl-cookie-notice-preview* CSS left over from the pre-promo-panel settings preview. - Delete tests exercising the removed class (CookieNoticeLinkTest.php); trim CookieNoticeTransitionTest.php down to its CookieNoticeDeprecationNotice coverage and rename it CookieNoticeDeprecationNoticeTest.php, adding regression tests that the legacy class is gone and that the promo tab still renders without it. - Update RedundantPluginsTest.php, AGENTS.md, readme.txt/readme.md, and docs/COOKIE-NOTICE.md to describe this as a hard cutover rather than a transition, and fix a stale test comment referencing a cookie-notice JS test file that no longer exists. Admin\CookieNoticeDeprecationNotice and Settings::render_cookie_notice_promo_tab() are untouched — both only ever depended on each other, never on the removed runtime class. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> * fix: realign RedundantPlugins array double-arrows after cookie-notice removal Removing the 'cookie-notice' entry left 'svg-upload' and 'login-google' misaligned per WordPress.Arrays.MultipleStatementAlignment, which composer lint's phpcs run flagged. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> * fix: address Codex review findings on the Cookie Notice hard cutover - Bump CookieNoticeDeprecationNotice::DISMISSED_META_KEY to a new name so an admin who dismissed the old, lower-stakes transition notice still sees this one — the site now has no consent banner at all until FrontConsent is installed, which the old dismissal predates. - Rewrite the notice's copy (and its class docblock) to state plainly that the banner is already gone, instead of the stale "is moving" / "is being extracted" / "turns itself off" transition-period wording. - Gate the Settings promo tab's install CTA on current_user_can( 'install_plugins' ): a user with only edit_theme_options (e.g. a multisite subsite admin) could see the tab but would hit a failed nonce authorization on the install URL; they now get a message pointing at a site/network administrator instead. - Drop cookie-consent claims from readme.txt's short description, opening paragraph, and Tags line, and point to FrontConsent instead — those are the first things a WordPress.org visitor sees, ahead of the (already-accurate) detailed changelog section. - Correct readme.md and docs/REDUNDANT-PLUGINS.md, both still documenting Cookie Notice as one of the two core redundant-plugin defaults; the actual defaults are SVG Upload and Google Login. - Clarify docs/COOKIE-NOTICE.md: the promo panel's link only installs FrontConsent when it isn't present yet — WordPress still requires a separate activation step, so "one-click install/activation" overstated what actually happens in one click. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
Summary
Settings.php(banner copy, layout, colors, GTM/GA4/tracking integrations, legacy migration) — that logic lives in FrontConsent's own settings page now.CookieNotice::is_enabled()returnsfalseonce FrontConsent is active (FRCN_VERSIONdefined), so the two plugins never render a banner together even before FrontConsent's own migration flips the stored option.CookieNoticeDeprecationNoticeadmin notice (separate from the tab) pointing existing users with Cookie Notice enabled toward installing FrontConsent.readme.txt(deprecation note + changelog entry) andAGENTS.mdto point future cookie-consent work to FrontConsent's own repo.Settingsmethods (CookieNoticeIntegrationsTest,CookieNoticeSettingsSanitizationTest); preserved the still-relevantCookieNoticecache-invalidation coverage in a newCookieNoticeCacheInvalidationTest.Test plan
php -lon all changed filescomposer lint(phpcs) — cleancomposer phpstan— cleancomposer test— blocked in this environment (no local WordPress test install at the pathtests/bootstrap.phpexpects); please run in CI🤖 Generated with Claude Code