WordPress OSINT, maintenance or security needs? Reach out!
TLDWP

Plugin: wp-consent-api (Used by 47,818 domains)

WP Consent API

πŸ‘€ Rogier Lankhorst πŸ“¦ v2.0.1 πŸ”— Plugin Homepage

WP Consent API is a plugin that standardizes the communication of accepted consent categories between plugins. It requires a cookie banner plugin and, at least, one other plugin that supports the WP Consent API.

With this plugin, all supporting plugins can use the same set of methods to read and register the current consent category, allowing consent management plugins and other plugins to work together, improving compliance with privacy laws.

WARNING: the plugin itself will not handle consent. It will show you how many plugins you have without Consent API support and will improve compliance on your site by ensuring smooth communication between cookie banner plugins and plugins that set cookies or track user data.

What problem does this plugin solve?

Currently, it is possible for a consent management plugin to block third-party services like Facebook, Google Maps, Twitter, etc. But if a WordPress plugin places a PHP cookie, a consent management plugin cannot prevent this.

Secondly, some plugins integrate the tracking code on the clientside in javascript files that, when blocked, break the site.

Or, if such a plugin’s javascript is minified, causing the URL to be unrecognizable and won’t get detected by an automatic blocking script.

Lastly, the blocking approach requires a list of all types of URL’s that tracks data. A generic API where plugins adhere to can greatly
facilitate a webmaster in getting a site compliant.

Does usage of this API prevent third-party services from tracking user data?

Primary this API is aimed at compliant first-party cookies or tracking by WordPress plugins. If such a plugin triggers, for example, Facebook,
usage of this API will be of help. If a user embeds a Facebook iframe, a blocking tool is needed that initially disables the iframe and or scripts.

Third-party scripts have to blocked by blocking functionality in a consent management plugin. To do this in core would be to intrusive, and is also not applicable to all users: only users with visitors from opt-in regions such as the European Union require such a feature. Such a feature also has a risk of breaking things. Additionally, blocking these and showing a nice placeholder requires even more sophisticated code, all of which should in my opinion not be part of WordPress core, for the same reasons.

How does it work?

There are two indicators that together tell if consent is given for a specific consent category, e.g., β€œmarketing”:
1) the region based consent_type, which
can be opt-in, opt-out, or other possible consent_types;
2) and the visitor’s choice: not set, allow, or deny.

The consent_type is a function that wraps a filter, β€œwp_get_consent_type”. If there’s no consent management plugin to set it, it will return false. This will cause all consent categories to return true, allowing cookies to be set on all categories.

If opt-in is set using this filter, a category will only return true if the value of the visitor’s choice is β€œallow”.

If the region based consent_type is opt-out, it will return true if the visitor’s choice is not set or is β€œallow”.

Clientside, a consent management plugin can dynamically manipulate the consent type and set several cookie categories.

A plugin can use a hook to listen for changes or check the value of a given category.

Categories and most other stuff can be extended with a filter.

Existing integrations

Categorized, and sorted alphabetically

Example plugin

  • Example plugin. The plugin basically consists of a shortcode, with a div that shows a tracking or not tracking message. No actual tracking is done πŸ™‚

Consent Management Providers

Consent Requiring Plugins

Demo site

wpconsentapi.org
Below are the plugins used to set up the demo site:

javascript, consent management plugin

//set consent type
window.wp_consent_type = 'optin'

//dispatch event when consent type is defined. This is useful if the region is detected server side, so the consent type is defined later during the pageload
let event = new CustomEvent('wp_consent_type_defined');
document.dispatchEvent( event );


//consent management plugin sets cookie when consent category value changes
wp_set_consent('marketing', 'allow');

javascript, tracking plugin

//listen to consent change event
document.addEventListener("wp_listen_for_consent_change", function (e) {
  var changedConsentCategory = e.detail;
  for (var key in changedConsentCategory) {
    if (changedConsentCategory.hasOwnProperty(key)) {
      if (key === 'marketing' && changedConsentCategory[key] === 'allow') {
        console.log("just given consent, track user")
      }
    }
  }
});

