Skip to main content

WordPress Plugin with WP Consent API Integration

Overview

Create a WordPress plugin for Cookient that integrates with the WordPress Consent API (wp-consent-api), enabling WordPress users to easily install and configure Cookient's consent management directly from their WordPress admin dashboard.

Background

As of 2025, Google requires all CMP Partner Program participants (Bronze, Silver, and Gold tiers) to provide WordPress plugins that integrate with the wp-consent-api. This is a mandatory requirement for certification.

Requirements

WP Consent API Integration

  • Full integration with the WordPress Consent API (https://github.com/developer-richly/wp-consent-api)

  • Register Cookient as a consent provider

  • Map Cookient consent categories to WP Consent API categories:

    • functional

    • statistics (analytics)

    • marketing (advertising)

    • preferences

  • Properly update consent state through the API when user makes choices

Plugin Features

  • Easy installation from WordPress Plugin Directory

  • Settings page in WordPress admin for configuration:

    • API key / Site ID input

    • Consent categories configuration

    • Banner position and styling options

    • Google Consent Mode v2 toggle

  • Auto-injection of Cookient script into site header

  • Compatible with WordPress multisite installations

Compatibility

  • WordPress 6.0+ support

  • PHP 7.4+ and 8.x support

  • Compatible with popular caching plugins (WP Rocket, W3 Total Cache, etc.)

  • Compatible with popular page builders (Elementor, Divi, Gutenberg)

  • No conflicts with other consent/cookie plugins

Cookie Scanning

  • Trigger cookie scan from WordPress admin

  • Display detected cookies in admin dashboard

  • Allow manual categorization of cookies

Performance

  • Minimal impact on page load time

  • Async script loading

  • No render-blocking resources

Documentation

  • Installation guide

  • Configuration walkthrough

  • FAQ section

  • Troubleshooting guide

Acceptance Criteria

  • Plugin approved and published on WordPress Plugin Directory

  • WP Consent API fully integrated and functional

  • Settings page complete with all configuration options

  • Works with WordPress 6.0+

  • Tested with top 5 caching plugins

  • Documentation complete

  • No PHP errors or warnings in debug mode

Technical Notes

  • Follow WordPress Coding Standards

  • Use WordPress Settings API for options

  • Implement proper sanitization and escaping

  • Include uninstall.php for clean removal

Log in to comment and vote

No comments yet

Be the first to share your thoughts.