Cookie Notice by dFactory - Version 1.2.4

Version Description

  • New: Added filter hooks to customize where and how display the cookie notice
Download this release

Release Info

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

Code changes from version 1.2.3 to 1.2.4

Files changed (2) hide show
  1. cookie-notice.php +20 -7
  2. readme.txt +6 -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.3
6
  Author: dFactory
7
  Author URI: http://www.dfactory.eu/
8
  Plugin URI: http://www.dfactory.eu/plugins/cookie-notice/
@@ -474,15 +474,28 @@ class Cookie_Notice
474
 
475
  if(function_exists('icl_object_id'))
476
  $this->options['see_more_opt']['id'] = icl_object_id($this->options['see_more_opt']['id'], 'page', TRUE);
477
-
478
- echo '
479
- <div id="cookie-notice" class="cn-'.($this->options['position']).($this->options['css_style'] !== 'none' ? ' '.$this->options['css_style'] : '').'" style="color: '.$this->options['colors']['text'].'; background-color: '.$this->options['colors']['bar'].';">'
 
 
 
 
 
 
 
 
 
 
480
  .'<div class="cookie-notice-container">'
481
- .$this->options['message_text']
482
- .'<a href="" id="cn-accept-cookie" class="button'.($this->options['css_style'] !== 'none' ? ' '.$this->options['css_style'] : '').'">'.$this->options['accept_text'].'</a>'
483
- .($this->options['see_more'] === 'yes' ? '<a href="'.($this->options['see_more_opt']['link_type'] === 'custom' ? $this->options['see_more_opt']['link'] : get_permalink($this->options['see_more_opt']['id'])).'" target="_blank" class="button'.($this->options['css_style'] !== 'none' ? ' '.$this->options['css_style'] : '').'">'.$this->options['see_more_opt']['text'].'</a>' : '').'
484
  </div>
485
  </div>';
 
 
 
486
  }
487
  }
488
 
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.4
6
  Author: dFactory
7
  Author URI: http://www.dfactory.eu/
8
  Plugin URI: http://www.dfactory.eu/plugins/cookie-notice/
474
 
475
  if(function_exists('icl_object_id'))
476
  $this->options['see_more_opt']['id'] = icl_object_id($this->options['see_more_opt']['id'], 'page', TRUE);
477
+
478
+ $options = apply_filters('cn_cookie_notice_args', array(
479
+ 'position' => $this->options['position'],
480
+ 'css_style' => $this->options['css_style'],
481
+ 'colors' => $this->options['colors'],
482
+ 'message_text' => $this->options['message_text'],
483
+ 'accept_text' => $this->options['accept_text'],
484
+ 'see_more' => $this->options['see_more'],
485
+ 'see_more_opt' => $this->options['see_more_opt'],
486
+ ));
487
+
488
+ $output = '
489
+ <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'].';">'
490
  .'<div class="cookie-notice-container">'
491
+ .$options['message_text']
492
+ .'<a href="" id="cn-accept-cookie" class="button'.($options['css_style'] !== 'none' ? ' '.$options['css_style'] : '').'">'.$options['accept_text'].'</a>'
493
+ .($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="_blank" class="button'.($options['css_style'] !== 'none' ? ' '.$options['css_style'] : '').'">'.$options['see_more_opt']['text'].'</a>' : '').'
494
  </div>
495
  </div>';
496
+
497
+ echo apply_filters('cn_cookie_notice_output', $output);
498
+
499
  }
500
  }
501
 
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: 3.8.1
7
- Stable tag: 1.2.3
8
  License: MIT License
9
  License URI: http://opensource.org/licenses/MIT
10
 
@@ -49,6 +49,9 @@ No questions yet.
49
 
50
  == Changelog ==
51
 
 
 
 
52
  = 1.2.3 =
53
  * New: Portuguese translation, thanks to Luis Maia
54
 
@@ -78,5 +81,5 @@ Initial release
78
 
79
  == Upgrade Notice ==
80
 
81
- = 1.2.3 =
82
- * New: Portuguese translation, thanks to Luis Maia
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: 3.8.1
7
+ Stable tag: 1.2.4
8
  License: MIT License
9
  License URI: http://opensource.org/licenses/MIT
10
 
49
 
50
  == Changelog ==
51
 
52
+ = 1.2.4 =
53
+ * New: Added filter hooks to customize where and how display the cookie notice
54
+
55
  = 1.2.3 =
56
  * New: Portuguese translation, thanks to Luis Maia
57
 
81
 
82
  == Upgrade Notice ==
83
 
84
+ = 1.2.4 =
85
+ * New: Added filter hooks to customize where and how display the cookie notice