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

Plugin: wp-consent-api (Used by 47,850 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
t*l*c*m*c*a*b*r.com (WP 6.9.4) βœ… D 2026-05-14 19:25:40
e*e*t*d*o*e*p*n*o*.com βœ… F 2026-05-14 19:25:28
b*r*p*i*e.com (WP 6.9.4) βœ… F 2026-05-14 19:25:16
j*r*e*y*e*a*d.com βœ… F 2026-05-14 19:23:50
g*u*p*f*h.it βœ… F 2026-05-14 19:22:02
h*p*e.com (WP 6.9.4) βœ… D 2026-05-14 19:21:11
n*f*t*c*c*n*r*l.com βœ… F 2026-05-14 19:20:40
h*p*n*s.com (WP 6.9.4) βœ… F 2026-05-14 19:17:09
a*o*e*t*r*e*e*t*.com βœ… F 2026-05-14 19:16:47
a*o*e*s*o*i*s.com βœ… F 2026-05-14 19:16:46
a*o*e*p*o*.com βœ… F 2026-05-14 19:16:46
v*-*o*c*i*g.fr (WP 6.9.4) βœ… B 2026-05-14 19:15:01
v*x*o*n*c*.live (WP 6.9.4) βœ… F 2026-05-14 19:11:34
t*p*v*n*c*e*t*r.com βœ… F 2026-05-14 19:11:23
t*l*b*t*s*e.com (WP 6.9.4) βœ… F 2026-05-14 19:10:33
t*l*b*a*n.com βœ… F 2026-05-14 19:10:33
m*r*a*o*e*e*i*n.com βœ… F 2026-05-14 19:10:06
g*m*w*i*s.com βœ… F 2026-05-14 19:09:10
c*y*t*c*r*e*c*a*c*s*.com (WP 6.9.4) βœ… F 2026-05-14 19:08:22
i*i*a*a*h*o*.shop βœ… F 2026-05-14 19:07:56
c*e*e*s*a*a*.de (WP 6.9.4) βœ… F 2026-05-14 19:06:21
j*r*e*v*n*e*n*n*e*.com (WP 6.9.4) βœ… F 2026-05-14 19:05:51
w*n*e*h*a*.com βœ… F 2026-05-14 19:04:35
t*p*s*a*k*i*d*v.com βœ… F 2026-05-14 19:04:31
x*-*h*e*l*s*o*p*e*a*-*u*.es (WP 6.9.4) βœ… F 2026-05-14 19:04:29
w*n*a*u*.com βœ… F 2026-05-14 19:01:14
w*n*a*i*e.com βœ… F 2026-05-14 19:01:14
l*k*s*e.com βœ… F 2026-05-14 19:00:54
w*n*a*e*t*n*.com βœ… F 2026-05-14 18:56:04
w*n*a*e*t.com βœ… F 2026-05-14 18:56:04
w*n*a*r*u*.com βœ… F 2026-05-14 18:56:04
w*n*a*l*o*h*a*i*g.com βœ… F 2026-05-14 18:56:04
w*n*a*l*o*.com βœ… F 2026-05-14 18:56:04
b*k*m*l*t*.com (WP 6.9.4) βœ… F 2026-05-14 18:55:42
r*c*p*a*x*r*s*.com βœ… F 2026-05-14 18:55:01
e*v*r*t*s*k*t*.com (WP 6.9.4) βœ… F 2026-05-14 18:54:51
e*v*r*t*s*k*t.com (WP 6.9.4) βœ… F 2026-05-14 18:54:51
y*k*e*e*i*i*.com (WP 6.9.4) βœ… F 2026-05-14 18:54:26
v*t*i*s*m*.fr πŸ”“ F 2026-05-14 18:54:20
c*l*e*t*l*r*e*.com (WP 6.9.4) βœ… F 2026-05-14 18:53:49
e*p*r*j*c*s.c*.uk βœ… F 2026-05-14 18:51:49
t*l*a*e.com βœ… A 2026-05-14 18:50:11
a*o*s*a*o*.com (WP 6.9.4) βœ… F 2026-05-14 18:49:21
v*s*n*.tech (WP 6.9.4) βœ… F 2026-05-14 18:48:50
y*k*n*e*i*a*.com βœ… F 2026-05-14 18:47:51
n*e*i*d*s*u*i*.com βœ… F 2026-05-14 18:47:21
j*d*w*.be (WP 6.8.2) βœ… F 2026-05-14 18:46:18
t*l*t*o*o*o.com (WP 6.9.4) βœ… F 2026-05-14 18:45:38
t*l*t*m*.com βœ… F 2026-05-14 18:45:38
v*t*l.global (WP 6.9.4) βœ… F 2026-05-14 18:45:01
a*o*n*p*y*i*.com (WP 6.9.4) βœ… F 2026-05-14 18:44:46
c*y*t*c*s*n*c*n*e*t.com (WP 6.9.4) βœ… F 2026-05-14 18:43:33
j*r*e*g*.com βœ… F 2026-05-14 18:42:28
n*e*t*y*y*t*m.com (WP 6.9.4) βœ… F 2026-05-14 18:41:54
c*e*r*z*m*.w*e*g*n*.com βœ… F 2026-05-14 18:40:47
r*i*e*c*r*r*.com (WP 6.9.4) βœ… F 2026-05-14 18:40:00
r*i*a*s*l*t*o*s.com βœ… F 2026-05-14 18:39:58
e*o*m*r*d*.g*x*e*.com βœ… D 2026-05-14 18:36:41
m*r*a*a*r*.com (WP 6.9.4) βœ… F 2026-05-14 18:36:10
t*l*n*a*a*o*e*.com βœ… F 2026-05-14 18:35:45
v*s*t*a*d*n*t*v*l*i*o*i*o.it βœ… D 2026-05-14 18:31:28
u*e*i*i*g.ae (WP 6.9.4) βœ… F 2026-05-14 18:29:46
n*e*i*-*.com (WP 6.7.5) βœ… F 2026-05-14 18:29:21
c*l*a*o*a*i*e*i*o*c*f*r*w*r*h.com βœ… D 2026-05-14 18:29:04
t*e*s*a*e*o*m*t*e*.com (WP 6.9.4) βœ… F 2026-05-14 18:28:10
j*r*i*r*d*n*.com βœ… F 2026-05-14 18:26:37
r*i*e*3*.com βœ… D 2026-05-14 18:26:22
j*r*i*a*i*s*a.com (WP 6.8.5) βœ… F 2026-05-14 18:22:59
j*r*i*o*i*e.com (WP 6.9.4) βœ… F 2026-05-14 18:22:59
e*v*r*l*t*.com βœ… F 2026-05-14 18:21:38
v*s*t*s*u*a*a*e*t*e*a*u*a.es πŸ”“ F 2026-05-14 18:20:59
y*k*t*m*0*2*.com βœ… F 2026-05-14 18:20:20
c*y*t*a*s*t*u*e*.com βœ… F 2026-05-14 18:20:16
a*o*s*-*a*c*a.com βœ… F 2026-05-14 18:19:36
w*e*b*n*s*i*t*n*-*i*d*n*.com (WP 6.9.4) βœ… F 2026-05-14 18:15:52
w*e*b*n*b*l*u*g*s*i*t*n*.com (WP 6.9.4) βœ… F 2026-05-14 18:15:52
w*e*b*n*b*l*u*g*s*i*t*n*.com (WP 6.9.4) βœ… F 2026-05-14 18:15:52
a*o*i*f*s*a*d*.com βœ… F 2026-05-14 18:15:16
a*o*g*h*w*i*s*w*y.com (WP 6.9.4) βœ… F 2026-05-14 18:15:16
c*l*g*o*s*u*r*o*a*p*o*a.com (WP 6.9.4) βœ… F 2026-05-14 18:15:12
c*l*g*o*n*e*n*c*o*a*d*t*r*t.com (WP 6.9.4) βœ… F 2026-05-14 18:15:12
c*l*g*o*n*e*n*c*o*a*d*l*a*o*.com (WP 6.9.4) βœ… F 2026-05-14 18:15:12
s*f*t*-*h*e*.lu βœ… F 2026-05-14 18:13:36
n*e*l*o*e*i*n*.com βœ… A 2026-05-14 18:13:26
y*k*r*r*a*i*.com (WP 6.9.4) βœ… F 2026-05-14 18:13:19
l*j*m*a*c*i*s.com βœ… F 2026-05-14 18:12:40
w*d*n.com βœ… F 2026-05-14 18:11:57
m*t*o*i*x*l*m*i*g.c*m.au (WP 6.9.4) βœ… C 2026-05-14 18:11:49
t*k*m*t*c*n*l*g*.com (WP 6.9.4) βœ… F 2026-05-14 18:11:27
r*n*n*.c*.uk βœ… F 2026-05-14 18:11:06
a*o*k*s*t*p*.com (WP 6.9.4) βœ… F 2026-05-14 18:10:00
a*o*k*e*k.com (WP 6.9.4) βœ… B 2026-05-14 18:09:59
l*p*t*t*t*d*o*e*.fr βœ… F 2026-05-14 18:06:20
n*a*s*a*d.c*.il (WP 6.9.4) βœ… D 2026-05-14 18:06:15
a*o*g*a*s*r*i*e*.com (WP 6.9.4) βœ… F 2026-05-14 18:05:34
a*o*g*a*s*r*i*e.com (WP 6.9.4) βœ… F 2026-05-14 18:05:34
e*v*r*v*a*r*t*c*.com (WP 6.9.4) βœ… F 2026-05-14 18:03:18
c*y*t*-*a*z.com (WP 6.9.4) βœ… F 2026-05-14 18:00:06
r*i*i*g*a*n.com (WP 6.9.4) βœ… C 2026-05-14 17:58:57
g*m*s.m*c*o*o*b*x.com (WP 6.8.5) βœ… F 2026-05-14 17:58:14

Top 50 Plugins

Plugin Count
elementor 1,716,439
contact-form-7 1,681,037
elementor-pro 996,327
woocommerce 784,881
revslider 598,482
jetpack 451,944
js_composer 414,848
wp-rocket 314,818
essential-addons-for-elementor-lite 272,081
gravityforms 252,518
complianz-gdpr 231,913
instagram-feed 217,342
cookie-law-info 213,727
google-site-kit 207,390
google-analytics-for-wordpress 207,053
sitepress-multilingual-cms 206,476
header-footer-elementor 203,891
elementskit-lite 192,666
bluehost-wordpress-plugin 188,175
gutenberg-core 158,311
gutenberg 153,863
cookie-notice 133,169
wpforms-lite 129,477
the-events-calendar 123,189
astra-sites 120,795
gtranslate 120,177
litespeed-cache 119,445
popup-maker 112,184
woocommerce-payments 110,091
coblocks 98,058
tablepress 97,421
all-in-one-seo-pack 91,288
astra-addon 89,848
wp-smushit 89,309
honeypot 89,175
LayerSlider 88,882
bb-plugin 88,042
duracelltomi-google-tag-manager 86,680
akismet 83,038
premium-addons-for-elementor 83,030
cleantalk-spam-protect 81,767
mailchimp-for-wp 80,865
megamenu 79,602
woocommerce-gateway-stripe 78,878
fusion-builder 76,482
formidable 75,056
ewww-image-optimizer 73,656
gravityformsrecaptcha 72,980
smart-slider-3 72,895
creative-mail-by-constant-contact 71,887

Top 50 Themes

Theme Count
hello-elementor 584,679
Divi 492,578
astra 410,590
Avada 119,709
flatsome 116,029
generatepress 110,378
pub 109,031
oceanwp 79,553
kadence 73,684
enfold 68,029
salient 64,215
h4 55,926
twentyseventeen 53,939
bb-theme 53,717
twentytwentyfour 52,478
cocoon-master 51,035
betheme 49,649
blocksy 47,526
dt-the7 43,533
twentytwentyfive 42,384
neve 37,257
Avada-Child-Theme 35,746
gox 32,226
twentytwentyone 32,002
bridge 31,779
woodmart 31,377
lightning 29,116
twentytwenty 29,109
swell 27,046
Impreza 24,675
twentytwentythree 24,404
bricks 24,291
Newspaper 21,528
twentytwentytwo 20,141
epik-redesign 19,439
uncode 17,938
pro 17,575
twentysixteen 17,484
storefront 17,127
extendable 16,352
sydney 16,114
yith-wonder 13,979
Total 13,965
voxel 13,207
themify-ultra 12,726
hello-theme-child-master 12,341
hestia 12,185
twentynineteen 12,093
yootheme 11,946
factory-templates-4 11,769