{"id":50784,"date":"2016-09-08T07:41:06","date_gmt":"2016-09-08T07:41:06","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/gdy-cookie-note\/"},"modified":"2018-01-26T13:21:48","modified_gmt":"2018-01-26T13:21:48","slug":"gdy-cookie-note","status":"closed","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/gdy-cookie-note\/","author":10496251,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"0.2.0","stable_tag":"trunk","tested":"4.6.30","requires":"3.6","requires_php":"","requires_plugins":"","header_name":"GDY Cookie Note","header_author":"Johannes Grandy","header_description":"","assets_banners_color":"","last_updated":"2018-01-26 13:21:48","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/wordpress.org\/plugins\/gdy-cookie-note\/","header_author_uri":"http:\/\/johannesgrandy.com\/","rating":0,"author_block_rating":0,"active_installs":10,"downloads":660,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":[],"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":0},"assets_icons":{"icon.svg":{"filename":"icon.svg","revision":"1809926","resolution":"","location":"assets"}},"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["0.1.0","0.2.0"],"block_files":[],"assets_screenshots":[],"screenshots":[]},"plugin_section":[],"plugin_tags":[388,76928,3188],"plugin_category":[],"plugin_contributors":[94942,94941],"plugin_business_model":[],"class_list":["post-50784","plugin","type-plugin","status-closed","hentry","plugin_tags-cookie","plugin_tags-gdy","plugin_tags-note","plugin_contributors-fouadvollmer","plugin_contributors-grandy","plugin_committers-grandy"],"banners":[],"icons":{"svg":"https:\/\/ps.w.org\/gdy-cookie-note\/assets\/icon.svg?rev=1809926","icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/gdy-cookie-note.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>Another plugin that bloats my backend with option pages and settings? No! This plugin is a drop in cookie note solution. Just install it and it works.<\/p>\n\n<p>It is just a 4 KB big file with only 3 hooks (the note, script and style). It has almost no programming overhead because customiztation runs via hooks, filters and css.<\/p>\n\n<p>If you want to make adjustments that go beyond some CSS styles you should be familiar with WordPress filters and hooks. If you are not, there are probably better plugins for you.<\/p>\n\n<p>For customization examples view the plugins FAQ.<\/p>\n\n<!--section=installation-->\n<p>Here's how to install the plugin:<\/p>\n\n<ol>\n<li>Upload 'gdy-cookie-note' to the '\/wp-content\/plugins\/' directory<\/li>\n<li>Activate the plugin through the 'Plugins' menu in WordPress<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt>Installation Instructions<\/dt>\n<dd><p>Here's how to install the plugin:<\/p>\n\n<ol>\n<li>Upload 'gdy-cookie-note' to the '\/wp-content\/plugins\/' directory<\/li>\n<li>Activate the plugin through the 'Plugins' menu in WordPress<\/li>\n<\/ol><\/dd>\n<dt>Is it possible to change the position of the note<\/dt>\n<dd><p>Yes. You can overwrite the default CSS styles or completely deactivate them.<\/p>\n\n<pre><code>remove_action( 'wp_footer', 'gdycn_style' );\n<\/code><\/pre><\/dd>\n<dt>Is it possible to change the color of the note<\/dt>\n<dd><p>Yes. You can overwrite the default CSS styles or completely deactivate them.<\/p>\n\n<pre><code>remove_action( 'wp_footer', 'gdycn_style' );\n<\/code><\/pre><\/dd>\n<dt>Is there a way to style elements depending on the visibility of the note<\/dt>\n<dd><p>Yes. The <code>gdycn_visible<\/code> class is added to the body if the note is visible.<\/p><\/dd>\n<dt>Is it possible to change the ids or classes<\/dt>\n<dd><p>Yes. Use the <code>gdycn_selectors<\/code> filter:<\/p>\n\n<pre><code>add_filter( 'gdycn_selectors', 'custom_cookie_class' );\n\nfunction custom_cookie_class( $selectors ) {\n\n    $selectors[ 'body' ] = 'my_custom_body_class';\n\n    return $selectors;\n\n}\n<\/code><\/pre><\/dd>\n<dt>Is it possible to customize the text<\/dt>\n<dd><p>Yes. Use the <code>gdycn_text<\/code> filter:<\/p>\n\n<pre><code>add_filter( 'gdycn_text', 'custom_cookie_message' );\n\nfunction custom_cookie_message( $text) {\n\n    return 'My own cookie message';\n\n}\n<\/code><\/pre><\/dd>\n<dt>Is it possible to completely change the window<\/dt>\n<dd><p>Yes. Just remove the GDYCN hooks and add your own window anywhere. You can use the existing javascript with your custom window. The visibility is then controled by the body class added by the script.<\/p>\n\n<pre><code>remove_action( 'wp_footer', 'gdycn_note' );\nremove_action( 'wp_footer', 'gdycn_style' );\n\n\/\/ Add your own HTML and CSS\n<\/code><\/pre><\/dd>\n<dt>How can i close my custom window<\/dt>\n<dd><p>If the GDYCN JS is still enabled a click on <code>#gdycn_close<\/code> should remove the body class (which control the visiblity of the window). Make sure you use the correct id if you have changed them via <code>gdycn_selectors<\/code>.<\/p><\/dd>\n<dt>Is there a JS callback when the window is rendered<\/dt>\n<dd><p>No. Just look for the body class <code>cookie_note<\/code>.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>0.2.0<\/h4>\n\n<ul>\n<li>Changed to js local storage instead of cookies. No dependencies (jQuery.js, cookie.js ...) or any extra files (js, css) needed anymore. The whole plugin is even smaller now.<\/li>\n<\/ul>\n\n<h4>0.1.0<\/h4>\n\n<ul>\n<li>Initial release.<\/li>\n<\/ul>","raw_excerpt":"A very lightweight cookie plugin without any dependencies or extra files loaded.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/50784","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=50784"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/grandy"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=50784"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=50784"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=50784"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=50784"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=50784"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=50784"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}