Cookie Notice by dFactory - Version 1.2.26

Version Description

  • Fix: Accept cookies on scroll option working unchecked.
  • Fix: call_user_func() warning on lower version of WP
Download this release

Release Info

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

Code changes from version 1.2.25 to 1.2.26

Files changed (3) hide show
  1. cookie-notice.php +21 -15
  2. js/front.js +1 -1
  3. readme.txt +8 -3
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.25
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.25
38
  */
39
  class Cookie_Notice {
40
 
@@ -44,31 +44,31 @@ class Cookie_Notice {
44
  private $defaults = array(
45
  'general' => array(
46
  'position' => 'bottom',
47
- 'message_text' => '',
48
  'css_style' => 'bootstrap',
49
  'accept_text' => '',
50
  'refuse_text' => '',
51
  'refuse_opt' => 'no',
52
  'see_more' => 'no',
53
  'link_target' => '_blank',
54
- 'time' => 'month',
55
  'hide_effect' => 'fade',
56
  'on_scroll' => false,
57
- 'colors' => array(
58
  'text' => '#fff',
59
- 'bar' => '#000',
60
  ),
61
- 'see_more_opt' => array(
62
- 'text' => '',
63
  'link_type' => 'custom',
64
- 'id' => 'empty',
65
- 'link' => ''
66
  ),
67
- 'script_placement' => 'header',
68
  'translate' => true,
69
- 'deactivation_delete' => 'no'
70
  ),
71
- 'version' => '1.2.25'
72
  );
73
  private $positions = array();
74
  private $styles = array();
@@ -271,7 +271,7 @@ class Cookie_Notice {
271
  register_setting( 'cookie_notice_options', 'cookie_notice_options', array( $this, 'validate_options' ) );
272
 
273
  // configuration
274
- add_settings_section( 'cookie_notice_configuration', __( 'Configuration', 'cookie-notice' ), '', 'cookie_notice_options' );
275
  add_settings_field( 'cn_message_text', __( 'Message', 'cookie-notice' ), array( $this, 'cn_message_text' ), 'cookie_notice_options', 'cookie_notice_configuration' );
276
  add_settings_field( 'cn_accept_text', __( 'Button text', 'cookie-notice' ), array( $this, 'cn_accept_text' ), 'cookie_notice_options', 'cookie_notice_configuration' );
277
  add_settings_field( 'cn_see_more', __( 'More info link', 'cookie-notice' ), array( $this, 'cn_see_more' ), 'cookie_notice_options', 'cookie_notice_configuration' );
@@ -283,13 +283,19 @@ class Cookie_Notice {
283
  add_settings_field( 'cn_deactivation_delete', __( 'Deactivation', 'cookie-notice' ), array( $this, 'cn_deactivation_delete' ), 'cookie_notice_options', 'cookie_notice_configuration' );
284
 
285
  // design
286
- add_settings_section( 'cookie_notice_design', __( 'Design', 'cookie-notice' ), '', 'cookie_notice_options' );
287
  add_settings_field( 'cn_position', __( 'Position', 'cookie-notice' ), array( $this, 'cn_position' ), 'cookie_notice_options', 'cookie_notice_design' );
288
  add_settings_field( 'cn_hide_effect', __( 'Animation', 'cookie-notice' ), array( $this, 'cn_hide_effect' ), 'cookie_notice_options', 'cookie_notice_design' );
289
  add_settings_field( 'cn_css_style', __( 'Button style', 'cookie-notice' ), array( $this, 'cn_css_style' ), 'cookie_notice_options', 'cookie_notice_design' );
290
  add_settings_field( 'cn_colors', __( 'Colors', 'cookie-notice' ), array( $this, 'cn_colors' ), 'cookie_notice_options', 'cookie_notice_design' );
291
  }
292
 
 
 
 
 
 
 
293
  /**
294
  * Delete plugin data on deactivation.
295
  */
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.26
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.26
38
  */
39
  class Cookie_Notice {
40
 
44
  private $defaults = array(
45
  'general' => array(
46
  'position' => 'bottom',
47
+ 'message_text' => '',
48
  'css_style' => 'bootstrap',
49
  'accept_text' => '',
50
  'refuse_text' => '',
51
  'refuse_opt' => 'no',
52
  'see_more' => 'no',
53
  'link_target' => '_blank',
54
+ 'time' => 'month',
55
  'hide_effect' => 'fade',
56
  'on_scroll' => false,
57
+ 'colors' => array(
58
  'text' => '#fff',
59
+ 'bar' => '#000',
60
  ),
61
+ 'see_more_opt' => array(
62
+ 'text' => '',
63
  'link_type' => 'custom',
64
+ 'id' => 'empty',
65
+ 'link' => ''
66
  ),
67
+ 'script_placement' => 'header',
68
  'translate' => true,
69
+ 'deactivation_delete' => 'no'
70
  ),
71
+ 'version' => '1.2.26'
72
  );
73
  private $positions = array();
74
  private $styles = array();
271
  register_setting( 'cookie_notice_options', 'cookie_notice_options', array( $this, 'validate_options' ) );
272
 
273
  // configuration
274
+ add_settings_section( 'cookie_notice_configuration', __( 'Configuration', 'cookie-notice' ), array( $this, 'cn_section_configuration' ), 'cookie_notice_options' );
275
  add_settings_field( 'cn_message_text', __( 'Message', 'cookie-notice' ), array( $this, 'cn_message_text' ), 'cookie_notice_options', 'cookie_notice_configuration' );
276
  add_settings_field( 'cn_accept_text', __( 'Button text', 'cookie-notice' ), array( $this, 'cn_accept_text' ), 'cookie_notice_options', 'cookie_notice_configuration' );
277
  add_settings_field( 'cn_see_more', __( 'More info link', 'cookie-notice' ), array( $this, 'cn_see_more' ), 'cookie_notice_options', 'cookie_notice_configuration' );
283
  add_settings_field( 'cn_deactivation_delete', __( 'Deactivation', 'cookie-notice' ), array( $this, 'cn_deactivation_delete' ), 'cookie_notice_options', 'cookie_notice_configuration' );
284
 
285
  // design
286
+ add_settings_section( 'cookie_notice_design', __( 'Design', 'cookie-notice' ), array( $this, 'cn_section_design' ), 'cookie_notice_options' );
287
  add_settings_field( 'cn_position', __( 'Position', 'cookie-notice' ), array( $this, 'cn_position' ), 'cookie_notice_options', 'cookie_notice_design' );
288
  add_settings_field( 'cn_hide_effect', __( 'Animation', 'cookie-notice' ), array( $this, 'cn_hide_effect' ), 'cookie_notice_options', 'cookie_notice_design' );
289
  add_settings_field( 'cn_css_style', __( 'Button style', 'cookie-notice' ), array( $this, 'cn_css_style' ), 'cookie_notice_options', 'cookie_notice_design' );
290
  add_settings_field( 'cn_colors', __( 'Colors', 'cookie-notice' ), array( $this, 'cn_colors' ), 'cookie_notice_options', 'cookie_notice_design' );
291
  }
292
 
293
+ /**
294
+ * Section callback: fix for WP < 3.3
295
+ */
296
+ public function cn_section_configuration() {}
297
+ public function cn_section_design() {}
298
+
299
  /**
300
  * Delete plugin data on deactivation.
301
  */
js/front.js CHANGED
@@ -9,7 +9,7 @@
9
  });
10
 
11
  // handle on scroll
12
- if( cnArgs.onScroll ){
13
  $(window).on('scroll', function () {
14
  if ($( this ).scrollTop() > 100) {
15
  // If user scrolls at least 100 pixels
9
  });
10
 
11
  // handle on scroll
12
+ if( cnArgs.onScroll == 'yes' ) {
13
  $(window).on('scroll', function () {
14
  if ($( this ).scrollTop() > 100) {
15
  // If user scrolls at least 100 pixels
readme.txt CHANGED
@@ -4,7 +4,7 @@ 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.2
7
- Stable tag: 1.2.25
8
  License: MIT License
9
  License URI: http://opensource.org/licenses/MIT
10
 
@@ -77,6 +77,10 @@ No questions yet.
77
 
78
  == Changelog ==
79
 
 
 
 
 
80
  = 1.2.25 =
81
  * New: Option to accept cookies on scroll, thanks to [Cristian Pascottini](http://cristian.pascottini.net/)
82
 
@@ -183,5 +187,6 @@ Initial release
183
 
184
  == Upgrade Notice ==
185
 
186
- = 1.2.25 =
187
- * New: Option to accept cookies on scroll, thanks to [Cristian Pascottini](http://cristian.pascottini.net/)
 
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.2
7
+ Stable tag: 1.2.26
8
  License: MIT License
9
  License URI: http://opensource.org/licenses/MIT
10
 
77
 
78
  == Changelog ==
79
 
80
+ = 1.2.26 =
81
+ * Fix: Accept cookies on scroll option working unchecked.
82
+ * Fix: call_user_func() warning on lower version of WP
83
+
84
  = 1.2.25 =
85
  * New: Option to accept cookies on scroll, thanks to [Cristian Pascottini](http://cristian.pascottini.net/)
86
 
187
 
188
  == Upgrade Notice ==
189
 
190
+ = 1.2.26 =
191
+ * Fix: Accept cookies on scroll option working unchecked.
192
+ * Fix: call_user_func() warning on lower version of WP