Cookie Notice by dFactory - Version 1.2.33

Version Description

  • New: Greek translation thanks to Elias Stefanidis
  • Fix: Avoid empty "href" attributes in links.
Download this release

Release Info

Developer dfactory
Plugin Icon 128x128 Cookie Notice by dFactory
Version 1.2.33
Comparing to
See all releases

Code changes from version 1.2.32 to 1.2.33

cookie-notice.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  Plugin Name: Cookie Notice
4
  Description: Cookie Notice allows you to elegantly inform users that your site uses cookies and to comply with the EU cookie law regulations.
5
- Version: 1.2.32
6
  Author: dFactory
7
  Author URI: http://www.dfactory.eu/
8
  Plugin URI: http://www.dfactory.eu/plugins/cookie-notice/
@@ -34,7 +34,7 @@ include_once( plugin_dir_path( __FILE__ ) . 'includes/update.php' );
34
  * Cookie Notice class.
35
  *
36
  * @class Cookie_Notice
37
- * @version 1.2.32
38
  */
39
  class Cookie_Notice {
40
 
@@ -54,7 +54,7 @@ class Cookie_Notice {
54
  'link_target' => '_blank',
55
  'time' => 'month',
56
  'hide_effect' => 'fade',
57
- 'on_scroll' => false,
58
  'on_scroll_offset' => 100,
59
  'colors' => array(
60
  'text' => '#fff',
@@ -70,7 +70,7 @@ class Cookie_Notice {
70
  'translate' => true,
71
  'deactivation_delete' => 'no'
72
  ),
73
- 'version' => '1.2.32'
74
  );
75
  private $positions = array();
76
  private $styles = array();
@@ -564,7 +564,7 @@ class Cookie_Notice {
564
  $input['message_text'] = wp_kses_post( isset( $input['message_text'] ) && $input['message_text'] !== '' ? $input['message_text'] : $this->defaults['general']['message_text'] );
565
  $input['accept_text'] = sanitize_text_field( isset( $input['accept_text'] ) && $input['accept_text'] !== '' ? $input['accept_text'] : $this->defaults['general']['accept_text'] );
566
  $input['refuse_text'] = sanitize_text_field( isset( $input['refuse_text'] ) && $input['refuse_text'] !== '' ? $input['refuse_text'] : $this->defaults['general']['refuse_text'] );
567
- $input['refuse_opt'] = (bool) isset( $input['refuse_opt'] ) ? 'yes' : 'no';
568
  $input['refuse_code'] = wp_kses_post( isset( $input['refuse_code'] ) && $input['refuse_code'] !== '' ? $input['refuse_code'] : $this->defaults['general']['refuse_code'] );
569
 
570
  // css
@@ -583,16 +583,16 @@ class Cookie_Notice {
583
  $input['hide_effect'] = sanitize_text_field( isset( $input['hide_effect'] ) && in_array( $input['hide_effect'], array_keys( $this->effects ) ) ? $input['hide_effect'] : $this->defaults['general']['hide_effect'] );
584
 
585
  // on scroll
586
- $input['on_scroll'] = (bool) isset( $input['on_scroll'] ) ? 'yes' : 'no';
587
 
588
  // on scroll offset
589
  $input['on_scroll_offset'] = absint( isset( $input['on_scroll_offset'] ) && $input['on_scroll_offset'] !== '' ? $input['on_scroll_offset'] : $this->defaults['general']['on_scroll_offset'] );
590
 
591
  // deactivation
592
- $input['deactivation_delete'] = (bool) isset( $input['deactivation_delete'] ) ? 'yes' : 'no';
593
 
594
  // read more
595
- $input['see_more'] = (bool) isset( $input['see_more'] ) ? 'yes' : 'no';
596
  $input['see_more_opt']['text'] = sanitize_text_field( isset( $input['see_more_opt']['text'] ) && $input['see_more_opt']['text'] !== '' ? $input['see_more_opt']['text'] : $this->defaults['general']['see_more_opt']['text'] );
597
  $input['see_more_opt']['link_type'] = sanitize_text_field( isset( $input['see_more_opt']['link_type'] ) && in_array( $input['see_more_opt']['link_type'], array_keys( $this->links ) ) ? $input['see_more_opt']['link_type'] : $this->defaults['general']['see_more_opt']['link_type'] );
598
 
@@ -649,8 +649,8 @@ class Cookie_Notice {
649
  $output = '
650
  <div id="cookie-notice" class="cn-' . ($options['position']) . ($options['css_style'] !== 'none' ? ' ' . $options['css_style'] : '') . '" style="color: ' . $options['colors']['text'] . '; background-color: ' . $options['colors']['bar'] . ';">'
651
  . '<div class="cookie-notice-container"><span id="cn-notice-text">'. $options['message_text'] .'</span>'
652
- . '<a href="" id="cn-accept-cookie" data-cookie-set="accept" class="cn-set-cookie button' . ($options['css_style'] !== 'none' ? ' ' . $options['css_style'] : '') . '">' . $options['accept_text'] . '</a>'
653
- . ($options['refuse_opt'] === 'yes' ? '<a href="" id="cn-refuse-cookie" data-cookie-set="refuse" class="cn-set-cookie button' . ($options['css_style'] !== 'none' ? ' ' . $options['css_style'] : '') . '">' . $options['refuse_text'] . '</a>' : '' )
654
  . ($options['see_more'] === 'yes' ? '<a href="' . ($options['see_more_opt']['link_type'] === 'custom' ? $options['see_more_opt']['link'] : get_permalink( $options['see_more_opt']['id'] )) . '" target="' . $options['link_target'] . '" id="cn-more-info" class="button' . ($options['css_style'] !== 'none' ? ' ' . $options['css_style'] : '') . '">' . $options['see_more_opt']['text'] . '</a>' : '') . '
655
  </div>
656
  </div>';
2
  /*
3
  Plugin Name: Cookie Notice
4
  Description: Cookie Notice allows you to elegantly inform users that your site uses cookies and to comply with the EU cookie law regulations.
5
+ Version: 1.2.33
6
  Author: dFactory
7
  Author URI: http://www.dfactory.eu/
8
  Plugin URI: http://www.dfactory.eu/plugins/cookie-notice/
34
  * Cookie Notice class.
35
  *
36
  * @class Cookie_Notice
37
+ * @version 1.2.33
38
  */
39
  class Cookie_Notice {
40
 
54
  'link_target' => '_blank',
55
  'time' => 'month',
56
  'hide_effect' => 'fade',
57
+ 'on_scroll' => 'no',
58
  'on_scroll_offset' => 100,
59
  'colors' => array(
60
  'text' => '#fff',
70
  'translate' => true,
71
  'deactivation_delete' => 'no'
72
  ),
73
+ 'version' => '1.2.33'
74
  );
75
  private $positions = array();
76
  private $styles = array();
564
  $input['message_text'] = wp_kses_post( isset( $input['message_text'] ) && $input['message_text'] !== '' ? $input['message_text'] : $this->defaults['general']['message_text'] );
565
  $input['accept_text'] = sanitize_text_field( isset( $input['accept_text'] ) && $input['accept_text'] !== '' ? $input['accept_text'] : $this->defaults['general']['accept_text'] );
566
  $input['refuse_text'] = sanitize_text_field( isset( $input['refuse_text'] ) && $input['refuse_text'] !== '' ? $input['refuse_text'] : $this->defaults['general']['refuse_text'] );
567
+ $input['refuse_opt'] = isset( $input['refuse_opt'] ) ? 'yes' : 'no';
568
  $input['refuse_code'] = wp_kses_post( isset( $input['refuse_code'] ) && $input['refuse_code'] !== '' ? $input['refuse_code'] : $this->defaults['general']['refuse_code'] );
569
 
570
  // css
583
  $input['hide_effect'] = sanitize_text_field( isset( $input['hide_effect'] ) && in_array( $input['hide_effect'], array_keys( $this->effects ) ) ? $input['hide_effect'] : $this->defaults['general']['hide_effect'] );
584
 
585
  // on scroll
586
+ $input['on_scroll'] = isset( $input['on_scroll'] ) ? 'yes' : 'no';
587
 
588
  // on scroll offset
589
  $input['on_scroll_offset'] = absint( isset( $input['on_scroll_offset'] ) && $input['on_scroll_offset'] !== '' ? $input['on_scroll_offset'] : $this->defaults['general']['on_scroll_offset'] );
590
 
591
  // deactivation
592
+ $input['deactivation_delete'] = isset( $input['deactivation_delete'] ) ? 'yes' : 'no';
593
 
594
  // read more
595
+ $input['see_more'] = isset( $input['see_more'] ) ? 'yes' : 'no';
596
  $input['see_more_opt']['text'] = sanitize_text_field( isset( $input['see_more_opt']['text'] ) && $input['see_more_opt']['text'] !== '' ? $input['see_more_opt']['text'] : $this->defaults['general']['see_more_opt']['text'] );
597
  $input['see_more_opt']['link_type'] = sanitize_text_field( isset( $input['see_more_opt']['link_type'] ) && in_array( $input['see_more_opt']['link_type'], array_keys( $this->links ) ) ? $input['see_more_opt']['link_type'] : $this->defaults['general']['see_more_opt']['link_type'] );
598
 
649
  $output = '
650
  <div id="cookie-notice" class="cn-' . ($options['position']) . ($options['css_style'] !== 'none' ? ' ' . $options['css_style'] : '') . '" style="color: ' . $options['colors']['text'] . '; background-color: ' . $options['colors']['bar'] . ';">'
651
  . '<div class="cookie-notice-container"><span id="cn-notice-text">'. $options['message_text'] .'</span>'
652
+ . '<a href="#" id="cn-accept-cookie" data-cookie-set="accept" class="cn-set-cookie button' . ($options['css_style'] !== 'none' ? ' ' . $options['css_style'] : '') . '">' . $options['accept_text'] . '</a>'
653
+ . ($options['refuse_opt'] === 'yes' ? '<a href="#" id="cn-refuse-cookie" data-cookie-set="refuse" class="cn-set-cookie button' . ($options['css_style'] !== 'none' ? ' ' . $options['css_style'] : '') . '">' . $options['refuse_text'] . '</a>' : '' )
654
  . ($options['see_more'] === 'yes' ? '<a href="' . ($options['see_more_opt']['link_type'] === 'custom' ? $options['see_more_opt']['link'] : get_permalink( $options['see_more_opt']['id'] )) . '" target="' . $options['link_target'] . '" id="cn-more-info" class="button' . ($options['css_style'] !== 'none' ? ' ' . $options['css_style'] : '') . '">' . $options['see_more_opt']['text'] . '</a>' : '') . '
655
  </div>
656
  </div>';
js/front.js CHANGED
@@ -80,7 +80,9 @@
80
 
81
  // remove Cookie Notice
82
  $.fn.removeCookieNotice = function ( cookie_value ) {
83
- $( '#cookie-notice' ).remove();
 
 
84
  $( 'body' ).removeClass( 'cookies-not-accepted' );
85
  }
86
 
80
 
81
  // remove Cookie Notice
82
  $.fn.removeCookieNotice = function ( cookie_value ) {
83
+ var cnDomNode = $( '#cookie-notice' );
84
+
85
+ cnDomNode.remove();
86
  $( 'body' ).removeClass( 'cookies-not-accepted' );
87
  }
88
 
languages/cookie-notice-pl_PL.mo CHANGED
Binary file
languages/cookie-notice-pl_PL.po CHANGED
@@ -1,15 +1,15 @@
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Cookie Notice\n"
4
- "POT-Creation-Date: 2015-07-21 13:29+0200\n"
5
- "PO-Revision-Date: 2015-07-21 13:29+0200\n"
6
  "Last-Translator: Bartosz Arendt <info@dfactory.eu>\n"
7
  "Language-Team: dFactory <info@dfactory.eu>\n"
8
  "Language: pl_PL\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "X-Generator: Poedit 1.8.2\n"
13
  "X-Poedit-KeywordsList: gettext;gettext_noop;__;_e\n"
14
  "X-Poedit-Basepath: .\n"
15
  "X-Poedit-SourceCharset: UTF-8\n"
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Cookie Notice\n"
4
+ "POT-Creation-Date: 2015-09-08 22:09+0200\n"
5
+ "PO-Revision-Date: 2015-09-08 22:09+0200\n"
6
  "Last-Translator: Bartosz Arendt <info@dfactory.eu>\n"
7
  "Language-Team: dFactory <info@dfactory.eu>\n"
8
  "Language: pl_PL\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Generator: Poedit 1.8.4\n"
13
  "X-Poedit-KeywordsList: gettext;gettext_noop;__;_e\n"
14
  "X-Poedit-Basepath: .\n"
15
  "X-Poedit-SourceCharset: UTF-8\n"
languages/cookie-notice.pot CHANGED
@@ -2,7 +2,7 @@
2
  msgid ""
3
  msgstr ""
4
  "Project-Id-Version: Cookie Notice\n"
5
- "POT-Creation-Date: 2015-07-21 13:29+0200\n"
6
  "PO-Revision-Date: 2015-03-24 11:30+0100\n"
7
  "Last-Translator: Bartosz Arendt <info@dfactory.eu>\n"
8
  "Language-Team: dFactory <info@dfactory.eu>\n"
@@ -10,7 +10,7 @@ msgstr ""
10
  "MIME-Version: 1.0\n"
11
  "Content-Type: text/plain; charset=UTF-8\n"
12
  "Content-Transfer-Encoding: 8bit\n"
13
- "X-Generator: Poedit 1.8.2\n"
14
  "X-Poedit-KeywordsList: gettext;gettext_noop;__;_e\n"
15
  "X-Poedit-Basepath: .\n"
16
  "X-Poedit-SourceCharset: UTF-8\n"
2
  msgid ""
3
  msgstr ""
4
  "Project-Id-Version: Cookie Notice\n"
5
+ "POT-Creation-Date: 2015-09-08 22:09+0200\n"
6
  "PO-Revision-Date: 2015-03-24 11:30+0100\n"
7
  "Last-Translator: Bartosz Arendt <info@dfactory.eu>\n"
8
  "Language-Team: dFactory <info@dfactory.eu>\n"
10
  "MIME-Version: 1.0\n"
11
  "Content-Type: text/plain; charset=UTF-8\n"
12
  "Content-Transfer-Encoding: 8bit\n"
13
+ "X-Generator: Poedit 1.8.4\n"
14
  "X-Poedit-KeywordsList: gettext;gettext_noop;__;_e\n"
15
  "X-Poedit-Basepath: .\n"
16
  "X-Poedit-SourceCharset: UTF-8\n"
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: dfactory
3
  Donate link: http://www.dfactory.eu/
4
  Tags: cookie, cookies, notice, notification, notify, cookie, cookie compliance, cookie law, eu cookie, privacy, privacy directive, consent, Bootstrap
5
  Requires at least: 3.3
6
- Tested up to: 4.2.3
7
- Stable tag: 1.2.32
8
  License: MIT License
9
  License URI: http://opensource.org/licenses/MIT
10
 
@@ -53,6 +53,7 @@ Feel free to contribute to the source code on the [dFactory GitHub Repository](h
53
  * Finnish - by [Daniel Storgards](www.danielstorgards.com)
54
  * French - by [Laura Orsal](http://www.traductrice-independante.fr)
55
  * German - by Alex Ernst
 
56
  * Hebrew - by [Ahrale Shrem](http://atar4u.com/)
57
  * Hungarian - by [Surbma](http://surbma.hu)
58
  * Italian - by [Luca](http://www.lucacicca.it)
@@ -78,6 +79,11 @@ No questions yet.
78
 
79
  == Changelog ==
80
 
 
 
 
 
 
81
  = 1.2.32 =
82
  * Fix: Accept cookie button hidden on acceptance instead of the cookie message container
83
 
@@ -209,5 +215,6 @@ Initial release
209
 
210
  == Upgrade Notice ==
211
 
212
- = 1.2.32 =
213
- * Fix: Accept cookie button hidden on acceptance instead of the cookie message container
 
3
  Donate link: http://www.dfactory.eu/
4
  Tags: cookie, cookies, notice, notification, notify, cookie, cookie compliance, cookie law, eu cookie, privacy, privacy directive, consent, Bootstrap
5
  Requires at least: 3.3
6
+ Tested up to: 4.3.1
7
+ Stable tag: 1.2.33
8
  License: MIT License
9
  License URI: http://opensource.org/licenses/MIT
10
 
53
  * Finnish - by [Daniel Storgards](www.danielstorgards.com)
54
  * French - by [Laura Orsal](http://www.traductrice-independante.fr)
55
  * German - by Alex Ernst
56
+ * Greek - by Elias Stefanidis
57
  * Hebrew - by [Ahrale Shrem](http://atar4u.com/)
58
  * Hungarian - by [Surbma](http://surbma.hu)
59
  * Italian - by [Luca](http://www.lucacicca.it)
79
 
80
  == Changelog ==
81
 
82
+
83
+ = 1.2.33 =
84
+ * New: Greek translation thanks to Elias Stefanidis
85
+ * Fix: Avoid empty "href" attributes in links.
86
+
87
  = 1.2.32 =
88
  * Fix: Accept cookie button hidden on acceptance instead of the cookie message container
89
 
215
 
216
  == Upgrade Notice ==
217
 
218
+ = 1.2.33 =
219
+ * New: Greek translation thanks to Elias Stefanidis
220
+ * Fix: Avoid empty "href" attributes in links.