Cookie Consent - Version 2.2.1

Version Description

  • Updated: better escapingn (suggested by @djpaul)
Download this release

Release Info

Developer Catapult_Themes
Plugin Icon 128x128 Cookie Consent
Version 2.2.1
Comparing to
See all releases

Code changes from version 2.2.0 to 2.2.1

Files changed (3) hide show
  1. admin/class-ctcc-admin.php +15 -15
  2. readme.txt +6 -3
  3. uk-cookie-consent.php +1 -1
admin/class-ctcc-admin.php CHANGED
@@ -470,28 +470,28 @@ if ( ! class_exists ( 'CTCC_Admin' ) ) {
470
 
471
  public function scroll_height_render() {
472
  $options = get_option( 'ctcc_options_settings' ); ?>
473
- <input type="number" min="1" name="ctcc_options_settings[scroll_height]" value="<?php echo $options['scroll_height']; ?>">
474
  <p class="description"><?php _e ( 'If you chose Scroll as the close method, enter the distance in pixels the user should scroll before the notification closes', 'uk-cookie-consent' ); ?></p>
475
  <?php
476
  }
477
 
478
  public function duration_render() {
479
  $options = get_option( 'ctcc_options_settings' ); ?>
480
- <input type="number" min="1" name="ctcc_options_settings[duration]" value="<?php echo $options['duration']; ?>">
481
  <p class="description"><?php _e ( 'If you chose Timer as the close method, enter how many seconds the notification should display for', 'uk-cookie-consent' ); ?></p>
482
  <?php
483
  }
484
 
485
  public function cookie_expiry_render() {
486
  $options = get_option( 'ctcc_options_settings' ); ?>
487
- <input type="number" min="1" name="ctcc_options_settings[cookie_expiry]" value="<?php echo $options['cookie_expiry']; ?>">
488
  <p class="description"><?php _e ( 'The number of days that the cookie is set for', 'uk-cookie-consent' ); ?></p>
489
  <?php
490
  }
491
 
492
  public function cookie_version_render() {
493
  $options = get_option( 'ctcc_options_settings' ); ?>
494
- <input type="text" name="ctcc_options_settings[cookie_version]" value="<?php echo $options['cookie_version']; ?>">
495
  <p class="description"><?php _e ( 'A version number for the cookie - update this to invalidate the cookie and force all users to view the notification again', 'uk-cookie-consent' ); ?></p>
496
  <?php
497
  }
@@ -502,28 +502,28 @@ if ( ! class_exists ( 'CTCC_Admin' ) ) {
502
 
503
  public function heading_text_render() {
504
  $ctcc_content_settings = get_option( 'ctcc_content_settings' ); ?>
505
- <input type="text" name="ctcc_content_settings[heading_text]" value="<?php echo $ctcc_content_settings['heading_text']; ?>">
506
  <p class="description"><?php _e ( 'The heading text - only applies if you are not using a top or bottom bar', 'uk-cookie-consent' ); ?></p>
507
  <?php
508
  }
509
 
510
  public function notification_text_render() {
511
  $ctcc_content_settings = get_option( 'ctcc_content_settings' ); ?>
512
- <input class="widefat" type="text" name="ctcc_content_settings[notification_text]" value="<?php echo $ctcc_content_settings['notification_text']; ?>">
513
  <p class="description"><?php _e ( 'The default text to indicate that your site uses cookies', 'uk-cookie-consent' ); ?></p>
514
  <?php
515
  }
516
 
517
  public function accept_text_render() {
518
  $ctcc_content_settings = get_option( 'ctcc_content_settings' ); ?>
519
- <input type="text" name="ctcc_content_settings[accept_text]" value="<?php echo $ctcc_content_settings['accept_text']; ?>">
520
  <p class="description"><?php _e ( 'The default text to dismiss the notification', 'uk-cookie-consent' ); ?></p>
521
  <?php
522
  }
523
 
524
  public function more_info_text_render() {
525
  $ctcc_content_settings = get_option( 'ctcc_content_settings' ); ?>
526
- <input type="text" name="ctcc_content_settings[more_info_text]" value="<?php echo $ctcc_content_settings['more_info_text']; ?>">
527
  <p class="description"><?php _e ( 'The default text to use to link to a page providing further information', 'uk-cookie-consent' ); ?></p>
528
  <?php
529
  }
@@ -546,7 +546,7 @@ if ( ! class_exists ( 'CTCC_Admin' ) ) {
546
 
547
  public function more_info_url_render() {
548
  $ctcc_content_settings = get_option( 'ctcc_content_settings' ); ?>
549
- <input type="url" name="ctcc_content_settings[more_info_url]" value="<?php echo $ctcc_content_settings['more_info_url']; ?>">
550
  <p class="description"><?php _e ( 'You can add an absolute URL here to override the More Info Page setting above. Use this to link to an external website for further information about cookies.', 'uk-cookie-consent' ); ?></p>
551
  <?php
552
  }
@@ -581,7 +581,7 @@ if ( ! class_exists ( 'CTCC_Admin' ) ) {
581
 
582
  public function container_class_render() {
583
  $options = get_option( 'ctcc_styles_settings' ); ?>
584
- <input type="text" name="ctcc_styles_settings[container_class]" value="<?php echo $options['container_class']; ?>">
585
  <p class="description"><?php _e ( 'You can add an optional wrapper class, eg container, here to align the notification text with the rest of your content', 'uk-cookie-consent' ); ?></p>
586
  <?php
587
  }
@@ -623,35 +623,35 @@ if ( ! class_exists ( 'CTCC_Admin' ) ) {
623
 
624
  public function text_color_render() {
625
  $options = get_option( 'ctcc_styles_settings' ); ?>
626
- <input type="text" class="cctc-color-field" name="ctcc_styles_settings[text_color]" value="<?php echo $options['text_color']; ?>">
627
  <p class="description"><?php _e ( 'The text color on the notification', 'uk-cookie-consent' ); ?></p>
628
  <?php
629
  }
630
 
631
  public function bg_color_render() {
632
  $options = get_option( 'ctcc_styles_settings' ); ?>
633
- <input type="text" class="cctc-color-field" name="ctcc_styles_settings[bg_color]" value="<?php echo $options['bg_color']; ?>">
634
  <p class="description"><?php _e ( 'The background color for the notification', 'uk-cookie-consent' ); ?></p>
635
  <?php
636
  }
637
 
638
  public function link_color_render() {
639
  $options = get_option( 'ctcc_styles_settings' ); ?>
640
- <input type="text" class="cctc-color-field" name="ctcc_styles_settings[link_color]" value="<?php echo $options['link_color']; ?>">
641
  <p class="description"><?php _e ( 'The link color on the notification', 'uk-cookie-consent' ); ?></p>
642
  <?php
643
  }
644
 
645
  public function button_color_render() {
646
  $options = get_option( 'ctcc_styles_settings' ); ?>
647
- <input type="text" class="cctc-color-field" name="ctcc_styles_settings[button_color]" value="<?php echo $options['button_color']; ?>">
648
  <p class="description"><?php _e ( 'The text color on the notification button', 'uk-cookie-consent' ); ?></p>
649
  <?php
650
  }
651
 
652
  public function button_bg_color_render() {
653
  $options = get_option( 'ctcc_styles_settings' ); ?>
654
- <input type="text" class="cctc-color-field" name="ctcc_styles_settings[button_bg_color]" value="<?php echo $options['button_bg_color']; ?>">
655
  <p class="description"><?php _e ( 'The background color on the notification button', 'uk-cookie-consent' ); ?></p>
656
  <?php
657
  }
470
 
471
  public function scroll_height_render() {
472
  $options = get_option( 'ctcc_options_settings' ); ?>
473
+ <input type="number" min="1" name="ctcc_options_settings[scroll_height]" value="<?php echo esc_attr( $options['scroll_height'] ); ?>">
474
  <p class="description"><?php _e ( 'If you chose Scroll as the close method, enter the distance in pixels the user should scroll before the notification closes', 'uk-cookie-consent' ); ?></p>
475
  <?php
476
  }
477
 
478
  public function duration_render() {
479
  $options = get_option( 'ctcc_options_settings' ); ?>
480
+ <input type="number" min="1" name="ctcc_options_settings[duration]" value="<?php echo esc_attr( $options['duration'] ); ?>">
481
  <p class="description"><?php _e ( 'If you chose Timer as the close method, enter how many seconds the notification should display for', 'uk-cookie-consent' ); ?></p>
482
  <?php
483
  }
484
 
485
  public function cookie_expiry_render() {
486
  $options = get_option( 'ctcc_options_settings' ); ?>
487
+ <input type="number" min="1" name="ctcc_options_settings[cookie_expiry]" value="<?php echo esc_attr( $options['cookie_expiry'] ); ?>">
488
  <p class="description"><?php _e ( 'The number of days that the cookie is set for', 'uk-cookie-consent' ); ?></p>
489
  <?php
490
  }
491
 
492
  public function cookie_version_render() {
493
  $options = get_option( 'ctcc_options_settings' ); ?>
494
+ <input type="text" name="ctcc_options_settings[cookie_version]" value="<?php echo esc_attr( $options['cookie_version'] ); ?>">
495
  <p class="description"><?php _e ( 'A version number for the cookie - update this to invalidate the cookie and force all users to view the notification again', 'uk-cookie-consent' ); ?></p>
496
  <?php
497
  }
502
 
503
  public function heading_text_render() {
504
  $ctcc_content_settings = get_option( 'ctcc_content_settings' ); ?>
505
+ <input type="text" name="ctcc_content_settings[heading_text]" value="<?php echo esc_attr( $ctcc_content_settings['heading_text'] ); ?>">
506
  <p class="description"><?php _e ( 'The heading text - only applies if you are not using a top or bottom bar', 'uk-cookie-consent' ); ?></p>
507
  <?php
508
  }
509
 
510
  public function notification_text_render() {
511
  $ctcc_content_settings = get_option( 'ctcc_content_settings' ); ?>
512
+ <input class="widefat" type="text" name="ctcc_content_settings[notification_text]" value="<?php echo esc_attr( $ctcc_content_settings['notification_text'] ); ?>">
513
  <p class="description"><?php _e ( 'The default text to indicate that your site uses cookies', 'uk-cookie-consent' ); ?></p>
514
  <?php
515
  }
516
 
517
  public function accept_text_render() {
518
  $ctcc_content_settings = get_option( 'ctcc_content_settings' ); ?>
519
+ <input type="text" name="ctcc_content_settings[accept_text]" value="<?php echo esc_attr( $ctcc_content_settings['accept_text'] ); ?>">
520
  <p class="description"><?php _e ( 'The default text to dismiss the notification', 'uk-cookie-consent' ); ?></p>
521
  <?php
522
  }
523
 
524
  public function more_info_text_render() {
525
  $ctcc_content_settings = get_option( 'ctcc_content_settings' ); ?>
526
+ <input type="text" name="ctcc_content_settings[more_info_text]" value="<?php echo esc_attr( $ctcc_content_settings['more_info_text'] ); ?>">
527
  <p class="description"><?php _e ( 'The default text to use to link to a page providing further information', 'uk-cookie-consent' ); ?></p>
528
  <?php
529
  }
546
 
547
  public function more_info_url_render() {
548
  $ctcc_content_settings = get_option( 'ctcc_content_settings' ); ?>
549
+ <input type="url" name="ctcc_content_settings[more_info_url]" value="<?php echo esc_attr( $ctcc_content_settings['more_info_url'] ); ?>">
550
  <p class="description"><?php _e ( 'You can add an absolute URL here to override the More Info Page setting above. Use this to link to an external website for further information about cookies.', 'uk-cookie-consent' ); ?></p>
551
  <?php
552
  }
581
 
582
  public function container_class_render() {
583
  $options = get_option( 'ctcc_styles_settings' ); ?>
584
+ <input type="text" name="ctcc_styles_settings[container_class]" value="<?php echo esc_attr( $options['container_class'] ); ?>">
585
  <p class="description"><?php _e ( 'You can add an optional wrapper class, eg container, here to align the notification text with the rest of your content', 'uk-cookie-consent' ); ?></p>
586
  <?php
587
  }
623
 
624
  public function text_color_render() {
625
  $options = get_option( 'ctcc_styles_settings' ); ?>
626
+ <input type="text" class="cctc-color-field" name="ctcc_styles_settings[text_color]" value="<?php echo esc_attr( $options['text_color'] ); ?>">
627
  <p class="description"><?php _e ( 'The text color on the notification', 'uk-cookie-consent' ); ?></p>
628
  <?php
629
  }
630
 
631
  public function bg_color_render() {
632
  $options = get_option( 'ctcc_styles_settings' ); ?>
633
+ <input type="text" class="cctc-color-field" name="ctcc_styles_settings[bg_color]" value="<?php echo esc_attr( $options['bg_color'] ); ?>">
634
  <p class="description"><?php _e ( 'The background color for the notification', 'uk-cookie-consent' ); ?></p>
635
  <?php
636
  }
637
 
638
  public function link_color_render() {
639
  $options = get_option( 'ctcc_styles_settings' ); ?>
640
+ <input type="text" class="cctc-color-field" name="ctcc_styles_settings[link_color]" value="<?php echo esc_attr( $options['link_color'] ); ?>">
641
  <p class="description"><?php _e ( 'The link color on the notification', 'uk-cookie-consent' ); ?></p>
642
  <?php
643
  }
644
 
645
  public function button_color_render() {
646
  $options = get_option( 'ctcc_styles_settings' ); ?>
647
+ <input type="text" class="cctc-color-field" name="ctcc_styles_settings[button_color]" value="<?php echo esc_attr( $options['button_color'] ); ?>">
648
  <p class="description"><?php _e ( 'The text color on the notification button', 'uk-cookie-consent' ); ?></p>
649
  <?php
650
  }
651
 
652
  public function button_bg_color_render() {
653
  $options = get_option( 'ctcc_styles_settings' ); ?>
654
+ <input type="text" class="cctc-color-field" name="ctcc_styles_settings[button_bg_color]" value="<?php echo esc_attr( $options['button_bg_color'] ); ?>">
655
  <p class="description"><?php _e ( 'The background color on the notification button', 'uk-cookie-consent' ); ?></p>
656
  <?php
657
  }
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate Link: https://paypal.com
4
  Tags: cookie law, cookies, EU, implied consent, uk cookie consent, compliance, eu cookie law, eu privacy directive, privacy, privacy directive, consent, cookie, cookie compliance, cookie law, eu cookie, notice, notification, notify, cookie notice, cookie notification, cookie notify, wpml, cookie bar, cookie notification bar
5
  Requires at least: 4.3
6
  Tested up to: 4.6.1
7
- Stable tag: 2.2.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
  The only cookie consent plugin you'll ever need.
@@ -70,9 +70,12 @@ You will find more details of the regulations on the [Information Commissioner's
70
 
71
  == Changelog ==
72
 
 
 
 
73
  = 2.2.0 =
74
- * Added: optionally exclude pages and posts from displaying the cookie notification
75
- * Added: close notification on scroll option
76
  * Added: class name for more info link
77
  * Fixed: x-close responsive margin
78
  * Updated: allow shortcodes in notification text
4
  Tags: cookie law, cookies, EU, implied consent, uk cookie consent, compliance, eu cookie law, eu privacy directive, privacy, privacy directive, consent, cookie, cookie compliance, cookie law, eu cookie, notice, notification, notify, cookie notice, cookie notification, cookie notify, wpml, cookie bar, cookie notification bar
5
  Requires at least: 4.3
6
  Tested up to: 4.6.1
7
+ Stable tag: 2.2.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
  The only cookie consent plugin you'll ever need.
70
 
71
  == Changelog ==
72
 
73
+ = 2.2.1 =
74
+ * Updated: better escapingn (suggested by @djpaul)
75
+
76
  = 2.2.0 =
77
+ * Added: optionally exclude pages and posts from displaying the cookie notification (suggested by @jeffrobbins)
78
+ * Added: close notification on scroll option (suggested by @jeffrobbins)
79
  * Added: class name for more info link
80
  * Fixed: x-close responsive margin
81
  * Updated: allow shortcodes in notification text
uk-cookie-consent.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Cookie Consent
4
  Plugin URI: http://catapultthemes.com/cookie-consent/
5
  Description: The only cookie consent plugin you'll ever need.
6
- Version: 2.2.0
7
  Author: Catapult_Themes
8
  Author URI: http://catapultthemes.com/
9
  Text Domain: uk-cookie-consent
3
  Plugin Name: Cookie Consent
4
  Plugin URI: http://catapultthemes.com/cookie-consent/
5
  Description: The only cookie consent plugin you'll ever need.
6
+ Version: 2.2.1
7
  Author: Catapult_Themes
8
  Author URI: http://catapultthemes.com/
9
  Text Domain: uk-cookie-consent