Ginger – EU Cookie Law - Version 3.0.1

Version Description

Download this release

Release Info

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

Code changes from version 3.0 to 3.0.1

admin/ginger.about.php CHANGED
@@ -2,13 +2,13 @@
2
  <div class="wrap">
3
  <div style="background-color: #F99A30; padding:10px;">
4
 
5
- <a href="http://www.ginger-cookielaw.com/download/" target="_blank" ><img src="http://www.ginger-cookielaw.com/wp-content/uploads/2015/07/logo-head.png" style="float: left;"></a>
6
  <p style="color: #FFFFFF; font-size: 30px; ">Need more?<br> Import-Export tools, Dinamic Google Analytics, Custom JS configurator, Logger, Multilanguage Tools, and more </p>
7
 
8
  </div>
9
 
10
 
11
- <div style="text-align: center; margin:60px 0px;"><h1 style="font-size: 40px; "><a href="http://www.ginger-cookielaw.com/download/" target="_blank" style="border-bottom: solid 6px #F99A30; color:#F99A30;text-decoration: none;">GET GINGER TOOLS INSTALLER!</h1></div>
12
 
13
 
14
  <br style="clear:both;">
2
  <div class="wrap">
3
  <div style="background-color: #F99A30; padding:10px;">
4
 
5
+ <a href="http://www.ginger-cookielaw.com/download/" target="_blank" ><img src="<?php echo plugins_url('/ginger/admin/img/logo-head.png')?>" style="float: left;"></a>
6
  <p style="color: #FFFFFF; font-size: 30px; ">Need more?<br> Import-Export tools, Dinamic Google Analytics, Custom JS configurator, Logger, Multilanguage Tools, and more </p>
7
 
8
  </div>
9
 
10
 
11
+ <div style="text-align: center; margin:60px 0px;"><h1 style="font-size: 40px; "><a href="http://www.ginger-cookielaw.com/download/" target="_blank" style="border-bottom: solid 6px #F99A30; color:#F99A30;text-decoration: none;">GET GINGER TOOLS INSTALLER!</a></h1></div>
12
 
13
 
14
  <br style="clear:both;">
admin/ginger.admin.php CHANGED
@@ -7,6 +7,11 @@ else:
7
  $key = "ginger_general";
8
  endif;
9
 
 
 
 
 
 
10
  if(isset($_POST["submit"]) && !wp_verify_nonce($_POST['ginger_options'], 'save_ginger_options')){
11
  return;
12
  }
@@ -17,50 +22,47 @@ if(isset($_POST["submit"])){
17
  unset($params["ginger_options"]);
18
  unset($params["_wp_http_referer"]);
19
 
20
- if ($key=='ginger_banner'){
 
21
  if (isset($params["disable_cookie_button_status"]) && $params["disable_cookie_button_status"]!='1'){
22
  $params["disable_cookie_button_status"]='0';
23
-
24
  }
25
  if (isset($params["read_more_button_status"]) && $params["read_more_button_status"]!='1'){
26
  $params["read_more_button_status"]='0';
27
  }
28
 
29
-
30
  }
 
 
31
 
 
 
32
 
33
- if ($key=='ginger_policy'){
34
- if ($_POST["choice"]=="new_page"){
35
-
36
- // controllo se il nome della privacy page è già esistente.
37
- if (get_page_by_title( $_POST["privacy_page_title"], $output, 'page' )){
38
-
39
- $control_page=get_page_by_title( $_POST["privacy_page_title"], $output, 'page' );
40
- if ($control_page->post_status=='publish') {
41
- $control_page_id = $control_page->ID;
42
- $privacy_page_id = $control_page_id;
43
- echo '<div class="updated"><p>'.__( 'The page with the specified title already exists and is your current privacy policy page!', 'ginger' ).'</p></div>';
44
-
45
- }else{
46
-
47
- $id_privacy_new_page=save_privacy_page($_POST["privacy_page_title"],$_POST["privacy_page_content"]);
48
- $privacy_page_id=$id_privacy_new_page;
49
- }
50
 
 
51
 
52
- }else{
53
  $id_privacy_new_page=save_privacy_page($_POST["privacy_page_title"],$_POST["privacy_page_content"]);
54
  $privacy_page_id=$id_privacy_new_page;
55
- }
56
-
57
- }else{
58
- $privacy_page_id=$_POST["ginger_privacy_page"];
59
  }
60
- update_option($key, $privacy_page_id);
61
  }else{
62
- update_option($key, $params);
 
63
  }
 
 
 
 
 
 
 
 
 
64
  echo '<div class="updated"><p>'.__( 'Updated!', 'ginger' ).'</p></div>';
65
  }
66
 
7
  $key = "ginger_general";
8
  endif;
9
 
10
+ if($tab == 'banner'):
11
+ wp_enqueue_script('jquery-textarea', plugins_url('/ginger/admin/js/jquery_lined_textarea/jquery-linedtextarea.js'), array( 'jquery' ) );
12
+ wp_enqueue_style('textarea-style', plugins_url('/ginger/admin/js/jquery_lined_textarea/jquery-linedtextarea.css'));
13
+ endif;
14
+
15
  if(isset($_POST["submit"]) && !wp_verify_nonce($_POST['ginger_options'], 'save_ginger_options')){
16
  return;
17
  }
