{"id":152793,"date":"2022-01-28T06:17:31","date_gmt":"2022-01-28T06:17:31","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/easy-cookie-consent\/"},"modified":"2022-06-13T10:40:54","modified_gmt":"2022-06-13T10:40:54","slug":"easy-cookie-consent","status":"publish","type":"plugin","link":"https:\/\/zul.wordpress.org\/plugins\/easy-cookie-consent\/","author":20187232,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.1.1","stable_tag":"1.1.1","tested":"6.0.11","requires":"5.3","requires_php":"7.4","requires_plugins":"","header_name":"Easy cookie consent","header_author":"UBK s.r.o.","header_description":"Plugin implements orestbida\/cookieconsent cookie consent solution and stores consents in custom database table.","assets_banners_color":"","last_updated":"2022-06-13 10:40:54","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"","header_author_uri":"https:\/\/www.ubk.cz\/","rating":5,"author_block_rating":0,"active_installs":100,"downloads":2195,"num_ratings":2,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","changelog"],"tags":{"1.0.0":{"tag":"1.0.0","author":"kamilpesekubkcz","date":"2022-05-02 11:52:40"},"1.1.0":{"tag":"1.1.0","author":"kamilpesekubkcz","date":"2022-05-02 11:52:40"},"1.1.1":{"tag":"1.1.1","author":"kamilpesekubkcz","date":"2022-06-13 10:40:54"}},"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":2},"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":2667846,"resolution":"128x128","location":"assets","locale":"","width":128,"height":128},"icon-256x256.png":{"filename":"icon-256x256.png","revision":2667846,"resolution":"256x256","location":"assets","locale":"","width":256,"height":256}},"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.0","1.1.0","1.1.1"],"block_files":[],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[],"plugin_category":[],"plugin_contributors":[206868],"plugin_business_model":[],"class_list":["post-152793","plugin","type-plugin","status-publish","hentry","plugin_contributors-kamilpesekubkcz","plugin_committers-kamilpesekubkcz"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/easy-cookie-consent\/assets\/icon-128x128.png?rev=2667846","icon_2x":"https:\/\/ps.w.org\/easy-cookie-consent\/assets\/icon-256x256.png?rev=2667846","generated":false},"screenshots":[],"raw_content":"<!--section=description-->\n<p>This plugin implements <a href=\"orestbida\/cookieconsent\">https:\/\/github.com\/orestbida\/cookieconsent\/<\/a> solution and stores consents in custom database table.<\/p>\n\n<p>Google Tag Manager consent mode is supported by default. <em>ad_storage<\/em> &amp; <em>anaylytics_storage<\/em> are set to denied by default.<\/p>\n\n\n\n<h3>Filters\/hooks<\/h3>\n\n<p>Set for which Wordpress role cookie settings will be available:<\/p>\n\n<pre><code>add_filter('easy_cookie_consent\/options_capability', static function ($optionsCapability) {\n    return 'custom_capability';\n});\n<\/code><\/pre>\n\n<p>Adjust options passed to Javascript. See <a href=\"https:\/\/github.com\/orestbida\/cookieconsent\/#all-configuration-options\/\">https:\/\/github.com\/orestbida\/cookieconsent\/#all-configuration-options<\/a><\/p>\n\n<pre><code>add_filter('easy_cookie_consent\/javascript_options', static function ($cookieConsentOptions) {\n    $cookieConsentOptions['cookie_domain'] = '.example.com';\n    return $cookieConsentOptions;\n});\n<\/code><\/pre>\n\n<p>Disable autorun:<\/p>\n\n<pre><code>add_filter('easy_cookie_consent\/autorun', static function ($autorun) {\n    return false;\n});\n\n\n\/\/ call easy_show_cookie_consent() when needed\nif (function_exists('easy_show_cookie_consent')) {\n    easy_show_cookie_consent();\n}\n<\/code><\/pre>\n\n\n\n<h3>Actions<\/h3>\n\n<p>Add custom\/service Javascripts to page and control them by cookie consent:<\/p>\n\n<pre><code>add_action('easy_cookie_consent\/add_app_scripts', static function () {\n    if (wp_get_environment_type() === 'production') {\n        ?&gt;\n        &lt;script&gt;\n            ...\n        &lt;\/script&gt;\n\n        &lt;script type=\"text\/script-template\" data-cookiecategory=\"analytics\"&gt;\n            ...\n        &lt;\/script&gt;\n\n        &lt;script type=\"text\/script-template\" data-cookiecategory=\"marketing\"&gt;\n            ...\n        &lt;\/script&gt;\n        &lt;?php\n    }\n});\n<\/code><\/pre>\n\n\n\n<h3>iframes<\/h3>\n\n<p>Change <code>&lt;iframe&gt;<\/code> tag to <code>&lt;div&gt;<\/code> and prefix attributes with <code>data-<\/code>\n- data-iframe-cookie-needed - cookie category needed for iframe\n- data-iframe-placeholder-url - url to placeholder image which will be used instead for iframe content<\/p>\n\n<p>Example:<\/p>\n\n<pre><code>&lt;div\n   title=\"Google Map\"\n   data-iframe-cookie-needed=\"analytics\"\n   data-iframe-placeholder-url=\"https:\/\/www.example.com\/map_placeholder.png\"\n   style=\"width:100%;min-height:400px\"\n   data-frameborder=\"0\"\n   data-src=\"https:\/\/www.google.com\/maps\/embed?pb=!1m18!1m12!1m3!1d82507.32058738587!2d13.30188385000431!3d49.74178702400929!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x470af1e5133d11b7%3A0x31b9406e3fc10b83!2sPilsen!5e0!3m2!1sen!2scz!4v1641891569357!5m2!1sen!2scz\"\n   &gt;\n&lt;\/div&gt;\n<\/code><\/pre>\n\n<!--section=installation-->\n<ol>\n<li>Go to settings -&gt; Cookie consent<\/li>\n<li>Fill all texts and cookies table for defined languages (Polylang plugin is supported)<\/li>\n<li>Set Google Tag Manager ID under <em>Settings<\/em> tab<\/li>\n<\/ol>\n\n<!--section=changelog-->\n<p>1.1.1 Allow iframe fix\n1.1.0 WPML support, import\/export options, default data\n1.0.0 GTM consent mode supported<\/p>","raw_excerpt":"This plugin implements https:\/\/github.com\/orestbida\/cookieconsent\/ solution and stores consents in custom database table. Google Tag Manager consent m &hellip;","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/zul.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/152793","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/zul.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/zul.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/zul.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=152793"}],"author":[{"embeddable":true,"href":"https:\/\/zul.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/kamilpesekubkcz"}],"wp:attachment":[{"href":"https:\/\/zul.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=152793"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/zul.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=152793"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/zul.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=152793"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/zul.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=152793"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/zul.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=152793"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/zul.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=152793"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}