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

Plugin: wp-consent-api (Used by 50,286 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
a*t*s*r*n*t*.com (WP 6.9.4) βœ… F 2026-06-02 22:48:42
m*p*s*l*s*p*t*e*a*y.c*.uk (WP 7.0) βœ… F 2026-06-02 22:48:35
e*e*a*e*e.com βœ… A 2026-06-02 22:47:56
e*e*a*e*u*v*d*.com (WP 6.9.4) βœ… F 2026-06-02 22:47:56
e*e*a*a*a*a.com (WP 6.9.4) βœ… F 2026-06-02 22:47:55
f*r*e*u*e*d*s*d.fr βœ… B 2026-06-02 22:47:34
f*t*u*a.com βœ… F 2026-06-02 22:45:39
f*t*a*g.com (WP 6.9.4) βœ… F 2026-06-02 22:45:39
c*u*r*u*-*i*m*.fr (WP 7.0) βœ… F 2026-06-02 22:43:54
s*a*e*.fr (WP 6.9) βœ… F 2026-06-02 22:43:54
c*u*r*u*-*e*g*b*e*t.fr βœ… D 2026-06-02 22:43:54
s*p*o*t.w*t*h*e*i*r.com βœ… D 2026-06-02 22:38:24
m*d*e*t*r*r*s*s.com βœ… F 2026-06-02 22:37:27
m*d*c*r*.com (WP 6.9.4) βœ… D 2026-06-02 22:37:26
i*d*s*i*l*n*.com βœ… F 2026-06-02 22:35:23
m*d*a*o*s*l*e.com (WP 7.0) βœ… F 2026-06-02 22:34:27
i*d*t*e*t*o*t*o*.com (WP 7.0) βœ… F 2026-06-02 22:32:15
f*s*f*v*l*a*o*i*.com (WP 7.0) βœ… F 2026-06-02 22:31:56
o*c*i*a*l*n*t*z*a.it πŸ”“ F 2026-06-02 22:29:46
m*d*u*s*n*i*e*.com βœ… F 2026-06-02 22:28:11
m*d*e*w*e*t*i*g*o*h*r*.com (WP 6.9.4) βœ… B 2026-06-02 22:24:27
r*k*o*.info βœ… F 2026-06-02 22:23:22
p*f*s*e*s*o*.com (WP 7.0) βœ… F 2026-06-02 22:21:55
c*s*n*i*t*r*a*i*n*l*e*u*n*a.com (WP 7.0) βœ… F 2026-06-02 22:20:31
c*b*o*m*t*o*.fr βœ… F 2026-06-02 22:20:06
e*e*a*h*r*m*l*.com (WP 7.0) βœ… F 2026-06-02 22:14:12
h*a*e*.hu (WP 7.0) πŸ”“ D 2026-06-02 22:10:22
p*e*-*k.com βœ… B 2026-06-02 22:10:22
m*n*f*c*u*i*g*o*y*u.com βœ… F 2026-06-02 22:07:37
c*s*n*g*r*e*.com (WP 7.0) βœ… F 2026-06-02 22:07:04
p*e*l*g*a*t*.com βœ… A 2026-06-02 22:06:58
d*n*e*-*i*m*n*e*b*n*.de (WP 7.0) βœ… F 2026-06-02 22:05:36
s*m*e*o*k.com (WP 7.0) βœ… F 2026-06-02 22:04:58
e*e*a*c*s*s.com (WP 6.6.5) βœ… F 2026-06-02 22:02:26
p*a*2*v*n*s.com βœ… F 2026-06-02 21:59:21
m*n*a*-*a*.com βœ… D 2026-06-02 21:59:03
s*m*s*s*e*.com βœ… C 2026-06-02 21:58:44
s*m*s*o*s.com βœ… F 2026-06-02 21:58:44
t*e*u*i*i*s*d*r*a*a*i*e.com βœ… F 2026-06-02 21:55:57
i*a*2*2*.com (WP 7.0) βœ… F 2026-06-02 21:55:45
a*t*r*c*n*1.com (WP 6.7.5) βœ… F 2026-06-02 21:54:31
t*e*u*h*o*m*p*r*c*o*.com βœ… F 2026-06-02 21:49:44
m*d*l*l*b.com (WP 6.8.3) βœ… F 2026-06-02 21:48:53
i*a*e*s.com (WP 7.0) βœ… F 2026-06-02 21:43:57
m*d*l*g*o*n*f*r*s.com βœ… F 2026-06-02 21:43:03
e*e*e*t*d*n*i*t*y.com βœ… F 2026-06-02 21:40:58
m*d*l*e*s*t*a*s*a*e*t.com βœ… F 2026-06-02 21:39:34
p*d*e*n*e*.com (WP 7.0) βœ… F 2026-06-02 21:37:11
m*d*l*e*s*h*r*t*g*r*f*r*e*.com (WP 7.0) βœ… D 2026-06-02 21:36:04
m*d*l*e*s*h*r*t*g*.com (WP 7.0) βœ… D 2026-06-02 21:36:04
c*n*t*u*t*o*e*p*r*w*t*e*s.c*m.au βœ… D 2026-06-02 21:33:57
f*a*i*i*o.com (WP 7.0) βœ… F 2026-06-02 21:33:41
f*a*p*e*e*t*o*.com βœ… F 2026-06-02 21:33:41
i*a*e*b*r*e*u*.com (WP 7.0) βœ… C 2026-06-02 21:32:44
p*d*v*e*t*d*o.com βœ… B 2026-06-02 21:32:43
i*a*a*d*a*o*t*d*.com βœ… D 2026-06-02 21:32:43
s*m*d*y*m*l*s*a*h*i*l*.com βœ… F 2026-06-02 21:30:47
m*s*b*c*e*.b*t*d*u*k.de (WP 6.7.1) βœ… F 2026-06-02 21:24:51
p*d*a*v*e*s.com (WP 6.9.4) βœ… F 2026-06-02 21:24:46
t*e*r*p*r*.com βœ… F 2026-06-02 21:24:08
e*e*e*t*n*e*n*r*a.com (WP 6.9) βœ… D 2026-06-02 21:22:51
a*s*r*.net βœ… F 2026-06-02 21:22:47
m*n*t*y.com (WP 6.9.4) βœ… F 2026-06-02 21:19:11
e*e*e*t*o*m*r*i*l*o*r*.com (WP 7.0) βœ… F 2026-06-02 21:18:22
i*a*h*l*c*i*k*e*e.com βœ… F 2026-06-02 21:16:40
a*t*p*r*s*6*.com (WP 7.0) βœ… F 2026-06-02 21:15:44
p*d*a*o*i*i*a*.com βœ… F 2026-06-02 21:14:14
p*d*o*.com (WP 7.0) βœ… F 2026-06-02 21:14:13
l*-*r*n*a.es βœ… F 2026-06-02 21:12:48
i*a*i*l*.com βœ… F 2026-06-02 21:09:02
k*r*t*n*i*n*s.de (WP 7.0) βœ… F 2026-06-02 21:07:50
i*a*p*.com βœ… D 2026-06-02 21:03:26
e*e*e*t*l*e*i*s.com (WP 7.0) βœ… F 2026-06-02 21:01:59
m*e*p*r*u*a*t*u*s.com (WP 7.0) βœ… F 2026-06-02 21:01:38
a*t*n*m*u*z*n*.com βœ… F 2026-06-02 21:01:24
s*g*r*l*v*.es (WP 6.6.5) βœ… F 2026-06-02 21:00:48
a*t*n*m*u*r*b*t.com βœ… F 2026-06-02 20:57:19
e*e*e*t*9*o*a.com (WP 7.0) βœ… F 2026-06-02 20:55:40
s*m*o*a*e*c*a.com (WP 6.9.4) βœ… F 2026-06-02 20:55:09
s*m*o*o*r.com βœ… F 2026-06-02 20:55:09
s*m*o*o*o*t*r*c*.com βœ… F 2026-06-02 20:55:09
a*t*n*m*c*i*o*d*r*.com (WP 6.9.4) βœ… F 2026-06-02 20:55:06
i*4*.com βœ… F 2026-06-02 20:51:07
e*e*e*-*o*i*i*r.com (WP 7.0) βœ… F 2026-06-02 20:49:47
e*e*e*-*r*i*-*e*i*n.com (WP 7.0) βœ… F 2026-06-02 20:49:47
e*e*e*-*g*n*e*e*t.com (WP 7.0) βœ… F 2026-06-02 20:49:47
t*e*o*h*r*o*l*.com (WP 6.8.5) βœ… F 2026-06-02 20:49:45
c*e*.v*u.e*u.vn (WP 6.9.4) βœ… F 2026-06-02 20:48:30
i*-*i*o*.com (WP 7.0) βœ… F 2026-06-02 20:48:29
i*z*h*n*e*s*e*t.com βœ… F 2026-06-02 20:41:29
m*d*c*l.r*r*d*s.org βœ… F 2026-06-02 20:39:39
e*e*t*o*h*e*i*k*h*m*.com (WP 6.8.3) βœ… F 2026-06-02 20:38:24
m*d*m*l*z*n*.com (WP 7.0) βœ… F 2026-06-02 20:37:52
t*e*o*t*a*e*o*n*.com βœ… F 2026-06-02 20:36:59
l*s*f*u*d.w*e*g*n*.com βœ… F 2026-06-02 20:33:17
s*m*a*i*p*l*e.com βœ… C 2026-06-02 20:32:57
s*m*y*o*r*h*.com (WP 7.0) βœ… F 2026-06-02 20:29:23
i*u*d*l*o.com (WP 7.0) βœ… F 2026-06-02 20:29:19
p*d*l*e*p*k*.com (WP 6.8.1) βœ… F 2026-06-02 20:29:12
i*u*l*r*.com βœ… F 2026-06-02 20:26:41

Top 50 Plugins

Plugin Count
elementor 1,791,424
contact-form-7 1,760,626
elementor-pro 1,044,086
woocommerce 812,732
revslider 614,749
jetpack 465,283
js_composer 430,121
wp-rocket 332,239
essential-addons-for-elementor-lite 292,340
gravityforms 266,140
complianz-gdpr 254,821
cookie-law-info 229,734
instagram-feed 226,991
google-site-kit 220,852
sitepress-multilingual-cms 220,076
google-analytics-for-wordpress 213,065
header-footer-elementor 209,159
elementskit-lite 206,041
bluehost-wordpress-plugin 190,530
gutenberg 161,755
gutenberg-core 158,667
cookie-notice 150,264
the-events-calendar 130,624
litespeed-cache 129,748
wpforms-lite 129,031
gtranslate 127,187
astra-sites 119,169
popup-maker 115,471
woocommerce-payments 112,578
tablepress 108,298
coblocks 98,976
honeypot 96,750
astra-addon 94,880
wp-smushit 93,076
duracelltomi-google-tag-manager 93,025
all-in-one-seo-pack 92,831
LayerSlider 91,209
bb-plugin 90,526
premium-addons-for-elementor 86,478
megamenu 86,005
akismet 85,698
cleantalk-spam-protect 83,572
mailchimp-for-wp 83,344
woocommerce-gateway-stripe 82,745
ml-slider 80,500
fusion-builder 79,270
borlabs-cookie 78,867
ewww-image-optimizer 78,674
wp-pagenavi 78,287
formidable 77,735

Top 50 Themes

Theme Count
hello-elementor 612,184
Divi 508,307
astra 421,706
flatsome 131,706
Avada 123,773
generatepress 119,131
pub 109,404
oceanwp 82,958
kadence 77,942
enfold 71,450
salient 66,403
twentytwentyfour 58,600
h4 56,093
twentyseventeen 55,850
bb-theme 55,096
cocoon-master 52,023
betheme 51,532
blocksy 50,325
dt-the7 45,908
twentytwentyfive 43,515
neve 39,098
Avada-Child-Theme 37,424
gox 33,337
woodmart 33,115
bridge 32,729
twentytwentyone 31,979
lightning 31,363
twentytwenty 29,877
swell 28,518
Impreza 26,279
bricks 25,886
twentytwentythree 23,929
Newspaper 23,294
sydney 22,579
voxel 22,389
twentytwentytwo 19,910
epik-redesign 19,270
uncode 18,998
kubio 18,624
sinatra 18,438
twentysixteen 18,094
pro 17,801
storefront 17,793
Total 14,650
extendable 14,533
yith-wonder 14,026
hello-theme-child-master 13,265
themify-ultra 12,924
factory-templates-4 12,899
yootheme 12,857