Version Description
- Fix: Unable to select Privacy policy link
- Fix: Blank Cookies policy link in a message
- Fix: Undefined index: on_click
- Tweak: Adjusted default opacity back to 100
Download this release
Release Info
Developer | dfactory |
Plugin | Cookie Notice by dFactory |
Version | 1.3.1 |
Comparing to | |
See all releases |
Code changes from version 1.3.0 to 1.3.1
- cookie-notice.php +11 -11
- images/logo-dfactory.png +0 -0
- readme.txt +11 -5
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 helps you comply with the EU GDPR cookie law and CCPA regulations.
|
5 |
-
Version: 1.3.
|
6 |
Author: dFactory
|
7 |
Author URI: http://www.dfactory.eu/
|
8 |
Plugin URI: http://www.dfactory.eu/plugins/cookie-notice/
|
@@ -29,7 +29,7 @@ if ( ! defined( 'ABSPATH' ) )
|
|
29 |
* Cookie Notice class.
|
30 |
*
|
31 |
* @class Cookie_Notice
|
32 |
-
* @version 1.3.
|
33 |
*/
|
34 |
class Cookie_Notice {
|
35 |
|
@@ -64,12 +64,12 @@ class Cookie_Notice {
|
|
64 |
'colors' => array(
|
65 |
'text' => '#fff',
|
66 |
'bar' => '#000',
|
67 |
-
'bar_opacity' =>
|
68 |
),
|
69 |
'see_more_opt' => array(
|
70 |
'text' => '',
|
71 |
'link_type' => 'page',
|
72 |
-
'id' =>
|
73 |
'link' => '',
|
74 |
'sync' => false
|
75 |
),
|
@@ -98,7 +98,7 @@ class Cookie_Notice {
|
|
98 |
'update_notice' => true,
|
99 |
'update_delay_date' => 0
|
100 |
),
|
101 |
-
'version' => '1.3.
|
102 |
);
|
103 |
private $positions = array();
|
104 |
private $styles = array();
|
@@ -951,7 +951,7 @@ class Cookie_Notice {
|
|
951 |
<p class="description">' . __( 'Select where to redirect user for more information.', 'cookie-notice' ) . '</p>
|
952 |
<div id="cn_see_more_opt_page"' . ($this->options['general']['see_more_opt']['link_type'] === 'custom' ? ' style="display: none;"' : '') . '>
|
953 |
<select name="cookie_notice_options[see_more_opt][id]">
|
954 |
-
<option value="
|
955 |
|
956 |
if ( $pages ) {
|
957 |
foreach ( $pages as $page ) {
|
@@ -1193,7 +1193,7 @@ class Cookie_Notice {
|
|
1193 |
|
1194 |
echo '
|
1195 |
<div id="cn_colors-bar_opacity"><label>' . __( 'Bar opacity', 'cookie-notice' ) . '</label><br />
|
1196 |
-
<div><input id="cn_colors_bar_opacity_range" class="cn_range" type="range" min="50" max="100" step="1" name="cookie_notice_options[colors][bar_opacity]" value="' . absint( $this->options['general']['colors']['bar_opacity'] ) . '" onchange="cn_colors_bar_opacity_text.value = cn_colors_bar_opacity_range.value" /><input id="cn_colors_bar_opacity_text" class="small-text" type="
|
1197 |
'</div>';
|
1198 |
|
1199 |
echo '
|
@@ -1278,9 +1278,9 @@ class Cookie_Notice {
|
|
1278 |
$input['see_more_opt']['link_type'] = sanitize_text_field( isset( $input['see_more_opt']['link_type'] ) && in_array( $input['see_more_opt']['link_type'], array_keys( $this->links ) ) ? $input['see_more_opt']['link_type'] : $this->defaults['general']['see_more_opt']['link_type'] );
|
1279 |
|
1280 |
if ( $input['see_more_opt']['link_type'] === 'custom' )
|
1281 |
-
$input['see_more_opt']['link'] =
|
1282 |
elseif ( $input['see_more_opt']['link_type'] === 'page' ) {
|
1283 |
-
$input['see_more_opt']['id'] = ( $input['see_more'] === true ? (int) $input['see_more_opt']['id'] :
|
1284 |
$input['see_more_opt']['sync'] = isset( $input['see_more_opt']['sync'] );
|
1285 |
|
1286 |
if ( $input['see_more_opt']['sync'] )
|
@@ -1391,7 +1391,7 @@ class Cookie_Notice {
|
|
1391 |
// check legacy parameters
|
1392 |
$options = $this->check_legacy_params( $options, array( 'refuse_opt', 'see_more' ) );
|
1393 |
|
1394 |
-
if ( $options['see_more'] === true
|
1395 |
$options['message_text'] = do_shortcode( wp_kses_post( $options['message_text'] ) );
|
1396 |
else
|
1397 |
$options['message_text'] = wp_kses_post( $options['message_text'] );
|
@@ -1720,7 +1720,7 @@ class Cookie_Notice {
|
|
1720 |
*/
|
1721 |
public function check_legacy_params( $options, $params ) {
|
1722 |
foreach ( $params as $param ) {
|
1723 |
-
if ( ! is_bool( $options[$param] ) )
|
1724 |
$options[$param] = $options[$param] === 'yes';
|
1725 |
}
|
1726 |
|
2 |
/*
|
3 |
Plugin Name: Cookie Notice
|
4 |
Description: Cookie Notice allows you to elegantly inform users that your site uses cookies and helps you comply with the EU GDPR cookie law and CCPA regulations.
|
5 |
+
Version: 1.3.1
|
6 |
Author: dFactory
|
7 |
Author URI: http://www.dfactory.eu/
|
8 |
Plugin URI: http://www.dfactory.eu/plugins/cookie-notice/
|
29 |
* Cookie Notice class.
|
30 |
*
|
31 |
* @class Cookie_Notice
|
32 |
+
* @version 1.3.1
|
33 |
*/
|
34 |
class Cookie_Notice {
|
35 |
|
64 |
'colors' => array(
|
65 |
'text' => '#fff',
|
66 |
'bar' => '#000',
|
67 |
+
'bar_opacity' => 100
|
68 |
),
|
69 |
'see_more_opt' => array(
|
70 |
'text' => '',
|
71 |
'link_type' => 'page',
|
72 |
+
'id' => 0,
|
73 |
'link' => '',
|
74 |
'sync' => false
|
75 |
),
|
98 |
'update_notice' => true,
|
99 |
'update_delay_date' => 0
|
100 |
),
|
101 |
+
'version' => '1.3.1'
|
102 |
);
|
103 |
private $positions = array();
|
104 |
private $styles = array();
|
951 |
<p class="description">' . __( 'Select where to redirect user for more information.', 'cookie-notice' ) . '</p>
|
952 |
<div id="cn_see_more_opt_page"' . ($this->options['general']['see_more_opt']['link_type'] === 'custom' ? ' style="display: none;"' : '') . '>
|
953 |
<select name="cookie_notice_options[see_more_opt][id]">
|
954 |
+
<option value="0" ' . selected( 0, $this->options['general']['see_more_opt']['id'], false ) . '>' . __( '-- select page --', 'cookie-notice' ) . '</option>';
|
955 |
|
956 |
if ( $pages ) {
|
957 |
foreach ( $pages as $page ) {
|
1193 |
|
1194 |
echo '
|
1195 |
<div id="cn_colors-bar_opacity"><label>' . __( 'Bar opacity', 'cookie-notice' ) . '</label><br />
|
1196 |
+
<div><input id="cn_colors_bar_opacity_range" class="cn_range" type="range" min="50" max="100" step="1" name="cookie_notice_options[colors][bar_opacity]" value="' . absint( $this->options['general']['colors']['bar_opacity'] ) . '" onchange="cn_colors_bar_opacity_text.value = cn_colors_bar_opacity_range.value" /><input id="cn_colors_bar_opacity_text" class="small-text" type="number" onchange="cn_colors_bar_opacity_range.value = cn_colors_bar_opacity_text.value" min="50" max="100" value="' . absint( $this->options['general']['colors']['bar_opacity'] ) . '" /></div>' .
|
1197 |
'</div>';
|
1198 |
|
1199 |
echo '
|
1278 |
$input['see_more_opt']['link_type'] = sanitize_text_field( isset( $input['see_more_opt']['link_type'] ) && in_array( $input['see_more_opt']['link_type'], array_keys( $this->links ) ) ? $input['see_more_opt']['link_type'] : $this->defaults['general']['see_more_opt']['link_type'] );
|
1279 |
|
1280 |
if ( $input['see_more_opt']['link_type'] === 'custom' )
|
1281 |
+
$input['see_more_opt']['link'] = ( $input['see_more'] === true ? esc_url( $input['see_more_opt']['link'] ) : 'empty' );
|
1282 |
elseif ( $input['see_more_opt']['link_type'] === 'page' ) {
|
1283 |
+
$input['see_more_opt']['id'] = ( $input['see_more'] === true ? (int) $input['see_more_opt']['id'] : 0 );
|
1284 |
$input['see_more_opt']['sync'] = isset( $input['see_more_opt']['sync'] );
|
1285 |
|
1286 |
if ( $input['see_more_opt']['sync'] )
|
1391 |
// check legacy parameters
|
1392 |
$options = $this->check_legacy_params( $options, array( 'refuse_opt', 'see_more' ) );
|
1393 |
|
1394 |
+
if ( $options['see_more'] === true )
|
1395 |
$options['message_text'] = do_shortcode( wp_kses_post( $options['message_text'] ) );
|
1396 |
else
|
1397 |
$options['message_text'] = wp_kses_post( $options['message_text'] );
|
1720 |
*/
|
1721 |
public function check_legacy_params( $options, $params ) {
|
1722 |
foreach ( $params as $param ) {
|
1723 |
+
if ( array_key_exists( $param, $options ) && ! is_bool( $options[$param] ) )
|
1724 |
$options[$param] = $options[$param] === 'yes';
|
1725 |
}
|
1726 |
|
images/logo-dfactory.png
DELETED
Binary file
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: gdpr, ccpa, cookie, cookies, notice, notification, notify, cookie, cookie
|
|
5 |
Requires at least: 3.3
|
6 |
Requires PHP: 5.2.4
|
7 |
Tested up to: 5.4
|
8 |
-
Stable tag: 1.3.
|
9 |
License: MIT License
|
10 |
License URI: http://opensource.org/licenses/MIT
|
11 |
|
@@ -68,6 +68,12 @@ No questions yet.
|
|
68 |
|
69 |
== Changelog ==
|
70 |
|
|
|
|
|
|
|
|
|
|
|
|
|
71 |
= 1.3.0 =
|
72 |
* New: Introducing Corona Banner that displays data about Coronavirus pandemia and five steps recommended by the WHO (World Health Organization)
|
73 |
* New: Option to set bar opacity
|
@@ -294,7 +300,7 @@ Initial release
|
|
294 |
|
295 |
== Upgrade Notice ==
|
296 |
|
297 |
-
= 1.3.
|
298 |
-
*
|
299 |
-
*
|
300 |
-
*
|
5 |
Requires at least: 3.3
|
6 |
Requires PHP: 5.2.4
|
7 |
Tested up to: 5.4
|
8 |
+
Stable tag: 1.3.1
|
9 |
License: MIT License
|
10 |
License URI: http://opensource.org/licenses/MIT
|
11 |
|
68 |
|
69 |
== Changelog ==
|
70 |
|
71 |
+
= 1.3.1 =
|
72 |
+
* Fix: Unable to select Privacy policy link
|
73 |
+
* Fix: Blank Cookies policy link in a message
|
74 |
+
* Fix: Undefined index: on_click
|
75 |
+
* Tweak: Adjusted default opacity back to 100
|
76 |
+
|
77 |
= 1.3.0 =
|
78 |
* New: Introducing Corona Banner that displays data about Coronavirus pandemia and five steps recommended by the WHO (World Health Organization)
|
79 |
* New: Option to set bar opacity
|
300 |
|
301 |
== Upgrade Notice ==
|
302 |
|
303 |
+
= 1.3.1 =
|
304 |
+
* Fix: Unable to select Privacy policy link
|
305 |
+
* Fix: Blank Cookies policy link in a message
|
306 |
+
* Fix: Undefined index: on_click
|