Cookie Law / GDPR Info - Version 1.8.8

Version Description

  • Introduced 'wt_cli_enable_cache_flush' filter to enable / disable cache flushing
  • Cookie elements are excluded from the Google search engine indexing (<! - googleoff: all ->)
Download this release

Release Info

Developer webtoffee
Plugin Icon Cookie Law / GDPR Info
Version 1.8.8
Comparing to
See all releases

Code changes from version 1.8.7 to 1.8.8

cookie-law-info.php CHANGED
@@ -16,7 +16,7 @@
16
  * Plugin Name: GDPR Cookie Consent
17
  * Plugin URI: https://www.webtoffee.com/product/gdpr-cookie-consent/
18
  * Description: A simple way to show your website complies with the EU Cookie Law / GDPR.
19
- * Version: 1.8.7
20
  * Author: WebToffee
21
  * Author URI: http://cookielawinfo.com/
22
  * License: GPLv3
@@ -63,7 +63,7 @@ define ( 'CLI_POST_TYPE','cookielawinfo');
63
  * Currently plugin version.
64
  * Rename this for your plugin and update it as you release new versions.
65
  */
66
- define( 'CLI_VERSION', '1.8.7' );
67
 
68
  function wt_cookie_law_info_update_message( $data, $response )
69
  {
16
  * Plugin Name: GDPR Cookie Consent
17
  * Plugin URI: https://www.webtoffee.com/product/gdpr-cookie-consent/
18
  * Description: A simple way to show your website complies with the EU Cookie Law / GDPR.
19
+ * Version: 1.8.8
20
  * Author: WebToffee
21
  * Author URI: http://cookielawinfo.com/
22
  * License: GPLv3
63
  * Currently plugin version.
64
  * Rename this for your plugin and update it as you release new versions.
65
  */
66
+ define( 'CLI_VERSION', '1.8.8' );
67
 
68
  function wt_cookie_law_info_update_message( $data, $response )
69
  {
includes/class-cookie-law-info.php CHANGED
@@ -76,7 +76,7 @@ class Cookie_Law_Info {
76
  }
77
  else
78
  {
79
- $this->version = '1.8.7';
80
  }
81
  $this->plugin_name = 'cookie-law-info';
82
 
76
  }
77
  else
78
  {
79
+ $this->version = '1.8.8';
80
  }
81
  $this->plugin_name = 'cookie-law-info';
82
 
public/class-cookie-law-info-public.php CHANGED
@@ -470,45 +470,48 @@ class Cookie_Law_Info_Public {
470
  public function other_plugin_clear_cache()
471
  {
472
 
473
- $cli_flush_cache=2;
474
  // Clear Litespeed cache
475
  if(class_exists('LiteSpeed_Cache_API') && method_exists( 'LiteSpeed_Cache_API', 'purge_all' ))
476
  {
477
- $cli_flush_cache=1;
478
  }
479
 
480
  // WP Super Cache
481
  if(function_exists('wp_cache_clear_cache'))
482
  {
483
- $cli_flush_cache=1;
484
  }
485
 
486
  // W3 Total Cache
487
  if(function_exists('w3tc_flush_all'))
488
  {
489
- $cli_flush_cache=1;
490
  }
491
 
492
  // Site ground
493
  if(class_exists('SG_CachePress_Supercacher') && method_exists('SG_CachePress_Supercacher', 'purge_cache')) {
494
- $cli_flush_cache=1;
495
  }
496
 
497
  // Endurance Cache
498
  if(class_exists('Endurance_Page_Cache') && method_exists('Endurance_Page_Cache','purge_all'))
499
  {
500
- $cli_flush_cache=1;
501
  }
502
 
503
  // WP Fastest Cache
504
  if(isset($GLOBALS['wp_fastest_cache']) && method_exists($GLOBALS['wp_fastest_cache'],'deleteCache'))
505
  {
506
- $cli_flush_cache=1;
507
  }
508
- if($cli_flush_cache == 1):
 
 
 
509
  ?>
510
  <script type="text/javascript">
511
- var cli_flush_cache=<?php echo $cli_flush_cache; ?>;
512
  </script>
513
  <?php
514
  endif;
470
  public function other_plugin_clear_cache()
471
  {
472
 
473
+ $cli_flush_cache = false;
474
  // Clear Litespeed cache
475
  if(class_exists('LiteSpeed_Cache_API') && method_exists( 'LiteSpeed_Cache_API', 'purge_all' ))
476
  {
477
+ $cli_flush_cache = true;
478
  }
479
 
480
  // WP Super Cache
481
  if(function_exists('wp_cache_clear_cache'))
482
  {
483
+ $cli_flush_cache = true;
484
  }
485
 
486
  // W3 Total Cache
487
  if(function_exists('w3tc_flush_all'))
488
  {
489
+ $cli_flush_cache = true;
490
  }
491
 
492
  // Site ground
493
  if(class_exists('SG_CachePress_Supercacher') && method_exists('SG_CachePress_Supercacher', 'purge_cache')) {
494
+ $cli_flush_cache = true;
495
  }
496
 
497
  // Endurance Cache
498
  if(class_exists('Endurance_Page_Cache') && method_exists('Endurance_Page_Cache','purge_all'))
499
  {
500
+ $cli_flush_cache = true;
501
  }
502
 
503
  // WP Fastest Cache
504
  if(isset($GLOBALS['wp_fastest_cache']) && method_exists($GLOBALS['wp_fastest_cache'],'deleteCache'))
505
  {
506
+ $cli_flush_cache = true;
507
  }
508
+
509
+ $cli_flush_cache = apply_filters('wt_cli_enable_cache_flush',$cli_flush_cache);
510
+
511
+ if( $cli_flush_cache === true ):
512
  ?>
513
  <script type="text/javascript">
514
+ var cli_flush_cache = true;
515
  </script>
516
  <?php
517
  endif;
public/js/cookie-law-info-public.js CHANGED
@@ -536,8 +536,9 @@ var CLI=
536
  return false;
537
  },
538
  reload_current_page:function()
539
- {
540
- if(typeof cli_flush_cache!=='undefined' && cli_flush_cache==1)
 
541
  {
542
  window.location.href=this.add_clear_cache_url_query();
543
  }else
536
  return false;
537
  },
538
  reload_current_page:function()
539
+ {
540
+
541
+ if(typeof cli_flush_cache!=='undefined' && cli_flush_cache === true)
542
  {
543
  window.location.href=this.add_clear_cache_url_query();
544
  }else
public/views/cookie-law-info_bar.php CHANGED
@@ -3,6 +3,8 @@
3
  if ( ! defined( 'WPINC' ) ) {
4
  die;
5
  }
 
 
6
 
7
  if($notify_html==""){ return; } //if filter is applied
8
  echo $notify_html;
@@ -34,4 +36,7 @@ if(file_exists($pop_content_html_file))
34
  /* <![CDATA[ */
35
  cli_cookiebar_settings='<?php echo Cookie_Law_Info::get_json_settings(); ?>';
36
  /* ]]> */
37
- </script>
 
 
 
3
  if ( ! defined( 'WPINC' ) ) {
4
  die;
5
  }
6
+ // Disable indexing of CookieLawInfo Cookie data
7
+ echo "<!--googleoff: all-->";
8
 
9
  if($notify_html==""){ return; } //if filter is applied
10
  echo $notify_html;
36
  /* <![CDATA[ */
37
  cli_cookiebar_settings='<?php echo Cookie_Law_Info::get_json_settings(); ?>';
38
  /* ]]> */
39
+ </script>
40
+ <?php
41
+ // Re-enable indexing
42
+ echo "<!--googleon: all-->";
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.webtoffee.com/plugins/
4
  Tags: eu cookie law, GDPR, cookie law, cookie consent, eu privacy directive, privacy directive, cookies, privacy, compliance
5
  Requires at least: 3.3.1
6
  Tested up to: 5.4
7
- Stable tag: 1.8.7
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -143,6 +143,11 @@ See http://cookielawinfo.com for more information on what is required.
143
 
144
  == Changelog ==
145
 
 
 
 
 
 
146
  = 1.8.7 =
147
 
148
  * Tested ok with Wordpress version 5.4.0
@@ -405,6 +410,7 @@ See http://cookielawinfo.com for more information on what is required.
405
 
406
  == Upgrade Notice ==
407
 
408
- = 1.8.7 =
409
 
410
- * Tested ok with Wordpress version 5.4.0
 
4
  Tags: eu cookie law, GDPR, cookie law, cookie consent, eu privacy directive, privacy directive, cookies, privacy, compliance
5
  Requires at least: 3.3.1
6
  Tested up to: 5.4
7
+ Stable tag: 1.8.8
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
143
 
144
  == Changelog ==
145
 
146
+ = 1.8.8 =
147
+
148
+ * Introduced 'wt_cli_enable_cache_flush' filter to enable / disable cache flushing
149
+ * Cookie elements are excluded from the Google search engine indexing (<! - googleoff: all ->)
150
+
151
  = 1.8.7 =
152
 
153
  * Tested ok with Wordpress version 5.4.0
410
 
411
  == Upgrade Notice ==
412
 
413
+ = 1.8.8 =
414
 
415
+ * Introduced 'wt_cli_enable_cache_flush' filter to enable / disable cache flushing
416
+ * Cookie elements are excluded from the Google search engine indexing (<! - googleoff: all ->)