//basic implementation of consent check:
if (wp_has_consent('marketing')){
  activateMarketing();
  console.log("set marketing stuff now!");
} else {
  console.log("No marketing stuff please!");
}

PHP

//declare compliance with consent level API
$plugin = plugin_basename( __FILE__ );
add_filter( "wp_consent_api_registered_{$plugin}", '__return_true' );

/**
* Example how a plugin can register cookies with the consent API
 * These cookies can then be shown on the front-end, to the user, with wp_get_cookie_info()
 */

function my_wordpress_register_cookies(){
    if ( function_exists( 'wp_add_cookie_info' ) ) {
        wp_add_cookie_info( 'AMP_token', 'AMP', 'marketing', __( 'Session' ), __( 'Store a unique User ID.' ) );
    }
}
add_action('plugins_loaded', 'my_wordpress_register_cookies');


if (wp_has_consent('marketing')){
//do marketing stuff
}

Service-level consent

In addition to category-based consent, the API supports service-level consent control. This allows consent management plugins to grant or deny consent for specific services (like β€˜google-analytics’ or β€˜facebook-pixel’) independently from their category. When checking service consent with wp_has_service_consent(), the API first checks if explicit consent exists for that service. If no explicit consent is set, it falls back to the consent status of the service’s category. This enables fine-grained control: a user might accept statistics cookies in general, but explicitly deny a specific analytics service.

Service consent can be checked and set both server-side (PHP) and client-side (JavaScript):

PHP:

//check if a specific service has consent
if ( wp_has_service_consent( 'google-analytics' ) ) {
    //activate google analytics
}

//check if a service is explicitly denied
if ( wp_is_service_denied( 'facebook-pixel' ) ) {
    //service was explicitly denied by user
}

//set service consent
wp_set_service_consent( 'google-analytics', true ); //grant consent
wp_set_service_consent( 'facebook-pixel', false ); //deny consent

//listen for service consent changes
add_action( 'wp_consent_service_changed', function( $service, $consented ) {
    error_log( "Service {$service} consent changed to: " . ( $consented ? 'granted' : 'denied' ) );
}, 10, 2 );

JavaScript:

//check service consent
if ( wp_has_service_consent( 'youtube' ) ) {
    //activate tracking
}

//check if explicitly denied
if ( wp_is_service_denied( 'facebook-pixel' ) ) {
    //service denied
}

//set service consent
wp_set_service_consent( 'youtube', true );

//listen for service consent changes
document.addEventListener( 'wp_consent_api_status_change_service', function( e ) {
    console.log( 'Service: ' + e.detail.service + ', consented: ' + e.detail.value );
});

Any code suggestions? We’re on GitHub as well!

