Cookiebot | GDPR Compliant Cookie Consent and Notice - Version 3.3.1

Version Description

Download this release

Release Info

Developer cookiebot
Plugin Icon 128x128 Cookiebot | GDPR Compliant Cookie Consent and Notice
Version 3.3.1
Comparing to
See all releases

Code changes from version 3.3.0 to 3.3.1

addons/controller/addons/caos-host-analyticsjs-local/caos-host-analyticsjs-local.php CHANGED
@@ -82,7 +82,9 @@ class CAOS_Host_Analyticsjs_Local implements Cookiebot_Addons_Interface {
82
/**
83
* ga scripts are loaded in wp_footer priority is defined in option variable
84
*/
85
- if ( has_action( 'wp_footer', 'caos_analytics_render_tracking_code' ) || has_action( 'wp_footer', 'add_ga_header_script' ) ) {
86
/**
87
* Consent not given - no cache
88
*/
@@ -94,7 +96,9 @@ class CAOS_Host_Analyticsjs_Local implements Cookiebot_Addons_Interface {
94
/**
95
* ga scripts are loaded in wp_head priority is defined in option variable
96
*/
97
- if ( has_action( 'wp_head', 'caos_analytics_render_tracking_code' ) || has_action( 'wp_head', 'add_ga_header_script' ) ) {
98
/**
99
* Consent not given - no cache
100
*/
82
/**
83
* ga scripts are loaded in wp_footer priority is defined in option variable
84
*/
85
+ if ( has_action( 'wp_footer', 'caos_analytics_render_tracking_code' ) ||
86
+ has_action( 'wp_footer', 'caos_render_tracking_code' ) ||
87
+ has_action( 'wp_footer', 'add_ga_header_script' ) ) {
88
/**
89
* Consent not given - no cache
90
*/
96
/**
97
* ga scripts are loaded in wp_head priority is defined in option variable
98
*/
99
+ if ( has_action( 'wp_head', 'caos_analytics_render_tracking_code' ) ||
100
+ has_action( 'wp_head', 'caos_render_tracking_code' ) ||
101
+ has_action( 'wp_head', 'add_ga_header_script' ) ) {
102
/**
103
* Consent not given - no cache
104
*/
addons/controller/addons/embed-autocorrect/embed-autocorrect.php CHANGED
@@ -187,6 +187,11 @@ class Embed_Autocorrect implements Cookiebot_Addons_Interface
187
foreach ($matches[0] as $match) {
188
//Find src.
189
preg_match('|<a href=\"([^\"]*)\">([^<]*)</a></blockquote>|', $match, $matchSrc);
190
$src = $matchSrc[1];
191
192
//Replace - and add cookie consent notice.
@@ -607,7 +612,7 @@ class Embed_Autocorrect implements Cookiebot_Addons_Interface
607
*/
608
private function get_regex()
609
{
610
- return $this->settings->get_addon_regex($this->get_option_name(), $this->get_default_regex());
611
}
612
613
/**
@@ -619,7 +624,7 @@ class Embed_Autocorrect implements Cookiebot_Addons_Interface
619
*/
620
private function get_default_regex()
621
{
622
- return '/<iframe[^>]* src=("|\').*(facebook\.com|youtu\.be|youtube\.com|youtube-nocookie\.com|player\.vimeo\.com).*[^>].*>.*?<\/iframe>/mi';
623
}
624
625
/**
187
foreach ($matches[0] as $match) {
188
//Find src.
189
preg_match('|<a href=\"([^\"]*)\">([^<]*)</a></blockquote>|', $match, $matchSrc);
190
+
191
+ if( empty( $matchSrc )) {
192
+ continue;
193
+ }
194
+
195
$src = $matchSrc[1];
196
197
//Replace - and add cookie consent notice.
612
*/
613
private function get_regex()
614
{
615
+ return apply_filters('cookiebot_embed_regex', $this->settings->get_addon_regex($this->get_option_name(), $this->get_default_regex()));
616
}
617
618
/**
624
*/
625
private function get_default_regex()
626
{
627
+ return apply_filters('cookiebot_embed_default_regex', '/<iframe[^>]* src=("|\').*(facebook\.com|youtu\.be|youtube\.com|youtube-nocookie\.com|player\.vimeo\.com).*[^>].*>.*?<\/iframe>/mi');
628
}
629
630
/**
addons/cookiebot-addons-init.php CHANGED
@@ -23,7 +23,7 @@ define( 'COOKIEBOT_ADDONS_BASE_NAME', dirname( plugin_basename( __FILE__ ) ) );
23
/**
24
* Same version as the CookiebotWP
25
*/
26
- define( 'COOKIEBOT_ADDONS_VERSION', '3.3.0' );
27
28
/**
29
* Register autoloader to load files/classes dynamically
23
/**
24
* Same version as the CookiebotWP
25
*/
26
+ define( 'COOKIEBOT_ADDONS_VERSION', '3.3.1' );
27
28
/**
29
* Register autoloader to load files/classes dynamically
addons/tests/integration/addons/test-caos-host-analyticsjs-local.php CHANGED
@@ -15,8 +15,8 @@ class Test_Caos_Host_Analyticsjs_Local extends \WP_UnitTestCase {
15
$content = file_get_contents( 'http://plugins.svn.wordpress.org/host-analyticsjs-local/trunk/host-analyticsjs-local.php' );
16
17
$this->assertNotFalse( strpos( $content,
18
- 'add_action(\'wp_footer\', \'caos_analytics_render_tracking_code\', CAOS_OPT_ENQUEUE_ORDER);' ) );
19
$this->assertNotFalse( strpos( $content,
20
- 'add_action(\'wp_head\', \'caos_analytics_render_tracking_code\', CAOS_OPT_ENQUEUE_ORDER);' ) );
21
}
22
}
15
$content = file_get_contents( 'http://plugins.svn.wordpress.org/host-analyticsjs-local/trunk/host-analyticsjs-local.php' );
16
17
$this->assertNotFalse( strpos( $content,
18
+ 'add_action(\'wp_footer\', \'caos_render_tracking_code\', CAOS_OPT_ENQUEUE_ORDER);' ) );
19
$this->assertNotFalse( strpos( $content,
20
+ 'add_action(\'wp_head\', \'caos_render_tracking_code\', CAOS_OPT_ENQUEUE_ORDER);' ) );
21
}
22
}
cookiebot.php CHANGED
@@ -21,7 +21,7 @@ final class Cookiebot_WP {
21
* @var string
22
* @since 1.0.0
23
*/
24
- public $version = '3.3.0';
25
26
/**
27
* @var Cookiebot_WP The single instance of the class
@@ -388,6 +388,7 @@ final class Cookiebot_WP {
388
$supportedLanguages['sr'] = __('Serbian','cookiebot');
389
$supportedLanguages['fi'] = __('Finnish','cookiebot');
390
$supportedLanguages['eu'] = __('Basque','cookiebot');
391
asort($supportedLanguages,SORT_LOCALE_STRING);
392
return $supportedLanguages;
393
}
21
* @var string
22
* @since 1.0.0
23
*/
24
+ public $version = '3.3.1';
25
26
/**
27
* @var Cookiebot_WP The single instance of the class
388
$supportedLanguages['sr'] = __('Serbian','cookiebot');
389
$supportedLanguages['fi'] = __('Finnish','cookiebot');
390
$supportedLanguages['eu'] = __('Basque','cookiebot');
391
+ $supportedLanguages['hu'] = __('Hungarian','cookiebot');
392
asort($supportedLanguages,SORT_LOCALE_STRING);
393
return $supportedLanguages;
394
}
readme.txt CHANGED
@@ -1,9 +1,9 @@
1
# Cookiebot | GDPR Compliant Cookie Consent and Notice #
2
- * Contributors: cookiebot,phpgeekdk,aytac,rvcybot,kh1987,bmlcybot
3
* Tags: cookie, compliance, eu, gdpr, europe, cookie consent, consent
4
* Requires at least: 4.4
5
* Tested up to: 5.2
6
- * Stable tag: 3.3.0
7
* Requires PHP: 5.6
8
* License: GPLv2 or later
9
@@ -164,6 +164,10 @@ Cookiebot works with GTM, however you need to enable the "Hide Cookie Popup" opt
164
165
## Changelog ##
166
167
### 3.3.0 - 2019-11-09 ###
168
* Fix for conflict with WPBakery Page Builder when Cookie blocking is in auto mode
169
* Fix for Elementor Extras causing JS errors in frontend when Cookie blocking is in auto mode
1
# Cookiebot | GDPR Compliant Cookie Consent and Notice #
2
+ * Contributors: cookiebot,phpgeekdk,aytac
3
* Tags: cookie, compliance, eu, gdpr, europe, cookie consent, consent
4
* Requires at least: 4.4
5
* Tested up to: 5.2
6
+ * Stable tag: 3.3.1
7
* Requires PHP: 5.6
8
* License: GPLv2 or later
9
164
165
## Changelog ##
166
167
+ ### 3.3.1 - 2019-11-27 ###
168
+ * Adding filter for regexp for fixing embedded media
169
+ * Minor fixes and changes
170
+
171
### 3.3.0 - 2019-11-09 ###
172
* Fix for conflict with WPBakery Page Builder when Cookie blocking is in auto mode
173
* Fix for Elementor Extras causing JS errors in frontend when Cookie blocking is in auto mode