22
  unset($params["ginger_options"]);
23
  unset($params["_wp_http_referer"]);
24
 
25
+ if ($key == 'ginger_banner'){
26
+
27
  if (isset($params["disable_cookie_button_status"]) && $params["disable_cookie_button_status"]!='1'){
28
  $params["disable_cookie_button_status"]='0';
 
29
  }
30
  if (isset($params["read_more_button_status"]) && $params["read_more_button_status"]!='1'){
31
  $params["read_more_button_status"]='0';
32
  }
33
 
 
34
  }
35
+ if ($key=='ginger_policy'){
36
+ if ($_POST["choice"]=="new_page"){
37
 
38
+ // controllo se il nome della privacy page è già esistente.
39
+ if (get_page_by_title( sanitize_text_field($_POST["privacy_page_title"]), $output, 'page' )){
40
 
41
+ $control_page=get_page_by_title( sanitize_text_field($_POST["privacy_page_title"]), $output, 'page' );
42
+ if ($control_page->post_status=='publish') {
43
+ $control_page_id = $control_page->ID;
44
+ $privacy_page_id = $control_page_id;
45
+ echo '<div class="updated"><p>'.__( 'The page with the specified title already exists and is your current privacy policy page!', 'ginger' ).'</p></div>';
 
 
 
 
 
 
 
 
 
 
 
 
46
 
47
+ }else{
48
 
 
49
  $id_privacy_new_page=save_privacy_page($_POST["privacy_page_title"],$_POST["privacy_page_content"]);
50
  $privacy_page_id=$id_privacy_new_page;
 
 
 
 
51
  }
52
+
53
  }else{
54
+ $id_privacy_new_page=save_privacy_page($_POST["privacy_page_title"],$_POST["privacy_page_content"]);
55
+ $privacy_page_id=$id_privacy_new_page;
56
  }
57
+
58
+ }else{
59
+ $privacy_page_id = intval($_POST["ginger_privacy_page"]);
60
+ }
61
+ if(is_int($privacy_page_id)):
62
+ update_option($key, $privacy_page_id);
63
+ endif;
64
+ }else{
65
+ update_option($key, $params);}
66
  echo '<div class="updated"><p>'.__( 'Updated!', 'ginger' ).'</p></div>';
67
  }
68
 
admin/img/logo-head.png ADDED
Binary file
admin/js/ginger.js CHANGED
@@ -63,4 +63,10 @@ function en_dis_able_add_on(id,id_img,id_text){
63
  document.getElementById(id_img).src='../wp-content/plugins/ginger/img/xx.png';
64
  }
65
 
66
- }
 
 
 
 
 
 
63
  document.getElementById(id_img).src='../wp-content/plugins/ginger/img/xx.png';
64
  }
65
 
66
+ }
67
+
68
+ jQuery(function() {
69
+ jQuery(".lined").linedtextarea(
70
+ {selectedLine: 1}
71
+ );
72
+ });
admin/partial/banner.php CHANGED
@@ -215,15 +215,3 @@
215
  </tr>
216
  </tbody>
217
  </table>
218
-
219
-
220
- <script src="<?php echo plugins_url('/ginger/admin/js/jquery_lined_textarea/jquery-linedtextarea.js')?>"></script>
221
- <link href="<?php echo plugins_url('/ginger/admin/js/jquery_lined_textarea/jquery-linedtextarea.css')?>" type="text/css" rel="stylesheet" />
222
-
223
- <script>
224
- jQuery(function() {
225
- jQuery(".lined").linedtextarea(
226
- {selectedLine: 1}
227
- );
228
- });
229
- </script>
215
  </tr>
216
  </tbody>
217
  </table>
 
 
 
 
 
 
 
 
 
 
 
 
admin/partial/bar.php CHANGED
@@ -1,6 +1,4 @@
1
- <?php
2
 
3
- ?>
4
  <table class="form-table striped">
5
  <thead>
6
  <tr>
@@ -66,6 +64,3 @@
66
 
67
 
68
  </tbody></table>
69
-
70
-
71
- <?php
 
1
 
 
2
  <table class="form-table striped">
3
  <thead>
4
  <tr>
64
 
65
 
66
  </tbody></table>
 
 
 
