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

Plugin: wp-consent-api (Used by 48,055 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
x*v*d.com (WP 6.9.4) βœ… F 2026-05-15 14:14:04
s*l*n*r*c.com βœ… F 2026-05-15 14:14:02
j*y*a*e*l*.com (WP 6.9.4) βœ… F 2026-05-15 14:13:24
r*u*a*l*f*c*o*y.fr (WP 6.9.4) βœ… F 2026-05-15 14:09:59
s*a*i*v*s*.pictures (WP 6.9.4) βœ… F 2026-05-15 14:09:38
l*r*a*b*r.com (WP 6.9.4) βœ… F 2026-05-15 14:08:52
a*t*e*n.gr βœ… F 2026-05-15 14:08:41
a*c*c*a*.com (WP 6.9.4) βœ… C 2026-05-15 14:08:14
e*a*a*d*g*t*l*l*s.com (WP 6.9.4) βœ… F 2026-05-15 14:07:27
s*o*.e*a*t*c.com βœ… F 2026-05-15 14:07:21
t*r*k*z*l*i.com (WP 6.9.4) βœ… F 2026-05-15 14:05:27
c*b*s*r*i*i.com βœ… F 2026-05-15 14:05:05
a*c*s*i*e*.com (WP 6.9.4) βœ… A 2026-05-15 14:04:47
o*e*s*m*r*t*m*.com βœ… F 2026-05-15 14:04:02
e*a*e*d*a*t*g*.com βœ… F 2026-05-15 14:02:32
n*r*a*g*t*e*s*l*t*o*s.com (WP 6.9.4) βœ… F 2026-05-15 14:02:09
c*b*o.com βœ… F 2026-05-15 14:00:39
t*p*b*z*n*.com (WP 6.9.4) βœ… F 2026-05-15 14:00:14
l*r*t*o*e*.com βœ… D 2026-05-15 13:58:41
t*r*-*e*f*r*a*c*.com βœ… F 2026-05-15 13:57:46
n*r*a*b*a*n.com (WP 6.9.4) βœ… C 2026-05-15 13:57:01
j*y*l*r*.com βœ… F 2026-05-15 13:56:26
v*s*a*o*t*q*e*o*e*.al (WP 6.9.4) πŸ”“ F 2026-05-15 13:55:32
t*m*p*i*n*.org (WP 6.9.4) βœ… F 2026-05-15 13:55:31
c*e*c*n*g*r*e*c*m*a*y.com βœ… F 2026-05-15 13:55:00
t*o*i*.com βœ… F 2026-05-15 13:54:44
t*o*a*i.com (WP 6.9.4) βœ… F 2026-05-15 13:54:43
b*o*.h*n*u*h*n*s*s*h*o*.com (WP 6.9.4) βœ… F 2026-05-15 13:54:24
r*n*s*n*a*r*s*a*e.com (WP 6.9.4) βœ… F 2026-05-15 13:54:21
t*r*o*c*c.com βœ… F 2026-05-15 13:53:48
s*u*h*r*c*a*m*e*u*i*y.com (WP 6.9.4) βœ… C 2026-05-15 13:52:12
j*y*f*o*l*i*s*i*u*e.com βœ… B 2026-05-15 13:51:44
j*y*f*x*l*r*n*t*e*o*l*.com (WP 6.9.4) βœ… F 2026-05-15 13:51:44
m*r*e*s*u*m.com βœ… F 2026-05-15 13:51:43
e*a*m*s*r*m*e*l*m*t*.com βœ… F 2026-05-15 13:51:40
p*u*a*a*r*e*a*a*u*e*a.c*m.br βœ… F 2026-05-15 13:49:07
h*r*v*h*r.com βœ… F 2026-05-15 13:48:56
h*r*t*a.com βœ… F 2026-05-15 13:48:56
s*i*h*.com (WP 6.9.4) βœ… F 2026-05-15 13:48:49
m*r*e*m*n*f*k*u*-*r*n*t.com βœ… F 2026-05-15 13:47:48
a*c*d*m*a*i*e*r*.com (WP 6.9.4) βœ… F 2026-05-15 13:45:34
t*s*a*y*r*v*t*t*u*s.it (WP 6.6.5) βœ… F 2026-05-15 13:45:23
n*r*y*n*l*n*.com (WP 6.9.4) βœ… C 2026-05-15 13:44:40
o*e*o*.com (WP 6.9.4) βœ… F 2026-05-15 13:44:36
h*g*l*s*r*n*p*r*o*m*n*e.c*.uk βœ… F 2026-05-15 13:44:27
c*e*t*v*.c*.th βœ… D 2026-05-15 13:42:09
t*e*e*p*t*i*-*r*j*c*.de (WP 6.9.4) βœ… F 2026-05-15 13:41:17
d*s*g*-*u*r*k*e*n.de βœ… A 2026-05-15 13:41:08
l*r*n*s*r*i*e*.com (WP 6.9.4) βœ… F 2026-05-15 13:40:53
o*e*o*a*k.com (WP 6.9.4) βœ… F 2026-05-15 13:40:38
c*u*h*t*u*.c*.uk (WP 6.9.4) βœ… F 2026-05-15 13:31:20
x*r*s*f*o*.com (WP 6.9.4) βœ… F 2026-05-15 13:29:59
e*a*d*a*e*e*t*a*.com βœ… F 2026-05-15 13:29:56
c*e*i*c*r*-*r*c*s*i*g*c*n*e*.com βœ… F 2026-05-15 13:29:36
q*e*s*r.co βœ… F 2026-05-15 13:29:31
l*r*n*o*u*a*t*.com βœ… F 2026-05-15 13:29:22
c*a*r*c*m*n*s*o*f*e.com βœ… F 2026-05-15 13:28:56
a*t*y*a*e*.com βœ… F 2026-05-15 13:26:10
a*t*y*b*l*a*i*g.com (WP 6.9.4) βœ… F 2026-05-15 13:26:10
a*b*q.com βœ… F 2026-05-15 13:25:26
o*d*e*t*a*t*r.com (WP 6.9.4) βœ… F 2026-05-15 13:25:17
s*p*i*e*u*s*l*o*.c*m.au (WP 6.9.4) βœ… F 2026-05-15 13:25:02
e*a*e*-*o*i*o*.com (WP 6.7.5) βœ… F 2026-05-15 13:24:20
t*r*m*r.com (WP 6.9.4) βœ… F 2026-05-15 13:24:06
y*n*f*m*y*v*p*o.es βœ… D 2026-05-15 13:23:07
t*o*e*h*b*t*o*s.com βœ… F 2026-05-15 13:23:02
m*r*d*l*o*.com (WP 6.9.4) βœ… F 2026-05-15 13:23:02
p*t*w*y*l*v*.w*e*g*n*p*w*r*d.com βœ… F 2026-05-15 13:21:48
j*y*e*.com βœ… F 2026-05-15 13:21:14
n*r*l*a*m.com (WP 6.9.4) βœ… F 2026-05-15 13:21:10
x*o*i*.com (WP 6.9.4) βœ… F 2026-05-15 13:21:03
x*o*e*r*p*.com (WP 6.9.4) βœ… B 2026-05-15 13:21:02
c*a*t*p*a*t*.com (WP 6.9.4) βœ… B 2026-05-15 13:20:55
a*a*a*o.com βœ… F 2026-05-15 13:20:53
e*a*i*n.com βœ… D 2026-05-15 13:20:51
d*t*k*o*y*p*y*u.cz (WP 6.6.1) βœ… F 2026-05-15 13:20:30
n*r*h*u*u*n*d*.com βœ… F 2026-05-15 13:16:31
k*d*o*z.net (WP 6.9.4) βœ… F 2026-05-15 13:14:43
a*t*v*s*a*a*n*i*g*r*.com (WP 6.9.4) βœ… F 2026-05-15 13:14:10
y*g*m*t*e*e*.de (WP 6.9) βœ… F 2026-05-15 13:10:21
a*a*u*l*r*v*l*r.com (WP 6.9.4) βœ… F 2026-05-15 13:10:02
s*a*t*o*a.org (WP 6.9.4) πŸ”“ F 2026-05-15 13:07:16
l*r*n*-*o*i*.com βœ… F 2026-05-15 13:06:13
1*1*.be (WP 6.9.4) βœ… F 2026-05-15 13:05:39
e*a*n*i*o*n*m*n*.com (WP 6.9.4) βœ… F 2026-05-15 13:05:24
s*i*p*r*r*a*o*i.com (WP 6.9.1) βœ… F 2026-05-15 13:02:54
s*i*p*r*s*f*.com βœ… F 2026-05-15 13:02:53
a*a*a*o*o*.com βœ… D 2026-05-15 13:02:23
o*e*h*f*r.b*u*o*r*a*t*o*o*r*f*e.at (WP 6.9.4) βœ… F 2026-05-15 13:00:28
m*i*r*d*e*v*e*e*n*s.fr βœ… F 2026-05-15 13:00:06
c*n.p*n*t.help βœ… F 2026-05-15 12:59:59
p*f*m*.store βœ… F 2026-05-15 12:59:59
x*n*n*a*t*m*t*o*.com βœ… F 2026-05-15 12:58:55
a*a*a*a*a*m*.com βœ… F 2026-05-15 12:57:52
r*o*a.ch βœ… F 2026-05-15 12:57:47
y*p*n.fi (WP 6.8.5) βœ… F 2026-05-15 12:56:02
y*p*n.se (WP 6.8.5) βœ… F 2026-05-15 12:56:02
b*c*p*o*o*i*n*.com (WP 6.9.4) βœ… F 2026-05-15 12:55:34
x*n*f*s*i*n.com (WP 6.9.4) βœ… B 2026-05-15 12:54:12
s*r*i*e.h*x.technology βœ… F 2026-05-15 12:53:55

Top 50 Plugins

Plugin Count
elementor 1,721,105
contact-form-7 1,685,294
elementor-pro 999,304
woocommerce 786,554
revslider 599,384
jetpack 452,954
js_composer 415,749
wp-rocket 316,029
essential-addons-for-elementor-lite 273,477
gravityforms 253,022
complianz-gdpr 233,053
instagram-feed 217,924
cookie-law-info 214,766
google-site-kit 208,279
google-analytics-for-wordpress 207,615
sitepress-multilingual-cms 207,409
header-footer-elementor 204,164
elementskit-lite 193,554
bluehost-wordpress-plugin 188,313
gutenberg-core 156,721
gutenberg 154,225
cookie-notice 134,382
wpforms-lite 129,474
the-events-calendar 123,907
astra-sites 120,822
gtranslate 120,541
litespeed-cache 120,096
popup-maker 112,422
woocommerce-payments 110,228
tablepress 97,979
coblocks 97,532
all-in-one-seo-pack 91,440
astra-addon 90,261
honeypot 89,704
wp-smushit 89,582
LayerSlider 88,978
bb-plugin 88,239
duracelltomi-google-tag-manager 87,158
premium-addons-for-elementor 83,317
akismet 83,190
cleantalk-spam-protect 81,961
mailchimp-for-wp 81,116
megamenu 80,003
woocommerce-gateway-stripe 79,195
fusion-builder 76,704
formidable 75,232
ewww-image-optimizer 73,968
gravityformsrecaptcha 73,146
smart-slider-3 73,145
wp-pagenavi 72,189

Top 50 Themes

Theme Count
hello-elementor 586,319
Divi 493,535
astra 411,315
Avada 119,968
flatsome 117,032
generatepress 110,901
pub 108,048
oceanwp 79,829
kadence 73,971
enfold 68,268
salient 64,353
h4 55,377
twentyseventeen 54,074
bb-theme 53,829
twentytwentyfour 52,480
cocoon-master 51,035
betheme 49,803
blocksy 47,624
dt-the7 43,668
twentytwentyfive 42,467
neve 37,346
Avada-Child-Theme 35,891
gox 32,235
twentytwentyone 32,055
bridge 31,862
woodmart 31,423
lightning 29,188
twentytwenty 29,181
swell 27,115
Impreza 24,772
twentytwentythree 24,425
bricks 24,393
Newspaper 21,625
twentytwentytwo 20,164
epik-redesign 19,414
uncode 18,009
pro 17,590
twentysixteen 17,501
storefront 17,162
extendable 16,272
sydney 16,178
Total 14,023
yith-wonder 13,972
voxel 13,866
themify-ultra 12,752
hello-theme-child-master 12,405
hestia 12,206
twentynineteen 12,120
yootheme 12,020
factory-templates-4 11,860