這個外掛並未在最新的 3 個 WordPress 主要版本上進行測試。開發者可能不再對這個外掛進行維護或提供技術支援,並可能會與更新版本的 WordPress 產生使用上的相容性問題。

WP GDPR Cookie Notice

外掛說明

This plugin adds a simple performant cookie consent notice to your WordPress site that supports AMP, Web Stories, granular cookie control and live preview customization.

Not only does the notice allow you to provide the regular message that your site uses cookies, you can also optionally grant your site visitors permission to granularly allow which cookie types are allowed, supporting groups of functional (always required), preferences, analytics and marketing cookies. This aims towards compliance with how the new GDPR regulations recommend implementing cookie control for your site.

In addition to the Privacy Policy page setting that WordPress core provides, you also get a settings to optionally set an extra Cookie Policy page, and you can easily link to either of them from the cookie consent notice.

The cookie notice content and appearance can easily be tweaked using the Customizer, with an immediate live-preview of what your changes will look like.

Last but not least, another important thing that this plugin takes care of, other than most other cookie consent plugins, is that it actually ensures cookies are only placed if the respective cookie type has been allowed by the visitor. The plugin does this by implementing cookie rules for WordPress itself, and also for the following plugins:

More plugins will be supported in the future. If you are a developer though, it’s also very easy to add cookie rules for other code, by using the flexible cookie rule component the plugin provides as an extension point.

Feature Summary

  • Lightweight and easy-to-use: Simply activate the plugin, and the notice will appear.
  • Live Preview: Use the Customizer to adjust the notice to your needs, with an instant live preview.
  • Customizable Appearance: Specify the notice position, colors, border, button size and more.
  • Customizable Content: Adjust the notice heading, text and button label to your preferences. You can easily link to your cookie policy page or privacy policy page, and even give visitors granular control about which cookie types they allow.
  • Cookie Policy Support: Define an optional cookie policy page if your site has one, or alternatively provide an ID attribute to the cookie section in your privacy policy.
  • Cookie Integrations: Supported cookies are only set once the visitor has given their consent. The cookie rules implemented also respect the more granular cookie control.
  • JavaScript-driven: The cookie notice is inserted into the page as necessary via JavaScript, but at the same time provides easy access to whether it should be displayed via its PHP API.
  • AMP Support: The notice is fully AMP-compatible using <amp-consent>, integrating seamlessly with the AMP plugin. It integrates with Web Stories as well.
  • Coding Best Practices: The plugin is fully object-oriented and is coded after best practices, such as using interfaces, traits, dependency injection or the single responsibility principle. It also implements modern coding features requiring PHP 7, such as scalar type hints or return type hints.

Disclaimer

This plugin does not provide any legal protection. You as a site administrator are required to ensure that it meets legal standards. This plugin is a technical tool, not a lawyer.

螢幕擷圖

  • The cookie notice with its default content and appearance
  • Customizing the cookie notice behavior and content
  • Customizing the cookie notice appearance

安裝方式

  1. Upload the entire wp-gdpr-cookie-notice folder to the /wp-content/plugins/ directory or download it through the WordPress backend.
  2. Activate the plugin through the ‘Plugins’ menu in WordPress.

常見問題集

Where are the plugin settings?

Since the settings of the plugin are mostly of visual nature, the plugin does not have any settings page, but uses exclusively the Customizer. You can easily reach the plugin’s Customizer panel either by using the link in the Settings menu or the link in the plugin’s row on the Plugins screen.

Which filters are available?

You can use the following filters:

  • wp_gdpr_cookie_notice_max_content_width: Filters the maximum width of the cookie notice content. By default, the $content_width global is used to determine this value, with a fallback of ‘640px’ if none is defined.
  • wp_gdpr_cookie_notice_heading_level: Filters the heading level to use for the cookie notice heading. Default is ‘h2’.

Where should I submit my support request?

For regular support requests, please use the wordpress.org support forums. If you have a technical issue with the plugin where you already have more insight on how to fix it, you can also open an issue on Github instead.

