| 开发者 | cookiehug |
|---|---|
| 更新时间 | 2026年11月28日 01:22 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.2 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
<head> on every page (synchronous, so it runs before any tracker).wp-content/plugins/cookiehug/.Click Open CookieHug dashboard on the plugin settings page. Everything is configured there. The plugin never exposes those controls locally — that's intentional.
No. The plugin stores a license key, a connection key (hashed on the server), and a domain ID. No visitor data ever touches the plugin — consent events go directly from the banner script to the CookieHug backend.
Deactivation stops the snippet from loading. Uninstall (Plugins → Delete) removes all cookiehug_* options and transients. The remote connection is not revoked automatically on uninstall — do that from the plugin's settings page before deleting, or from the CookieHug dashboard.
Yes — add to wp-config.php:
add_filter( 'cookiehug_api_base', function() { return 'https://cookiehug.test'; } );
wp_has_consent() returns true until the visitor objects (the bridge sets window.wp_consent_type to optout and writes allow). In opt-in regions an allow left over from an opt-out region is turned back into deny.wp_has_consent() at its old value until the next page load after a visitor accepted or rejected.<head> and loads synchronously (it used to be async and printed with the other enqueued scripts). Inline trackers added by the theme or other plugins after wp_head can no longer run before consent is enforced. Sites that prefer the old behaviour can return true from the cookiehug_loader_async filter.data-cfasync="false" (Cloudflare Rocket Loader), data-no-optimize and data-no-defer (LiteSpeed Cache), nowprocket (WP Rocket) and data-jetpack-boost="ignore" (Jetpack Boost). Delaying or combining the consent loader breaks consent enforcement.src to data-cookiehug-src, so the browser sends no request to the provider before the decision. CookieHug shows its placeholder in the meantime. Can be switched off on the CookieHug settings page; the cookiehug_embed_hosts filter extends the provider list.[cookiehug_declaration] shortcode: renders the cookie declaration table on any page or post (the loader is enqueued only where the shortcode is used).