Version Description
- Fix sub sub domain of generated AMP file.
- Add settings anchor in plugin page
Download this release
Release Info
Developer | iubenda |
Plugin | iubenda Cookie Solution for GDPR |
Version | 2.5.3 |
Comparing to | |
See all releases |
Code changes from version 2.5.2 to 2.5.3
- includes/amp.php +11 -1
- iubenda_cookie_solution.php +28 -3
- readme.txt +8 -3
includes/amp.php
CHANGED
@@ -359,7 +359,17 @@ class iubenda_AMP {
|
|
359 |
$has_www = strpos( $parsed_file['host'], 'www.' ) === 0;
|
360 |
|
361 |
// add or remove www from url string to make iframe url pass AMP validation
|
362 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
363 |
|
364 |
// generate new url
|
365 |
$tweaked_url = $parsed_file['scheme'] . '://' . $tweaked_host . ( isset( $parsed_file['port'] ) ? ':' . $parsed_file['port'] : '' ) . $parsed_file['path'] . ( ! empty( $parsed_file['query'] ) ? '?' . $parsed_file['query'] : '' );
|
359 |
$has_www = strpos( $parsed_file['host'], 'www.' ) === 0;
|
360 |
|
361 |
// add or remove www from url string to make iframe url pass AMP validation
|
362 |
+
#1 Check if not localhost and not subdomain or doesn't have www
|
363 |
+
if ( ! $is_localhost && ! $has_www ) {
|
364 |
+
#2 Append www if not exist
|
365 |
+
$tweaked_host = 'www.' . $parsed_file['host'];
|
366 |
+
} else if ( ! $is_localhost && $has_www ) {
|
367 |
+
#3 Remove www if exist
|
368 |
+
$tweaked_host = preg_replace( '/^www\./i', '', $parsed_file['host'] );
|
369 |
+
} else {
|
370 |
+
#4 else Get the current host normally
|
371 |
+
$tweaked_host = $parsed_file['host'];
|
372 |
+
}
|
373 |
|
374 |
// generate new url
|
375 |
$tweaked_url = $parsed_file['scheme'] . '://' . $tweaked_host . ( isset( $parsed_file['port'] ) ? ':' . $parsed_file['port'] : '' ) . $parsed_file['path'] . ( ! empty( $parsed_file['query'] ) ? '?' . $parsed_file['query'] : '' );
|
iubenda_cookie_solution.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Cookie and Consent Solution for the GDPR & ePrivacy
|
4 |
Plugin URI: https://www.iubenda.com
|
5 |
Description: An All-in-One approach developed by iubenda, which includes functionalities of two powerful solutions that help to make your website GDPR and ePrivacy compliant.
|
6 |
-
Version: 2.5.
|
7 |
Author: iubenda
|
8 |
Author URI: https://www.iubenda.com
|
9 |
License: MIT License
|
@@ -32,7 +32,7 @@ define( 'IUB_DEBUG', false );
|
|
32 |
* iubenda final class.
|
33 |
*
|
34 |
* @class iubenda
|
35 |
-
* @version 2.5.
|
36 |
*/
|
37 |
class iubenda {
|
38 |
|
@@ -62,7 +62,7 @@ class iubenda {
|
|
62 |
)
|
63 |
);
|
64 |
public $base_url;
|
65 |
-
public $version = '2.5.
|
66 |
public $activation = array(
|
67 |
'update_version' => 0,
|
68 |
'update_notice' => true,
|
@@ -167,8 +167,33 @@ class iubenda {
|
|
167 |
add_action( 'template_redirect', array( $this, 'disable_jetpack_tracking' ) );
|
168 |
add_action( 'admin_init', array( $this, 'maybe_do_upgrade' ) );
|
169 |
add_action( 'upgrader_process_complete', array( $this, 'upgrade' ), 10, 2 );
|
|
|
170 |
}
|
171 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
172 |
/**
|
173 |
* Setup plugin constants.
|
174 |
*
|
3 |
Plugin Name: Cookie and Consent Solution for the GDPR & ePrivacy
|
4 |
Plugin URI: https://www.iubenda.com
|
5 |
Description: An All-in-One approach developed by iubenda, which includes functionalities of two powerful solutions that help to make your website GDPR and ePrivacy compliant.
|
6 |
+
Version: 2.5.3
|
7 |
Author: iubenda
|
8 |
Author URI: https://www.iubenda.com
|
9 |
License: MIT License
|
32 |
* iubenda final class.
|
33 |
*
|
34 |
* @class iubenda
|
35 |
+
* @version 2.5.3
|
36 |
*/
|
37 |
class iubenda {
|
38 |
|
62 |
)
|
63 |
);
|
64 |
public $base_url;
|
65 |
+
public $version = '2.5.3';
|
66 |
public $activation = array(
|
67 |
'update_version' => 0,
|
68 |
'update_notice' => true,
|
167 |
add_action( 'template_redirect', array( $this, 'disable_jetpack_tracking' ) );
|
168 |
add_action( 'admin_init', array( $this, 'maybe_do_upgrade' ) );
|
169 |
add_action( 'upgrader_process_complete', array( $this, 'upgrade' ), 10, 2 );
|
170 |
+
add_filter( 'plugin_action_links', array($this, 'plugin_action_links'), 10, 5 );
|
171 |
}
|
172 |
|
173 |
+
/**
|
174 |
+
* Append settings to plugin action link
|
175 |
+
*
|
176 |
+
* @param $actions
|
177 |
+
* @param $plugin_file
|
178 |
+
*
|
179 |
+
* @return array|mixed
|
180 |
+
*/
|
181 |
+
public function plugin_action_links( $actions, $plugin_file ) {
|
182 |
+
static $plugin;
|
183 |
+
if ( ! isset( $plugin ) ) {
|
184 |
+
$plugin = plugin_basename( __FILE__ );
|
185 |
+
}
|
186 |
+
|
187 |
+
if ( $plugin === $plugin_file ) {
|
188 |
+
$menu_page = esc_url_raw( add_query_arg( 'page', 'iubenda', admin_url( $this->options['cs']['menu_position'] === 'submenu' ? 'options-general.php' : 'admin.php' ) ) );
|
189 |
+
$settings = array( 'settings' => "<a href='{$menu_page}'>" . esc_html__( 'Settings', 'iubenda' ) . '</a>' );
|
190 |
+
$actions = array_merge( $actions, $settings );
|
191 |
+
}
|
192 |
+
|
193 |
+
return $actions;
|
194 |
+
}
|
195 |
+
|
196 |
+
|
197 |
/**
|
198 |
* Setup plugin constants.
|
199 |
*
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: cookies, cookie law, cookie policy, cookie banner, privacy policy, cookie
|
|
5 |
Requires at least: 4.0
|
6 |
Requires PHP: 5.2.4
|
7 |
Tested up to: 5.7.2
|
8 |
-
Stable tag: 2.5.
|
9 |
License: MIT License
|
10 |
License URI: http://opensource.org/licenses/MIT
|
11 |
|
@@ -150,6 +150,10 @@ We will be very happy to receive feedback here: [Uservoice forum](https://suppor
|
|
150 |
|
151 |
== Changelog ==
|
152 |
|
|
|
|
|
|
|
|
|
153 |
= 2.5.2 =
|
154 |
* Tweak: Disallow using custom CSS in AMP
|
155 |
|
@@ -518,5 +522,6 @@ We will be very happy to receive feedback here: [Uservoice forum](https://suppor
|
|
518 |
|
519 |
== Upgrade Notice ==
|
520 |
|
521 |
-
= 2.5.
|
522 |
-
*
|
|
5 |
Requires at least: 4.0
|
6 |
Requires PHP: 5.2.4
|
7 |
Tested up to: 5.7.2
|
8 |
+
Stable tag: 2.5.3
|
9 |
License: MIT License
|
10 |
License URI: http://opensource.org/licenses/MIT
|
11 |
|
150 |
|
151 |
== Changelog ==
|
152 |
|
153 |
+
= 2.5.3 =
|
154 |
+
* Fix sub sub domain of generated AMP file.
|
155 |
+
* Add settings anchor in plugin page
|
156 |
+
|
157 |
= 2.5.2 =
|
158 |
* Tweak: Disallow using custom CSS in AMP
|
159 |
|
522 |
|
523 |
== Upgrade Notice ==
|
524 |
|
525 |
+
= 2.5.3 =
|
526 |
+
* Fix sub sub domain of generated AMP file.
|
527 |
+
* Add settings anchor in plugin page
|