DomainExposuresHeadersLast Checked
m*n*u*a*k*t*h*n.com βœ… F 2026-05-13 08:55:39
t*p*e*o*t*r*v*l*e*s.com (WP 6.9.4) βœ… F 2026-05-13 08:55:25
c*e*i*a*a*y*.com (WP 6.9.4) βœ… B 2026-05-13 08:54:34
a*i*n*e*a*b*r*l*o.it (WP 6.8.3) βœ… F 2026-05-13 08:52:42
t*m*t*n*.org (WP 6.9.4) βœ… C 2026-05-13 08:50:34
t*k*l*u*e*o*a*l*s.com (WP 6.9.4) βœ… F 2026-05-13 08:49:52
t*k*y*e*n*l*j*.com (WP 6.9.4) βœ… F 2026-05-13 08:44:11
c*e*e*s*.com βœ… F 2026-05-13 08:42:51
l*k*o*a*-*a*r*t*.de (WP 6.9.4) βœ… F 2026-05-13 08:39:30
j*c*s*o*t*.com βœ… F 2026-05-13 08:38:22
t*k*t*4*9*.com (WP 6.9.4) βœ… F 2026-05-13 08:37:11
m*c*r*b*a*.com (WP 6.9.4) βœ… C 2026-05-13 08:36:57
k*d*g*.org βœ… A 2026-05-13 08:36:03
f*m*l*v*n*u*e*.nl (WP 6.9.4) πŸ”“ F 2026-05-13 08:36:02
b*e*k*h*o*g*t*s*c*e*s.com βœ… F 2026-05-13 08:34:20
n*m*t*c.com (WP 6.9.4) βœ… F 2026-05-13 08:33:23
s*n*a*o.ai βœ… A 2026-05-13 08:31:17
c*b*-*o*3*0.com βœ… F 2026-05-13 08:27:10
c*a*t*r.com (WP 6.9.4) βœ… F 2026-05-13 08:27:10
e*h*c*r*.c*.za βœ… F 2026-05-13 08:25:04
c*e*a*i*.com βœ… C 2026-05-13 08:24:43
a*c*-*4.com (WP 6.9.4) βœ… D 2026-05-13 08:23:53
p*o*i*i*r*.it βœ… F 2026-05-13 08:23:16
s*o*t*e*w*s*.com βœ… B 2026-05-13 08:22:35
n*i*.no (WP 6.9.4) βœ… F 2026-05-13 08:22:07
m*s*e*a*a*e*i*t.no (WP 6.9.4) βœ… F 2026-05-13 08:22:07
t*k*t*k*d*m*e*.no (WP 6.9.4) βœ… F 2026-05-13 08:22:07
k*n*e*i*k*e*t*l.net βœ… B 2026-05-13 08:21:11
q*r*n*e*c*i*g.com (WP 6.5.8) πŸ”“ F 2026-05-13 08:20:40
t*p*o*a*r*n*n.com βœ… F 2026-05-13 08:17:09
e*d*n*o*a*n*o*.com βœ… F 2026-05-13 08:14:43
c*e*i*i*n*o*s*u*i*.com (WP 6.9.4) βœ… F 2026-05-13 08:14:13
j*b*r*q.com βœ… F 2026-05-13 08:13:30
w*r*-*a*e.com βœ… F 2026-05-13 08:10:59
y*t*a.c*m.au βœ… D 2026-05-13 08:08:37
j*b*y*s.com βœ… F 2026-05-13 08:07:46
w*r*e*t*r*b*s*c*e*n*n*c*m*a*y.com (WP 6.9.4) βœ… F 2026-05-13 08:07:15
d*m*i*i*n*a*a*i*a.c*m.es (WP 6.9.4) βœ… F 2026-05-13 08:05:46
s*o*s*i*t*e*.com βœ… F 2026-05-13 08:02:01
a*l*e*a.com βœ… F 2026-05-13 08:01:29
a*l*e*.com (WP 6.9.4) βœ… D 2026-05-13 08:01:29
q*r*n*c*e*f*r*a*c*.com (WP 6.6.5) βœ… F 2026-05-13 08:01:01
q*r*n*c*a.com (WP 6.9.4) βœ… A 2026-05-13 08:01:01
g*l*o*s*i*t*.com (WP 6.9.4) βœ… F 2026-05-13 08:00:52
n*m*l*c*m*e*.com βœ… F 2026-05-13 07:55:22
g*l*n*u*r*g*c*.com βœ… D 2026-05-13 07:54:51
t*i*e*s*m*.fi (WP 6.9.4) βœ… F 2026-05-13 07:54:48
a*l*4*d*x*.com (WP 6.9.4) βœ… F 2026-05-13 07:53:19
g*i*a*e*z*o.pl βœ… F 2026-05-13 07:53:16
a*l*n*t*n*l*c*r*c*l.c*.uk (WP 6.9.4) βœ… F 2026-05-13 07:53:07
e*d*k*v*n*g*.com (WP 6.8.5) πŸ”“ F 2026-05-13 07:51:39
e*d*c*v*n*g*.com (WP 6.8.5) πŸ”“ F 2026-05-13 07:51:38
g*l*m*g*l.com βœ… F 2026-05-13 07:50:26
a*t*i*i*.com (WP 6.9.4) βœ… A 2026-05-13 07:50:17
t*g*x.de βœ… F 2026-05-13 07:46:41
q*r*l*s.com βœ… F 2026-05-13 07:46:02
a*a*o*i*f*u*d*t*o*.com βœ… F 2026-05-13 07:45:29
l*v*e*r*m*n*e*r.com βœ… A 2026-05-13 07:45:16
m*r*i*l*e*h*i*e.com (WP 6.9.4) βœ… A 2026-05-13 07:44:18
a*p*o*-*r*u*.com (WP 6.9.4) βœ… F 2026-05-13 07:42:12
e*t.it πŸ”“ F 2026-05-13 07:42:00
f*s*p*l*g*s*h*l*-*r*e*e*.de (WP 6.9.4) βœ… F 2026-05-13 07:41:26
t*i*u*e.com (WP 6.9.4) βœ… F 2026-05-13 07:41:11
b*s*o*e*l*z*n*d*s*g*.c*.uk (WP 6.9.4) βœ… F 2026-05-13 07:40:38
t*p*r*a*e*.com βœ… D 2026-05-13 07:40:23
a*l*i*m*n*p*a*e.com βœ… F 2026-05-13 07:38:47
a*b*s*a*a*r.fr βœ… F 2026-05-13 07:38:36
t*i*u*e*b*r*e*u*.com (WP 6.9.4) βœ… F 2026-05-13 07:37:07
y*y*s*n*a*i.org (WP 6.9.4) βœ… F 2026-05-13 07:36:51
a*a*p*i*n*e*e*s*n*.com βœ… F 2026-05-13 07:36:03
s*o*t*c*a*t*r*p*i*s.c*m.au βœ… F 2026-05-13 07:35:07
p*p*s*e*i*e*p*u*b*n*.c*m.au βœ… F 2026-05-13 07:35:07
g*l*m*n*u*r*g*c*.com βœ… D 2026-05-13 07:34:58
g*l*m*n*l*p.com βœ… F 2026-05-13 07:34:58
f*r*a*o*s*t.c*m.tr (WP 6.8.3) βœ… F 2026-05-13 07:34:09
c*u*s*p*a*.ai βœ… D 2026-05-13 07:33:48
z*n*i*o*s*.e*e*i*o.com (WP 6.9.1) βœ… F 2026-05-13 07:33:20
z*n*i*o*p*.e*e*i*o.com (WP 6.9.1) βœ… F 2026-05-13 07:33:20
z*n*i*o*i*.e*e*i*o.com (WP 6.9.1) βœ… F 2026-05-13 07:33:20
z*n*i*o*h*.e*e*i*o.com (WP 6.9.1) βœ… F 2026-05-13 07:33:20
z*n*i*o*f*.e*e*i*o.com (WP 6.9.1) βœ… F 2026-05-13 07:33:20
z*n*i*o*e*.e*e*i*o.com (WP 6.9.1) βœ… F 2026-05-13 07:33:20
z*n*i*o*d*.e*e*i*o.com (WP 6.9.1) βœ… F 2026-05-13 07:33:20
z*n*i*o*c*.e*e*i*o.com (WP 6.9.4) βœ… F 2026-05-13 07:33:20
j*b*i*w*s*v*l*e*c*t*.com βœ… F 2026-05-13 07:32:03
j*b*i*s*g*o*g*.com βœ… F 2026-05-13 07:32:02
j*b*i*s*c.com βœ… F 2026-05-13 07:32:02
j*b*i*s*l*l*k*c*u*t*.com βœ… F 2026-05-13 07:32:02
j*b*i*s*l*l*k*c*t*u*a*.com βœ… F 2026-05-13 07:32:02
c*e*t*s*.com βœ… F 2026-05-13 07:32:00
n*m*l*b*.com βœ… F 2026-05-13 07:31:25
e*c*e*t*o*i*r*o.com (WP 6.8.5) βœ… F 2026-05-13 07:30:24
v*r*o*e*d*.asia (WP 6.9.4) βœ… F 2026-05-13 07:30:23
m*n*p*l*l*g.com (WP 6.9.4) βœ… F 2026-05-13 07:30:14
j*b*i*o*d*n.com βœ… F 2026-05-13 07:28:39
j*b*i*g*l*.com (WP 6.9.4) βœ… C 2026-05-13 07:28:38
l*n*.nl βœ… B 2026-05-13 07:28:04
c*v*r*a*t*g*o*p.com βœ… F 2026-05-13 07:25:59
n*l*r*n.com (WP 6.9.4) βœ… F 2026-05-13 07:25:07
p*e*o.f*s*.u*l.pt πŸ”“ F 2026-05-13 07:24:50

