Version Description
Release Date: July 25th, 2015
Dev time: 3h
- Add filter for js_array
icc_js_array
- Fixed performance issue in sites with many posts
- Fixed Parse error issue #124
Download this release
Release Info
Developer | overclokk |
Plugin | Italy Cookie Choices (for EU Cookie Law) |
Version | 2.3.5 |
Comparing to | |
See all releases |
Code changes from version 2.3.4 to 2.3.5
admin/class-italy-cookie-choices-admin.php
CHANGED
@@ -56,7 +56,8 @@ if ( !class_exists( 'Italy_Cookie_Choices_Admin' ) ){
|
|
56 |
/**
|
57 |
* Get all posts and pages object and merge for jQuery autocomplete function
|
58 |
*/
|
59 |
-
$this->get_post_and_page_array();
|
|
|
60 |
|
61 |
/**
|
62 |
* Add Admin menù page
|
@@ -121,15 +122,15 @@ if ( !class_exists( 'Italy_Cookie_Choices_Admin' ) ){
|
|
121 |
* Get all posts and pages object and merge for jQuery autocomplete function
|
122 |
* @return array Return an array with all posts and pages
|
123 |
*/
|
124 |
-
public function get_post_and_page_array(){
|
125 |
|
126 |
-
$get_pages = ( is_array( get_pages('numberposts=-1') ) ) ? get_pages('numberposts=-1') : array();
|
127 |
|
128 |
-
$get_posts = ( is_array( get_posts('numberposts=-1') ) ) ? get_posts('numberposts=-1') : array();
|
129 |
|
130 |
-
$this->post_and_page_array = array_merge($get_pages, $get_posts);
|
131 |
|
132 |
-
}
|
133 |
|
134 |
|
135 |
/**
|
@@ -1214,31 +1215,44 @@ if ( !class_exists( 'Italy_Cookie_Choices_Admin' ) ){
|
|
1214 |
/**
|
1215 |
* Multilingual for text, url, anchor_text & button_text
|
1216 |
*/
|
1217 |
-
if( isset( $input['text'] ) )
|
|
|
1218 |
$new_input['text'] = wp_kses_post( $input['text'] );
|
1219 |
// $new_input['text'] = sanitize_text_field( $input['text'] );
|
|
|
|
|
1220 |
|
1221 |
-
|
1222 |
|
1223 |
-
if( isset( $input['url'] ) )
|
1224 |
$new_input['url'] = sanitize_text_field( $input['url'] );
|
1225 |
|
1226 |
-
|
|
|
|
|
|
|
|
|
1227 |
|
1228 |
-
if( isset( $input['slug'] ) )
|
1229 |
$new_input['slug'] = sanitize_text_field( $input['slug'] );
|
1230 |
|
1231 |
-
|
|
|
|
|
|
|
|
|
1232 |
|
1233 |
-
if( isset( $input['anchor_text'] ) )
|
1234 |
$new_input['anchor_text'] = sanitize_text_field( $input['anchor_text'] );
|
1235 |
|
1236 |
-
|
|
|
|
|
|
|
|
|
1237 |
|
1238 |
-
if( isset( $input['button_text'] ) )
|
1239 |
$new_input['button_text'] = sanitize_text_field( $input['button_text'] );
|
1240 |
|
1241 |
-
|
|
|
|
|
1242 |
|
1243 |
/**
|
1244 |
* Sezione per lo stile
|
@@ -1325,15 +1339,21 @@ if ( !class_exists( 'Italy_Cookie_Choices_Admin' ) ){
|
|
1325 |
if( isset( $input['custom_script_block'] ) )
|
1326 |
$new_input['custom_script_block'] = $input['custom_script_block'];
|
1327 |
|
1328 |
-
if( isset( $input['content_message_text'] ) )
|
|
|
1329 |
$new_input['content_message_text'] = wp_kses_post( $input['content_message_text'] );
|
1330 |
|
1331 |
-
|
|
|
|
|
1332 |
|
1333 |
-
if( isset( $input['content_message_button_text'] ) )
|
|
|
1334 |
$new_input['content_message_button_text'] = sanitize_text_field( $input['content_message_button_text'] );
|
1335 |
|
1336 |
-
|
|
|
|
|
1337 |
|
1338 |
return $new_input;
|
1339 |
|
56 |
/**
|
57 |
* Get all posts and pages object and merge for jQuery autocomplete function
|
58 |
*/
|
59 |
+
// $this->get_post_and_page_array();
|
60 |
+
$this->post_and_page_array = ( is_array( get_pages('numberposts=-1') ) ) ? get_pages('numberposts=-1') : array();
|
61 |
|
62 |
/**
|
63 |
* Add Admin menù page
|
122 |
* Get all posts and pages object and merge for jQuery autocomplete function
|
123 |
* @return array Return an array with all posts and pages
|
124 |
*/
|
125 |
+
// public function get_post_and_page_array(){
|
126 |
|
127 |
+
// $get_pages = ( is_array( get_pages('numberposts=-1') ) ) ? get_pages('numberposts=-1') : array();
|
128 |
|
129 |
+
// $get_posts = ( is_array( get_posts('numberposts=-1') ) ) ? get_posts('numberposts=-1') : array();
|
130 |
|
131 |
+
// $this->post_and_page_array = array_merge($get_pages, $get_posts);
|
132 |
|
133 |
+
// }
|
134 |
|
135 |
|
136 |
/**
|
1215 |
/**
|
1216 |
* Multilingual for text, url, anchor_text & button_text
|
1217 |
*/
|
1218 |
+
if( isset( $input['text'] ) ){
|
1219 |
+
|
1220 |
$new_input['text'] = wp_kses_post( $input['text'] );
|
1221 |
// $new_input['text'] = sanitize_text_field( $input['text'] );
|
1222 |
+
register_string( 'Italy Cookie Choices', 'Banner text', $new_input['text'] );
|
1223 |
+
}
|
1224 |
|
1225 |
+
if( isset( $input['url'] ) ){
|
1226 |
|
|
|
1227 |
$new_input['url'] = sanitize_text_field( $input['url'] );
|
1228 |
|
1229 |
+
register_string( 'Italy Cookie Choices', 'Banner url', $new_input['url'] );
|
1230 |
+
|
1231 |
+
}
|
1232 |
+
|
1233 |
+
if( isset( $input['slug'] ) ){
|
1234 |
|
|
|
1235 |
$new_input['slug'] = sanitize_text_field( $input['slug'] );
|
1236 |
|
1237 |
+
register_string( 'Italy Cookie Choices', 'Banner slug', $new_input['slug'] );
|
1238 |
+
|
1239 |
+
}
|
1240 |
+
|
1241 |
+
if( isset( $input['anchor_text'] ) ){
|
1242 |
|
|
|
1243 |
$new_input['anchor_text'] = sanitize_text_field( $input['anchor_text'] );
|
1244 |
|
1245 |
+
register_string( 'Italy Cookie Choices', 'Banner anchor text', $new_input['anchor_text'] );
|
1246 |
+
|
1247 |
+
}
|
1248 |
+
|
1249 |
+
if( isset( $input['button_text'] ) ){
|
1250 |
|
|
|
1251 |
$new_input['button_text'] = sanitize_text_field( $input['button_text'] );
|
1252 |
|
1253 |
+
register_string( 'Italy Cookie Choices', 'Banner button text', $new_input['button_text'] );
|
1254 |
+
|
1255 |
+
}
|
1256 |
|
1257 |
/**
|
1258 |
* Sezione per lo stile
|
1339 |
if( isset( $input['custom_script_block'] ) )
|
1340 |
$new_input['custom_script_block'] = $input['custom_script_block'];
|
1341 |
|
1342 |
+
if( isset( $input['content_message_text'] ) ){
|
1343 |
+
|
1344 |
$new_input['content_message_text'] = wp_kses_post( $input['content_message_text'] );
|
1345 |
|
1346 |
+
register_string( 'Italy Cookie Choices', 'Content message text', $new_input['content_message_text'] );
|
1347 |
+
|
1348 |
+
}
|
1349 |
|
1350 |
+
if( isset( $input['content_message_button_text'] ) ){
|
1351 |
+
|
1352 |
$new_input['content_message_button_text'] = sanitize_text_field( $input['content_message_button_text'] );
|
1353 |
|
1354 |
+
register_string( 'Italy Cookie Choices', 'Content message button text', $new_input['content_message_button_text'] );
|
1355 |
+
|
1356 |
+
}
|
1357 |
|
1358 |
return $new_input;
|
1359 |
|
classes/class-italy-cookie-choices-front-end.php
CHANGED
@@ -695,7 +695,7 @@ if ( !class_exists( 'Italy_Cookie_Choices_Front_End' ) ){
|
|
695 |
* var consText = Variabile per le classe dello span per il testo
|
696 |
* @var string
|
697 |
*/
|
698 |
-
$jsVariables = 'var coNA="' . $cookie_name . '",coVA="' . $cookie_value . '";scroll="' . $scroll . '",elPos="fixed",infoClass="' . $infoClass . '",closeClass="' . $closeClass . '",htmlM="' . $htmlM . '",rel="' . $reload . '",tar="' . $target . '",bgB="' . $banner_bg . '",btcB="' . $banner_text_color . '",bPos="' . $bPos . '",bannerStyle="' . $bannerStyle . '",contentStyle="' . $contStyle . '",consText="' . $consentText . '",jsArr = ' . $this->wp_json_encode( $this->js_array ) . ';';
|
699 |
|
700 |
/**
|
701 |
* Snippet per il multilingua
|
695 |
* var consText = Variabile per le classe dello span per il testo
|
696 |
* @var string
|
697 |
*/
|
698 |
+
$jsVariables = 'var coNA="' . $cookie_name . '",coVA="' . $cookie_value . '";scroll="' . $scroll . '",elPos="fixed",infoClass="' . $infoClass . '",closeClass="' . $closeClass . '",htmlM="' . $htmlM . '",rel="' . $reload . '",tar="' . $target . '",bgB="' . $banner_bg . '",btcB="' . $banner_text_color . '",bPos="' . $bPos . '",bannerStyle="' . $bannerStyle . '",contentStyle="' . $contStyle . '",consText="' . $consentText . '",jsArr = ' . $this->wp_json_encode( apply_filters( 'icc_js_array', $this->js_array ) ) . ';';
|
699 |
|
700 |
/**
|
701 |
* Snippet per il multilingua
|
includes/functions-italy-cookie-choices-lang.php
CHANGED
@@ -49,12 +49,12 @@ if ( !function_exists( 'register_string' ) ) {
|
|
49 |
|
50 |
elseif ( has_filter( 'cml_my_translations' ) ) {
|
51 |
|
52 |
-
add_filter( 'cml_my_translations',
|
53 |
-
|
54 |
CMLTranslations:add( $string_name, $value, $plugin_name_human_format );
|
55 |
$groups[$plugin_name_human_format_replaced] = $plugin_name_human_format;
|
56 |
-
return $groups;
|
57 |
-
|
58 |
|
59 |
} elseif ( function_exists( 'pll_register_string' ) ) {
|
60 |
|
49 |
|
50 |
elseif ( has_filter( 'cml_my_translations' ) ) {
|
51 |
|
52 |
+
add_filter( 'cml_my_translations', function ( $groups, $plugin_name_human_format ){
|
53 |
+
$plugin_name_human_format_replaced = str_replace( ' ', '-', $plugin_name_human_format );
|
54 |
CMLTranslations:add( $string_name, $value, $plugin_name_human_format );
|
55 |
$groups[$plugin_name_human_format_replaced] = $plugin_name_human_format;
|
56 |
+
return $groups;
|
57 |
+
} );
|
58 |
|
59 |
} elseif ( function_exists( 'pll_register_string' ) ) {
|
60 |
|
italy-cookie-choices.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Italy Cookie Choices (for EU Cookie Law)
|
4 |
* Plugin URI: https://plus.google.com/u/0/communities/109254048492234113886
|
5 |
* Description: Italy Cookie Choices allows you to easily comply with the european cookie law and block third part cookie in your page.
|
6 |
-
* Version: 2.3.
|
7 |
* Author: Enea Overclokk, Andrea Pernici, Andrea Cardinale
|
8 |
* Author URI: https://github.com/ItalyCookieChoices/italy-cookie-choices
|
9 |
* Text Domain: italy-cookie-choices
|
3 |
* Plugin Name: Italy Cookie Choices (for EU Cookie Law)
|
4 |
* Plugin URI: https://plus.google.com/u/0/communities/109254048492234113886
|
5 |
* Description: Italy Cookie Choices allows you to easily comply with the european cookie law and block third part cookie in your page.
|
6 |
+
* Version: 2.3.5
|
7 |
* Author: Enea Overclokk, Andrea Pernici, Andrea Cardinale
|
8 |
* Author URI: https://github.com/ItalyCookieChoices/italy-cookie-choices
|
9 |
* Text Domain: italy-cookie-choices
|
readme.txt
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
-
=== Italy Cookie Choices ===
|
2 |
Contributors: overclokk, andreapernici, cardinaleandrea
|
3 |
Donate link:
|
4 |
Tags: compliance, cookie law, cookies, eu cookie law, eu law, eu privacy directive, privacy, privacy directive, notification, privacy law, cookie law banner, implied consent, third party script, third party cookie
|
5 |
Requires at least: 3.5
|
6 |
Tested up to: 4.3.0
|
7 |
-
Stable tag: 2.3.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -115,6 +115,16 @@ if it doesn't work activate standard theme and try
|
|
115 |
|
116 |
== Changelog ==
|
117 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
118 |
= 2.3.4 =
|
119 |
Release Date: July 22th, 2015
|
120 |
|
@@ -327,4 +337,5 @@ a notice to the user only the very first time that visits your website without d
|
|
327 |
|
328 |
* [www.cookiechoices.org](https://www.cookiechoices.org/)
|
329 |
* [Loghino piccolo](http://www.posizionamento-seo.com/)
|
330 |
-
* Romanian lang: [Florin Lungu](http://www.florinlungu.it/)
|
|
1 |
+
=== Italy Cookie Choices (for EU Cookie Law) ===
|
2 |
Contributors: overclokk, andreapernici, cardinaleandrea
|
3 |
Donate link:
|
4 |
Tags: compliance, cookie law, cookies, eu cookie law, eu law, eu privacy directive, privacy, privacy directive, notification, privacy law, cookie law banner, implied consent, third party script, third party cookie
|
5 |
Requires at least: 3.5
|
6 |
Tested up to: 4.3.0
|
7 |
+
Stable tag: 2.3.5
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
115 |
|
116 |
== Changelog ==
|
117 |
|
118 |
+
= 2.3.5 =
|
119 |
+
Release Date: July 25th, 2015
|
120 |
+
|
121 |
+
Dev time: 3h
|
122 |
+
|
123 |
+
* Add filter for js_array `icc_js_array`
|
124 |
+
* Fixed performance issue in sites with many posts
|
125 |
+
* [Fixed Parse error issue #124](https://github.com/ItalyCookieChoices/italy-cookie-choices/issues/124#issuecomment-122952940)
|
126 |
+
|
127 |
+
|
128 |
= 2.3.4 =
|
129 |
Release Date: July 22th, 2015
|
130 |
|
337 |
|
338 |
* [www.cookiechoices.org](https://www.cookiechoices.org/)
|
339 |
* [Loghino piccolo](http://www.posizionamento-seo.com/)
|
340 |
+
* Romanian lang: [Florin Lungu](http://www.florinlungu.it/)
|
341 |
+
* [Some code for WordPress Plugin Boilerplate Powered by Mte90](https://github.com/Mte90/WordPress-Plugin-Boilerplate-Powered)
|