Version Description
Release Date: July 22th, 2015
Dev time: 10min
- Fixed bug in plugin admin panel
Download this release
Release Info
Developer | overclokk |
Plugin | Italy Cookie Choices (for EU Cookie Law) |
Version | 2.3.4 |
Comparing to | |
See all releases |
Code changes from version 2.3.3 to 2.3.4
- admin/class-italy-cookie-choices-admin.php +38 -2
- italy-cookie-choices.php +1 -1
- readme.txt +8 -1
admin/class-italy-cookie-choices-admin.php
CHANGED
@@ -81,6 +81,42 @@ if ( !class_exists( 'Italy_Cookie_Choices_Admin' ) ){
|
|
81 |
|
82 |
}
|
83 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
/**
|
85 |
* Get all posts and pages object and merge for jQuery autocomplete function
|
86 |
* @return array Return an array with all posts and pages
|
@@ -656,7 +692,7 @@ if ( !class_exists( 'Italy_Cookie_Choices_Admin' ) ){
|
|
656 |
|
657 |
?>
|
658 |
<script>
|
659 |
-
var urls = '<?php echo wp_json_encode( $urls ); ?>';
|
660 |
</script>
|
661 |
<input type="text" id="italy_cookie_choices[url]" name="italy_cookie_choices[url]" value="<?php echo esc_url( $this->options['url'] ); ?>" placeholder="<?php _e( 'e.g. http://www.aboutcookies.org/', 'italy-cookie-choices' ) ?>" size="70" />
|
662 |
<br>
|
@@ -688,7 +724,7 @@ if ( !class_exists( 'Italy_Cookie_Choices_Admin' ) ){
|
|
688 |
|
689 |
?>
|
690 |
<script>
|
691 |
-
var slugs = '<?php echo wp_json_encode( $slugs ); ?>';
|
692 |
</script>
|
693 |
<input type="text" id="italy_cookie_choices[slug]" name="italy_cookie_choices[slug]" value="<?php echo esc_attr( $slug ); ?>" placeholder="<?php _e( 'e.g. privacy-e-cookie', 'italy-cookie-choices' ); ?>" size="70" class="slug_autocomplete"/>
|
694 |
<br>
|
81 |
|
82 |
}
|
83 |
|
84 |
+
/**
|
85 |
+
* Encode a variable into JSON, with some sanity checks.
|
86 |
+
*
|
87 |
+
* @since 4.1.0
|
88 |
+
*
|
89 |
+
* @param mixed $data Variable (usually an array or object) to encode as JSON.
|
90 |
+
* @param int $options Optional. Options to be passed to json_encode(). Default 0.
|
91 |
+
* @param int $depth Optional. Maximum depth to walk through $data. Must be
|
92 |
+
* greater than 0. Default 512.
|
93 |
+
* @return bool|string The JSON encoded string, or false if it cannot be encoded.
|
94 |
+
*/
|
95 |
+
public function wp_json_encode( $data, $options = 0, $depth = 512 ) {
|
96 |
+
|
97 |
+
/*
|
98 |
+
* json_encode() has had extra params added over the years.
|
99 |
+
* $options was added in 5.3, and $depth in 5.5.
|
100 |
+
* We need to make sure we call it with the correct arguments.
|
101 |
+
*/
|
102 |
+
if ( version_compare( PHP_VERSION, '5.5', '>=' ) )
|
103 |
+
$args = array( $data, $options, $depth );
|
104 |
+
elseif ( version_compare( PHP_VERSION, '5.3', '>=' ) )
|
105 |
+
$args = array( $data, $options );
|
106 |
+
else
|
107 |
+
$args = array( $data );
|
108 |
+
|
109 |
+
$json = call_user_func_array( 'json_encode', $args );
|
110 |
+
|
111 |
+
// If json_encode() was successful, no need to do more sanity checking.
|
112 |
+
// ... unless we're in an old version of PHP, and json_encode() returned
|
113 |
+
// a string containing 'null'. Then we need to do more sanity checking.
|
114 |
+
if ( false !== $json && ( version_compare( PHP_VERSION, '5.5', '>=' ) || false === strpos( $json, 'null' ) ) )
|
115 |
+
return $json;
|
116 |
+
|
117 |
+
return call_user_func_array( 'json_encode', $args );
|
118 |
+
}
|
119 |
+
|
120 |
/**
|
121 |
* Get all posts and pages object and merge for jQuery autocomplete function
|
122 |
* @return array Return an array with all posts and pages
|
692 |
|
693 |
?>
|
694 |
<script>
|
695 |
+
var urls = '<?php echo $this->wp_json_encode( $urls ); ?>';
|
696 |
</script>
|
697 |
<input type="text" id="italy_cookie_choices[url]" name="italy_cookie_choices[url]" value="<?php echo esc_url( $this->options['url'] ); ?>" placeholder="<?php _e( 'e.g. http://www.aboutcookies.org/', 'italy-cookie-choices' ) ?>" size="70" />
|
698 |
<br>
|
724 |
|
725 |
?>
|
726 |
<script>
|
727 |
+
var slugs = '<?php echo $this->wp_json_encode( $slugs ); ?>';
|
728 |
</script>
|
729 |
<input type="text" id="italy_cookie_choices[slug]" name="italy_cookie_choices[slug]" value="<?php echo esc_attr( $slug ); ?>" placeholder="<?php _e( 'e.g. privacy-e-cookie', 'italy-cookie-choices' ); ?>" size="70" class="slug_autocomplete"/>
|
730 |
<br>
|
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.4
|
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
@@ -4,7 +4,7 @@ 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,13 @@ if it doesn't work activate standard theme and try
|
|
115 |
|
116 |
== Changelog ==
|
117 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
118 |
= 2.3.3 =
|
119 |
Release Date: July 21th, 2015
|
120 |
|
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.4
|
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.4 =
|
119 |
+
Release Date: July 22th, 2015
|
120 |
+
|
121 |
+
Dev time: 10min
|
122 |
+
|
123 |
+
* [Fixed bug in plugin admin panel](https://wordpress.org/support/topic/il-menu-impostazioni-non-si-carica-completamente?replies=3#post-7207319)
|
124 |
+
|
125 |
= 2.3.3 =
|
126 |
Release Date: July 21th, 2015
|
127 |
|