How can I contribute to the plugin?

If you have some ideas to improve the plugin or to solve a bug, feel free to raise an issue or submit a pull request in the Github repository for the plugin. Please stick to the contributing guidelines.

You can also contribute to the plugin by translating it. Simply visit translate.wordpress.org to get started.

使用者評論

2022 年 3 月 16 日
We strongly recommend this plugin over the more popular ones as this is the only plugin that we found that is lightweight and AMP compatible. Configuring capability from within the customiser is an added bonus. We had to introduce a few CSS changes to avoid covering the entire screen. @media (max-width: 414px) { .wp-gdpr-cookie-notice-inner { margin-top: 25% !important; } } .wp-gdpr-cookie-notice-inner { border: 5px solid #000; background-color: #fff; padding: 25px; } .wp-gdpr-cookie-notice { background-color: initial !important; } .wp-gdpr-cookie-notice-controls { display: block !important; margin-top: 15px; } .wp-gdpr-cookie-notice-toggles { margin: 15px 0px !important; } .wp-gdpr-cookie-notice { box-shadow: none !important; }
2021 年 12 月 31 日
La mejor opción para integrar la política de cookies en sitios amp. Gracias!!
2021 年 7 月 28 日
This is definitely fantastic and simple plugin. This is also the only one working with AMP! I have tried nearly every Coocie plugin and they are not AMP compitable at all.
2021 年 4 月 21 日
This was exactly what I needed I just wish I tried it first before going through a few including paid for plugins. It is EASY to setup, it works on AMP and that is a huge plus!. The only recommendation I would have is to have separate settings for desktop vs mobile as the "Modal Overlay" fills mobile with a white screen so makes it a big less attractive. But other than that great plugin a hue thank you to the developer!
2020 年 12 月 30 日
A recommended plugin for AMP solutions. Thanks to its developer
2020 年 12 月 5 日
The plugin is actually not that bad. But there are a few problems and nothing has changed in the beta status for a long time. But what is not nice is that there are no answers to support requests. Therefore I cannot recommend the plugin.
閱讀全部 15 則使用者評論

參與者及開發者

以下人員參與了開源軟體〈WP GDPR Cookie Notice〉的開發相關工作。

參與者

〈WP GDPR Cookie Notice〉外掛目前已有 1 個本地化語言版本。 感謝全部譯者為這個外掛做出的貢獻。

將〈WP GDPR Cookie Notice〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

變更記錄

1.0.0-rc.2

  • Introduce filter wp_gdpr_cookie_notice_amp_use_submission_endpoint to allow disabling usage of the form submission endpoint for cookie consent preferences in AMP.

1.0.0-rc.1

  • Add support for cookie notice to show up in Web Stories.
  • Add integration for blocking AdSense tags via Site Kit by Google and improve the existing Analytics integration as well, relying on Site Kit’s tag blocking API.
  • Add support for cookie notice to show up in AMP legacy theme / reader mode.
  • Fix bug where accepting the cookie notice on the WordPress login screen was not working when the AMP plugin is active.
  • Remove usage of !important in cookie notice CSS since it is bad practice and can get flagged by AMP.
  • Update default settings so that the integrations are opt-in, i.e. disabled by default.
  • Fix bug where the AMP version of the cookie notice form was unexpectedly used in Customizer previews.

1.0.0-beta.3

  • Add cookie integration support for the Site Kit by Google plugin.
  • Introduce filter wp_gdpr_cookie_notice_amp_use_endpoint to allow disabling usage of the checkConsentHref endpoint relevant for amp-consent. Props claudiulodro.
  • Fix bug with deprecated amp-consent attribute. Props claudiulodro.
  • Support current Lighthouse user agent so that the consent is skipped for it.

1.0.0-beta.2

  • Fix incompatibility with PWA plugin, previously causing the service worker to be broken.

1.0.0-beta.1

  • Initial beta release.