admin/partial/link.php DELETED
@@ -1,95 +0,0 @@
1
- <?php
2
-
3
- ?>
4
- <table class="form-table striped">
5
- <thead>
6
- <tr>
7
- <td colspan="2">
8
- <h2><?php _e("Link", "ginger"); ?></h2>
9
- </td>
10
- </tr>
11
- <tr>
12
- <td>
13
- <div data-repeater-list="group-a">
14
- <?php
15
-
16
- if ($options) {
17
- foreach ($options['group-a'] as $option) {
18
- ?>
19
- <div data-repeater-item>
20
-
21
- URL: <input type="text" name="ginger_url" value="<?php echo $option['ginger_url'];?>"/>
22
-
23
- Enable:&nbsp;SI&nbsp;<input type="radio" name="ginger_url_enable" value="1" <?php if ($option['ginger_url_enable']==1){ echo 'checked';}?>/>
24
- NO&nbsp;<input type="radio" name="ginger_url_enable" value="0" <?php if ($option['ginger_url_enable']==0){ echo 'checked';}?>/>
25
-
26
-
27
- <input data-repeater-delete type="button" value="Delete"/>
28
- </div>
29
- <?php
30
- }
31
- }else{
32
- ?>
33
- <div data-repeater-item>
34
-
35
- URL: <input type="text" name="ginger_url" value=""/>
36
-
37
- Enable:&nbsp;SI&nbsp;<input type="radio" name="ginger_url_enable" value="1" />
38
- NO&nbsp;<input type="radio" name="ginger_url_enable" value="0" />
39
-
40
-
41
- <input data-repeater-delete type="button" value="Delete"/>
42
- </div>
43
- <?php
44
-
45
- }
46
- ?>
47
- </div>
48
- <input data-repeater-create type="button" value="Add Url"/>
49
-
50
- </td>
51
-
52
- </tr>
53
- </thead>
54
- </table>
55
-
56
-
57
-
58
-
59
-
60
- <script src="../wp-content/plugins/ginger/admin/js/jquery.repeater-master/jquery.repeater.js"></script>
61
- <script>
62
- jQuery(document).ready(function () {
63
- 'use strict';
64
- jQuery('.repeater').repeater({
65
- defaultValues: {
66
- //'textarea-input': 'foo',
67
- 'ginger_url': '',
68
- //'select-input': 'B',
69
- //'checkbox-input': ['A', 'B'],
70
- 'ginger_url_enable': '1'
71
- },
72
- show: function () {
73
- jQuery(this).slideDown();
74
- },
75
- hide: function (deleteElement) {
76
- if(confirm('Are you sure you want to delete this element?')) {
77
- jQuery(this).slideUp(deleteElement);
78
- }
79
- }
80
- });
81
- });
82
- </script>
83
- <?php
84
-
85
-
86
- ?>
87
-
88
-
89
-
90
-
91
-
92
-
93
- <?php
94
-
95
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
front/gingerfront.utils.php CHANGED
@@ -19,6 +19,7 @@ function ginger_style_script() {
19
  wp_register_style( 'ginger-style', plugin_dir_url( __FILE__ ) . 'css/cookies-enabler.css' );
20
  wp_enqueue_style( 'ginger-style' );
21
  endif;
 
22
  }
23
 
24
  //Aggioungo i custom style
@@ -113,8 +114,7 @@ function ginger_script(){ ?>
113
  $label_disable_cookie = ginger_get_label_disable_cookie($option_ginger_bar);
114
 
115
  ?>
116
- <!-- Ginger Script -->
117
- <script src="<?php echo plugin_dir_url( __FILE__ ); ?>js/cookies-enabler.min.js"></script>
118
  <!-- Init the script -->
119
  <script>
120
  COOKIES_ENABLER.init({
19
  wp_register_style( 'ginger-style', plugin_dir_url( __FILE__ ) . 'css/cookies-enabler.css' );
20
  wp_enqueue_style( 'ginger-style' );
21
  endif;
22
+ wp_enqueue_script('gigner-cookies-enabler', plugin_dir_url( __FILE__ ) . "js/cookies-enabler.min.js" );
23
  }
24
 
25
  //Aggioungo i custom style
114
  $label_disable_cookie = ginger_get_label_disable_cookie($option_ginger_bar);
115
 
116
  ?>
117
+
 
118
  <!-- Init the script -->
119
  <script>
120
  COOKIES_ENABLER.init({
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! For more features get <a href="">Ginger Plus - Tools Installer</a>
6
- Version: 3.0
7
  Author: Manafactory
8
  Author URI: http://manafactory.it/
9
  License: GPLv2 or later
@@ -26,4 +26,4 @@ if(!is_admin()){
26
  require_once("front/gingerfront.core.php");
27
  }
28
 
29
- add_filter('plugin_action_links_' . plugin_basename(__FILE__), 'render_ginger_action_links');
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! For more features get <a href="">Ginger Plus - Tools Installer</a>
6
+ Version: 3.0.1
7
  Author: Manafactory
8
  Author URI: http://manafactory.it/
9
  License: GPLv2 or later
26
  require_once("front/gingerfront.core.php");
27
  }
28
 
29
+ add_filter('plugin_action_links_' . plugin_basename(__FILE__), 'render_ginger_action_links');
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
5
  Requires at least: 3.0.1
6
  Tested up to: 4.3
7
- Stable tag: 3.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
4
  Tags: EU Cookie Law, cookie law, block cookie, cookie consent, cookie law, cookie policy, privacy policy, cookie banner, italian cookie law, cookie italia
5
  Requires at least: 3.0.1
6
  Tested up to: 4.3
7
+ Stable tag: 3.0.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10