Top 50 Plugins

Plugin Count
elementor 1,722,234
contact-form-7 1,682,869
elementor-pro 998,365
woocommerce 790,405
revslider 600,303
jetpack 450,462
js_composer 415,114
wp-rocket 314,531
essential-addons-for-elementor-lite 271,119
gravityforms 251,823
complianz-gdpr 229,765
instagram-feed 217,303
cookie-law-info 212,728
google-analytics-for-wordpress 207,578
google-site-kit 207,389
header-footer-elementor 205,563
sitepress-multilingual-cms 205,066
elementskit-lite 192,330
bluehost-wordpress-plugin 188,981
gutenberg-core 165,545
gutenberg 153,204
wpforms-lite 131,535
cookie-notice 131,296
astra-sites 122,855
the-events-calendar 122,298
litespeed-cache 120,165
gtranslate 120,108
popup-maker 112,037
woocommerce-payments 108,907
coblocks 100,766
tablepress 96,435
all-in-one-seo-pack 90,307
astra-addon 89,953
wp-smushit 89,233
LayerSlider 89,069
bb-plugin 88,353
honeypot 88,254
duracelltomi-google-tag-manager 86,149
premium-addons-for-elementor 83,206
akismet 83,039
cleantalk-spam-protect 82,083
mailchimp-for-wp 81,326
megamenu 79,264
woocommerce-gateway-stripe 78,817
fusion-builder 76,520
formidable 74,964
ewww-image-optimizer 73,468
smart-slider-3 72,785
gravityformsrecaptcha 72,777
creative-mail-by-constant-contact 72,332

Top 50 Themes

Theme Count
hello-elementor 585,288
Divi 492,883
astra 414,656
Avada 119,694
flatsome 115,423
pub 113,907
generatepress 110,676
oceanwp 79,680
kadence 73,923
enfold 67,782
salient 64,191
h4 58,510
bb-theme 53,918
twentyseventeen 53,771
twentytwentyfour 52,994
cocoon-master 51,679
betheme 49,733
blocksy 47,932
dt-the7 43,460
twentytwentyfive 43,200
neve 37,306
Avada-Child-Theme 35,531
gox 32,225
twentytwentyone 32,135
woodmart 31,781
bridge 31,769
lightning 29,188
twentytwenty 29,124
swell 27,212
twentytwentythree 24,628
Impreza 24,509
bricks 24,288
Newspaper 21,435
twentytwentytwo 20,309
epik-redesign 19,578
uncode 17,809
pro 17,587
twentysixteen 17,461
storefront 17,226
extendable 16,538
sydney 16,000
yith-wonder 14,193
Total 13,951
themify-ultra 12,805
hestia 12,222
hello-theme-child-master 12,149
twentynineteen 12,085
yootheme 11,859
factory-templates-4 11,554
porto 11,534