=== GDPR Visitor Consent === Contributors: === GDPR Visitor Consent === Contributors: nateconley, brandondove, jeffreyzinn Tags: gdpr, privacy, scripts Requires at least: 3.9 Tested up to: 5.2.1 Requires PHP: 5.6 Stable tag: 1.1.4 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html Allow users to have control of what scripts are loaded. == Screenshots == 1. The front-end screen a user sees to configure their preferences. 2. The user preferences as a shortcode, embedded into a page. 3. The admin script editing interface. 4. The admin script editing interface. == Description == Allow users to have control of what scripts are loaded. Scripts are grouped together (Required, Marketing, Analytics, etc). You can also lock a group, so that a user cannot disable a script within that group (think WordPress or Stripe cookies). We strongly encourage you to perform an audit of you site to find out what scripts may be tracking users. Scripts that track users could include such things as: analytics scripts, CRM scripts, tracking pixels, and more. Use the shortcode `[gdpr_visitor_consent]` to create a user preferences page. Using this shortcode, a user can change their GDPR preferences at a later date. ## Developer API You can add your script in a dropdown in the admin screen using the filter `gdprvc_third_party_script( $scripts );` **Example (PHP):** `function add_third_party_script( $scripts ) { $scripts[] = array( 'slug' => 'third-party-script', 'label' => 'Script Label', ); return $scripts; } add_filter( 'gdprvc_third_party_scripts', 'add_third_party_script', 10, 1 ); ` *You can then use the JavaScript API in the browser to control your scripts on the front-end* **Example (JavaScript):** `window.gdprvc_is_accepted( 'slug' ); // returns true/false` You can also use our helper function to parse your script containing `