Version Description
- Further bugfixing
Download this release
Release Info
Developer | Facens |
Plugin | iubenda Cookie Solution for GDPR |
Version | 1.10.9 |
Comparing to | |
See all releases |
Code changes from version 1.10.8 to 1.10.9
- iubenda-cookie-class/README.md +0 -4
- iubenda-cookie-class/iubenda.class.php +3 -4
- iubenda_cookie_solution.php +104 -86
- readme.txt +3 -0
iubenda-cookie-class/README.md
DELETED
@@ -1,4 +0,0 @@
|
|
1 |
-
# Attention
|
2 |
-
We offer these files as a download on here https://www.iubenda.com/it/help/posts/1045
|
3 |
-
|
4 |
-
If there are stable changes, they need also be reflected there. Please tell Simon or Andrea
|
|
|
|
|
|
|
|
iubenda-cookie-class/iubenda.class.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* iubenda.class.php
|
6 |
*
|
7 |
-
* Version: 1.0.0.
|
8 |
*
|
9 |
*/
|
10 |
|
@@ -18,7 +18,6 @@
|
|
18 |
'apis.google.com/js/platform.js',
|
19 |
'connect.facebook.net',
|
20 |
'www.youtube.com/iframe_api',
|
21 |
-
'pagead2.googlesyndication.com/pagead/show_ads.js',
|
22 |
'pagead2.googlesyndication.com/pagead/js/adsbygoogle.js',
|
23 |
'sharethis.com/button/buttons.js',
|
24 |
'addthis.com/js/'
|
@@ -265,7 +264,7 @@ if('callback' in _iub.csConfiguration) {
|
|
265 |
|
266 |
if($ad_found)
|
267 |
{
|
268 |
-
$
|
269 |
"
|
270 |
<script>
|
271 |
function iubenda_adsense_unblock(){
|
@@ -309,7 +308,7 @@ if('callback' in _iub.csConfiguration) {
|
|
309 |
</script>
|
310 |
";
|
311 |
|
312 |
-
$html = str_replace("</body>", "
|
313 |
}
|
314 |
|
315 |
/**/
|
4 |
*
|
5 |
* iubenda.class.php
|
6 |
*
|
7 |
+
* Version: 1.0.0.1
|
8 |
*
|
9 |
*/
|
10 |
|
18 |
'apis.google.com/js/platform.js',
|
19 |
'connect.facebook.net',
|
20 |
'www.youtube.com/iframe_api',
|
|
|
21 |
'pagead2.googlesyndication.com/pagead/js/adsbygoogle.js',
|
22 |
'sharethis.com/button/buttons.js',
|
23 |
'addthis.com/js/'
|
264 |
|
265 |
if($ad_found)
|
266 |
{
|
267 |
+
$adsense_callback =
|
268 |
"
|
269 |
<script>
|
270 |
function iubenda_adsense_unblock(){
|
308 |
</script>
|
309 |
";
|
310 |
|
311 |
+
$html = str_replace("</body>", $adsense_callback."</body>", $html);
|
312 |
}
|
313 |
|
314 |
/**/
|
iubenda_cookie_solution.php
CHANGED
@@ -4,23 +4,17 @@
|
|
4 |
* Plugin URI: https://www.iubenda.com
|
5 |
* Description: Iubenda Cookie Solution permette di gestire tutti gli aspetti della cookie law su WP.
|
6 |
* Author: iubenda
|
7 |
-
* Version: 1.10.
|
8 |
* Text Domain: iubenda-cookie-wp-plugin
|
9 |
* Author URI: https://www.iubenda.com
|
10 |
*/
|
11 |
|
12 |
define('DEBUG', 0);
|
|
|
13 |
define('IUB_NO_PARSE_GET_PARAM', isset($_GET['iub_no_parse']));
|
14 |
-
define("IUB_REGEX_PATTERN", "/<!--IUB_COOKIE_POLICY_START-->(.*)<!--IUB_COOKIE_POLICY_END-->/sU");
|
15 |
|
16 |
/**/
|
17 |
|
18 |
-
function iubenda_load_output_buffer()
|
19 |
-
{
|
20 |
-
if(!is_admin()) {
|
21 |
-
ob_start("__iubenda_final_output");
|
22 |
-
}
|
23 |
-
}
|
24 |
function iubenda_load_admin_panel()
|
25 |
{
|
26 |
/*
|
@@ -52,18 +46,97 @@
|
|
52 |
if(is_admin()) add_action('admin_menu', 'iub_admin');
|
53 |
}
|
54 |
|
55 |
-
add_action("
|
56 |
-
add_action("plugins_loaded", "iubenda_load_admin_panel", 0);
|
57 |
-
|
58 |
-
/**/
|
59 |
|
60 |
-
function
|
61 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
|
64 |
-
|
65 |
|
66 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
67 |
|
68 |
function __iubenda_final_output($output)
|
69 |
{
|
@@ -74,79 +147,23 @@
|
|
74 |
$page = new Page($output);
|
75 |
$page->parse();
|
76 |
|
77 |
-
$output = $page->get_converted_page();
|
78 |
-
|
79 |
/**/
|
80 |
|
81 |
-
|
82 |
-
|
83 |
-
/*
|
84 |
-
* __iubenda_buffer_head
|
85 |
-
*/
|
86 |
-
|
87 |
-
/**/
|
88 |
-
|
89 |
-
$iubenda_code = "";
|
90 |
-
|
91 |
-
/**/
|
92 |
-
|
93 |
-
if(get_option("iub_code")) {
|
94 |
-
$wpml_old = html_entity_decode(stripslashes(get_option("iub_code")));
|
95 |
-
|
96 |
-
$iubenda_languages = array("it", "de", "en", "es", "br", "ru");
|
97 |
-
|
98 |
-
foreach($iubenda_languages as $iubenda_language)
|
99 |
-
{
|
100 |
-
if(strpos($wpml_old, 'lang: "'.$iubenda_language) !== false) {
|
101 |
-
$language_tag = $iubenda_language;
|
102 |
-
|
103 |
-
break;
|
104 |
-
}
|
105 |
-
}
|
106 |
-
|
107 |
-
update_option("iubenda-code-$language_tag", $wpml_old);
|
108 |
-
update_option("iubenda-code-default", $wpml_old);
|
109 |
-
update_option("iub_code", false);
|
110 |
-
}
|
111 |
-
|
112 |
-
if(defined("IUBENDA_WPML") && get_option("iubenda-code-".ICL_LANGUAGE_CODE)) {
|
113 |
-
$iubenda_code .= get_option("iubenda-code-".ICL_LANGUAGE_CODE);
|
114 |
-
}
|
115 |
-
else {
|
116 |
-
$iubenda_code .= get_option("iubenda-code-default");
|
117 |
-
}
|
118 |
-
|
119 |
-
$iubenda_code .= "\n
|
120 |
-
<script>
|
121 |
-
var iCallback = function(){};
|
122 |
-
|
123 |
-
if('callback' in _iub.csConfiguration) {
|
124 |
-
if('onConsentGiven' in _iub.csConfiguration.callback) iCallback = _iub.csConfiguration.callback.onConsentGiven;
|
125 |
-
|
126 |
-
_iub.csConfiguration.callback.onConsentGiven = function()
|
127 |
-
{
|
128 |
-
iCallback();
|
129 |
-
|
130 |
-
/*
|
131 |
-
* Separator
|
132 |
-
*/
|
133 |
-
|
134 |
-
jQuery('noscript._no_script_iub').each(function (a, b) { var el = jQuery(b); el.after(el.html()); });
|
135 |
-
};
|
136 |
-
};
|
137 |
-
</script>";
|
138 |
-
|
139 |
-
|
140 |
-
/**/
|
141 |
-
|
142 |
-
$output = str_replace("</head>", $iubenda_code."</head>", $output);
|
143 |
-
}
|
144 |
-
|
145 |
-
/**/
|
146 |
-
|
147 |
-
return $output;
|
148 |
}
|
149 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
150 |
/***********************************
|
151 |
*
|
152 |
* Add menù item on the admin
|
@@ -154,7 +171,8 @@
|
|
154 |
************************************/
|
155 |
|
156 |
|
157 |
-
function iub_admin()
|
|
|
158 |
add_menu_page("Iubenda - Settings", "Iubenda", "administrator", __FILE__, "__iub_admin_load");
|
159 |
}
|
160 |
|
4 |
* Plugin URI: https://www.iubenda.com
|
5 |
* Description: Iubenda Cookie Solution permette di gestire tutti gli aspetti della cookie law su WP.
|
6 |
* Author: iubenda
|
7 |
+
* Version: 1.10.9
|
8 |
* Text Domain: iubenda-cookie-wp-plugin
|
9 |
* Author URI: https://www.iubenda.com
|
10 |
*/
|
11 |
|
12 |
define('DEBUG', 0);
|
13 |
+
define('IUB_REGEX_PATTERN', '/<!--IUB_COOKIE_POLICY_START-->(.*)<!--IUB_COOKIE_POLICY_END-->/sU');
|
14 |
define('IUB_NO_PARSE_GET_PARAM', isset($_GET['iub_no_parse']));
|
|
|
15 |
|
16 |
/**/
|
17 |
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
function iubenda_load_admin_panel()
|
19 |
{
|
20 |
/*
|
46 |
if(is_admin()) add_action('admin_menu', 'iub_admin');
|
47 |
}
|
48 |
|
49 |
+
add_action("plugins_loaded", "iubenda_load_admin_panel");
|
|
|
|
|
|
|
50 |
|
51 |
+
function __iubenda_buffer_head()
|
52 |
+
{
|
53 |
+
/*
|
54 |
+
* __iubenda_buffer_head
|
55 |
+
*/
|
56 |
+
|
57 |
+
$iubenda_code = "";
|
58 |
+
|
59 |
+
/**/
|
60 |
+
|
61 |
+
if(get_option("iub_code")) {
|
62 |
+
$wpml_old = html_entity_decode(stripslashes(get_option("iub_code")));
|
63 |
+
|
64 |
+
$iubenda_languages = array("it", "de", "en", "es", "br", "ru");
|
65 |
+
|
66 |
+
foreach($iubenda_languages as $iubenda_language)
|
67 |
+
{
|
68 |
+
if(strpos($wpml_old, 'lang: "'.$iubenda_language) !== false) {
|
69 |
+
$language_tag = $iubenda_language;
|
70 |
+
|
71 |
+
break;
|
72 |
+
}
|
73 |
+
}
|
74 |
+
|
75 |
+
update_option("iubenda-code-$language_tag", $wpml_old);
|
76 |
+
update_option("iubenda-code-default", $wpml_old);
|
77 |
+
update_option("iub_code", false);
|
78 |
+
}
|
79 |
+
|
80 |
+
if(defined("IUBENDA_WPML") && get_option("iubenda-code-".ICL_LANGUAGE_CODE)) {
|
81 |
+
|
82 |
+
$iubenda_code .= get_option("iubenda-code-".ICL_LANGUAGE_CODE);
|
83 |
+
}
|
84 |
+
else {
|
85 |
+
$iubenda_code .= get_option("iubenda-code-default");
|
86 |
+
}
|
87 |
+
|
88 |
+
$iubenda_code .= "\n
|
89 |
+
<script>
|
90 |
+
var iCallback = function(){};
|
91 |
+
|
92 |
+
if('callback' in _iub.csConfiguration) {
|
93 |
+
if('onConsentGiven' in _iub.csConfiguration.callback) iCallback = _iub.csConfiguration.callback.onConsentGiven;
|
94 |
+
|
95 |
+
_iub.csConfiguration.callback.onConsentGiven = function()
|
96 |
+
{
|
97 |
+
iCallback();
|
98 |
+
|
99 |
+
/*
|
100 |
+
* Separator
|
101 |
+
*/
|
102 |
+
|
103 |
+
jQuery('noscript._no_script_iub').each(function (a, b) { var el = jQuery(b); el.after(el.html()); });
|
104 |
+
};
|
105 |
+
};
|
106 |
+
</script>";
|
107 |
+
|
108 |
+
|
109 |
+
/**/
|
110 |
+
|
111 |
+
echo $iubenda_code;
|
112 |
}
|
113 |
+
|
114 |
+
/**/
|
115 |
+
|
116 |
+
add_action("wp_head", "__iubenda_buffer_head", 99);
|
117 |
+
|
118 |
+
function __iubenda_shutdown()
|
119 |
+
{
|
120 |
+
$final = "";
|
121 |
|
122 |
+
$levels = ob_get_level();
|
123 |
|
124 |
+
for($i = 0; $i < $levels; $i++){
|
125 |
+
$final .= ob_get_clean();
|
126 |
+
}
|
127 |
+
|
128 |
+
echo apply_filters("final_output", $final);
|
129 |
+
}
|
130 |
+
|
131 |
+
// add_action("shutdown", "__iubenda_shutdown", 0);
|
132 |
+
|
133 |
+
function __iubenda_setup_output() {
|
134 |
+
if(!is_admin()) {
|
135 |
+
ob_start("__iubenda_final_output");
|
136 |
+
}
|
137 |
+
}
|
138 |
+
|
139 |
+
add_action("registered_taxonomy", "__iubenda_setup_output", 0);
|
140 |
|
141 |
function __iubenda_final_output($output)
|
142 |
{
|
147 |
$page = new Page($output);
|
148 |
$page->parse();
|
149 |
|
|
|
|
|
150 |
/**/
|
151 |
|
152 |
+
return $page->get_converted_page();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
153 |
}
|
154 |
|
155 |
+
add_filter("final_output", "__iubenda_final_output");
|
156 |
+
|
157 |
+
/**/
|
158 |
+
|
159 |
+
function iub_func($atts, $content = "") {
|
160 |
+
return '<!--IUB_COOKIE_POLICY_START-->'.do_shortcode($content).'<!--IUB_COOKIE_POLICY_END-->';
|
161 |
+
}
|
162 |
+
|
163 |
+
|
164 |
+
add_shortcode('iub-cookie-policy', 'iub_func');
|
165 |
+
|
166 |
+
|
167 |
/***********************************
|
168 |
*
|
169 |
* Add menù item on the admin
|
171 |
************************************/
|
172 |
|
173 |
|
174 |
+
function iub_admin()
|
175 |
+
{
|
176 |
add_menu_page("Iubenda - Settings", "Iubenda", "administrator", __FILE__, "__iub_admin_load");
|
177 |
}
|
178 |
|
readme.txt
CHANGED
@@ -122,6 +122,9 @@ Il plugin Wordpress di iubenda permette di semplificare l’adeguamento del prop
|
|
122 |
|
123 |
== Changelog ==
|
124 |
|
|
|
|
|
|
|
125 |
= 1.10.8 =
|
126 |
* Fixed problems with WPML and with using the shortcode
|
127 |
|
122 |
|
123 |
== Changelog ==
|
124 |
|
125 |
+
= 1.10.9 =
|
126 |
+
* Further bugfixing
|
127 |
+
|
128 |
= 1.10.8 =
|
129 |
* Fixed problems with WPML and with using the shortcode
|
130 |
|