| 开发者 | fabiodalez |
|---|---|
| 更新时间 | 2026年4月30日 23:34 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 6.9 |
| 版权: | GPL-3.0-or-later |
| 版权网址: | 版权信息 |
data-faz-tag to block it until the right category is accepted.faz-cookie-manager folder to /wp-content/plugins/No required cloud account or subscription is needed. Core consent features run locally, while some optional refresh/download features can contact documented third-party services such as GitHub, IAB Europe, MaxMind, or AMP infrastructure.
It's free and open source (GPL-3.0). There are no premium upgrades, no feature gates, and no upsells. The plugin is based on the GPL-licensed CookieYes v3.4.0 codebase, with cloud dependencies removed and all included features running locally.
Yes. The plugin sends all 7 consent signals (ad_storage, analytics_storage, ad_user_data, ad_personalization, functionality_storage, personalization_storage, security_storage) and supports Google Additional Consent Mode (GACM) for ad technology providers.
Yes. Any script tagged with data-faz-tag="category-name" is blocked until the visitor grants consent for that category. This helps you implement consent-based blocking for ePrivacy/GDPR workflows.
Go to FAZ Cookie > Cookies and click Scan Site. The scanner runs in your browser using iframes, crawling your site's pages to detect all cookies. Choose from quick scan (10 pages), standard (100), deep (1000), or full scan. No external service involved.
Yes. Every consent action (accept, reject, customize) is recorded in a local database table with timestamp, consent ID, categories chosen, anonymized IP, and page URL. Export to CSV anytime from the Consent Logs page.
Yes. The Languages page lets you select from 180+ available languages. The banner text is automatically translated based on the visitor's browser language, and you can customize every string.
Yes. A floating revisit widget appears on every page, letting visitors reopen the preference center and change their choices at any time.
Yes. The banner supports full keyboard navigation (Tab, Enter, Escape), proper ARIA labels, and is responsive down to 375px viewports. Buttons have equal visual prominence to avoid dark patterns.
Yes. The consent banner is rendered via JavaScript from a cached template, so it works with all major caching plugins (WP Super Cache, W3 Total Cache, LiteSpeed Cache, etc.).
No. The plugin contains no telemetry, no analytics beacon, and no "phone home". Dashboard numbers are computed locally from your own wp_faz_pageviews and wp_faz_consent_logs tables. Every outbound request that can happen is documented in the "External services" section and is gated behind an explicit admin action.
The only minified files we ship are frontend/js/gcm.min.js and frontend/js/tcf-cmp.min.js. The full, unminified sources live next to them as gcm.js and tcf-cmp.js, and the build command npm run build:min rebuilds them with terser. No obfuscation is used.
By default, no — your consent logs, banner configuration and categories stay in the database so you can reinstall without losing work. To wipe everything on uninstall, enable Settings → General → Remove all data on uninstall or define FAZ_REMOVE_ALL_DATA as true in wp-config.php before deleting the plugin.
.faz-consent-container, .faz-modal, etc. — wp.org compliance ("plugins must not allow arbitrary code insertion").$_SERVER['HTTP_USER_AGENT'] in faz_is_bot() now wrapped with sanitize_text_field( wp_unslash( … ) ) at the access line (was wp_unslash() only with a phpcs:ignore). Visible to static analysers.class-filesystem.php no longer issues define('FS_CHMOD_DIR', 0755) / define('FS_CHMOD_FILE', 0644) globally. WordPress core uses the same defaults internally when those constants are unset, so runtime behaviour is unchanged for any environment that doesn't already set them.wp faz export (WP-CLI) now defaults to wp_upload_dir()/faz-cookie-manager/exports/faz-settings-YYYY-MM-DD.json. A bare filename argument is appended to that directory; an absolute path argument must resolve inside wp_upload_dir() or the command is rejected — no more arbitrary filesystem writes.frontend/class-frontend.php::start_blocking_buffer() carries an explanatory block-comment for the ob_start() callback pattern (PHP auto-flushes at shutdown, no explicit ob_end_flush() needed) and now also registers a belt-and-braces register_shutdown_function() safety-net that triggers the callback only if our handler is still on top of the buffer stack.library_core_files ERROR on admin/assets/js/cp-api-fetch-polyfill.js resolved. The polyfill structurally re-implements wp-includes/js/dist/api-fetch.js (so Plugin Check fingerprints it as a duplicate of a WordPress core library) but is needed only on ClassicPress 1.x, where the bundled WP 4.9-era wp-api-fetch lacks createRootURLMiddleware. The wp.org-distribution ZIP now excludes the polyfill via .distignore (it ships only in the GitHub -full release ZIP for ClassicPress users); class-admin.php::deregister_api_fetch() carries a file_exists() guard so the wp.org build is a graceful no-op when the file is absent. WordPress users see no functional change — the native wp-api-fetch was already winning the dependency resolution..distignore realigned to release.md::COMMON_EXCLUDES (added .code-review-graph/, graphify-out/, .serena/, phpstan-bootstrap.php, report.md, CLAUDE.md, cookie-banner-compliance-checklist.md, biome.json, .gitattributes, .playwright-cli/, languages/*.po~, languages/messages.mo). Prior drift between .distignore and the actual zip build flow caused dev artefacts to leak into past wp.org submissions.WordPress.Security.EscapeOutput.OutputNotEscaped ERROR on admin/class-admin.php:462 resolved. The ClassicPress wp.apiFetch polyfill is no longer echoed as <script>$polyfill</script> in admin_head; it now ships as a static file (admin/assets/js/cp-api-fetch-polyfill.js) registered against the wp-api-fetch handle, with the REST URL + nonce passed via wp_localize_script() as fazApiFetchConfig. Same behaviour, zero inline echo, browser-cacheable.Activator::install() now fires Activator::purge_page_caches() right after the version bump so visitors immediately see the up-to-date _fazConfig localize block — no more manual "purge LiteSpeed / Bunny / WP Rocket" step after each FAZ update. Best-effort detection across LiteSpeed Cache, WP Rocket, W3 Total Cache, WP Super Cache, Cache Enabler, SG Optimizer, Hummingbird, Breeze (Cloudways), Autoptimize, WP-Optimize, and Comet Cache. CDN edges (Cloudflare, Bunny, KeyCDN) still need a manual purge — those need API credentials we do not own..brxe-video (with aspect-ratio: 16/9 + no explicit width/height) gets a consent CTA injected synchronously, even when its offsetWidth is still 0 at MutationObserver time.<a class="bricks-lightbox" data-pswp-video-url="…"> (plus Elementor Pro / Divi equivalents) and prevents the modal from opening when the video host is gated behind unconsented categories. A placeholder is injected inline.faz_disable_banner() recognises ?bricks=run, ?bricks_preview, ?_bricksmode, and the Bricks helper functions.Call to undefined function FazCookie\…\wp_tempnam() on the REST endpoint. Lazy-load wp-admin/includes/file.php and call \wp_tempnam() from the global namespace.min-height: 0 from .faz-placeholder--video, scoped min-width: min(280px, 100%) to the video variant only.functional to necessary so visitor-rejected functional consent no longer replaces every wpDiscuz / Disqus / WP-core comment avatar with a 200-px-tall placeholder. As defence in depth, wpdiscuz_nonce_* and comment_author_* added to the is_wp_internal_cookie() allowlist.load_plugin_textdomain() documented no-op (auto since WP 4.6), 4× __($variable, …) calls replaced with verbatim returns, 8 of 10 inline <script>/<style> migrated to wp_enqueue_* / wp_add_inline_* (3 residuals carry phpcs:ignore + technical justification), _faz_first_time_install site-transient renamed to faz_first_time_install with migration, three public REST routes carry explanatory block-comments documenting the HMAC-token + rate-limit security model.Known_Providers (143 of them — Google Analytics, Adobe, Plausible, Microsoft Clarity, Mixpanel, Segment, Stripe, Mailchimp, Klaviyo, HubSpot, Pinterest, Snapchat, Reddit, Quora, Outbrain, Taboola, Yandex Metrica, Baidu Analytics, etc.) now appears in WP Admin → FAZ Cookie Manager → Cookies → "Add from template". Previously only 11 templates were exposed in the admin picker; the runtime always blocked them all, but admins couldn't see them in the picker. Discovery-friendly without changing the privacy contract.includes/data/known-providers.json (single source of truth). Each template inherits the provider's label, category, patterns, and cookies._pk_*, MATOMO_SESSID, and mtm_consent* cookies. Requested by a user on the back of a successful 1.13.4 install.wp_localize_script payloads ({handle}-js-extra) and translation tags ({handle}-js-translations) for FAZ scripts now also carry the 5 cache opt-out attributes. Those inline tags do not travel through script_loader_tag so the 1.13.1 / 1.13.2 / 1.13.3 attribute injection missed them, and a delay-aware optimizer (LiteSpeed Guest Mode in particular) re-typed them to litespeed/javascript. Added a hook on wp_inline_script_attributes (WP 5.7+) that recognises our handle prefix and injects the same 5 hints.faz-cookie-manager without the full wp-content/plugins/... prefix. The 1.13.2 path-anchored scrubber was strict-anchored and skipped those entries; 1.13.3 also matches faz-cookie-manager as a complete token, while still leaving third-party companion names like my-integration-faz-cookie-manager-compat.js untouched. Reported by gooloo.de.color: #1863dc instead of reading the preset's --faz-settings-button-color variable.litespeed_optm_gm_js_exc filter so Guest Mode's separate JS exclude list also recognises our scripts.faz-fw alias) children (faz-fw-gcm, faz-fw-tcf-cmp, faz-fw-a11y) now correctly tagged with the cache-plugin opt-out attributes.litespeed_optm_js_delay_inc scrubbing now path-anchored (plugins/faz-cookie-manager/) so third-party integration entries are never collaterally removed.faz_auto_exclude_cache_plugins filter for admins who want to disable the automatic cache-plugin exclusion block.<script> now carries data-no-defer, data-no-optimize, data-no-minify, data-cfasync="false" and data-ao-skip, and the matching pattern-based exclude filters are hooked for LiteSpeed Cache, WP Rocket, Autoptimize, SG Optimizer, Hummingbird, Cloudflare Rocket Loader and W3 Total Cache. Fixes the "banner only appears on second tap" reports from publishers using those plugins.discover_urls places recently-modified pages in the priority bucket (issue #78) so freshly-edited posts aren't skipped by the client-side early-stop threshold."js" or "com" no longer whitelists nearly every provider.type attribute (module, etc.) through the block/unblock round-trip._lscache_vary, _litespeed_*) added to the internal whitelist so they're not shredded by the server-side cookie cleanup.strpos → stripos).buildConsentArtifacts, Purpose 1 treatment, euconsent-v2 cleanup.faz_settings memoized, N+1 queries eliminated, faz_current_language() cached.wp_inline_script_tag filter intercepts inline scripts before the output buffer for cleaner blocking. Backward compatible with WP < 5.7.load event, fixing late-rendered content for returning visitors.OutputNotEscaped, MissingTranslatorsComment, and NoExplicitVersion errors resolved for wp.org submission.is_whitelisted() no longer matches against inline script body content._fazBuildRestoredScript() deduplicates script-cloning logic._fazRenderBanner() prevents crash when the banner template element is absent.applyDesignPreset() deep-replaces preference center and optout popup config — the old cherry-pick missed toggle states.const → var in WP Consent API inline script for broader browser compatibility.#000000 → transparent skip in template CSS — High Contrast preset buttons now render as intended black.rev and the stale-check wiped the cookie every time. URL-encode on write, two-pass decode on read. Reported by a live publisher running 1.11.0.exempt_levels setting didn't persist — the settings sanitizer coerced the CSV input to an empty array before the per-key handler could parse it. Without this fix the entire Paid Memberships Pro integration was silently non-functional.ad_user_data / ad_personalization to denied in the region-default code path, aligning with the post-"reject all" state.consent:yes (the token script.js::_fazUnblock() gates on) instead of consent:accepted, so exempt members get their scripts actually unblocked client-side.setAdditionalConsent(null) no longer fires during the stale-revision window — would otherwise clobber the live GACM provider list.loadSettings() and invalidateConsents() — bumped revision is no longer reverted by a late-arriving GET.+, /, =) so forwarded consentids aren't silently dropped.wca.js and microsoft-consent.js requested .min.js files that don't exist on the installation, 404'ing the WP Consent API and Microsoft UET/Clarity integrations. Suffix is now computed per-file.wordpress-internal, invisible ones) so they don't leak into a visitor's consent record.ad_storage = granted still allows advertising identifiers for frequency capping/fraud detection; what NPA removes is profiling and ad-user-data signals.faz_get_cookie_domain() is now the single source of truth; Frontend::get_cookie_domain() delegates. No more TLD-list drift between server-side writes and client-side localization.ad_storage = granted while forcing ad_user_data and ad_personalization to denied — the Google-sanctioned configuration for serving non-personalized ads to visitors who reject the banner. Publishers still earn revenue on those pageviews. Disabled by default; admins enable it explicitly.gtag("consent", "default", …) emitted directly with their granted states, removing the brief denied→granted window during which AdSense/GTM could fire the first request with ads blocked.wait_for_update default aligned between admin UI (500 ms) and PHP defaults (previously 2000 ms) — the UI number now matches what new installations actually use.color: inherit, which on dark-theme host sites inherited a light text colour from body, producing unreadable "light on white" text. Locked the text colour to var(--faz-detail-color, #212121) on the preference center, preference, header, footer wrapper, body wrapper and description paragraphs. The default is dark regardless of host theme, and users can still override the colour from the banner editor because the CSS variable is fed from the stored banner config..faz-preference-center CSS used background-color: inherit which left the modal visually empty when the classic template was active, because that template wraps the preference center in .faz-preference-wrapper (not .faz-modal) and no ancestor provided a colour. Replaced with background-color: var(--faz-detail-background-color, #ffffff) so the default is always a solid background, regardless of template variant. Reported as issue #57.background-color of .faz-preference-center is not transparent.composer require fabiodalez/faz-cookie-managerfaz-cookie-manager