Ginger – EU Cookie Law - Version 2.3.3

Version Description

  • Import/Export Tool
  • notice fix
Download this release

Release Info

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

Code changes from version 2.3.2 to 2.3.3

addon/exporter/index.php ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Import/Export tool
4
+ */
5
+
6
+ add_action('ginger_add_menu', 'add_ginger_export', 100);
7
+ function add_ginger_export(){
8
+ add_submenu_page( 'ginger-setup', "Import Export", __("Import/Export", "ginger"), 'manage_options', 'ginger-export', 'ginger_export');
9
+ }
10
+
11
+
12
+ function ginger_export(){
13
+ if(isset($_POST["submit"]) && !wp_verify_nonce($_POST['save_ginger_export_options'], 'ginger_export_options')){
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
+ }
21
+ echo '<div class="updated"><p>'.__( 'All done! Your configuration was saved!', 'ginger' ).'</p></div>';
22
+ }else{
23
+ echo '<div class="updated error"><p>'.__( 'Error! Copied text is wrong...', 'ginger' ).'</p></div>';
24
+ }
25
+ }
26
+ ?>
27
+ <div class="wrap">
28
+ <h2>Ginger - Import/Export</h2>
29
+ <h3><?php _e("Export", "ginger"); ?></h3>
30
+ <p><?php _e("You can export your configuration and import it on a Ginger Managed websites!", "ginger"); ?></p>
31
+ <p><?php _e("Simply copy & paste this code in Import Textarea:", "ginger"); ?></p>
32
+ <textarea style="width:100%;" rows="10" ><?php
33
+ $export = array();
34
+
35
+ $export["ginger_general"] = get_option('ginger_general');
36
+ $export["ginger_banner"] = get_option('ginger_banner');
37
+ // $ $export["ginger_policy"] = get_option('ginger_policy');
38
+ $export["gingerjscustom"] = get_option('gingerjscustom');
39
+ $export["ginger_jscustom"]= get_option('ginger_jscustom_options');
40
+ $export["gingeradsense"] = get_option('gingeradsense');
41
+ $export["gingerwpml"] = get_option('gingerwpml');
42
+ $export["ginger_wpml_options"] = get_option('ginger_wpml_options');
43
+ $export["gingerpolylang"] = get_option('gingerpolylang');
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">
51
+
52
+ <br>
53
+ <hr>
54
+ <h3><?php _e("Import", "ginger"); ?></h3>
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>
62
+
63
+ <input type="submit" value="<?php _e("Import Configuration", "ginger"); ?>" class="button" />
64
+ </form>
65
+ </div>
66
+ <?php
67
+ }
admin/ginger.admin.php CHANGED
@@ -18,11 +18,11 @@ if(isset($_POST["submit"])){
18
  unset($params["_wp_http_referer"]);
19
 
20
  if ($key=='ginger_banner'){
21
- if ($params["disable_cookie_button_status"]!='1'){
22
  $params["disable_cookie_button_status"]='0';
23
 
24
  }
25
- if ($params["read_more_button_status"]!='1'){
26
  $params["read_more_button_status"]='0';
27
  }
28
 
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
 
ginger-eu-cookie-law.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Ginger - EU Cookie Law
4
  Plugin URI: http://manafactory.it/
5
  Description: Make your website compliant with EU Cookie Policy.
6
- Version: 2.3.2
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://manafactory.it/
5
  Description: Make your website compliant with EU Cookie Policy.
6
+ Version: 2.3.3
7
  Author: Manafactory
8
  Author URI: http://manafactory.it/
9
  License: GPLv2 or later
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: 2.3.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -93,6 +93,10 @@ Yes, actually you we have 2 addons for multilanguages: wpml and polylang. Ask to
93
 
94
  == Changelog ==
95
 
 
 
 
 
96
  = 2.3.2 =
97
  * Doubleclick Adsense addon
98
 
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: 2.3.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
93
 
94
  == Changelog ==
95
 
96
+ = 2.3.3 =
97
+ * Import/Export Tool
98
+ * notice fix
99
+
100
  = 2.3.2 =
101
  * Doubleclick Adsense addon
102