Ginger – EU Cookie Law - Version 4.1.4

Version Description

Download this release

Release Info

Developer manafactory
Plugin Icon 128x128 Ginger – EU Cookie Law
Version 4.1.4
Comparing to
See all releases

Code changes from version 4.1.3 to 4.1.4

addon/exporter/index.php CHANGED
@@ -14,7 +14,12 @@ function ginger_export(){
14
  return;
15
  }
16
  if(isset($_POST["action"]) && $_POST["action"] == "import"){
17
- if($newconf = @unserialize(stripslashes($_POST["data"]))) {
 
 
 
 
 
18
  foreach($newconf as $key => $val){
19
  update_option($key, $val);
20
  }
@@ -44,7 +49,7 @@ function ginger_export(){
44
  $export["ginger_polylang_options"] = get_option('ginger_polylang_options');
45
  $export["gingeranalytics"] = get_option('gingeranalytics');
46
  $export["gingeranalytics_option"] = get_option('gingeranalytics_option');
47
- echo serialize($export);
48
  ?></textarea>
49
 
50
  <input type="hidden" name="action" value="export">
@@ -55,7 +60,7 @@ function ginger_export(){
55
 
56
  <p><?php _e("Upload here the export file to overwrite existing settings!", "ginger"); ?></p>
57
  <form method="post" action="admin.php?page=<?php echo $_GET["page"]; ?>">
58
- <?php wp_nonce_field('save_ginger_export_options', 'ginger_export_options'); ?>
59
  <input type="hidden" name="action" value="import" >
60
  <textarea name="data" style="width:100%;" rows="10" ></textarea>
61
  <p> <small><b><?php _e("Attention: you must define manually a privacy policy page if you are using {{privacy_policy}} shortcode!", "ginger"); ?></b></small></p>
14
  return;
15
  }
16
  if(isset($_POST["action"]) && $_POST["action"] == "import"){
17
+ $nonce = $_REQUEST['_wpnonce'];
18
+ if ( ! wp_verify_nonce( $nonce, 'save_ginger_export_options' ) ) {
19
+ exit; // Get out of here, the nonce is rotten!
20
+ }
21
+ if($newconf = json_decode(stripslashes($_POST["data"]), true)) {
22
+ $newconf = json_decode(json_encode($newconf), true);
23
  foreach($newconf as $key => $val){
24
  update_option($key, $val);
25
  }
49
  $export["ginger_polylang_options"] = get_option('ginger_polylang_options');
50
  $export["gingeranalytics"] = get_option('gingeranalytics');
51
  $export["gingeranalytics_option"] = get_option('gingeranalytics_option');
52
+ echo json_encode($export);
53
  ?></textarea>
54
 
55
  <input type="hidden" name="action" value="export">
60
 
61
  <p><?php _e("Upload here the export file to overwrite existing settings!", "ginger"); ?></p>
62
  <form method="post" action="admin.php?page=<?php echo $_GET["page"]; ?>">
63
+ <?php wp_nonce_field('save_ginger_export_options'); ?>
64
  <input type="hidden" name="action" value="import" >
65
  <textarea name="data" style="width:100%;" rows="10" ></textarea>
66
  <p> <small><b><?php _e("Attention: you must define manually a privacy policy page if you are using {{privacy_policy}} shortcode!", "ginger"); ?></b></small></p>
addon/logger/ginger.logger.php CHANGED
@@ -124,7 +124,15 @@ function ginger_add_log_variable(){
124
  <script type="text/javascript">
125
  var ginger_logger = "Y";
126
  var ginger_logger_url = "<?php bloginfo("url"); ?>";
127
- var current_url = "<?php echo (isset($_SERVER['HTTPS']) ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; ?>";
 
 
 
 
 
 
 
 
128
 
129
  function gingerAjaxLogTime(status) {
130
  var xmlHttp = new XMLHttpRequest();
@@ -150,7 +158,7 @@ function ginger_add_log_variable(){
150
  var xmlHttp = new XMLHttpRequest();
151
  var parameters = "ginger_action=log&time=" + ginger_logtime + "&url=" + current_url + "&status=" + status;
152
  var url= ginger_logger_url + "?" + parameters;
153
- console.log(url);
154
  xmlHttp.open("GET", url, true);
155
 
156
  //Black magic paragraph
@@ -169,6 +177,9 @@ function ginger_do_log($url = "", $status = "Y"){
169
  global $wpdb;
170
  if($url == "")
171
  $url = (isset($_SERVER['HTTPS']) ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
 
 
 
172
  $table_name = $wpdb->prefix . 'logger_ginger';
173
  $ipuser = ginger_get_ip_address();
174
  $now = current_time( 'mysql' );
124
  <script type="text/javascript">
125
  var ginger_logger = "Y";
126
  var ginger_logger_url = "<?php bloginfo("url"); ?>";
127
+ var current_url = "<?php
128
+ $curl = (isset($_SERVER['HTTPS']) ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
129
+ if(filter_var($url, FILTER_VALIDATE_URL) === FALSE){
130
+ $curl = get_bloginfo("url");
131
+ }else{
132
+ $curl = $curl;
133
+ }
134
+ echo $curl;
135
+ ?>";
136
 
137
  function gingerAjaxLogTime(status) {
138
  var xmlHttp = new XMLHttpRequest();
158
  var xmlHttp = new XMLHttpRequest();
159
  var parameters = "ginger_action=log&time=" + ginger_logtime + "&url=" + current_url + "&status=" + status;
160
  var url= ginger_logger_url + "?" + parameters;
161
+ //console.log(url);
162
  xmlHttp.open("GET", url, true);
163
 
164
  //Black magic paragraph
177
  global $wpdb;
178
  if($url == "")
179
  $url = (isset($_SERVER['HTTPS']) ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
180
+ if(filter_var($url, FILTER_VALIDATE_URL) === FALSE){
181
+ $url = get_bloginfo("url");
182
+ }
183
  $table_name = $wpdb->prefix . 'logger_ginger';
184
  $ipuser = ginger_get_ip_address();
185
  $now = current_time( 'mysql' );
admin/partial/banner.php CHANGED
@@ -13,11 +13,11 @@
13
  <fieldset>
14
  <legend class="screen-reader-text"><span><?php _e("Choose Banner Type", "ginger"); ?></span></legend>
15
  <p><label><input name="ginger_banner_type" type="radio" value="bar"
16
- class="tog" <?php if ($options["ginger_banner_type"] == "bar") echo ' checked="checked" '; ?>><?php _e("Bar", "ginger"); ?>
17
  </label></p>
18
 
19
  <p><label><input name="ginger_banner_type" type="radio" value="dialog"
20
- class="tog" <?php if ($options["ginger_banner_type"] == "dialog") echo ' checked="checked" '; ?>><?php _e("Dialog", "ginger"); ?>
21
  </label></p>
22
  </fieldset>
23
  </td>
@@ -28,11 +28,11 @@
28
  <fieldset>
29
  <legend class="screen-reader-text"><span><?php _e("Banner Position", "ginger"); ?></span></legend>
30
  <p><label><input name="ginger_banner_position" type="radio" value="top"
31
- class="tog" <?php if ($options["ginger_banner_position"] == "top") echo ' checked="checked" '; ?>><?php _e("Top", "ginger"); ?>
32
  </label></p>
33
 
34
  <p><label><input name="ginger_banner_position" type="radio" value="bottom"
35
- class="tog" <?php if ($options["ginger_banner_position"] == "bottom") echo ' checked="checked" '; ?>><?php _e("Bottom", "ginger"); ?>
36
  </label></p>
37
  </fieldset>
38
  </td>
@@ -43,10 +43,12 @@
43
  <fieldset>
44
  <legend class="screen-reader-text"><span><?php _e("Banner Text", "ginger"); ?></span></legend>
45
  <p><label><?php
46
- if (function_exists("wp_editor"))
47
- wp_editor(stripslashes($options["ginger_banner_text"]), "ginger_bar_text", array('textarea_name' => "ginger_banner_text", 'media_buttons' => false, 'textarea_rows' => 3, 'teeny' => true));
48
- else
49
- echo '<textarea name = "ginger_banner_text" >' . $options["ginger_banner_text"] . '</textarea>';
 
 
50
  ?>
51
  <br>
52
  <small><?php _e('You can use syntax <code><input type="text" value="{{privacy_page}}" style="border:none; width: 160px; text-align:center;"></code> to link Privacy Police Page defined in <a href="admin.php?page=ginger-setup&tab=policy">Privacy Policy Tab</a>', "ginger"); ?></small>
@@ -61,11 +63,12 @@
61
  <fieldset>
62
  <legend class="screen-reader-text"><span><?php _e("Iframe Text", "ginger"); ?></span></legend>
63
  <p><label><?php
64
- if (function_exists("wp_editor"))
65
- wp_editor(stripslashes($options["ginger_Iframe_text"]), "ginger_Iframe_text", array('textarea_name' => "ginger_Iframe_text", 'media_buttons' => false, 'textarea_rows' => 3, 'teeny' => true));
66
- else
67
- echo '<textarea name = "ginger_Iframe_text" >' . $options["ginger_Iframe_text"] . '</textarea>';
68
-
 
69
  ?></label></p>
70
  </fieldset>
71
  </td>
@@ -82,7 +85,7 @@
82
  <p>
83
  <label><?php _e("Text", "ginger"); ?></label>
84
  <input name="accept_cookie_button_text" id="accept_cookie_button_text" type="text"
85
- value="<?php if ($options['accept_cookie_button_text'] != "") {
86
  echo $options['accept_cookie_button_text'];
87
  } else {
88
  echo _e('Accept Cookie', 'ginger');
@@ -96,23 +99,23 @@
96
  <p>
97
  <label><?php _e("Text", "ginger"); ?></label>
98
  <input name="disable_cookie_button_text" id="disable_cookie_button_text" type="text"
99
- value="<?php if (isset($options['disable_cookie_button_text']) && $options['disable_cookie_button_text'] != "") {
100
  echo $options['disable_cookie_button_text'];
101
  } else {
102
  echo _e('Disable Cookie', 'ginger');
103
- } ?>" <?php if (!(isset($options['disable_cookie_button_status']) && $options['disable_cookie_button_status'] == "1")) {
104
  echo 'disabled=true';
105
  } ?>>
106
  <?php echo _e('Enable:', 'ginger') ?>&nbsp;
107
  <input type="checkbox" id="disable_cookie_button_status" name="disable_cookie_button_status"
108
- value="1" <?php if (isset($options['disable_cookie_button_status']) && $options['disable_cookie_button_status'] == "1") {
109
  echo 'checked';
110
  } ?>
111
  onclick="en_dis_able_text_banner_button('disable_cookie_button_status','disable_cookie_button_text','img_disable_cookie_button_status');">
112
 
113
 
114
  <img id="img_disable_cookie_button_status"
115
- src="<?php if (isset($options['disable_cookie_button_status']) && $options['disable_cookie_button_status'] == "1") {
116
  echo plugins_url('ginger/img/ok.png');
117
  } else {
118
  echo plugins_url('ginger/img/xx.png');
@@ -129,11 +132,11 @@
129
  <fieldset>
130
  <legend class="screen-reader-text"><span><?php _e("Choose Ginger Theme", "ginger"); ?></span></legend>
131
  <p><label><input name="theme_ginger" type="radio" value="light"
132
- class="tog" <?php if ($options["theme_ginger"] == "light") echo ' checked="checked" '; ?>><?php _e("Light Theme", "ginger"); ?>
133
  </label></p>
134
 
135
  <p><label><input name="theme_ginger" type="radio" value="dark"
136
- class="tog" <?php if ($options["theme_ginger"] == "dark") echo ' checked="checked" '; ?>><?php _e("Dark Theme", "ginger"); ?>
137
  </label></p>
138
  </fieldset>
139
  </td>
@@ -148,7 +151,7 @@
148
  <td>
149
  <fieldset>
150
  <legend class="screen-reader-text"><span><?php _e("Background", "ginger"); ?></span></legend>
151
- <p><label><input type="text" name="background_color" value="<?php echo $options["background_color"]; ?>"
152
  class="color-field"></label></p>
153
  </fieldset>
154
  </td>
@@ -158,7 +161,7 @@
158
  <td>
159
  <fieldset>
160
  <legend class="screen-reader-text"><span><?php _e("Text", "ginger"); ?></span></legend>
161
- <p><label><input type="text" name="text_color" value="<?php echo $options["text_color"]; ?>"
162
  class="color-field"></label></p>
163
  </fieldset>
164
  </td>
@@ -169,7 +172,7 @@
169
  <td>
170
  <fieldset>
171
  <legend class="screen-reader-text"><span><?php _e("Button", "ginger"); ?></span></legend>
172
- <p><label><input type="text" name="button_color" value="<?php echo $options["button_color"]; ?>"
173
  class="color-field"></label></p>
174
  </fieldset>
175
  </td>
@@ -179,7 +182,7 @@
179
  <td>
180
  <fieldset>
181
  <legend class="screen-reader-text"><span><?php _e("Button Text Color", "ginger"); ?></span></legend>
182
- <p><label><input type="text" name="button_text_color" value="<?php echo $options["button_text_color"]; ?>"
183
  class="color-field"></label></p>
184
  </fieldset>
185
  </td>
@@ -189,7 +192,7 @@
189
  <td>
190
  <fieldset>
191
  <legend class="screen-reader-text"><span><?php _e("Link", "ginger"); ?></span></legend>
192
- <p><label><input type="text" name="link_color" value="<?php echo $options["link_color"]; ?>"
193
  class="color-field"></label></p>
194
  </fieldset>
195
  </td>
@@ -206,7 +209,7 @@
206
  <legend class="screen-reader-text"><span><?php _e("Insert here your banner custom CSS", "ginger"); ?></span></legend>
207
  <p>
208
  <label>
209
- <textarea name = "ginger_css" cols="100" rows="20" class="lined"><?php echo $options["ginger_css"];?></textarea>
210
 
211
  </label>
212
  </p>
13
  <fieldset>
14
  <legend class="screen-reader-text"><span><?php _e("Choose Banner Type", "ginger"); ?></span></legend>
15
  <p><label><input name="ginger_banner_type" type="radio" value="bar"
16
+ class="tog" <?php if (is_array($options) && $options["ginger_banner_type"] == "bar") echo ' checked="checked" '; ?>><?php _e("Bar", "ginger"); ?>
17
  </label></p>
18
 
19
  <p><label><input name="ginger_banner_type" type="radio" value="dialog"
20
+ class="tog" <?php if (is_array($options) && $options["ginger_banner_type"] == "dialog") echo ' checked="checked" '; ?>><?php _e("Dialog", "ginger"); ?>
21
  </label></p>
22
  </fieldset>
23
  </td>
28
  <fieldset>
29
  <legend class="screen-reader-text"><span><?php _e("Banner Position", "ginger"); ?></span></legend>
30
  <p><label><input name="ginger_banner_position" type="radio" value="top"
31
+ class="tog" <?php if (is_array($options) && $options["ginger_banner_position"] == "top") echo ' checked="checked" '; ?>><?php _e("Top", "ginger"); ?>
32
  </label></p>
33
 
34
  <p><label><input name="ginger_banner_position" type="radio" value="bottom"
35
+ class="tog" <?php if (is_array($options) && $options["ginger_banner_position"] == "bottom") echo ' checked="checked" '; ?>><?php _e("Bottom", "ginger"); ?>
36
  </label></p>
37
  </fieldset>
38
  </td>
43
  <fieldset>
44
  <legend class="screen-reader-text"><span><?php _e("Banner Text", "ginger"); ?></span></legend>
45
  <p><label><?php
46
+ if(is_array($options)) {
47
+ if (function_exists("wp_editor"))
48
+ wp_editor(stripslashes($options["ginger_banner_text"]), "ginger_bar_text", array('textarea_name' => "ginger_banner_text", 'media_buttons' => false, 'textarea_rows' => 3, 'teeny' => true));
49
+ else
50
+ echo '<textarea name = "ginger_banner_text" >' . $options["ginger_banner_text"] . '</textarea>';
51
+ }
52
  ?>
53
  <br>
54
  <small><?php _e('You can use syntax <code><input type="text" value="{{privacy_page}}" style="border:none; width: 160px; text-align:center;"></code> to link Privacy Police Page defined in <a href="admin.php?page=ginger-setup&tab=policy">Privacy Policy Tab</a>', "ginger"); ?></small>
63
  <fieldset>
64
  <legend class="screen-reader-text"><span><?php _e("Iframe Text", "ginger"); ?></span></legend>
65
  <p><label><?php
66
+ if(is_array($options)) {
67
+ if (function_exists("wp_editor"))
68
+ wp_editor(stripslashes($options["ginger_Iframe_text"]), "ginger_Iframe_text", array('textarea_name' => "ginger_Iframe_text", 'media_buttons' => false, 'textarea_rows' => 3, 'teeny' => true));
69
+ else
70
+ echo '<textarea name = "ginger_Iframe_text" >' . $options["ginger_Iframe_text"] . '</textarea>';
71
+ }
72
  ?></label></p>
73
  </fieldset>
74
  </td>
85
  <p>
86
  <label><?php _e("Text", "ginger"); ?></label>
87
  <input name="accept_cookie_button_text" id="accept_cookie_button_text" type="text"
88
+ value="<?php if (is_array($options) && $options['accept_cookie_button_text'] != "") {
89
  echo $options['accept_cookie_button_text'];
90
  } else {
91
  echo _e('Accept Cookie', 'ginger');
99
  <p>
100
  <label><?php _e("Text", "ginger"); ?></label>
101
  <input name="disable_cookie_button_text" id="disable_cookie_button_text" type="text"
102
+ value="<?php if (is_array($options) && isset($options['disable_cookie_button_text']) && $options['disable_cookie_button_text'] != "") {
103
  echo $options['disable_cookie_button_text'];
104
  } else {
105
  echo _e('Disable Cookie', 'ginger');
106
+ } ?>" <?php if (is_array($options) && !(isset($options['disable_cookie_button_status']) && $options['disable_cookie_button_status'] == "1")) {
107
  echo 'disabled=true';
108
  } ?>>
109
  <?php echo _e('Enable:', 'ginger') ?>&nbsp;
110
  <input type="checkbox" id="disable_cookie_button_status" name="disable_cookie_button_status"
111
+ value="1" <?php if (is_array($options) && isset($options['disable_cookie_button_status']) && $options['disable_cookie_button_status'] == "1") {
112
  echo 'checked';
113
  } ?>
114
  onclick="en_dis_able_text_banner_button('disable_cookie_button_status','disable_cookie_button_text','img_disable_cookie_button_status');">
115
 
116
 
117
  <img id="img_disable_cookie_button_status"
118
+ src="<?php if (is_array($options) && isset($options['disable_cookie_button_status']) && $options['disable_cookie_button_status'] == "1") {
119
  echo plugins_url('ginger/img/ok.png');
120
  } else {
121
  echo plugins_url('ginger/img/xx.png');
132
  <fieldset>
133
  <legend class="screen-reader-text"><span><?php _e("Choose Ginger Theme", "ginger"); ?></span></legend>
134
  <p><label><input name="theme_ginger" type="radio" value="light"
135
+ class="tog" <?php if (is_array($options) && $options["theme_ginger"] == "light") echo ' checked="checked" '; ?>><?php _e("Light Theme", "ginger"); ?>
136
  </label></p>
137
 
138
  <p><label><input name="theme_ginger" type="radio" value="dark"
139
+ class="tog" <?php if (is_array($options) && $options["theme_ginger"] == "dark") echo ' checked="checked" '; ?>><?php _e("Dark Theme", "ginger"); ?>
140
  </label></p>
141
  </fieldset>
142
  </td>
151
  <td>
152
  <fieldset>
153
  <legend class="screen-reader-text"><span><?php _e("Background", "ginger"); ?></span></legend>
154
+ <p><label><input type="text" name="background_color" value="<?php if(is_array($options)) echo $options["background_color"]; ?>"
155
  class="color-field"></label></p>
156
  </fieldset>
157
  </td>
161
  <td>
162
  <fieldset>
163
  <legend class="screen-reader-text"><span><?php _e("Text", "ginger"); ?></span></legend>
164
+ <p><label><input type="text" name="text_color" value="<?php if(is_array($options)) echo $options["text_color"]; ?>"
165
  class="color-field"></label></p>
166
  </fieldset>
167
  </td>
172
  <td>
173
  <fieldset>
174
  <legend class="screen-reader-text"><span><?php _e("Button", "ginger"); ?></span></legend>
175
+ <p><label><input type="text" name="button_color" value="<?php if(is_array($options)) echo $options["button_color"]; ?>"
176
  class="color-field"></label></p>
177
  </fieldset>
178
  </td>
182
  <td>
183
  <fieldset>
184
  <legend class="screen-reader-text"><span><?php _e("Button Text Color", "ginger"); ?></span></legend>
185
+ <p><label><input type="text" name="button_text_color" value="<?php if(is_array($options)) echo $options["button_text_color"]; ?>"
186
  class="color-field"></label></p>
187
  </fieldset>
188
  </td>
192
  <td>
193
  <fieldset>
194
  <legend class="screen-reader-text"><span><?php _e("Link", "ginger"); ?></span></legend>
195
+ <p><label><input type="text" name="link_color" value="<?php if(is_array($options)) echo $options["link_color"]; ?>"
196
  class="color-field"></label></p>
197
  </fieldset>
198
  </td>
209
  <legend class="screen-reader-text"><span><?php _e("Insert here your banner custom CSS", "ginger"); ?></span></legend>
210
  <p>
211
  <label>
212
+ <textarea name = "ginger_css" cols="100" rows="20" class="lined"><?php if(is_array($options)) echo $options["ginger_css"];?></textarea>
213
 
214
  </label>
215
  </p>
admin/partial/general.php CHANGED
@@ -2,7 +2,7 @@
2
  <thead>
3
  <tr>
4
  <td colspan="2">
5
- <h2><?php _e("Ginger is currently", "ginger"); ?>: <b><?php if($options["enable_ginger"]) _e("enabled", "ginger"); else _e("disabled", "ginger"); ?></b> </h2>
6
  </td>
7
  </tr>
8
  </thead>
@@ -14,12 +14,12 @@
14
  <legend class="screen-reader-text"><span><?php _e("Enable Ginger", "ginger"); ?></span></legend>
15
  <p>
16
  <label>
17
- <input name="enable_ginger" type="radio" value="1" class="tog" <?php if($options["enable_ginger"] == "1") echo ' checked="checked" '; ?>><?php _e("Enabled", "ginger"); ?>
18
  </label>
19
  </p>
20
  <p>
21
  <label>
22
- <input name="enable_ginger" type="radio" value="0" class="tog" <?php if($options["enable_ginger"] == "0") echo ' checked="checked" '; ?>><?php _e("Disabled", "ginger"); ?>
23
  </label>
24
  </p>
25
  </fieldset>
@@ -32,12 +32,12 @@
32
  <legend class="screen-reader-text"><span><?php _e("Do you have a cache system?", "ginger"); ?></span></legend>
33
  <p>
34
  <label>
35
- <input name="ginger_cache" type="radio" value="yes" class="tog" <?php if($options["ginger_cache"] == "yes") echo ' checked="checked" '; ?>><?php _e("Yes", "ginger"); ?>
36
  </label>
37
  </p>
38
  <p>
39
  <label>
40
- <input name="ginger_cache" type="radio" value="no" class="tog" <?php if($options["ginger_cache"] == "no") echo ' checked="checked" '; ?>><?php _e("No", "ginger"); ?>
41
  </label>
42
  </p>
43
  <p>
@@ -55,7 +55,7 @@
55
  <legend class="screen-reader-text"><span><?php _e("Cookie Confirmation Type", "ginger"); ?></span></legend>
56
  <p>
57
  <label>
58
- <input name="ginger_opt" type="radio" value="in" class="tog" <?php if($options["ginger_opt"] == "in") echo ' checked="checked" '; ?>><?php _e("Opt-In", "ginger"); ?>
59
  </label>
60
  <small>
61
  (<?php _e("Cookies are disabled until banner is accepted", "ginger"); ?>)
@@ -63,7 +63,7 @@
63
  </p>
64
  <p>
65
  <label>
66
- <input name="ginger_opt" type="radio" value="out" class="tog" <?php if($options["ginger_opt"] == "out") echo ' checked="checked" '; ?>><?php _e("Opt-Out", "ginger"); ?>
67
  </label>
68
  <small>
69
  (<?php _e("Cookies are disabled only if explicitly requested", "ginger"); ?>)
@@ -87,12 +87,12 @@
87
  </legend>
88
  <p>
89
  <label>
90
- <input name="ginger_scroll" type="radio" value="1" class="tog" <?php if($options["ginger_scroll"] == "1") echo ' checked="checked" '; ?>><?php _e("Scroll to accept cookie", "ginger"); ?>
91
  </label>
92
  </p>
93
  <p>
94
  <label>
95
- <input name="ginger_scroll" type="radio" value="0" class="tog" <?php if($options["ginger_scroll"] == "0") echo ' checked="checked" '; ?>><?php _e("Keep banner after scroll", "ginger"); ?>
96
  </label>
97
  </p>
98
  </fieldset>
@@ -107,12 +107,12 @@
107
  </legend>
108
  <p>
109
  <label>
110
- <input name="ginger_click_out" type="radio" value="1" class="tog" <?php if($options["ginger_click_out"] == "1") echo ' checked="checked" '; ?>><?php _e("Yes", "ginger"); ?>
111
  </label>
112
  </p>
113
  <p>
114
  <label>
115
- <input name="ginger_click_out" type="radio" value="0" class="tog" <?php if($options["ginger_click_out"] == "0") echo ' checked="checked" '; ?>><?php _e("No", "ginger"); ?>
116
  </label>
117
  </p>
118
  </fieldset>
@@ -127,12 +127,12 @@
127
  </legend>
128
  <p>
129
  <label>
130
- <input name="ginger_force_reload" type="radio" value="1" class="tog" <?php if($options["ginger_force_reload"] == "1") echo ' checked="checked" '; ?>><?php _e("Yes", "ginger"); ?>
131
  </label>
132
  </p>
133
  <p>
134
  <label>
135
- <input name="ginger_force_reload" type="radio" value="0" class="tog" <?php if($options["ginger_force_reload"] == "0") echo ' checked="checked" '; ?>><?php _e("No", "ginger"); ?>
136
  </label>
137
  </p>
138
  </fieldset>
@@ -147,12 +147,12 @@
147
  </legend>
148
  <p>
149
  <label>
150
- <input name="ginger_keep_banner" type="radio" value="1" class="tog" <?php if($options["ginger_keep_banner"] == "1") echo ' checked="checked" '; ?>><?php _e("Yes", "ginger"); ?>
151
  </label>
152
  </p>
153
  <p>
154
  <label>
155
- <input name="ginger_keep_banner" type="radio" value="0" class="tog" <?php if($options["ginger_keep_banner"] == "0") echo ' checked="checked" '; ?>><?php _e("No", "ginger"); ?>
156
  </label>
157
  </p>
158
  <p>
@@ -174,10 +174,10 @@
174
  <label><?php _e("Select cookies duration", "ginger"); ?></label>
175
  <select name="ginger_cookie_duration">
176
  <option value=""><?php _e('Select', 'ginger')?></option>
177
- <option value="1" <?php if ($options['ginger_cookie_duration']=='1'){echo 'selected';}?>><?php _e('1 Day', 'ginger')?></option>
178
- <option value="30" <?php if ($options['ginger_cookie_duration']=='30'){echo 'selected';}?>><?php _e('1 Month', 'ginger')?></option>
179
- <option value="365" <?php if ($options['ginger_cookie_duration']=='365'){echo 'selected';}?>><?php _e('1 Year', 'ginger')?></option>
180
- <option value="365000" <?php if ($options['ginger_cookie_duration']=='365000'){echo 'selected';}?>><?php _e('For ever', 'ginger')?></option>
181
  </select>
182
  </p>
183
 
@@ -192,12 +192,12 @@
192
  <span><?php _e("Disable Ginger for logged users", "ginger"); ?></span>
193
  </legend>
194
  <label>
195
- <input name="ginger_logged_users" type="radio" value="1" class="tog" <?php if(isset($options["ginger_logged_users"]) && $options["ginger_logged_users"] == "1") echo ' checked="checked" '; ?>><?php _e("Yes", "ginger"); ?>
196
  </label>
197
  </p>
198
  <p>
199
  <label>
200
- <input name="ginger_logged_users" type="radio" value="0" class="tog" <?php if(!isset($options["ginger_logged_users"]) || $options["ginger_logged_users"] == "0") echo ' checked="checked" '; ?>><?php _e("No", "ginger"); ?>
201
  </label>
202
  </p>
203
  </p>
@@ -211,7 +211,7 @@
211
  <td>
212
  <fieldset>
213
  <div data-repeater-list="pagine_escluse">
214
- <?php if (!empty($options['pagine_escluse'])):?>
215
 
216
 
217
  <?php foreach ($options['pagine_escluse'] as $array_pagine):?>
2
  <thead>
3
  <tr>
4
  <td colspan="2">
5
+ <h2><?php _e("Ginger is currently", "ginger"); ?>: <b><?php if(is_array($options) && $options["enable_ginger"]) _e("enabled", "ginger"); else _e("disabled", "ginger"); ?></b> </h2>
6
  </td>
7
  </tr>
8
  </thead>
14
  <legend class="screen-reader-text"><span><?php _e("Enable Ginger", "ginger"); ?></span></legend>
15
  <p>
16
  <label>
17
+ <input name="enable_ginger" type="radio" value="1" class="tog" <?php if(is_array($options) && $options["enable_ginger"] == "1") echo ' checked="checked" '; ?>><?php _e("Enabled", "ginger"); ?>
18
  </label>
19
  </p>
20
  <p>
21
  <label>
22
+ <input name="enable_ginger" type="radio" value="0" class="tog" <?php if(is_array($options) && $options["enable_ginger"] == "0") echo ' checked="checked" '; ?>><?php _e("Disabled", "ginger"); ?>
23
  </label>
24
  </p>
25
  </fieldset>
32
  <legend class="screen-reader-text"><span><?php _e("Do you have a cache system?", "ginger"); ?></span></legend>
33
  <p>
34
  <label>
35
+ <input name="ginger_cache" type="radio" value="yes" class="tog" <?php if(is_array($options) && $options["ginger_cache"] == "yes") echo ' checked="checked" '; ?>><?php _e("Yes", "ginger"); ?>
36
  </label>
37
  </p>
38
  <p>
39
  <label>
40
+ <input name="ginger_cache" type="radio" value="no" class="tog" <?php if(is_array($options) && $options["ginger_cache"] == "no") echo ' checked="checked" '; ?>><?php _e("No", "ginger"); ?>
41
  </label>
42
  </p>
43
  <p>
55
  <legend class="screen-reader-text"><span><?php _e("Cookie Confirmation Type", "ginger"); ?></span></legend>
56
  <p>
57
  <label>
58
+ <input name="ginger_opt" type="radio" value="in" class="tog" <?php if(is_array($options) && $options["ginger_opt"] == "in") echo ' checked="checked" '; ?>><?php _e("Opt-In", "ginger"); ?>
59
  </label>
60
  <small>
61
  (<?php _e("Cookies are disabled until banner is accepted", "ginger"); ?>)
63
  </p>
64
  <p>
65
  <label>
66
+ <input name="ginger_opt" type="radio" value="out" class="tog" <?php if(is_array($options) && $options["ginger_opt"] == "out") echo ' checked="checked" '; ?>><?php _e("Opt-Out", "ginger"); ?>
67
  </label>
68
  <small>
69
  (<?php _e("Cookies are disabled only if explicitly requested", "ginger"); ?>)
87
  </legend>
88
  <p>
89
  <label>
90
+ <input name="ginger_scroll" type="radio" value="1" class="tog" <?php if(is_array($options) && $options["ginger_scroll"] == "1") echo ' checked="checked" '; ?>><?php _e("Scroll to accept cookie", "ginger"); ?>
91
  </label>
92
  </p>
93
  <p>
94
  <label>
95
+ <input name="ginger_scroll" type="radio" value="0" class="tog" <?php if(is_array($options) && $options["ginger_scroll"] == "0") echo ' checked="checked" '; ?>><?php _e("Keep banner after scroll", "ginger"); ?>
96
  </label>
97
  </p>
98
  </fieldset>
107
  </legend>
108
  <p>
109
  <label>
110
+ <input name="ginger_click_out" type="radio" value="1" class="tog" <?php if(is_array($options) && $options["ginger_click_out"] == "1") echo ' checked="checked" '; ?>><?php _e("Yes", "ginger"); ?>
111
  </label>
112
  </p>
113
  <p>
114
  <label>
115
+ <input name="ginger_click_out" type="radio" value="0" class="tog" <?php if(is_array($options) && $options["ginger_click_out"] == "0") echo ' checked="checked" '; ?>><?php _e("No", "ginger"); ?>
116
  </label>
117
  </p>
118
  </fieldset>
127
  </legend>
128
  <p>
129
  <label>
130
+ <input name="ginger_force_reload" type="radio" value="1" class="tog" <?php if(is_array($options) && $options["ginger_force_reload"] == "1") echo ' checked="checked" '; ?>><?php _e("Yes", "ginger"); ?>
131
  </label>
132
  </p>
133
  <p>
134
  <label>
135
+ <input name="ginger_force_reload" type="radio" value="0" class="tog" <?php if(is_array($options) && $options["ginger_force_reload"] == "0") echo ' checked="checked" '; ?>><?php _e("No", "ginger"); ?>
136
  </label>
137
  </p>
138
  </fieldset>
147
  </legend>
148
  <p>
149
  <label>
150
+ <input name="ginger_keep_banner" type="radio" value="1" class="tog" <?php if(is_array($options) && $options["ginger_keep_banner"] == "1") echo ' checked="checked" '; ?>><?php _e("Yes", "ginger"); ?>
151
  </label>
152
  </p>
153
  <p>
154
  <label>
155
+ <input name="ginger_keep_banner" type="radio" value="0" class="tog" <?php if(is_array($options) && $options["ginger_keep_banner"] == "0") echo ' checked="checked" '; ?>><?php _e("No", "ginger"); ?>
156
  </label>
157
  </p>
158
  <p>
174
  <label><?php _e("Select cookies duration", "ginger"); ?></label>
175
  <select name="ginger_cookie_duration">
176
  <option value=""><?php _e('Select', 'ginger')?></option>
177
+ <option value="1" <?php if (is_array($options) && $options['ginger_cookie_duration']=='1'){echo 'selected';}?>><?php _e('1 Day', 'ginger')?></option>
178
+ <option value="30" <?php if (is_array($options) && $options['ginger_cookie_duration']=='30'){echo 'selected';}?>><?php _e('1 Month', 'ginger')?></option>
179
+ <option value="365" <?php if (is_array($options) && $options['ginger_cookie_duration']=='365'){echo 'selected';}?>><?php _e('1 Year', 'ginger')?></option>
180
+ <option value="365000" <?php if (is_array($options) && $options['ginger_cookie_duration']=='365000'){echo 'selected';}?>><?php _e('For ever', 'ginger')?></option>
181
  </select>
182
  </p>
183
 
192
  <span><?php _e("Disable Ginger for logged users", "ginger"); ?></span>
193
  </legend>
194
  <label>
195
+ <input name="ginger_logged_users" type="radio" value="1" class="tog" <?php if(is_array($options) && isset($options["ginger_logged_users"]) && $options["ginger_logged_users"] == "1") echo ' checked="checked" '; ?>><?php _e("Yes", "ginger"); ?>
196
  </label>
197
  </p>
198
  <p>
199
  <label>
200
+ <input name="ginger_logged_users" type="radio" value="0" class="tog" <?php if(is_array($options) && (!isset($options["ginger_logged_users"]) || $options["ginger_logged_users"] == "0")) echo ' checked="checked" '; ?>><?php _e("No", "ginger"); ?>
201
  </label>
202
  </p>
203
  </p>
211
  <td>
212
  <fieldset>
213
  <div data-repeater-list="pagine_escluse">
214
+ <?php if (is_array($options) && !empty($options['pagine_escluse'])):?>
215
 
216
 
217
  <?php foreach ($options['pagine_escluse'] as $array_pagine):?>
ginger-eu-cookie-law.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Ginger - EU Cookie Law
4
  Plugin URI: http://www.ginger-cookielaw.com/
5
  Description: Make your website compliant with EU Cookie Policy! Now totally free and unlocked
6
- Version: 4.1.3
7
  Author: Manafactory
8
  Author URI: http://manafactory.it/
9
  License: GPLv2 or later
3
  Plugin Name: Ginger - EU Cookie Law
4
  Plugin URI: http://www.ginger-cookielaw.com/
5
  Description: Make your website compliant with EU Cookie Policy! Now totally free and unlocked
6
+ Version: 4.1.4
7
  Author: Manafactory
8
  Author URI: http://manafactory.it/
9
  License: GPLv2 or later
languages/ginger-it_IT.mo CHANGED
Binary file
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.ginger-cookielaw.com/
4
  Tags: EU Cookie Law, cookie law, block cookie, cookie consent, cookie law, cookie policy, privacy policy, cookie banner, italian cookie law, cookie italia, wpml, polylang
5
  Requires at least: 3.0.1
6
  Tested up to: 4.7.3
7
- Stable tag: 4.1.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -91,9 +91,6 @@ Yes, actually you we have 2 addons for multilanguages: wpml and polylang. Ask to
91
  == Changelog ==
92
 
93
 
94
- = 4.1.3 =
95
- * Dutch language
96
-
97
  = 4.1.2 =
98
  * bug fixing from github
99
 
4
  Tags: EU Cookie Law, cookie law, block cookie, cookie consent, cookie law, cookie policy, privacy policy, cookie banner, italian cookie law, cookie italia, wpml, polylang
5
  Requires at least: 3.0.1
6
  Tested up to: 4.7.3
7
+ Stable tag: 4.1.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
91
  == Changelog ==
92
 
93
 
 
 
 
94
  = 4.1.2 =
95
  * bug fixing from github
96