{"id":87266,"date":"2018-06-19T20:18:24","date_gmt":"2018-06-19T20:18:24","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/gdpr-visitor-consent\/"},"modified":"2022-01-15T00:47:20","modified_gmt":"2022-01-15T00:47:20","slug":"gdpr-visitor-consent","status":"publish","type":"plugin","link":"https:\/\/test.wordpress.org\/plugins\/gdpr-visitor-consent\/","author":23402928,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.1.4","stable_tag":"1.1.4","tested":"5.8.13","requires":"3.9","requires_php":"5.6","requires_plugins":"","header_name":"GDPR Visitor Consent","header_author":"Pixel Jar","header_description":"Easily allow users to have control of which scripts they allow.","assets_banners_color":"1f4691","last_updated":"2022-01-15 00:47:20","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/www.pixeljar.com","header_author_uri":"http:\/\/www.pixeljar.com","rating":0,"author_block_rating":0,"active_installs":10,"downloads":1655,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.0":{"tag":"1.0.0","author":"nateconley","date":"2018-08-15 20:40:08"},"1.1.0":{"tag":"1.1.0","author":"nateconley","date":"2018-08-20 16:53:51"},"1.1.1":{"tag":"1.1.1","author":"nateconley","date":"2018-08-20 17:10:37"},"1.1.2":{"tag":"1.1.2","author":"nateconley","date":"2018-08-21 18:26:39"},"1.1.3":{"tag":"1.1.3","author":"nateconley","date":"2018-08-21 19:06:02"},"1.1.4":{"tag":"1.1.4","author":"nateconley","date":"2022-01-15 00:47:20"}},"upgrade_notice":{"1.1.0":"<p>This update introduces breaking changes to the Developer API. We now use localStorage instead of cookies in order be compatible with page caching.<\/p>"},"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":1895446,"resolution":"128x128","location":"assets","locale":"","width":128,"height":128},"icon-256x256.png":{"filename":"icon-256x256.png","revision":1895446,"resolution":"256x256","location":"assets","locale":"","width":256,"height":256}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":1895446,"resolution":"1544x500","location":"assets","locale":"","width":1544,"height":500},"banner-772x250.png":{"filename":"banner-772x250.png","revision":1895446,"resolution":"772x250","location":"assets","locale":"","width":772,"height":250}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.0","1.1.0","1.1.1","1.1.2","1.1.3","1.1.4"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":1895455,"resolution":"1","location":"assets","locale":"","width":2868,"height":1874},"screenshot-2.png":{"filename":"screenshot-2.png","revision":1895455,"resolution":"2","location":"assets","locale":"","width":2900,"height":1656},"screenshot-3.png":{"filename":"screenshot-3.png","revision":1895455,"resolution":"3","location":"assets","locale":"","width":2988,"height":1684},"screenshot-4.png":{"filename":"screenshot-4.png","revision":1895455,"resolution":"4","location":"assets","locale":"","width":1990,"height":1902}},"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."},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[131785,396,2864],"plugin_category":[54],"plugin_contributors":[80966,80967],"plugin_business_model":[],"class_list":["post-87266","plugin","type-plugin","status-publish","hentry","plugin_tags-gdpr","plugin_tags-privacy","plugin_tags-scripts","plugin_category-security-and-spam-protection","plugin_contributors-brandondove","plugin_contributors-jeffreyzinn","plugin_committers-noraconley"],"banners":{"banner":"https:\/\/ps.w.org\/gdpr-visitor-consent\/assets\/banner-772x250.png?rev=1895446","banner_2x":"https:\/\/ps.w.org\/gdpr-visitor-consent\/assets\/banner-1544x500.png?rev=1895446","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/gdpr-visitor-consent\/assets\/icon-128x128.png?rev=1895446","icon_2x":"https:\/\/ps.w.org\/gdpr-visitor-consent\/assets\/icon-256x256.png?rev=1895446","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/gdpr-visitor-consent\/assets\/screenshot-1.png?rev=1895455","caption":"The front-end screen a user sees to configure their preferences."},{"src":"https:\/\/ps.w.org\/gdpr-visitor-consent\/assets\/screenshot-2.png?rev=1895455","caption":"The user preferences as a shortcode, embedded into a page."},{"src":"https:\/\/ps.w.org\/gdpr-visitor-consent\/assets\/screenshot-3.png?rev=1895455","caption":"The admin script editing interface."},{"src":"https:\/\/ps.w.org\/gdpr-visitor-consent\/assets\/screenshot-4.png?rev=1895455","caption":"The admin script editing interface."}],"raw_content":"<!--section=description-->\n<p>Allow users to have control of what scripts are loaded.<\/p>\n\n<p>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).<\/p>\n\n<p>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.<\/p>\n\n<p>Use the shortcode <code>[gdpr_visitor_consent]<\/code> to create a user preferences page. Using this shortcode, a user can change their GDPR preferences at a later date.<\/p>\n\n<h3>Developer API<\/h3>\n\n<p>You can add your script in a dropdown in the admin screen using the filter <code>gdprvc_third_party_script( $scripts );<\/code><\/p>\n\n<p><strong>Example (PHP):<\/strong><\/p>\n\n<pre><code>function add_third_party_script( $scripts ) {\n\n    $scripts[] = array(\n        'slug'  =&gt; 'third-party-script',\n        'label' =&gt; 'Script Label',\n    );\n\n    return $scripts;\n\n}\nadd_filter( 'gdprvc_third_party_scripts', 'add_third_party_script', 10, 1 );\n<\/code><\/pre>\n\n<p><em>You can then use the JavaScript API in the browser to control your scripts on the front-end<\/em><\/p>\n\n<p><strong>Example (JavaScript):<\/strong><\/p>\n\n<pre><code>window.gdprvc_is_accepted( 'slug' );\n\n\/\/ returns true\/false\n<\/code><\/pre>\n\n<p>You can also use our helper function to parse your script containing <code>&lt;script&gt;<\/code> and <code>&lt;img&gt;<\/code> tags. This will automatically place your JavaScript in a conditional and remove <code>src<\/code> attributes until a user has consented.<\/p>\n\n<p><strong>Example (PHP):<\/strong><\/p>\n\n<pre><code>add_action( 'wp_head', 'your_wp_head' );\n\nfunction your_wp_head() {\n    \/\/ Check for GDPR Visitor Consent Plugin\n    if ( function_exists( 'gdprvc_parse_script' ) ) {\n        echo gdprvc_parse_script( 'your script as a string', 'slug' );\n        return;\n    }\n    \/\/ Echo normally if plugin is not active\n    echo 'your script as a string';\n}\n<\/code><\/pre>\n\n<h3>Browser Compatibility<\/h3>\n\n<p><strong>Chrome<\/strong>\n    \u2713 Admin Editing\n    \u2713 Front-end functionality\n    \u2713 Front-end styles<\/p>\n\n<p><strong>Firefox<\/strong>\n    \u2713 Admin Editing\n    \u2713 Front-end functionality\n    \u2713 Front-end styles<\/p>\n\n<p><strong>Safari<\/strong>\n    \u2713 Admin Editing\n    \u2713 Front-end functionality\n    \u2713 Front-end styles<\/p>\n\n<p><strong>Edge<\/strong>\n    \u2713 Admin Editing\n    \u2713 Front-end functionality\n    \u2713 Front-end styles<\/p>\n\n<p><strong>IE11<\/strong>\n    \u2718 Admin Editing\n    \u2713 Front-end functionality\n    \u2713 Front-end styles<\/p>\n\n<p><strong>IE10<\/strong>\n    \u2718 Admin Editing\n    \u2713 Front-end functionality\n    \u2718 Front-end styles<\/p>\n\n<p><strong>IE9<\/strong>\n    \u2718 Admin Editing\n    \u2713 Front-end functionality\n    \u2718 Front-end styles<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Upload <code>gdpr-visitor-consent.php<\/code> to the <code>\/wp-content\/plugins\/<\/code> directory<\/li>\n<li>Activate the plugin through the 'Plugins' menu in WordPress<\/li>\n<li>Navigate to 'GDPR Visitor Consent' in the sidebar and configure your scripts<\/li>\n<li>Switch the banner to active in 'Other Settings' and Save!<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id='does%20this%20plugin%20control%20scripts%20from%20other%20plugins%3F'><h3>Does this plugin control scripts from other plugins?<\/h3><\/dt>\n<dd><p>GDPR Visitor Consent provides an API for third-party developers to integrate their scripts into this plugin.<\/p><\/dd>\n<dt id='what%20happens%20if%20i%20add%20a%20new%20script%20after%20i%20have%20already%20published%20my%20scripts%3F'><h3>What happens if I add a new script after I have already published my scripts?<\/h3><\/dt>\n<dd><p>Simply check \"Force users to re-consent\" before saving your scripts. This will force users who have already saved their preferences to opt-in to your new scripts. Re-consenting still loads a user's previous preferences.<\/p><\/dd>\n<dt id='will%20this%20work%20with%20page%20caching%3F'><h3>Will this work with page caching?<\/h3><\/dt>\n<dd><p>As of version 1.1.0, yes! GDPR Visitor Consent is JavaScript-based and uses the localStorage API.<\/p><\/dd>\n<dt id='what%20html%20tags%20are%20supported%3F'><h3>What html tags are supported?<\/h3><\/dt>\n<dd><p>You may insert <code>&lt;script&gt;<\/code> tags and <code>&lt;img&gt;<\/code> tags. Sometimes, <code>&lt;img&gt;<\/code> tags are surrounded by <code>&lt;noscript&gt;<\/code>. This works, too.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Initial Launch<\/li>\n<\/ul>\n\n<h4>1.1.0<\/h4>\n\n<ul>\n<li>Significant updates to the core functionality of the plugin. This plugin now uses localStorage instead of a cookie, in order to work when page caching is enabled.<\/li>\n<li>Breaking changes to the Developer API<\/li>\n<\/ul>\n\n<h4>1.1.1<\/h4>\n\n<ul>\n<li>Adds in a missing file causing fatal error for some users.<\/li>\n<\/ul>\n\n<h4>1.1.2<\/h4>\n\n<ul>\n<li>Fixes an error in the display of shortcodes.<\/li>\n<\/ul>\n\n<h4>1.1.3<\/h4>\n\n<ul>\n<li>Prevents errors if there are no scripts added to a group<\/li>\n<\/ul>\n\n<h4>1.1.4<\/h4>\n\n<ul>\n<li>Streamlines JavaScript polyfills<\/li>\n<\/ul>","raw_excerpt":"Allow users to have control of what scripts are loaded.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/test.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/87266","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/test.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/test.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/test.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=87266"}],"author":[{"embeddable":true,"href":"https:\/\/test.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/noraconley"}],"wp:attachment":[{"href":"https:\/\/test.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=87266"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/test.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=87266"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/test.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=87266"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/test.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=87266"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/test.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=87266"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/test.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=87266"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}