Version Description
Download this release
Release Info
Developer | matteobarale |
Plugin | Ginger – EU Cookie Law |
Version | 2.0 |
Comparing to | |
See all releases |
Code changes from version 1.2.2 to 2.0
- addon/adsense/ginger.adsense.php +65 -0
- addon/adsense/index.php +80 -0
- addon/analytics/ginger.analytics.php +176 -0
- addon/analytics/gingeranalytics.js +34 -0
- addon/analytics/gingeranalytics.min.js +1 -0
- addon/analytics/index.php +80 -0
- addon/ginger.addon.utils.php +184 -0
- addon/ginger.addoncheck.php +31 -0
- addon/wpml/ginger.wpml.php +230 -0
- addon/wpml/index.php +175 -0
- admin/ginger.admin.php +4 -1
- admin/ginger.utils.php +6 -3
- admin/js/ginger.js +24 -2
- admin/partial/banner.php +2 -2
- admin/partial/policy.php +5 -15
- front/css/cookies-enabler-dialog.css +3 -3
- front/css/cookies-enabler.css +3 -3
- front/gingerfront.core.php +227 -0
- front/gingerfront.utils.php +22 -197
- front/js/cookies-enabler.min.js +1 -1
- ginger-eu-cookie-law.php +7 -4
- languages/ginger-it_IT.mo +0 -0
- languages/ginger-it_IT.po +470 -21
addon/adsense/ginger.adsense.php
ADDED
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Created by PhpStorm.
|
4 |
+
* User: matteobarale
|
5 |
+
* Date: 26/06/15
|
6 |
+
* Time: 12:02
|
7 |
+
*/
|
8 |
+
|
9 |
+
add_action('ginger_add_menu', 'add_ginger_adsense');
|
10 |
+
function add_ginger_adsense(){
|
11 |
+
add_submenu_page( 'ginger-setup', "Ginger Adsense", __("Google Adsense", "ginger"), 'manage_options', 'ginger-adsense', 'ginger_adsense');
|
12 |
+
}
|
13 |
+
|
14 |
+
function ginger_adsense(){
|
15 |
+
|
16 |
+
$wp_root = dirname(dirname( dirname( dirname( dirname( dirname( __FILE__ ) ) ) ) ));
|
17 |
+
if ( file_exists( $wp_root . '/wp-load.php' ) ) {
|
18 |
+
require_once( $wp_root . "/wp-load.php" );
|
19 |
+
} else {
|
20 |
+
exit;
|
21 |
+
}
|
22 |
+
|
23 |
+
if ( ! current_user_can( 'manage_options' ) ) die();
|
24 |
+
|
25 |
+
|
26 |
+
$option_analitycs = get_option('gingeradsense');
|
27 |
+
$activationemail = $option_analitycs['email'];
|
28 |
+
$activationcode = $option_analitycs['licence_key'];
|
29 |
+
$product_id = $option_analitycs['product_id'];
|
30 |
+
$instance = $option_analitycs['instance'];
|
31 |
+
|
32 |
+
|
33 |
+
$args = array(
|
34 |
+
'wc-api' => 'software-api',
|
35 |
+
'request' => 'check',
|
36 |
+
'email' => $activationemail,
|
37 |
+
'licence_key' => $activationcode,
|
38 |
+
'product_id' => $product_id,
|
39 |
+
'instance' => $instance
|
40 |
+
);
|
41 |
+
|
42 |
+
$data = execute_request( $args );
|
43 |
+
if($data->success == 1): //Inizio Verifica ?>
|
44 |
+
<div class="wrap">
|
45 |
+
<?php $option = get_option('gingeradsense_option');?>
|
46 |
+
<h2>Ginger - Adsense Add On</h2>
|
47 |
+
<p><?php _e("No configuration required!", "ginger"); ?></p>
|
48 |
+
|
49 |
+
</div>
|
50 |
+
<?php else: //La licenza sembra non essere valida; ?>
|
51 |
+
<?php $option = get_option('gingeradsense');
|
52 |
+
$option['activated'] = 0; update_option('gingeradsense', $option); ?>
|
53 |
+
<div class="wrap">
|
54 |
+
<h2>Ginger - Adsense Add On</h2>
|
55 |
+
<p><?php _e("Licence key look inactive. Addon disabled", "ginger"); ?></p>
|
56 |
+
<p><?php _e("If you think is an error contact us here:", "ginger"); ?> <a href="http://www.ginger-cookielaw.com/">www.ginger-cookielaw.com/</a></p>
|
57 |
+
</div>
|
58 |
+
<?php endif; ?>
|
59 |
+
|
60 |
+
|
61 |
+
<?php }
|
62 |
+
add_filter('ginger_script_async_tags', 'ginger_addsesneremover',10,3);
|
63 |
+
function ginger_addsesneremover($array){
|
64 |
+
return array_merge($array, array('adsbygoogle'));
|
65 |
+
}
|
addon/adsense/index.php
ADDED
@@ -0,0 +1,80 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
//Adsense
|
3 |
+
$option_adense = get_option('gingeradsense');
|
4 |
+
if($option_adense && $option_adense['activated'] == 1):
|
5 |
+
require_once('ginger.adsense.php');
|
6 |
+
endif;
|
7 |
+
|
8 |
+
add_action("ginger_addon_activation_page", "ginger_adsense_activation_page");
|
9 |
+
|
10 |
+
function ginger_adsense_activation_page()
|
11 |
+
{
|
12 |
+
|
13 |
+
|
14 |
+
?>
|
15 |
+
<table class="form-table striped">
|
16 |
+
<thead>
|
17 |
+
<tr>
|
18 |
+
<td colspan="2">
|
19 |
+
<h3><?php _e("Google AdSense", "ginger"); ?></h3>
|
20 |
+
<small><?php _e("This add-on blocks cookies and ads created by Google AdSense, until user's acceptation.", "ginger"); ?></small>
|
21 |
+
<p>
|
22 |
+
|
23 |
+
<b style="color:#F99A30"><?php _e("Get activation code here:", "ginger"); ?> <a href="http://www.ginger-cookielaw.com/prodotto/adsense/" target="_BLANK">http://www.ginger-cookielaw.com/prodotto/adsense/</a></b>
|
24 |
+
</p>
|
25 |
+
</td>
|
26 |
+
</tr>
|
27 |
+
</thead>
|
28 |
+
<tbody>
|
29 |
+
<tr>
|
30 |
+
|
31 |
+
<td>
|
32 |
+
<fieldset>
|
33 |
+
<legend class="screen-reader-text"><span><?php _e("Google AdSense", "ginger"); ?></span></legend>
|
34 |
+
<p>
|
35 |
+
<label>
|
36 |
+
<?php _e("Active add-on", "ginger");?>:
|
37 |
+
</label>
|
38 |
+
<?php $option_ginger_analitics = get_option('gingeradsense');?>
|
39 |
+
<?php if ($option_ginger_analitics && $option_ginger_analitics['activated'] == 1): ?>
|
40 |
+
<img id="img_google_analytics"
|
41 |
+
src="<?php echo plugins_url('/ginger/img/ok.png'); ?>"
|
42 |
+
style="max-width: 20px; max-height: 20px; vertical-align: middle">
|
43 |
+
|
44 |
+
<form method="get" action="<?php echo admin_url('admin.php?page=ginger-add-on'); ?>">
|
45 |
+
<input type="hidden" name="page" value="ginger-add-on">
|
46 |
+
<input id="activationcode" type="text" name="activationcode"
|
47 |
+
value="<?php echo $option_ginger_analitics['licence_key']; ?>" placeholder=""
|
48 |
+
size="30px">
|
49 |
+
<input id="activationmail" type="text" name="activationmail"
|
50 |
+
value="<?php echo $option_ginger_analitics['email']; ?>" placeholder="" size="30px">
|
51 |
+
<input type="hidden" name="product_id" value="gingeradsense">
|
52 |
+
<input type="hidden" name="request" value="deactivation">
|
53 |
+
<input type="submit" class="button" value="<?php _e('Deactivate', 'ginger') ?>">
|
54 |
+
</form>
|
55 |
+
<?php else: ?>
|
56 |
+
<img id="img_google_analytics"
|
57 |
+
src="<?php echo plugins_url('/ginger/img/xx.png'); ?>"
|
58 |
+
style="max-width: 20px; max-height: 20px; vertical-align: middle">
|
59 |
+
<form method="get" action="<?php echo admin_url('admin.php?page=ginger-add-on'); ?>">
|
60 |
+
<input type="hidden" name="page" value="ginger-add-on">
|
61 |
+
<input id="activationcode" type="text" name="activationcode" value=""
|
62 |
+
placeholder="<?php _e('Insert here the add-on activation code.', 'ginger') ?>"
|
63 |
+
size="30px">
|
64 |
+
<input id="activationmail" type="text" name="activationmail" value=""
|
65 |
+
placeholder="<?php _e('Insert here your activation mail.', 'ginger') ?>" size="30px">
|
66 |
+
<input type="hidden" name="product_id" value="gingeradsense">
|
67 |
+
<input type="hidden" name="request" value="activation">
|
68 |
+
<input type="submit" class="button" value="<?php _e('Activate', 'ginger') ?>">
|
69 |
+
</form>
|
70 |
+
<?php endif; ?>
|
71 |
+
</p>
|
72 |
+
</fieldset>
|
73 |
+
</td>
|
74 |
+
</tr>
|
75 |
+
|
76 |
+
</tbody>
|
77 |
+
</table>
|
78 |
+
<?php
|
79 |
+
|
80 |
+
}
|
addon/analytics/ginger.analytics.php
ADDED
@@ -0,0 +1,176 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Created by PhpStorm.
|
4 |
+
* User: matteobarale
|
5 |
+
* Date: 26/06/15
|
6 |
+
* Time: 12:02
|
7 |
+
*/
|
8 |
+
|
9 |
+
add_action('ginger_add_menu', 'add_ginger_analytics');
|
10 |
+
function add_ginger_analytics(){
|
11 |
+
add_submenu_page( 'ginger-setup', "Ginger Analytics", __("Google Analytics", "ginger"), 'manage_options', 'ginger-analytics', 'ginger_analytics');
|
12 |
+
}
|
13 |
+
|
14 |
+
function ginger_analytics(){
|
15 |
+
|
16 |
+
$wp_root = dirname(dirname( dirname( dirname( dirname( dirname( __FILE__ ) ) ) ) ));
|
17 |
+
if ( file_exists( $wp_root . '/wp-load.php' ) ) {
|
18 |
+
require_once( $wp_root . "/wp-load.php" );
|
19 |
+
} else {
|
20 |
+
exit;
|
21 |
+
}
|
22 |
+
|
23 |
+
if ( ! current_user_can( 'manage_options' ) ) die();
|
24 |
+
|
25 |
+
|
26 |
+
$option_analitycs = get_option('gingeranalytics');
|
27 |
+
$activationemail = $option_analitycs['email'];
|
28 |
+
$activationcode = $option_analitycs['licence_key'];
|
29 |
+
$product_id = $option_analitycs['product_id'];
|
30 |
+
$instance = $option_analitycs['instance'];
|
31 |
+
|
32 |
+
|
33 |
+
$args = array(
|
34 |
+
'wc-api' => 'software-api',
|
35 |
+
'request' => 'check',
|
36 |
+
'email' => $activationemail,
|
37 |
+
'licence_key' => $activationcode,
|
38 |
+
'product_id' => $product_id,
|
39 |
+
'instance' => $instance
|
40 |
+
);
|
41 |
+
|
42 |
+
$data = execute_request( $args );
|
43 |
+
if($data->success == 1): //Inizio Verifica ?>
|
44 |
+
<?php
|
45 |
+
if($_POST):
|
46 |
+
if(isset($_POST['enable_ginger_analytics']) && $_POST['enable_ginger_analytics'] == 1):
|
47 |
+
$content = file_get_contents(get_bloginfo('url') .'/?analytics=check');
|
48 |
+
$array_to_check = array(
|
49 |
+
'www.google-analytics.com/analytics.js',
|
50 |
+
'google-analytics.com/ga.js',
|
51 |
+
'_getTracker',
|
52 |
+
);
|
53 |
+
|
54 |
+
foreach($array_to_check as $check):
|
55 |
+
if(strpos( $content, $check) !== false):
|
56 |
+
$find = 'trovatocodice';
|
57 |
+
$_POST['enable_ginger_analytics'] = 0;
|
58 |
+
break;
|
59 |
+
endif;
|
60 |
+
endforeach;
|
61 |
+
|
62 |
+
endif;
|
63 |
+
$args = array(
|
64 |
+
'enable_ginger_analytics' => $_POST['enable_ginger_analytics'],
|
65 |
+
'ginger_analytics_code' => $_POST['ginger_analytics_code'],
|
66 |
+
'anonymize_ginger_analytics' => $_POST['anonymize_ginger_analytics']
|
67 |
+
);
|
68 |
+
update_option('gingeranalytics_option', $args);
|
69 |
+
endif;
|
70 |
+
?>
|
71 |
+
<div class="wrap">
|
72 |
+
<?php $option = get_option('gingeranalytics_option');?>
|
73 |
+
<h2>Ginger - Analytics Add On</h2>
|
74 |
+
<?php if(isset($find)): ?>
|
75 |
+
<h3><?php _e("Attenzione è stato trovato un codice analytics nella pagina", "ginger"); ?></h3>
|
76 |
+
<?php endif; ?>
|
77 |
+
<form method="post" action="admin.php?page=<?php echo $_GET["page"]; ?>">
|
78 |
+
<?php wp_nonce_field('save_ginger_analytics_options', 'ginger_analytics_options'); ?>
|
79 |
+
<table class="form-table striped">
|
80 |
+
<thead>
|
81 |
+
<tr>
|
82 |
+
<td colspan="2">
|
83 |
+
<h3><?php _e('Impostazioni Add on', 'ginger'); ?></h3>
|
84 |
+
</td>
|
85 |
+
</tr>
|
86 |
+
</thead>
|
87 |
+
<tr>
|
88 |
+
<th scope="row" style="padding-left:20px;"><?php _e("Enable Ginger Analytics", "ginger"); ?></th>
|
89 |
+
<td>
|
90 |
+
<fieldset>
|
91 |
+
<legend class="screen-reader-text"><span><?php _e("Enable Ginger Analytics", "ginger"); ?></span></legend>
|
92 |
+
<p>
|
93 |
+
<label>
|
94 |
+
<input name="enable_ginger_analytics" type="radio" value="1" class="tog" <?php if(isset($option['enable_ginger_analytics']) && $option['enable_ginger_analytics'] == 1 ): echo 'checked'; endif;?>>Abilitato
|
95 |
+
</label>
|
96 |
+
</p>
|
97 |
+
<p>
|
98 |
+
<label>
|
99 |
+
<input name="enable_ginger_analytics" type="radio" value="0" class="tog" <?php if(isset($option['enable_ginger_analytics']) && $option['enable_ginger_analytics'] == 0 ): echo 'checked'; endif;?>>Disabilitato
|
100 |
+
</label>
|
101 |
+
</p>
|
102 |
+
</fieldset>
|
103 |
+
</td>
|
104 |
+
</tr>
|
105 |
+
<tr>
|
106 |
+
<th scope="row" style="padding-left:20px;"><?php _e("Codice Analytics (Ex: UA-XXXXXXX-X)", "ginger"); ?></th>
|
107 |
+
<td>
|
108 |
+
<fieldset>
|
109 |
+
<legend class="screen-reader-text"><span><?php _e("Codice Analytics (Ex: UA-XXXXXXX-X)", "ginger"); ?></span></legend>
|
110 |
+
<p>
|
111 |
+
<label>
|
112 |
+
<input name="ginger_analytics_code" type="text" value="<?php if(isset($option['ginger_analytics_code']) && $option['ginger_analytics_code'] != '' ): echo $option['ginger_analytics_code']; endif;?>" placeholder="<?php _e('Inserisci qui il tuo traking code', 'ginger'); ?>">
|
113 |
+
</label>
|
114 |
+
</p>
|
115 |
+
</fieldset>
|
116 |
+
</td>
|
117 |
+
</tr>
|
118 |
+
</table>
|
119 |
+
<p class="submit"><input type="submit" name="submit" id="submit" class="button button-primary" value="<?php _e("Save Changes", "ginger"); ?>"></p>
|
120 |
+
</form>
|
121 |
+
</div>
|
122 |
+
<?php else: //La licenza sembra non essere valida; ?>
|
123 |
+
<?php $option = get_option('gingeranalytics'); $option['activated'] = 0; update_option('gingeranalytics', $option); ?>
|
124 |
+
<div class="wrap">
|
125 |
+
<h2>Ginger - Analytics Add On</h2>
|
126 |
+
<p>Il codice di licenza sembra non essere attivo per questo sito l'add-on verra disinstallato</p>
|
127 |
+
<p>Se ritieni ci sia stato un errore in questa verifica contattaci</p>
|
128 |
+
</div>
|
129 |
+
<?php endif; ?>
|
130 |
+
|
131 |
+
|
132 |
+
<?php }
|
133 |
+
|
134 |
+
add_action('wp_footer', 'ginger_analytics_code');
|
135 |
+
function ginger_analytics_code(){ ?>
|
136 |
+
<?php if(isset($_GET) && isset($_GET['analytics']) && $_GET['analytics'] == 'check') return; ?>
|
137 |
+
<?php $option = get_option('gingeranalytics_option');?>
|
138 |
+
<?php if(isset($option['enable_ginger_analytics']) && $option['enable_ginger_analytics'] == 1): ?>
|
139 |
+
<!-- Ginger Analytics code -->
|
140 |
+
<script>
|
141 |
+
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
142 |
+
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
143 |
+
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
144 |
+
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
145 |
+
|
146 |
+
|
147 |
+
</script>
|
148 |
+
<!-- End Ginger Analytics code -->
|
149 |
+
<?php endif; ?>
|
150 |
+
<?php }
|
151 |
+
|
152 |
+
|
153 |
+
add_action( 'wp_head', 'ginger_anyltics_script_anonymize');
|
154 |
+
function ginger_anyltics_script_anonymize(){ ?>
|
155 |
+
<?php $option = get_option('gingeranalytics_option');?>
|
156 |
+
<script>var ginger_anyltics_add_on = 1; var ginger_analytics_code = "<?php if(isset($option['ginger_analytics_code']) && $option['ginger_analytics_code'] != '' ): echo $option['ginger_analytics_code']; endif;?>"</script>
|
157 |
+
<?php }
|
158 |
+
|
159 |
+
// Registro script per il controllo dello script Analytics
|
160 |
+
add_action( 'wp_enqueue_scripts', 'ginger_analytics_style_script' );
|
161 |
+
function ginger_analytics_style_script() {
|
162 |
+
wp_register_script( 'ginger-analytics_script', plugin_dir_url( __FILE__ ) . 'gingeranalytics.min.js' );
|
163 |
+
wp_enqueue_script( 'ginger-analytics_script' );
|
164 |
+
}
|
165 |
+
|
166 |
+
add_filter('ginger_script_tags', 'ginger_analytics_remover',10,3);
|
167 |
+
function ginger_analytics_remover($array){
|
168 |
+
$option = get_option('gingeranalytics_option');
|
169 |
+
if(isset($option['enable_ginger_analytics']) && $option['enable_ginger_analytics'] == 1 ):
|
170 |
+
$pos = array_search('www.google-analytics.com/analytics.js', $array);
|
171 |
+
unset($array[$pos]);
|
172 |
+
$pos = array_search('google-analytics.com/ga.js', $array);
|
173 |
+
unset($array[$pos]);
|
174 |
+
return $array;
|
175 |
+
endif;
|
176 |
+
}
|
addon/analytics/gingeranalytics.js
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Created by matteobarale on 09/07/15.
|
3 |
+
*/
|
4 |
+
window.onload = function() {
|
5 |
+
if (typeof(ginger_analytics_code) !== 'undefined') {
|
6 |
+
var code = ginger_analytics_code;
|
7 |
+
}else{
|
8 |
+
var code = 'UA-XXXX-Y';
|
9 |
+
}
|
10 |
+
console.log(getCookie('ginger-cookie'));
|
11 |
+
|
12 |
+
if(getCookie('ginger-cookie') == 'Y'){
|
13 |
+
var gacode = "ga('create', '" + code + "', 'auto'); ga('send', 'pageview');";
|
14 |
+
}else{
|
15 |
+
var gacode = "ga('create', '" + code + "', 'auto'); ga('set', 'anonymizeIP', true); ga('send', 'pageview');";
|
16 |
+
}
|
17 |
+
|
18 |
+
var scriptanalytics = document.createElement('script');
|
19 |
+
scriptanalytics.type = 'text/javascript';
|
20 |
+
scriptanalytics.innerHTML = gacode;
|
21 |
+
console.log(scriptanalytics);
|
22 |
+
document.getElementsByTagName('head')[0].appendChild(scriptanalytics);
|
23 |
+
}
|
24 |
+
|
25 |
+
function getCookie(cname) {
|
26 |
+
var name = cname + "=";
|
27 |
+
var ca = document.cookie.split(';');
|
28 |
+
for(var i=0; i<ca.length; i++) {
|
29 |
+
var c = ca[i];
|
30 |
+
while (c.charAt(0)==' ') c = c.substring(1);
|
31 |
+
if (c.indexOf(name) == 0) return c.substring(name.length,c.length);
|
32 |
+
}
|
33 |
+
return "";
|
34 |
+
}
|
addon/analytics/gingeranalytics.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
function getCookie(e){for(var n=e+"=",t=document.cookie.split(";"),o=0;o<t.length;o++){for(var a=t[o];" "==a.charAt(0);)a=a.substring(1);if(0==a.indexOf(n))return a.substring(n.length,a.length)}return""}window.onload=function(){if("undefined"!=typeof ginger_analytics_code)var e=ginger_analytics_code;else var e="UA-XXXX-Y";if(console.log(getCookie("ginger-cookie")),"Y"==getCookie("ginger-cookie"))var n="ga('create', '"+e+"', 'auto'); ga('send', 'pageview');";else var n="ga('create', '"+e+"', 'auto'); ga('set', 'anonymizeIP', true); ga('send', 'pageview');";var t=document.createElement("script");t.type="text/javascript",t.innerHTML=n,console.log(t),document.getElementsByTagName("head")[0].appendChild(t)};
|
addon/analytics/index.php
ADDED
@@ -0,0 +1,80 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
//Analitycs
|
3 |
+
$option_analitycs = get_option('gingeranalytics');
|
4 |
+
if($option_analitycs && $option_analitycs['activated'] == 1):
|
5 |
+
require_once('ginger.analytics.php');
|
6 |
+
endif;
|
7 |
+
|
8 |
+
add_action("ginger_addon_activation_page", "ginger_analytics_activation_page");
|
9 |
+
|
10 |
+
function ginger_analytics_activation_page()
|
11 |
+
{
|
12 |
+
|
13 |
+
|
14 |
+
?>
|
15 |
+
<table class="form-table striped">
|
16 |
+
<thead>
|
17 |
+
<tr>
|
18 |
+
<td colspan="2">
|
19 |
+
<h3><?php _e("Google Analytics", "ginger"); ?></h3>
|
20 |
+
<small><?php _e("Google Analytics Add-on will add analytics tracking code to your site, switching automatically between anonymized/not anonymized mode based on user cookies acceptance.", "ginger"); ?></small>
|
21 |
+
<p>
|
22 |
+
<b style="color:#F99A30"><?php _e("Get activation code here:", "ginger"); ?> <a href="http://www.ginger-cookielaw.com/prodotto/google-analytics" target="_BLANK">http://www.ginger-cookielaw.com/prodotto/google-analytics/</a></b>
|
23 |
+
</p>
|
24 |
+
</td>
|
25 |
+
</tr>
|
26 |
+
</thead>
|
27 |
+
<tbody>
|
28 |
+
<tr>
|
29 |
+
|
30 |
+
<td>
|
31 |
+
<fieldset>
|
32 |
+
<legend class="screen-reader-text"><span><?php _e("Google Analytics", "ginger"); ?></span></legend>
|
33 |
+
|
34 |
+
<p>
|
35 |
+
<label>
|
36 |
+
<?php _e("Active add-on", "ginger");?>:
|
37 |
+
</label>
|
38 |
+
<?php $option_ginger_analitics = get_option('gingeranalytics');?>
|
39 |
+
<?php if ($option_ginger_analitics && $option_ginger_analitics['activated'] == 1): ?>
|
40 |
+
<img id="img_google_analytics"
|
41 |
+
src="<?php echo plugins_url('/ginger/img/ok.png'); ?>"
|
42 |
+
style="max-width: 20px; max-height: 20px; vertical-align: middle">
|
43 |
+
|
44 |
+
<form method="get" action="<?php echo admin_url('admin.php?page=ginger-add-on'); ?>">
|
45 |
+
<input type="hidden" name="page" value="ginger-add-on">
|
46 |
+
<input id="activationcode" type="text" name="activationcode"
|
47 |
+
value="<?php echo $option_ginger_analitics['licence_key']; ?>" placeholder=""
|
48 |
+
size="30px">
|
49 |
+
<input id="activationmail" type="text" name="activationmail"
|
50 |
+
value="<?php echo $option_ginger_analitics['email']; ?>" placeholder="" size="30px">
|
51 |
+
<input type="hidden" name="product_id" value="gingeranalytics">
|
52 |
+
<input type="hidden" name="request" value="deactivation">
|
53 |
+
<input type="submit" class="button" value="<?php _e('Deactivate', 'ginger') ?>">
|
54 |
+
</form>
|
55 |
+
<?php else: ?>
|
56 |
+
<img id="img_google_analytics"
|
57 |
+
src="<?php echo plugins_url('/ginger/img/xx.png'); ?>"
|
58 |
+
style="max-width: 20px; max-height: 20px; vertical-align: middle">
|
59 |
+
<form method="get" action="<?php echo admin_url('admin.php?page=ginger-add-on'); ?>">
|
60 |
+
<input type="hidden" name="page" value="ginger-add-on">
|
61 |
+
<input id="activationcode" type="text" name="activationcode" value=""
|
62 |
+
placeholder="<?php _e('Insert here the add-on activation code.', 'ginger') ?>"
|
63 |
+
size="30px">
|
64 |
+
<input id="activationmail" type="text" name="activationmail" value=""
|
65 |
+
placeholder="<?php _e('Insert here your activation mail.', 'ginger') ?>" size="30px">
|
66 |
+
<input type="hidden" name="product_id" value="gingeranalytics">
|
67 |
+
<input type="hidden" name="request" value="activation">
|
68 |
+
<input type="submit" class="button" value="<?php _e('Activate', 'ginger') ?>">
|
69 |
+
</form>
|
70 |
+
<?php endif; ?>
|
71 |
+
</p>
|
72 |
+
</fieldset>
|
73 |
+
</td>
|
74 |
+
</tr>
|
75 |
+
|
76 |
+
</tbody>
|
77 |
+
</table>
|
78 |
+
<?php
|
79 |
+
|
80 |
+
}
|
addon/ginger.addon.utils.php
ADDED
@@ -0,0 +1,184 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Option Analitics: gingeranalytics_option -> Contine l'array con le impostazioni del plugin - gingeranalytics -> Contine le optin con il serial number e l'attivazione;
|
4 |
+
*
|
5 |
+
*
|
6 |
+
*/
|
7 |
+
|
8 |
+
|
9 |
+
|
10 |
+
$addons = ginger_include_addons();
|
11 |
+
|
12 |
+
function ginger_include_addons(){
|
13 |
+
// check native gallery types
|
14 |
+
$addons = array();
|
15 |
+
$addondir = plugin_dir_path( __FILE__ );
|
16 |
+
|
17 |
+
$files = scandir($addondir);
|
18 |
+
|
19 |
+
|
20 |
+
foreach($files as $file){
|
21 |
+
if(is_dir($addondir.'/'.$file) && $file != "." && $file != ".."){
|
22 |
+
if(file_exists($addondir.'/'.$file.'/index.php')){
|
23 |
+
require_once($addondir.'/'.$file.'/index.php');
|
24 |
+
$addons[]=$file;
|
25 |
+
}
|
26 |
+
}
|
27 |
+
}
|
28 |
+
|
29 |
+
return $addons;
|
30 |
+
}
|
31 |
+
|
32 |
+
|
33 |
+
//// Ginger check api
|
34 |
+
function execute_request( $args ) {
|
35 |
+
$target_url = create_url( $args );
|
36 |
+
$data = wp_remote_get( $target_url );
|
37 |
+
$data = json_decode(strip_tags(wp_remote_retrieve_body( $data )));
|
38 |
+
return $data;
|
39 |
+
}
|
40 |
+
|
41 |
+
// Create an url based on
|
42 |
+
function create_url( $args ) {
|
43 |
+
global $base_url;
|
44 |
+
$base_url = 'http://www.ginger-cookielaw.com/';
|
45 |
+
$base_url = add_query_arg( 'wc-api', 'software-api', $base_url );
|
46 |
+
return $base_url . '&' . http_build_query( $args );
|
47 |
+
//exit;
|
48 |
+
|
49 |
+
}
|
50 |
+
add_action('ginger_add_menu', 'add_ginger_add_on');
|
51 |
+
function add_ginger_add_on(){
|
52 |
+
add_submenu_page( 'ginger-setup', "Add-on", __("Add-on", "ginger"), 'manage_options', 'ginger-add-on', 'ginger_add_on_menu_page');
|
53 |
+
}
|
54 |
+
|
55 |
+
function ginger_add_on_menu_page(){
|
56 |
+
|
57 |
+
$wp_root = dirname( dirname( dirname( dirname( dirname( __FILE__ ) ) ) ) );
|
58 |
+
if ( file_exists( $wp_root . '/wp-load.php' ) ) {
|
59 |
+
require_once( $wp_root . "/wp-load.php" );
|
60 |
+
} else {
|
61 |
+
exit;
|
62 |
+
}
|
63 |
+
|
64 |
+
if ( ! current_user_can( 'manage_options' ) ) die();
|
65 |
+
|
66 |
+
//$base_url = 'http://www.ginger-cookielaw.com/';
|
67 |
+
//$email = 'mb@matteobarale.com';
|
68 |
+
//$product_id = 'gingeranalytics';
|
69 |
+
//$licence_key = 'gingerba76a04b-18a0-47e6-89e2-c59848047c56';
|
70 |
+
//$instance = 'ginger.dev';
|
71 |
+
//print_r($_GET);
|
72 |
+
|
73 |
+
|
74 |
+
|
75 |
+
|
76 |
+
$request = ( isset( $_GET['request'] ) ) ? $_GET['request'] : '';
|
77 |
+
$activationemail = ( isset( $_GET['activationmail'] ) ) ? $_GET['activationmail'] : '';
|
78 |
+
$activationcode = ( isset( $_GET['activationcode'] ) ) ? $_GET['activationcode'] : '';
|
79 |
+
$product_id = ( isset( $_GET['product_id'] ) ) ? $_GET['product_id'] : '';
|
80 |
+
|
81 |
+
|
82 |
+
$links = array(
|
83 |
+
'invalid' => 'Invalid request',
|
84 |
+
'generate_key' => 'Generate key',
|
85 |
+
'check' => 'Check request',
|
86 |
+
'activation' => 'Activation request',
|
87 |
+
'activation_reset' => 'Application reset',
|
88 |
+
'deactivation' => 'Deactivation'
|
89 |
+
);
|
90 |
+
|
91 |
+
foreach ( $links as $key => $value ) {
|
92 |
+
echo '<a href="' . add_query_arg( 'request', $key ) . '">' . $value . '</a> | ';
|
93 |
+
}
|
94 |
+
|
95 |
+
echo '<br/><br/>';
|
96 |
+
|
97 |
+
//
|
98 |
+
// Valid activation request
|
99 |
+
if ( $request == 'activation' && $activationcode != '' && $activationemail != '' && $product_id != '' ) {
|
100 |
+
$args = array(
|
101 |
+
'request' => 'activation',
|
102 |
+
'email' => $activationemail,
|
103 |
+
'licence_key' => $activationcode,
|
104 |
+
'product_id' => $product_id,
|
105 |
+
'instance' => get_bloginfo('url'),
|
106 |
+
);
|
107 |
+
|
108 |
+
$data = execute_request( $args );
|
109 |
+
var_dump($data);
|
110 |
+
if($data->activated == 1):
|
111 |
+
$args = array(
|
112 |
+
'activated' => 1,
|
113 |
+
'email' => $activationemail,
|
114 |
+
'licence_key' => $activationcode,
|
115 |
+
'product_id' => $product_id,
|
116 |
+
'instance' => get_bloginfo('url'),
|
117 |
+
);
|
118 |
+
$array_activate = update_option($product_id, $args);
|
119 |
+
endif;
|
120 |
+
}
|
121 |
+
|
122 |
+
// Valid check request
|
123 |
+
if ( $request == 'check' ) {
|
124 |
+
$args = array(
|
125 |
+
'wc-api' => 'software-api',
|
126 |
+
'request' => 'check',
|
127 |
+
'email' => $activationemail,
|
128 |
+
'licence_key' => $activationcode,
|
129 |
+
'product_id' => $product_id
|
130 |
+
);
|
131 |
+
|
132 |
+
$data = execute_request( $args );
|
133 |
+
//('<pre>');
|
134 |
+
//print_r(json_decode($data['body']));
|
135 |
+
//echo('</pre>');
|
136 |
+
|
137 |
+
}
|
138 |
+
|
139 |
+
// Valid activation reset request
|
140 |
+
if ( $request == 'activation_reset' ) {
|
141 |
+
$args = array(
|
142 |
+
'request' => 'activation_reset',
|
143 |
+
'email' => $activationemail,
|
144 |
+
'licence_key' => $activationcode,
|
145 |
+
'product_id' => $product_id,
|
146 |
+
'secret_key' => $secret_key,
|
147 |
+
);
|
148 |
+
|
149 |
+
echo '<b>Valid activation reset request:</b><br />';
|
150 |
+
$data = execute_request( $args );
|
151 |
+
//echo('<pre>');
|
152 |
+
//print_r(json_decode($data['body']));
|
153 |
+
//echo('</pre>');
|
154 |
+
}
|
155 |
+
|
156 |
+
|
157 |
+
|
158 |
+
//
|
159 |
+
// Valid deactivation reset request
|
160 |
+
if ( $request == 'deactivation' && $activationcode != '' && $activationemail != '' && $product_id != '' ) {
|
161 |
+
$args = array(
|
162 |
+
'request' => 'deactivation',
|
163 |
+
'email' => $activationemail,
|
164 |
+
'licence_key' => $activationcode,
|
165 |
+
'product_id' => $product_id,
|
166 |
+
'instance' => get_bloginfo('url'),
|
167 |
+
);
|
168 |
+
|
169 |
+
echo '<b>Valid deactivation request:</b><br />';
|
170 |
+
execute_request( $args );
|
171 |
+
delete_option( $product_id );
|
172 |
+
}
|
173 |
+
|
174 |
+
?>
|
175 |
+
|
176 |
+
<div class="wrap">
|
177 |
+
<h2><?php _e("Ginger Available Add-ons", "ginger"); ?></h2>
|
178 |
+
<hr>
|
179 |
+
<?php do_action("ginger_addon_activation_page"); ?>
|
180 |
+
</div>
|
181 |
+
<?php
|
182 |
+
}
|
183 |
+
|
184 |
+
require_once('ginger.addoncheck.php');
|
addon/ginger.addoncheck.php
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if ( ! wp_next_scheduled( 'ginger_check_hook' ) ) {
|
4 |
+
wp_schedule_event( time(), 'daily', 'ginger_check_hook' );
|
5 |
+
}
|
6 |
+
|
7 |
+
add_action( 'ginger_check_hook', 'ginger_check_function' );
|
8 |
+
|
9 |
+
function ginger_check_function() {
|
10 |
+
$ginger_addon = array(
|
11 |
+
'gingeranalytics'
|
12 |
+
);
|
13 |
+
foreach($ginger_addon as $addon):
|
14 |
+
$addon_to_check = get_option($addon);
|
15 |
+
if($addon_to_check && $addon_to_check['activated'] == 1):
|
16 |
+
$args = array(
|
17 |
+
'wc-api' => 'software-api',
|
18 |
+
'request' => 'check',
|
19 |
+
'email' => $addon_to_check['email'],
|
20 |
+
'licence_key' => $addon_to_check['licence_key'],
|
21 |
+
'product_id' => $addon_to_check['product_id'],
|
22 |
+
'instance' => get_bloginfo('url')
|
23 |
+
);
|
24 |
+
|
25 |
+
$data = execute_request( $args );
|
26 |
+
if($data->success != 1):
|
27 |
+
$addon_to_check['activated'] = 0; update_option('gingeranalytics', $addon_to_check);
|
28 |
+
endif;
|
29 |
+
endif;
|
30 |
+
endforeach;
|
31 |
+
}
|
addon/wpml/ginger.wpml.php
ADDED
@@ -0,0 +1,230 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
add_action("ginger_add_menu", "ginger_wpml_menu");
|
3 |
+
|
4 |
+
function ginger_wpml_menu(){
|
5 |
+
|
6 |
+
add_submenu_page( 'ginger-setup', "WPML", __("WPML", "ginger"), 'manage_options', 'ginger-wpml', 'ginger_wpml_menu_page');
|
7 |
+
|
8 |
+
|
9 |
+
}
|
10 |
+
|
11 |
+
function ginger_wpml_menu_page(){
|
12 |
+
global $sitepress;
|
13 |
+
$current_lang = $sitepress->get_current_language(); //save current language
|
14 |
+
|
15 |
+
$key = "ginger_wpml_options";
|
16 |
+
if(isset($_POST["submit"]) && !wp_verify_nonce($_POST['ginger_options'], 'save_ginger_wpml_options')){
|
17 |
+
return;
|
18 |
+
}
|
19 |
+
|
20 |
+
if(isset($_POST["submit"])){
|
21 |
+
|
22 |
+
$params = $_POST;
|
23 |
+
unset($params["submit"]);
|
24 |
+
unset($params["ginger_options"]);
|
25 |
+
unset($params["_wp_http_referer"]);
|
26 |
+
|
27 |
+
|
28 |
+
// print_r($params);
|
29 |
+
update_option($key, $params);
|
30 |
+
|
31 |
+
echo '<div class="updated"><p>'.__( 'Updated!', 'ginger' ).'</p></div>';
|
32 |
+
}
|
33 |
+
$options = get_option($key);
|
34 |
+
|
35 |
+
// print_r($options);
|
36 |
+
?>
|
37 |
+
<div class="wrap">
|
38 |
+
<h2>WPML - Ginger setup</h2>
|
39 |
+
<hr>
|
40 |
+
|
41 |
+
<?php
|
42 |
+
if (!function_exists('icl_get_languages')) {
|
43 |
+
echo "<h3>";
|
44 |
+
_e("WPML is disabled!", "ginger");
|
45 |
+
echo "</h3>";
|
46 |
+
|
47 |
+
_e("Enable here:", "ginger");
|
48 |
+
echo " <a href='".get_bloginfo("url")."/wp-admin/plugins.php'>"._("Plugins")."</a>";
|
49 |
+
}else{
|
50 |
+
?>
|
51 |
+
<form method="post" action="admin.php?page=<?php echo $_GET["page"]; ?>">
|
52 |
+
|
53 |
+
<table class="form-table striped">
|
54 |
+
<thead>
|
55 |
+
<tr>
|
56 |
+
<td colspan="2">
|
57 |
+
<h2><?php _e("Banner Multilanguage Setup", "ginger"); ?></h2>
|
58 |
+
<?php _e("Overwrite default banner rules", "ginger"); ?>
|
59 |
+
</td>
|
60 |
+
</tr>
|
61 |
+
</thead>
|
62 |
+
<tbody>
|
63 |
+
|
64 |
+
<?php wp_nonce_field('save_ginger_wpml_options', 'ginger_options'); ?>
|
65 |
+
<?php
|
66 |
+
$languages = icl_get_languages('skip_missing=0');
|
67 |
+
//print_r($languages);
|
68 |
+
$c=0;
|
69 |
+
foreach ($languages as $langcode=>$langval ) {
|
70 |
+
?>
|
71 |
+
<tr style="background-color:#F99A30; ">
|
72 |
+
<th scope="row" style="padding-left:20px;"></th>
|
73 |
+
<td>
|
74 |
+
<h2><?php echo $langval["native_name"]; ?></h2>
|
75 |
+
</td>
|
76 |
+
</tr>
|
77 |
+
|
78 |
+
<tr>
|
79 |
+
<th scope="row" style="padding-left:20px;"><?php _e("Banner Text", "ginger"); ?> - <?php echo $langval["native_name"]; ?></th>
|
80 |
+
<td>
|
81 |
+
<fieldset>
|
82 |
+
<legend class="screen-reader-text"><span><?php _e("Banner Text", "ginger"); ?></span></legend>
|
83 |
+
<p><label><?php
|
84 |
+
if (function_exists("wp_editor"))
|
85 |
+
wp_editor(stripslashes($options["ginger_banner_text"][$langcode]), "ginger_bar_text_".$langcode."", array('textarea_name' => "ginger_banner_text[".$langcode."]", 'media_buttons' => false, 'textarea_rows' => 3, 'teeny' => true));
|
86 |
+
else
|
87 |
+
echo '<textarea name = "ginger_banner_text['.$langcode.']" >' . $options["ginger_banner_text"][$langcode] . '</textarea>';
|
88 |
+
?>
|
89 |
+
<br>
|
90 |
+
<small><?php _e('You can use syntax <code>{{privacy_page}}</code> to link Privacy Police Page defined in <a href="admin.php?page=ginger-setup&tab=policy">Privacy Policy Tab</a>', "ginger"); ?></small>
|
91 |
+
</label>
|
92 |
+
</p>
|
93 |
+
</fieldset>
|
94 |
+
</td>
|
95 |
+
</tr>
|
96 |
+
|
97 |
+
<tr>
|
98 |
+
<th scope="row" style="padding-left:20px;"><?php _e('Privacy Policy page', 'ginger'); ?> - <?php echo $langval["native_name"]; ?></th>
|
99 |
+
<td>
|
100 |
+
<fieldset>
|
101 |
+
<p><label>
|
102 |
+
<?php
|
103 |
+
$sitepress->switch_lang($langcode);
|
104 |
+
$args = array(
|
105 |
+
'sort_order' => 'asc',
|
106 |
+
'sort_column' => 'post_title',
|
107 |
+
'hierarchical' => 1,
|
108 |
+
'number' => '',
|
109 |
+
'offset' => 0,
|
110 |
+
'post_type' => 'page',
|
111 |
+
'post_status' => 'publish',
|
112 |
+
);
|
113 |
+
|
114 |
+
$p = new WP_Query( $args );
|
115 |
+
?>
|
116 |
+
<select name="ginger_privacy_page[<?php echo $langcode; ?>]" id="privacy_page_select_<?php echo $langcode; ?>" >
|
117 |
+
<option value=""><?php _e('Select page', 'ginger'); ?></option>
|
118 |
+
<?php
|
119 |
+
while ( $p->have_posts() ) :
|
120 |
+
$p->next_post();
|
121 |
+
?>
|
122 |
+
<option value="<?php echo $p->post->ID; ?>" <?php if ($options["ginger_privacy_page"][$langcode] == $p->post->ID) echo ' selected="selected" '; ?>><?php echo $p->post->post_title; ?></option>
|
123 |
+
<?php
|
124 |
+
endwhile;
|
125 |
+
?>
|
126 |
+
</select>
|
127 |
+
<?php
|
128 |
+
$sitepress->switch_lang($current_lang); //restore previous language
|
129 |
+
?>
|
130 |
+
|
131 |
+
</label></p>
|
132 |
+
</fieldset>
|
133 |
+
</td>
|
134 |
+
</tr>
|
135 |
+
|
136 |
+
|
137 |
+
|
138 |
+
<tr>
|
139 |
+
<th scope="row" style="padding-left:20px;"><?php _e("Iframe Text", "ginger"); ?> - <?php echo $langval["native_name"]; ?></th>
|
140 |
+
<td>
|
141 |
+
<fieldset>
|
142 |
+
<legend class="screen-reader-text"><span><?php _e("Iframe Text", "ginger"); ?></span></legend>
|
143 |
+
<p><label><?php
|
144 |
+
if (function_exists("wp_editor"))
|
145 |
+
wp_editor(stripslashes($options["ginger_Iframe_text"][$langcode]), "ginger_Iframe_text_".$langcode."", array('textarea_name' => "ginger_Iframe_text[".$langcode."]", 'media_buttons' => false, 'textarea_rows' => 3, 'teeny' => true));
|
146 |
+
else
|
147 |
+
echo '<textarea name = "ginger_Iframe_text['.$langcode.']" >' . $options["ginger_Iframe_text"][$langcode] . '</textarea>';
|
148 |
+
|
149 |
+
?></label></p>
|
150 |
+
</fieldset>
|
151 |
+
</td>
|
152 |
+
</tr>
|
153 |
+
|
154 |
+
<tr>
|
155 |
+
<th scope="row" style="padding-left:20px;"><?php _e("Customize your banner buttons", "ginger"); ?> - <?php echo $langval["native_name"]; ?></th>
|
156 |
+
<td>
|
157 |
+
<fieldset>
|
158 |
+
<legend class="screen-reader-text"><span><?php _e("Iframe Text", "ginger"); ?></span></legend>
|
159 |
+
<p>
|
160 |
+
<label><b><?php _e("Accept cookie Button", "ginger"); ?></b></label>
|
161 |
+
</p>
|
162 |
+
|
163 |
+
<p>
|
164 |
+
<label><?php _e("Text", "ginger"); ?></label>
|
165 |
+
<input name="accept_cookie_button_text[<?php echo $langcode; ?>]" id="accept_cookie_button_text_<?php echo $langcode; ?>" type="text"
|
166 |
+
value="<?php if ($options['accept_cookie_button_text'][$langcode] != "") {
|
167 |
+
echo $options['accept_cookie_button_text'][$langcode];
|
168 |
+
} else {
|
169 |
+
echo _e('Accept Cookie', 'ginger');
|
170 |
+
} ?>">
|
171 |
+
</p>
|
172 |
+
|
173 |
+
<p>
|
174 |
+
<label><b><?php _e("Disable cookie Button", "ginger"); ?></b></label>
|
175 |
+
</p>
|
176 |
+
|
177 |
+
<p>
|
178 |
+
<label><?php _e("Text", "ginger"); ?></label>
|
179 |
+
<input name="disable_cookie_button_text[<?php echo $langcode; ?>]" id="disable_cookie_button_text_<?php echo $langcode; ?>" type="text"
|
180 |
+
value="<?php if ($options['disable_cookie_button_text'][$langcode] != "") {
|
181 |
+
echo $options['disable_cookie_button_text'][$langcode];
|
182 |
+
} else {
|
183 |
+
echo _e('Disable Cookie', 'ginger');
|
184 |
+
} ?>" <?php if ($options['disable_cookie_button_status'][$langcode] != "1") {
|
185 |
+
echo 'disabled=true';
|
186 |
+
} ?>>
|
187 |
+
<?php echo _e('Enable:', 'ginger') ?>
|
188 |
+
<input type="checkbox" id="disable_cookie_button_status_<?php echo $langcode; ?>" name="disable_cookie_button_status[<?php echo $langcode; ?>]"
|
189 |
+
value="1" <?php if ($options['disable_cookie_button_status'][$langcode] == "1") {
|
190 |
+
echo 'checked';
|
191 |
+
} ?>
|
192 |
+
onclick="en_dis_able_text_banner_button('disable_cookie_button_status_<?php echo $langcode; ?>','disable_cookie_button_text_<?php echo $langcode; ?>','img_disable_cookie_button_status_<?php echo $langcode; ?>');">
|
193 |
+
|
194 |
+
|
195 |
+
<img id="img_disable_cookie_button_status_<?php echo $langcode; ?>"
|
196 |
+
src="<?php if ($options['disable_cookie_button_status'][$langcode] == "1") {
|
197 |
+
echo plugins_url("ginger/img/ok.png");
|
198 |
+
} else {
|
199 |
+
echo plugins_url("ginger/img/xx.png");
|
200 |
+
} ?>" style="max-width: 20px; max-height: 20px; vertical-align: middle">
|
201 |
+
|
202 |
+
|
203 |
+
</p>
|
204 |
+
</fieldset>
|
205 |
+
</td>
|
206 |
+
</tr>
|
207 |
+
|
208 |
+
|
209 |
+
|
210 |
+
|
211 |
+
<?php
|
212 |
+
|
213 |
+
}
|
214 |
+
?>
|
215 |
+
</tbody>
|
216 |
+
</table>
|
217 |
+
<p class="submit"><input type="submit" name="submit" id="submit" class="button button-primary" value="<?php _e("Save Changes", "ginger"); ?>"></p>
|
218 |
+
</form>
|
219 |
+
<?php
|
220 |
+
|
221 |
+
}// check wpml active
|
222 |
+
?>
|
223 |
+
|
224 |
+
|
225 |
+
|
226 |
+
</div>
|
227 |
+
|
228 |
+
<?php
|
229 |
+
|
230 |
+
}
|
addon/wpml/index.php
ADDED
@@ -0,0 +1,175 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
//WPML
|
3 |
+
$option_wpml = get_option('gingerwpml');
|
4 |
+
if($option_wpml && $option_wpml['activated'] == 1):
|
5 |
+
require_once('ginger.wpml.php');
|
6 |
+
endif;
|
7 |
+
|
8 |
+
add_filter("ginger_text_iframe", "ginger_wpml_text_iframe");
|
9 |
+
function ginger_wpml_text_iframe($text){
|
10 |
+
$key = "ginger_wpml_options";
|
11 |
+
$options = get_option($key);
|
12 |
+
if($options == "") return $text;
|
13 |
+
if (!function_exists('icl_get_languages')) return $text;
|
14 |
+
|
15 |
+
global $sitepress;
|
16 |
+
$current_lang = $sitepress->get_current_language(); //save current language
|
17 |
+
|
18 |
+
if(trim(strip_tags($options['ginger_Iframe_text'][$current_lang]))):
|
19 |
+
$ginger_iframe_text = $options['ginger_Iframe_text'][$current_lang];
|
20 |
+
$ginger_iframe_text = str_replace('</', '<\/', $ginger_iframe_text);
|
21 |
+
$ginger_iframe_text = str_replace( array("\n", "\r"), "<br \/>", $ginger_iframe_text );
|
22 |
+
return $ginger_iframe_text;
|
23 |
+
endif;
|
24 |
+
|
25 |
+
return $text;
|
26 |
+
}
|
27 |
+
|
28 |
+
|
29 |
+
add_filter("ginger_text_banner", "ginger_wpml_text_banner");
|
30 |
+
function ginger_wpml_text_banner($text)
|
31 |
+
{
|
32 |
+
$key = "ginger_wpml_options";
|
33 |
+
$options = get_option($key);
|
34 |
+
if ($options == "") return $text;
|
35 |
+
if (!function_exists('icl_get_languages')) return $text;
|
36 |
+
|
37 |
+
global $sitepress;
|
38 |
+
$current_lang = $sitepress->get_current_language(); //save current language
|
39 |
+
|
40 |
+
if (trim(strip_tags($options['ginger_banner_text'][$current_lang])) != ""):
|
41 |
+
$ginger_text = $options['ginger_banner_text'][$current_lang];
|
42 |
+
$ginger_text = str_replace('</', '<\/', $ginger_text);
|
43 |
+
$ginger_text = str_replace(array("\n", "\r"), "<br \/>", $ginger_text);
|
44 |
+
|
45 |
+
//Recupero privacy policy se presente
|
46 |
+
if (strpos($ginger_text, '{{privacy_page}}') !== false):
|
47 |
+
$privacy_policy = $options['ginger_privacy_page'][$current_lang];
|
48 |
+
if ($privacy_policy) {
|
49 |
+
|
50 |
+
$privacy_policy = get_post($privacy_policy);
|
51 |
+
$privacy_policy = ' <a href="' . get_permalink($privacy_policy->ID) . '">' . $privacy_policy->post_title . '<\/a>';
|
52 |
+
$ginger_text = str_replace('{{privacy_page}}', $privacy_policy, $ginger_text);
|
53 |
+
}
|
54 |
+
endif;
|
55 |
+
return $ginger_text;
|
56 |
+
endif;
|
57 |
+
|
58 |
+
return $text;
|
59 |
+
}
|
60 |
+
|
61 |
+
add_filter("ginger_label_accept_cookie", "ginger_wpml_label_accept_cookie");
|
62 |
+
function ginger_wpml_label_accept_cookie($text){
|
63 |
+
$key = "ginger_wpml_options";
|
64 |
+
$options = get_option($key);
|
65 |
+
if($options == "") return $text;
|
66 |
+
if (!function_exists('icl_get_languages')) return $text;
|
67 |
+
|
68 |
+
global $sitepress;
|
69 |
+
$current_lang = $sitepress->get_current_language();
|
70 |
+
|
71 |
+
if(trim($options['accept_cookie_button_text'][$current_lang])):
|
72 |
+
$label_accept_cookie = $options['accept_cookie_button_text'][$current_lang];
|
73 |
+
return $label_accept_cookie;
|
74 |
+
endif;
|
75 |
+
|
76 |
+
return $text;
|
77 |
+
}
|
78 |
+
|
79 |
+
add_filter("ginger_label_disable_cookie", "ginger_wpml_label_disable_cookie");
|
80 |
+
function ginger_wpml_label_disable_cookie($text){
|
81 |
+
$key = "ginger_wpml_options";
|
82 |
+
$options = get_option($key);
|
83 |
+
if($options == "") return $text;
|
84 |
+
if (!function_exists('icl_get_languages')) return $text;
|
85 |
+
|
86 |
+
global $sitepress;
|
87 |
+
$current_lang = $sitepress->get_current_language(); //save current language
|
88 |
+
if($options['disable_cookie_button_status'][$current_lang]):
|
89 |
+
if(trim($options['disable_cookie_button_text'][$current_lang])):
|
90 |
+
$label_disable_cookie = $options['disable_cookie_button_text'][$current_lang];
|
91 |
+
return $label_disable_cookie;
|
92 |
+
endif;
|
93 |
+
endif;
|
94 |
+
|
95 |
+
return $text;
|
96 |
+
}
|
97 |
+
|
98 |
+
|
99 |
+
|
100 |
+
|
101 |
+
|
102 |
+
|
103 |
+
add_action("ginger_addon_activation_page", "ginger_wpml_activation_page");
|
104 |
+
|
105 |
+
function ginger_wpml_activation_page()
|
106 |
+
{
|
107 |
+
|
108 |
+
|
109 |
+
?>
|
110 |
+
<table class="form-table striped">
|
111 |
+
<thead>
|
112 |
+
<tr>
|
113 |
+
<td colspan="2">
|
114 |
+
<h3><?php _e("WPML", "ginger"); ?></h3>
|
115 |
+
<small><?php _e("WPML add-on will adapt Ginger for WPML multilanguage websites .", "ginger"); ?></small>
|
116 |
+
<p>
|
117 |
+
<b style="color:#F99A30"><?php _e("Get activation code here:", "ginger"); ?> <a href="http://www.ginger-cookielaw.com/prodotto/wpml/" target="_BLANK">http://www.ginger-cookielaw.com/prodotto/wpml/</a></b>
|
118 |
+
</p>
|
119 |
+
|
120 |
+
</td>
|
121 |
+
</tr>
|
122 |
+
</thead>
|
123 |
+
<tbody>
|
124 |
+
<tr>
|
125 |
+
|
126 |
+
<td>
|
127 |
+
<fieldset>
|
128 |
+
<legend class="screen-reader-text"><span><?php _e("WPML", "ginger"); ?></span></legend>
|
129 |
+
<p>
|
130 |
+
<label>
|
131 |
+
<?php _e("Active add-on", "ginger");?>:
|
132 |
+
</label>
|
133 |
+
<?php $option_ginger_wpml = get_option('gingerwpml');?>
|
134 |
+
<?php if ($option_ginger_wpml && $option_ginger_wpml['activated'] == 1): ?>
|
135 |
+
<img id="img_google_wpml"
|
136 |
+
src="<?php echo plugins_url('/ginger/img/ok.png'); ?>"
|
137 |
+
style="max-width: 20px; max-height: 20px; vertical-align: middle">
|
138 |
+
|
139 |
+
<form method="get" action="<?php echo admin_url('admin.php?page=ginger-add-on'); ?>">
|
140 |
+
<input type="hidden" name="page" value="ginger-add-on">
|
141 |
+
<input id="activationcode" type="text" name="activationcode"
|
142 |
+
value="<?php echo $option_ginger_wpml['licence_key']; ?>" placeholder=""
|
143 |
+
size="30px">
|
144 |
+
<input id="activationmail" type="text" name="activationmail"
|
145 |
+
value="<?php echo $option_ginger_wpml['email']; ?>" placeholder="" size="30px">
|
146 |
+
<input type="hidden" name="product_id" value="gingerwpml">
|
147 |
+
<input type="hidden" name="request" value="deactivation">
|
148 |
+
<input type="submit" class="button" value="<?php _e('Deactivate', 'ginger') ?>">
|
149 |
+
</form>
|
150 |
+
<?php else: ?>
|
151 |
+
<img id="img_google_wpml"
|
152 |
+
src="<?php echo plugins_url('/ginger/img/xx.png'); ?>"
|
153 |
+
style="max-width: 20px; max-height: 20px; vertical-align: middle">
|
154 |
+
<form method="get" action="<?php echo admin_url('admin.php?page=ginger-add-on'); ?>">
|
155 |
+
<input type="hidden" name="page" value="ginger-add-on">
|
156 |
+
<input id="activationcode" type="text" name="activationcode" value=""
|
157 |
+
placeholder="<?php _e('Insert here the add-on activation code.', 'ginger') ?>"
|
158 |
+
size="30px">
|
159 |
+
<input id="activationmail" type="text" name="activationmail" value=""
|
160 |
+
placeholder="<?php _e('Insert here your activation mail.', 'ginger') ?>" size="30px">
|
161 |
+
<input type="hidden" name="product_id" value="gingerwpml">
|
162 |
+
<input type="hidden" name="request" value="activation">
|
163 |
+
<input type="submit" class="button" value="<?php _e('Activate', 'ginger') ?>">
|
164 |
+
</form>
|
165 |
+
<?php endif; ?>
|
166 |
+
</p>
|
167 |
+
</fieldset>
|
168 |
+
</td>
|
169 |
+
</tr>
|
170 |
+
|
171 |
+
</tbody>
|
172 |
+
</table>
|
173 |
+
<?php
|
174 |
+
|
175 |
+
}
|
admin/ginger.admin.php
CHANGED
@@ -71,7 +71,7 @@ $options = get_option($key);
|
|
71 |
<h2>Ginger - EU Cookie Law</h2>
|
72 |
<hr>
|
73 |
<h2 class="nav-tab-wrapper">
|
74 |
-
<a href="admin.php?page=ginger-setup" class="nav-tab <?php echo (($_GET["page"] == 'ginger-setup') && ($_GET["tab"] == "" )) ? 'nav-tab-active' : ''; ?>"><?php _e("General Configuration", "ginger"); ?></a>
|
75 |
<a href="admin.php?page=ginger-setup&tab=banner" class="nav-tab <?php echo (($_GET["page"] == 'ginger-setup') && ($_GET["tab"] == "banner" )) ? 'nav-tab-active' : ''; ?>"><?php _e("Banner Setup", "ginger"); ?></a>
|
76 |
<a href="admin.php?page=ginger-setup&tab=policy" class="nav-tab <?php echo (($_GET["page"] == 'ginger-setup') && ($_GET["tab"] == "policy" )) ? 'nav-tab-active' : ''; ?>"><?php _e("Privacy Policy", "ginger"); ?></a>
|
77 |
<?php do_action("ginger_add_tab_menu"); ?>
|
@@ -93,3 +93,6 @@ $options = get_option($key);
|
|
93 |
<p class="submit"><input type="submit" name="submit" id="submit" class="button button-primary" value="<?php _e("Save Changes", "ginger"); ?>"></p>
|
94 |
</form>
|
95 |
</div>
|
|
|
|
|
|
71 |
<h2>Ginger - EU Cookie Law</h2>
|
72 |
<hr>
|
73 |
<h2 class="nav-tab-wrapper">
|
74 |
+
<a href="admin.php?page=ginger-setup" class="nav-tab <?php echo (($_GET["page"] == 'ginger-setup') && (($_GET["tab"] == "" ) || $_GET["tab"] == "general")) ? 'nav-tab-active' : ''; ?>"><?php _e("General Configuration", "ginger"); ?></a>
|
75 |
<a href="admin.php?page=ginger-setup&tab=banner" class="nav-tab <?php echo (($_GET["page"] == 'ginger-setup') && ($_GET["tab"] == "banner" )) ? 'nav-tab-active' : ''; ?>"><?php _e("Banner Setup", "ginger"); ?></a>
|
76 |
<a href="admin.php?page=ginger-setup&tab=policy" class="nav-tab <?php echo (($_GET["page"] == 'ginger-setup') && ($_GET["tab"] == "policy" )) ? 'nav-tab-active' : ''; ?>"><?php _e("Privacy Policy", "ginger"); ?></a>
|
77 |
<?php do_action("ginger_add_tab_menu"); ?>
|
93 |
<p class="submit"><input type="submit" name="submit" id="submit" class="button button-primary" value="<?php _e("Save Changes", "ginger"); ?>"></p>
|
94 |
</form>
|
95 |
</div>
|
96 |
+
|
97 |
+
|
98 |
+
|
admin/ginger.utils.php
CHANGED
@@ -11,17 +11,17 @@
|
|
11 |
add_action( 'admin_menu', 'register_ginger_menu_page' );
|
12 |
function register_ginger_menu_page(){
|
13 |
add_menu_page( 'ginger', 'Ginger Cookie', 'manage_options', 'ginger-setup', 'ginger_menu_page', plugins_url( 'ginger/img/ginger-color.png' ));
|
|
|
14 |
do_action("ginger_add_menu");
|
15 |
-
|
16 |
}
|
|
|
17 |
function ginger_menu_page(){
|
18 |
require_once(plugin_dir_path( __FILE__ )."/ginger.admin.php");
|
19 |
}
|
20 |
function ginger_about_menu_page(){
|
21 |
require_once(plugin_dir_path( __FILE__ )."/ginger.about.php");
|
22 |
}
|
23 |
-
|
24 |
-
|
25 |
//Aggingo style e script per ginger backend
|
26 |
add_action( 'admin_enqueue_scripts', 'ginger_add_admin_js' );
|
27 |
function ginger_add_admin_js( $hook ) {
|
@@ -44,6 +44,9 @@ function save_privacy_page($title,$content){
|
|
44 |
'post_category' => '',
|
45 |
'post_type' => 'page'
|
46 |
);
|
|
|
|
|
|
|
47 |
$id = wp_insert_post( $my_post );
|
48 |
return($id);
|
49 |
}
|
11 |
add_action( 'admin_menu', 'register_ginger_menu_page' );
|
12 |
function register_ginger_menu_page(){
|
13 |
add_menu_page( 'ginger', 'Ginger Cookie', 'manage_options', 'ginger-setup', 'ginger_menu_page', plugins_url( 'ginger/img/ginger-color.png' ));
|
14 |
+
|
15 |
do_action("ginger_add_menu");
|
16 |
+
//add_submenu_page( 'ginger-setup', "About", __("About EU Law", "ginger"), 'manage_options', 'ginger-about', 'ginger_about_menu_page');
|
17 |
}
|
18 |
+
|
19 |
function ginger_menu_page(){
|
20 |
require_once(plugin_dir_path( __FILE__ )."/ginger.admin.php");
|
21 |
}
|
22 |
function ginger_about_menu_page(){
|
23 |
require_once(plugin_dir_path( __FILE__ )."/ginger.about.php");
|
24 |
}
|
|
|
|
|
25 |
//Aggingo style e script per ginger backend
|
26 |
add_action( 'admin_enqueue_scripts', 'ginger_add_admin_js' );
|
27 |
function ginger_add_admin_js( $hook ) {
|
44 |
'post_category' => '',
|
45 |
'post_type' => 'page'
|
46 |
);
|
47 |
+
|
48 |
+
|
49 |
+
|
50 |
$id = wp_insert_post( $my_post );
|
51 |
return($id);
|
52 |
}
|
admin/js/ginger.js
CHANGED
@@ -39,6 +39,28 @@ function en_dis_able_text_banner_button(id,id_text,id_img){
|
|
39 |
|
40 |
document.getElementById(id_text).disabled=true;
|
41 |
document.getElementById(id_img).src='../wp-content/plugins/ginger/img/xx.png';
|
42 |
-
}
|
43 |
|
44 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
|
40 |
document.getElementById(id_text).disabled=true;
|
41 |
document.getElementById(id_img).src='../wp-content/plugins/ginger/img/xx.png';
|
|
|
42 |
|
43 |
+
|
44 |
+
}
|
45 |
+
|
46 |
+
}
|
47 |
+
|
48 |
+
function en_dis_able_add_on(id,id_img,id_text){
|
49 |
+
|
50 |
+
|
51 |
+
var status=document.getElementById(id).checked;
|
52 |
+
|
53 |
+
|
54 |
+
if (status){
|
55 |
+
if (id!='google_analytics_status') {
|
56 |
+
document.getElementById(id_text).disabled = false;
|
57 |
+
}
|
58 |
+
document.getElementById(id_img).src='../wp-content/plugins/ginger/img/ok.png';
|
59 |
+
|
60 |
+
}else if (!status){
|
61 |
+
|
62 |
+
document.getElementById(id_text).disabled=true;
|
63 |
+
document.getElementById(id_img).src='../wp-content/plugins/ginger/img/xx.png';
|
64 |
+
}
|
65 |
+
|
66 |
+
}
|
admin/partial/banner.php
CHANGED
@@ -113,9 +113,9 @@
|
|
113 |
|
114 |
<img id="img_disable_cookie_button_status"
|
115 |
src="<?php if ($options['disable_cookie_button_status'] == "1" or $options['disable_cookie_button_status'] == "") {
|
116 |
-
echo '
|
117 |
} elseif ($options['disable_cookie_button_status'] == "0") {
|
118 |
-
echo '
|
119 |
} ?>" style="max-width: 20px; max-height: 20px; vertical-align: middle">
|
120 |
|
121 |
|
113 |
|
114 |
<img id="img_disable_cookie_button_status"
|
115 |
src="<?php if ($options['disable_cookie_button_status'] == "1" or $options['disable_cookie_button_status'] == "") {
|
116 |
+
echo plugins_url('ginger/img/ok.png');
|
117 |
} elseif ($options['disable_cookie_button_status'] == "0") {
|
118 |
+
echo plugins_url('ginger/img/xx.png');
|
119 |
} ?>" style="max-width: 20px; max-height: 20px; vertical-align: middle">
|
120 |
|
121 |
|
admin/partial/policy.php
CHANGED
@@ -54,20 +54,10 @@
|
|
54 |
</label>
|
55 |
<select name="ginger_privacy_page"
|
56 |
id="privacy_page_select" <?php if ($options == "") echo ' disabled="true"'; ?>>
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
<option
|
63 |
-
value="<?php echo $page->ID;?>" <?php if ($options == $page->ID) echo ' selected="selected" '; ?>><?php echo $page->post_title; ?></option>
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
<?php
|
69 |
-
}
|
70 |
-
?>
|
71 |
</select>
|
72 |
</p>
|
73 |
</fieldset>
|
@@ -115,4 +105,4 @@
|
|
115 |
</td>
|
116 |
</tr>
|
117 |
</tbody>
|
118 |
-
</table>
|
54 |
</label>
|
55 |
<select name="ginger_privacy_page"
|
56 |
id="privacy_page_select" <?php if ($options == "") echo ' disabled="true"'; ?>>
|
57 |
+
<option value=""><?php _e('Select page', 'ginger'); ?></option>
|
58 |
+
<?php foreach ($pages as $page) { ?>
|
59 |
+
<option value="<?php echo $page->ID;?>" <?php if ($options == $page->ID) echo ' selected="selected" '; ?>><?php echo $page->post_title; ?></option>
|
60 |
+
<?php } ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
61 |
</select>
|
62 |
</p>
|
63 |
</fieldset>
|
105 |
</td>
|
106 |
</tr>
|
107 |
</tbody>
|
108 |
+
</table>
|
front/css/cookies-enabler-dialog.css
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
-
*{
|
2 |
box-sizing: border-box;
|
3 |
margin: 0;
|
4 |
padding: 0;
|
5 |
}
|
6 |
|
7 |
-
p{
|
8 |
margin-bottom: 1em;
|
9 |
}
|
10 |
|
@@ -124,7 +124,7 @@ p{
|
|
124 |
margin: 0;
|
125 |
}
|
126 |
|
127 |
-
iframe{
|
128 |
width: 100%;
|
129 |
}
|
130 |
|
1 |
+
.ginger-banner *{
|
2 |
box-sizing: border-box;
|
3 |
margin: 0;
|
4 |
padding: 0;
|
5 |
}
|
6 |
|
7 |
+
.ginger-banner p{
|
8 |
margin-bottom: 1em;
|
9 |
}
|
10 |
|
124 |
margin: 0;
|
125 |
}
|
126 |
|
127 |
+
.ginger-banner iframe{
|
128 |
width: 100%;
|
129 |
}
|
130 |
|
front/css/cookies-enabler.css
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
-
*{
|
2 |
box-sizing: border-box;
|
3 |
margin: 0;
|
4 |
padding: 0;
|
5 |
}
|
6 |
|
7 |
-
p{
|
8 |
margin-bottom: 1em;
|
9 |
}
|
10 |
|
@@ -124,7 +124,7 @@ p{
|
|
124 |
margin: 0;
|
125 |
}
|
126 |
|
127 |
-
iframe{
|
128 |
width: 100%;
|
129 |
}
|
130 |
|
1 |
+
.ginger-banner *{
|
2 |
box-sizing: border-box;
|
3 |
margin: 0;
|
4 |
padding: 0;
|
5 |
}
|
6 |
|
7 |
+
.ginger-banner p{
|
8 |
margin-bottom: 1em;
|
9 |
}
|
10 |
|
124 |
margin: 0;
|
125 |
}
|
126 |
|
127 |
+
.ginger-banner iframe{
|
128 |
width: 100%;
|
129 |
}
|
130 |
|
front/gingerfront.core.php
ADDED
@@ -0,0 +1,227 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Created by PhpStorm.
|
4 |
+
* User: matteobarale
|
5 |
+
* Date: 09/07/15
|
6 |
+
* Time: 13:17
|
7 |
+
*/
|
8 |
+
|
9 |
+
|
10 |
+
function ginger_get_text_iframe($option_ginger_bar){
|
11 |
+
|
12 |
+
if($option_ginger_bar['ginger_Iframe_text']):
|
13 |
+
$ginger_iframe_text = $option_ginger_bar['ginger_Iframe_text'];
|
14 |
+
$ginger_iframe_text = str_replace('</', '<\/', $ginger_iframe_text);
|
15 |
+
$ginger_iframe_text = str_replace( array("\n", "\r"), "<br \/>", $ginger_iframe_text );
|
16 |
+
else:
|
17 |
+
$ginger_iframe_text = 'This website uses cookies.';
|
18 |
+
endif;
|
19 |
+
|
20 |
+
$ginger_iframe_text = apply_filters("ginger_text_iframe", $ginger_iframe_text);
|
21 |
+
|
22 |
+
return $ginger_iframe_text;
|
23 |
+
}
|
24 |
+
|
25 |
+
function ginger_get_text_banner($option_ginger_bar){
|
26 |
+
if($option_ginger_bar['ginger_banner_text']):
|
27 |
+
$ginger_text = $option_ginger_bar['ginger_banner_text'];
|
28 |
+
$ginger_text = str_replace('</', '<\/', $ginger_text);
|
29 |
+
$ginger_text = str_replace( array("\n", "\r"), "<br \/>", $ginger_text );
|
30 |
+
//Recupero privacy policy se presente
|
31 |
+
if(strpos($ginger_text, '{{privacy_page}}') !== false):
|
32 |
+
$privacy_policy = get_option('ginger_policy', true);
|
33 |
+
$privacy_policy = get_post($privacy_policy);
|
34 |
+
$privacy_policy = ' <a href="' . get_permalink($privacy_policy->ID) . '">' . $privacy_policy->post_title . '<\/a>';
|
35 |
+
$ginger_text = str_replace('{{privacy_page}}', $privacy_policy, $ginger_text);
|
36 |
+
endif;
|
37 |
+
|
38 |
+
else:
|
39 |
+
$ginger_text = 'This website uses cookies.';
|
40 |
+
endif;
|
41 |
+
|
42 |
+
$ginger_text = apply_filters("ginger_text_banner", $ginger_text);
|
43 |
+
return $ginger_text;
|
44 |
+
}
|
45 |
+
|
46 |
+
function ginger_get_label_accept_cookie($option_ginger_bar){
|
47 |
+
|
48 |
+
//Recupero Label
|
49 |
+
if($option_ginger_bar['accept_cookie_button_text']):
|
50 |
+
$label_accept_cookie = $option_ginger_bar['accept_cookie_button_text'];
|
51 |
+
else:
|
52 |
+
$label_accept_cookie = __('Enable Cookies', 'ginger');
|
53 |
+
endif;
|
54 |
+
|
55 |
+
$label_accept_cookie = apply_filters("ginger_label_accept_cookie", $label_accept_cookie);
|
56 |
+
|
57 |
+
return $label_accept_cookie;
|
58 |
+
}
|
59 |
+
|
60 |
+
function ginger_get_label_disable_cookie($option_ginger_bar){
|
61 |
+
|
62 |
+
//Recupero Label
|
63 |
+
if($option_ginger_bar['disable_cookie_button_text']):
|
64 |
+
$label_disable_cookie = $option_ginger_bar['disable_cookie_button_text'];
|
65 |
+
else:
|
66 |
+
$label_disable_cookie = __('Disable Cookies', 'ginger');
|
67 |
+
endif;
|
68 |
+
|
69 |
+
$label_disable_cookie = apply_filters("ginger_label_disable_cookie", $label_disable_cookie);
|
70 |
+
|
71 |
+
return $label_disable_cookie;
|
72 |
+
}
|
73 |
+
|
74 |
+
|
75 |
+
//Ginger Start
|
76 |
+
function ginger_run(){
|
77 |
+
if(is_feed()) return;
|
78 |
+
$option_ginger_general = get_option('ginger_general');
|
79 |
+
if($option_ginger_general['enable_ginger'] != 1) return;
|
80 |
+
if(isset($_COOKIE['ginger-cookie']) && $_COOKIE['ginger-cookie'] == 'Y'):
|
81 |
+
if($option_ginger_general['ginger_cache'] == 'no') return;
|
82 |
+
endif;
|
83 |
+
if($option_ginger_general['ginger_opt'] == 'in'):
|
84 |
+
ob_start();
|
85 |
+
add_action('shutdown', '__shutdown', 0);
|
86 |
+
add_filter('final_output', 'ginger_parse_dom');
|
87 |
+
endif;
|
88 |
+
}
|
89 |
+
add_action('wp', 'ginger_run');
|
90 |
+
|
91 |
+
|
92 |
+
|
93 |
+
function __shutdown(){
|
94 |
+
$final = '';
|
95 |
+
|
96 |
+
// We'll need to get the number of ob levels we're in, so that we can iterate over each, collecting
|
97 |
+
// that buffer's output into the final output.
|
98 |
+
$levels = count(ob_get_level());
|
99 |
+
|
100 |
+
for ($i = 0; $i < $levels; $i++){
|
101 |
+
$final .= ob_get_clean();
|
102 |
+
}
|
103 |
+
|
104 |
+
// Apply any filters to the final output
|
105 |
+
echo apply_filters('final_output', $final);
|
106 |
+
}
|
107 |
+
|
108 |
+
|
109 |
+
|
110 |
+
|
111 |
+
function ginger_parse_dom($output){
|
112 |
+
|
113 |
+
$ginger_script_tags = array(
|
114 |
+
'platform.twitter.com/widgets.js',
|
115 |
+
'apis.google.com/js/plusone.js',
|
116 |
+
'apis.google.com/js/platform.js',
|
117 |
+
'connect.facebook.net',
|
118 |
+
'platform.linkedin.com',
|
119 |
+
'assets.pinterest.com',
|
120 |
+
'www.youtube.com/iframe_api',
|
121 |
+
'www.google-analytics.com/analytics.js',
|
122 |
+
'google-analytics.com/ga.js',
|
123 |
+
'new google.maps.',
|
124 |
+
'_getTracker',
|
125 |
+
'disqus.com',
|
126 |
+
);
|
127 |
+
$ginger_script_tags = apply_filters('ginger_script_tags', $ginger_script_tags);
|
128 |
+
$ginger_script_async_tags = array(
|
129 |
+
'addthis.com'
|
130 |
+
);
|
131 |
+
$ginger_script_async_tags = apply_filters('ginger_script_async_tags', $ginger_script_async_tags);
|
132 |
+
$ginger_iframe_tags = array(
|
133 |
+
'youtube.com',
|
134 |
+
'platform.twitter.com',
|
135 |
+
'www.facebook.com/plugins/like.php',
|
136 |
+
'apis.google.com',
|
137 |
+
'www.google.com/maps/embed/',
|
138 |
+
'player.vimeo.com',
|
139 |
+
'disqus.com'
|
140 |
+
);
|
141 |
+
$ginger_iframe_tags = apply_filters('ginger_add_iframe', $ginger_iframe_tags);
|
142 |
+
if(strpos($output, '<html') === false):
|
143 |
+
return $output;
|
144 |
+
elseif(strpos($output, '<html') > 200 ):
|
145 |
+
return $output;
|
146 |
+
endif;
|
147 |
+
libxml_use_internal_errors(true);
|
148 |
+
$doc = new DOMDocument();
|
149 |
+
$doc->encoding = 'utf-8';
|
150 |
+
$doc->loadHTML(mb_convert_encoding($output, 'HTML-ENTITIES', 'UTF-8'));
|
151 |
+
// get all the script tags
|
152 |
+
$script_tags = $doc->getElementsByTagName('script');
|
153 |
+
$async_array = array();
|
154 |
+
$domElemsToRemove = array();
|
155 |
+
foreach($script_tags as $script):
|
156 |
+
$src_script = $script->getAttribute('src');
|
157 |
+
if($src_script):
|
158 |
+
if(strpos_arr($src_script, $ginger_script_tags) !== false ):
|
159 |
+
$script->setAttribute("class", "ginger-script");
|
160 |
+
$script->setAttribute("type", "text/plain");
|
161 |
+
continue;
|
162 |
+
endif;
|
163 |
+
if(strpos_arr($src_script, $ginger_script_async_tags) !== false ):
|
164 |
+
//return print_r($script->nodeValue);
|
165 |
+
$async_array[] = $src_script;
|
166 |
+
$domElemsToRemove[] = $script;
|
167 |
+
continue;
|
168 |
+
endif;
|
169 |
+
endif;
|
170 |
+
if($script->nodeValue):
|
171 |
+
$key = strpos_arr($script->nodeValue, $ginger_script_tags);
|
172 |
+
if($key !== false ):
|
173 |
+
if($ginger_script_tags[$key] == 'www.google-analytics.com/analytics.js' || $ginger_script_tags[$key] == 'google-analytics.com/ga.js')
|
174 |
+
if(strpos($script->nodeValue, 'anonymizeIp') !== false ):
|
175 |
+
continue;
|
176 |
+
endif;
|
177 |
+
$script->setAttribute("class", "ginger-script");
|
178 |
+
$script->setAttribute("type", "text/plain");
|
179 |
+
if($ginger_script_tags[$key] == 'disqus.com/embed.js' || $ginger_script_tags[$key] == 'disqus.com'):
|
180 |
+
$script->setAttribute("class", "ginger-script");
|
181 |
+
$script->setAttribute("type", "text/plain");
|
182 |
+
endif;
|
183 |
+
endif;
|
184 |
+
endif;
|
185 |
+
endforeach;
|
186 |
+
foreach( $domElemsToRemove as $domElement ){
|
187 |
+
$domElement->parentNode->removeChild($domElement);
|
188 |
+
}
|
189 |
+
// get all the iframe tags
|
190 |
+
$iframe_tags = $doc->getElementsByTagName('iframe');
|
191 |
+
foreach($iframe_tags as $iframe):
|
192 |
+
$src_iframe = $iframe->getAttribute('src');
|
193 |
+
if($src_iframe):
|
194 |
+
if(strpos_arr($src_iframe, $ginger_iframe_tags) !== false ):
|
195 |
+
$iframe->removeAttribute('src');
|
196 |
+
$iframe->setAttribute("data-ce-src", $src_iframe);
|
197 |
+
if($iframe->hasAttribute('class')):
|
198 |
+
$addclass = $iframe->getAttribute('class');
|
199 |
+
else:
|
200 |
+
$addclass = '';
|
201 |
+
endif;
|
202 |
+
$iframe->setAttribute("class", "ginger-iframe " . $addclass);
|
203 |
+
endif;
|
204 |
+
endif;
|
205 |
+
endforeach;
|
206 |
+
if(!empty($async_array)):
|
207 |
+
$text = json_encode($async_array);
|
208 |
+
$text = 'var async_ginger_script = ' . $text . ';';
|
209 |
+
$head = $doc->getElementsByTagName('head')->item(0);
|
210 |
+
$element = $doc->createElement('script', $text);
|
211 |
+
$head->appendChild($element);
|
212 |
+
endif;
|
213 |
+
|
214 |
+
// get the HTML string back
|
215 |
+
$output = $doc->saveHTML();
|
216 |
+
libxml_use_internal_errors(false);
|
217 |
+
return $output;
|
218 |
+
}
|
219 |
+
|
220 |
+
function strpos_arr($haystack, $needle) {
|
221 |
+
if(!is_array($needle)) $needle = array($needle);
|
222 |
+
foreach($needle as $key => $what) {
|
223 |
+
if(($pos = strpos($haystack, $what))!==false) return $key;
|
224 |
+
}
|
225 |
+
return false;
|
226 |
+
}
|
227 |
+
|
front/gingerfront.utils.php
CHANGED
@@ -1,18 +1,15 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
-
* User: matteobarale
|
5 |
-
* Date: 11/06/15
|
6 |
-
* Time: 15:48
|
7 |
*/
|
8 |
|
9 |
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
/**
|
14 |
-
* Register style sheet.
|
15 |
*/
|
|
|
|
|
|
|
16 |
function ginger_style_script() {
|
17 |
$option_ginger_bar = get_option('ginger_banner');
|
18 |
if(isset($_COOKIE['ginger-cookie']) && $_COOKIE['ginger-cookie'] == 'N' || $option_ginger_bar['ginger_banner_type'] == 'dialog'):
|
@@ -23,8 +20,10 @@ function ginger_style_script() {
|
|
23 |
wp_enqueue_style( 'ginger-style' );
|
24 |
endif;
|
25 |
}
|
26 |
-
|
27 |
-
|
|
|
|
|
28 |
$option_ginger_general = get_option('ginger_general');
|
29 |
$option_ginger_bar = get_option('ginger_banner');
|
30 |
if($option_ginger_general['enable_ginger'] != 1) return;
|
@@ -60,7 +59,12 @@ function gigner_custom_style(){
|
|
60 |
<?php endif;
|
61 |
}
|
62 |
|
63 |
-
|
|
|
|
|
|
|
|
|
|
|
64 |
<?php
|
65 |
//Recupero le informazioni necessarie per stampare il banner
|
66 |
$option_ginger_general = get_option('ginger_general');
|
@@ -86,21 +90,8 @@ function ginger_scirpt(){ ?>
|
|
86 |
endif;
|
87 |
//Recupero le impostazioni per il banner
|
88 |
//Testo Banner
|
89 |
-
|
90 |
-
$ginger_text = $option_ginger_bar['ginger_banner_text'];
|
91 |
-
$ginger_text = str_replace('</', '<\/', $ginger_text);
|
92 |
-
$ginger_text = str_replace( array("\n", "\r"), "<br \/>", $ginger_text );
|
93 |
-
//Recupero privacy policy se presente
|
94 |
-
if(strpos($ginger_text, '{{privacy_page}}') !== false):
|
95 |
-
$privacy_policy = get_option('ginger_policy', true);
|
96 |
-
$privacy_policy = get_post($privacy_policy);
|
97 |
-
$privacy_policy = ' <a href="' . get_permalink($privacy_policy->ID) . '">' . $privacy_policy->post_title . '<\/a>';
|
98 |
-
$ginger_text = str_replace('{{privacy_page}}', $privacy_policy, $ginger_text);
|
99 |
-
endif;
|
100 |
|
101 |
-
else:
|
102 |
-
$ginger_text = 'This website uses cookies.';
|
103 |
-
endif;
|
104 |
//Definisco se è bar modal top o bottom
|
105 |
if($option_ginger_bar['ginger_banner_position'] == 'top'):
|
106 |
$banner_class = 'top';
|
@@ -116,26 +107,12 @@ function ginger_scirpt(){ ?>
|
|
116 |
$banner_class .= ' light';
|
117 |
endif;
|
118 |
//Recupero Testo Iframe
|
119 |
-
if($option_ginger_bar['ginger_Iframe_text']):
|
120 |
-
$ginger_iframe_text = $option_ginger_bar['ginger_Iframe_text'];
|
121 |
-
$ginger_iframe_text = str_replace('</', '<\/', $ginger_iframe_text);
|
122 |
-
$ginger_iframe_text = str_replace( array("\n", "\r"), "<br \/>", $ginger_iframe_text );
|
123 |
-
else:
|
124 |
-
$ginger_iframe_text = 'This website uses cookies.';
|
125 |
-
endif;
|
126 |
-
//Recupero Label
|
127 |
-
if($option_ginger_bar['accept_cookie_button_text']):
|
128 |
-
$label_accept_cookie = $option_ginger_bar['accept_cookie_button_text'];
|
129 |
-
else:
|
130 |
-
$label_accept_cookie = __('Enable Cookies', 'ginger');
|
131 |
-
endif;
|
132 |
-
//Recupero Label
|
133 |
-
if($option_ginger_bar['disable_cookie_button_text']):
|
134 |
-
$label_disable_cookie = $option_ginger_bar['disable_cookie_button_text'];
|
135 |
-
else:
|
136 |
-
$label_disable_cookie = __('Disable Cookies', 'ginger');
|
137 |
-
endif; ?>
|
138 |
|
|
|
|
|
|
|
|
|
|
|
139 |
<!-- Ginger Script -->
|
140 |
<script src="<?php echo plugin_dir_url( __FILE__ ); ?>js/cookies-enabler.min.js"></script>
|
141 |
<!-- Init the script -->
|
@@ -210,156 +187,4 @@ function ginger_scirpt(){ ?>
|
|
210 |
|
211 |
<?php }
|
212 |
|
213 |
-
add_action('wp_footer', 'ginger_scirpt');
|
214 |
|
215 |
-
//Ginger Start
|
216 |
-
function ginger_run(){
|
217 |
-
if(is_feed()) return;
|
218 |
-
$option_ginger_general = get_option('ginger_general');
|
219 |
-
if($option_ginger_general['enable_ginger'] != 1) return;
|
220 |
-
if(isset($_COOKIE['ginger-cookie']) && $_COOKIE['ginger-cookie'] == 'Y'):
|
221 |
-
if($option_ginger_general['ginger_cache'] == 'no') return;
|
222 |
-
endif;
|
223 |
-
if($option_ginger_general['ginger_opt'] == 'in'):
|
224 |
-
ob_start();
|
225 |
-
add_action('shutdown', '__shutdown', 0);
|
226 |
-
add_filter('final_output', 'ginger_parse_dom');
|
227 |
-
endif;
|
228 |
-
}
|
229 |
-
add_action('wp', 'ginger_run');
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
function __shutdown(){
|
234 |
-
$final = '';
|
235 |
-
|
236 |
-
// We'll need to get the number of ob levels we're in, so that we can iterate over each, collecting
|
237 |
-
// that buffer's output into the final output.
|
238 |
-
$levels = count(ob_get_level());
|
239 |
-
|
240 |
-
for ($i = 0; $i < $levels; $i++){
|
241 |
-
$final .= ob_get_clean();
|
242 |
-
}
|
243 |
-
|
244 |
-
// Apply any filters to the final output
|
245 |
-
echo apply_filters('final_output', $final);
|
246 |
-
}
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
function ginger_parse_dom($output){
|
252 |
-
|
253 |
-
$ginger_script_tags = array(
|
254 |
-
'platform.twitter.com/widgets.js',
|
255 |
-
'apis.google.com/js/plusone.js',
|
256 |
-
'apis.google.com/js/platform.js',
|
257 |
-
'connect.facebook.net',
|
258 |
-
'platform.linkedin.com',
|
259 |
-
'assets.pinterest.com',
|
260 |
-
'www.youtube.com/iframe_api',
|
261 |
-
'www.google-analytics.com/analytics.js',
|
262 |
-
'google-analytics.com/ga.js',
|
263 |
-
'new google.maps.',
|
264 |
-
'_getTracker',
|
265 |
-
'disqus.com',
|
266 |
-
);
|
267 |
-
|
268 |
-
$ginger_script_async_tags = array(
|
269 |
-
'addthis.com'
|
270 |
-
);
|
271 |
-
|
272 |
-
$ginger_iframe_tags = array(
|
273 |
-
'youtube.com',
|
274 |
-
'platform.twitter.com',
|
275 |
-
'www.facebook.com/plugins/like.php',
|
276 |
-
'apis.google.com',
|
277 |
-
'www.google.com/maps/embed/',
|
278 |
-
'player.vimeo.com',
|
279 |
-
'disqus.com'
|
280 |
-
);
|
281 |
-
do_action('ginger_add_iframe');
|
282 |
-
if(strpos($output, '<html') === false):
|
283 |
-
return $output;
|
284 |
-
elseif(strpos($output, '<html') > 200 ):
|
285 |
-
return $output;
|
286 |
-
endif;
|
287 |
-
libxml_use_internal_errors(true);
|
288 |
-
$doc = new DOMDocument();
|
289 |
-
$doc->encoding = 'utf-8';
|
290 |
-
$doc->loadHTML(mb_convert_encoding($output, 'HTML-ENTITIES', 'UTF-8'));
|
291 |
-
// get all the script tags
|
292 |
-
$script_tags = $doc->getElementsByTagName('script');
|
293 |
-
$async_array = array();
|
294 |
-
$domElemsToRemove = array();
|
295 |
-
foreach($script_tags as $script):
|
296 |
-
$src_script = $script->getAttribute('src');
|
297 |
-
if($src_script):
|
298 |
-
if(strpos_arr($src_script, $ginger_script_tags) !== false ):
|
299 |
-
$script->setAttribute("class", "ginger-script");
|
300 |
-
$script->setAttribute("type", "text/plain");
|
301 |
-
continue;
|
302 |
-
endif;
|
303 |
-
if(strpos_arr($src_script, $ginger_script_async_tags) !== false ):
|
304 |
-
$async_array[] = $src_script;
|
305 |
-
$domElemsToRemove[] = $script;
|
306 |
-
continue;
|
307 |
-
endif;
|
308 |
-
endif;
|
309 |
-
if($script->nodeValue):
|
310 |
-
$key = strpos_arr($script->nodeValue, $ginger_script_tags);
|
311 |
-
if($key !== false ):
|
312 |
-
if($ginger_script_tags[$key] == 'www.google-analytics.com/analytics.js' || $ginger_script_tags[$key] == 'google-analytics.com/ga.js')
|
313 |
-
if(strpos($script->nodeValue, 'anonymizeIp') !== false ):
|
314 |
-
continue;
|
315 |
-
endif;
|
316 |
-
$script->setAttribute("class", "ginger-script");
|
317 |
-
$script->setAttribute("type", "text/plain");
|
318 |
-
if($ginger_script_tags[$key] == 'disqus.com/embed.js' || $ginger_script_tags[$key] == 'disqus.com'):
|
319 |
-
$script->setAttribute("class", "ginger-script");
|
320 |
-
$script->setAttribute("type", "text/plain");
|
321 |
-
endif;
|
322 |
-
endif;
|
323 |
-
endif;
|
324 |
-
endforeach;
|
325 |
-
foreach( $domElemsToRemove as $domElement ){
|
326 |
-
$domElement->parentNode->removeChild($domElement);
|
327 |
-
}
|
328 |
-
// get all the iframe tags
|
329 |
-
$iframe_tags = $doc->getElementsByTagName('iframe');
|
330 |
-
foreach($iframe_tags as $iframe):
|
331 |
-
$src_iframe = $iframe->getAttribute('src');
|
332 |
-
if($src_iframe):
|
333 |
-
if(strpos_arr($src_iframe, $ginger_iframe_tags) !== false ):
|
334 |
-
$iframe->removeAttribute('src');
|
335 |
-
$iframe->setAttribute("data-ce-src", $src_iframe);
|
336 |
-
if($iframe->hasAttribute('class')):
|
337 |
-
$addclass = $iframe->getAttribute('class');
|
338 |
-
else:
|
339 |
-
$addclass = '';
|
340 |
-
endif;
|
341 |
-
$iframe->setAttribute("class", "ginger-iframe " . $addclass);
|
342 |
-
endif;
|
343 |
-
endif;
|
344 |
-
endforeach;
|
345 |
-
if(!empty($async_array)):
|
346 |
-
$text = json_encode($async_array);
|
347 |
-
$text = 'var async_ginger_script = ' . $text . ';';
|
348 |
-
$head = $doc->getElementsByTagName('head')->item(0);
|
349 |
-
$element = $doc->createElement('script', $text);
|
350 |
-
$head->appendChild($element);
|
351 |
-
endif;
|
352 |
-
|
353 |
-
// get the HTML string back
|
354 |
-
$output = $doc->saveHTML();
|
355 |
-
libxml_use_internal_errors(false);
|
356 |
-
return $output;
|
357 |
-
}
|
358 |
-
|
359 |
-
function strpos_arr($haystack, $needle) {
|
360 |
-
if(!is_array($needle)) $needle = array($needle);
|
361 |
-
foreach($needle as $key => $what) {
|
362 |
-
if(($pos = strpos($haystack, $what))!==false) return $key;
|
363 |
-
}
|
364 |
-
return false;
|
365 |
-
}
|
1 |
<?php
|
2 |
/**
|
3 |
+
* File per la gestione ed erigazione di script e style nella head e footer
|
|
|
|
|
|
|
4 |
*/
|
5 |
|
6 |
|
7 |
+
/*
|
8 |
+
* wp_head()
|
|
|
|
|
|
|
9 |
*/
|
10 |
+
|
11 |
+
// Registro style di base
|
12 |
+
add_action( 'wp_enqueue_scripts', 'ginger_style_script' );
|
13 |
function ginger_style_script() {
|
14 |
$option_ginger_bar = get_option('ginger_banner');
|
15 |
if(isset($_COOKIE['ginger-cookie']) && $_COOKIE['ginger-cookie'] == 'N' || $option_ginger_bar['ginger_banner_type'] == 'dialog'):
|
20 |
wp_enqueue_style( 'ginger-style' );
|
21 |
endif;
|
22 |
}
|
23 |
+
|
24 |
+
//Aggioungo i custom style
|
25 |
+
add_action('wp_head', 'ginger_custom_style' );
|
26 |
+
function ginger_custom_style(){
|
27 |
$option_ginger_general = get_option('ginger_general');
|
28 |
$option_ginger_bar = get_option('ginger_banner');
|
29 |
if($option_ginger_general['enable_ginger'] != 1) return;
|
59 |
<?php endif;
|
60 |
}
|
61 |
|
62 |
+
/*
|
63 |
+
* wp_footer()
|
64 |
+
*/
|
65 |
+
|
66 |
+
add_action('wp_footer', 'ginger_script');
|
67 |
+
function ginger_script(){ ?>
|
68 |
<?php
|
69 |
//Recupero le informazioni necessarie per stampare il banner
|
70 |
$option_ginger_general = get_option('ginger_general');
|
90 |
endif;
|
91 |
//Recupero le impostazioni per il banner
|
92 |
//Testo Banner
|
93 |
+
$ginger_text = ginger_get_text_banner($option_ginger_bar);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
94 |
|
|
|
|
|
|
|
95 |
//Definisco se è bar modal top o bottom
|
96 |
if($option_ginger_bar['ginger_banner_position'] == 'top'):
|
97 |
$banner_class = 'top';
|
107 |
$banner_class .= ' light';
|
108 |
endif;
|
109 |
//Recupero Testo Iframe
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
110 |
|
111 |
+
$ginger_iframe_text = ginger_get_text_iframe($option_ginger_bar);
|
112 |
+
$label_accept_cookie = ginger_get_label_accept_cookie($option_ginger_bar);
|
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 -->
|
187 |
|
188 |
<?php }
|
189 |
|
|
|
190 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
front/js/cookies-enabler.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
window.COOKIES_ENABLER=window.COOKIES_ENABLER||function(){"use strict";function e(){var e,n;for(e=1;e<arguments.length;e++)for(n in arguments[e])arguments[e].hasOwnProperty(n)&&(arguments[0][n]=arguments[e][n]);return arguments[0]}function n(e,n,t){var s;return function(){var a=this,i=arguments,r=function(){s=null,t||e.apply(a,i)},o=t&&!s;clearTimeout(s),s=setTimeout(r,n),o&&e.apply(a,i)}}function t(e,n){do if(s(e,n))return e;while(e=e.parentNode);return null}function s(e,n){return(" "+e.className+" ").indexOf(" "+n+" ")>-1}var a,i,r,o={scriptClass:"ce-script",iframeClass:"ce-iframe",acceptClass:"ce-accept",disableClass:"ce-disable",dismissClass:"ce-dismiss",bannerClass:"ce-banner",bannerHTML:null!==document.getElementById("ce-banner-html")?document.getElementById("ce-banner-html").innerHTML:'<p>This website uses cookies. <a href="#" class="ce-accept">Enable Cookies</a></p>',eventScroll:!1,scrollOffset:200,clickOutside:!1,cookieName:"ce-cookie",cookieDuration:"365",forceBannerClass:"ginger-banner bottom dialog dark force",forceEnable:!1,forceEnableText:'<div class="ginger-button-wrapper"><div class="ginger-button"><a href="#" class="ginger-accept">Enable Cookie</a></div></div>',iframesPlaceholder:!0,iframesPlaceholderHTML:null!==document.getElementById("ce-iframePlaceholder-html")?document.getElementById("ce-iframePlaceholder-html").innerHTML:'<p>To view this content you need to<a href="#" class="ce-accept">Enable Cookies</a></p>',iframesPlaceholderClass:"ce-iframe-placeholder",onEnable:"",onDismiss:"",onDisable:"",forceReload:!1},c=function(){Math.abs(window.pageYOffset-r)>a.scrollOffset&&"N"!=p.get()&&u()},l=function(){i={accept:document.getElementsByClassName(a.acceptClass),disable:document.getElementsByClassName(a.disableClass),banner:document.getElementsByClassName(a.bannerClass),bannerForce:document.getElementsByClassName(a.forceBannerClass),dismiss:document.getElementsByClassName(a.dismissClass)};var e,n=i.accept,s=n.length,o=i.disable,l=o.length,d=i.dismiss,g=d.length;for(a.eventScroll&&window.addEventListener("load",function(){r=window.pageYOffset,window.addEventListener("scroll",c)}),a.clickOutside&&document.addEventListener("click",function(e){var n=e.target;return t(n,a.iframesPlaceholderClass)||t(n,a.disableClass)||t(n,a.bannerClass)||t(n,a.dismissClass)||t(n,a.disableClass)?!1:void("N"!=p.get()&&u())}),e=0;s>e;e++)n[e].addEventListener("click",function(e){e.preventDefault(),u(e)});for(e=0;l>e;e++)o[e].addEventListener("click",function(e){e.preventDefault(),f(e)});for(e=0;g>e;e++)d[e].addEventListener("click",function(e){e.preventDefault(),m.dismiss()})},d=function(n){if(a=e({},o,n),"Y"==p.get())"function"==typeof a.onEnable&&a.onEnable(),b.get(),g.get();else if("N"==p.get()){var t=document.getElementById("disqus_thread");null!=t&&(t.style.display="none"),0!=a.forceEnable&&m.forceAccept(),"function"==typeof a.onDisable&&a.onDisable(),g.hide(),l()}else{var t=document.getElementById("disqus_thread");null!=t&&(t.style.display="none"),m.create(),g.hide(),l()}},u=n(function(e){if("undefined"!=typeof e&&"click"===e.type&&e.preventDefault(),"Y"!=p.get()){p.set(),b.get(),
|
1 |
+
function strpos(e,n,t){var s=(e+"").indexOf(n,t||0);return-1===s?!1:s}window.COOKIES_ENABLER=window.COOKIES_ENABLER||function(){"use strict";function e(){var e,n;for(e=1;e<arguments.length;e++)for(n in arguments[e])arguments[e].hasOwnProperty(n)&&(arguments[0][n]=arguments[e][n]);return arguments[0]}function n(e,n,t){var s;return function(){var a=this,i=arguments,r=function(){s=null,t||e.apply(a,i)},o=t&&!s;clearTimeout(s),s=setTimeout(r,n),o&&e.apply(a,i)}}function t(e,n){do if(s(e,n))return e;while(e=e.parentNode);return null}function s(e,n){return(" "+e.className+" ").indexOf(" "+n+" ")>-1}var a,i,r,o={scriptClass:"ce-script",iframeClass:"ce-iframe",acceptClass:"ce-accept",disableClass:"ce-disable",dismissClass:"ce-dismiss",bannerClass:"ce-banner",bannerHTML:null!==document.getElementById("ce-banner-html")?document.getElementById("ce-banner-html").innerHTML:'<p>This website uses cookies. <a href="#" class="ce-accept">Enable Cookies</a></p>',eventScroll:!1,scrollOffset:200,clickOutside:!1,cookieName:"ce-cookie",cookieDuration:"365",forceBannerClass:"ginger-banner bottom dialog dark force",forceEnable:!1,forceEnableText:'<div class="ginger-button-wrapper"><div class="ginger-button"><a href="#" class="ginger-accept">Enable Cookie</a></div></div>',iframesPlaceholder:!0,iframesPlaceholderHTML:null!==document.getElementById("ce-iframePlaceholder-html")?document.getElementById("ce-iframePlaceholder-html").innerHTML:'<p>To view this content you need to<a href="#" class="ce-accept">Enable Cookies</a></p>',iframesPlaceholderClass:"ce-iframe-placeholder",onEnable:"",onDismiss:"",onDisable:"",forceReload:!1},c=function(){Math.abs(window.pageYOffset-r)>a.scrollOffset&&"N"!=p.get()&&u()},l=function(){i={accept:document.getElementsByClassName(a.acceptClass),disable:document.getElementsByClassName(a.disableClass),banner:document.getElementsByClassName(a.bannerClass),bannerForce:document.getElementsByClassName(a.forceBannerClass),dismiss:document.getElementsByClassName(a.dismissClass)};var e,n=i.accept,s=n.length,o=i.disable,l=o.length,d=i.dismiss,g=d.length;for(a.eventScroll&&window.addEventListener("load",function(){r=window.pageYOffset,window.addEventListener("scroll",c)}),a.clickOutside&&document.addEventListener("click",function(e){var n=e.target;return t(n,a.iframesPlaceholderClass)||t(n,a.disableClass)||t(n,a.bannerClass)||t(n,a.dismissClass)||t(n,a.disableClass)?!1:void("N"!=p.get()&&u())}),e=0;s>e;e++)n[e].addEventListener("click",function(e){e.preventDefault(),u(e)});for(e=0;l>e;e++)o[e].addEventListener("click",function(e){e.preventDefault(),f(e)});for(e=0;g>e;e++)d[e].addEventListener("click",function(e){e.preventDefault(),m.dismiss()})},d=function(n){if(a=e({},o,n),"Y"==p.get())"function"==typeof a.onEnable&&a.onEnable(),y.get_async(),b.get(),g.get();else if("N"==p.get()){var t=document.getElementById("disqus_thread");null!=t&&(t.style.display="none"),0!=a.forceEnable&&m.forceAccept(),"function"==typeof a.onDisable&&a.onDisable(),g.hide(),l()}else{var t=document.getElementById("disqus_thread");null!=t&&(t.style.display="none"),m.create(),g.hide(),l()}},u=n(function(e){if("undefined"!=typeof e&&"click"===e.type&&e.preventDefault(),"Y"!=p.get()){y.get_async(),p.set(),b.get(),g.get(),g.removePlaceholders(),m.dismiss();var n=document.getElementById("disqus_thread");null!=n&&(n.style.display="block"),window.removeEventListener("scroll",c),"function"==typeof a.onEnable&&a.onEnable(),1==a.forceReload&&location.reload()}},250,!1),f=function(e){"undefined"!=typeof e&&"click"===e.type&&e.preventDefault(),"N"!=p.get()&&(p.set("N"),m.dismiss(),window.removeEventListener("scroll",c),"function"==typeof a.onDisable&&a.onDisable())},m=function(){function e(){var e='<div class="'+a.bannerClass+'">'+a.bannerHTML+"</div>";document.body.insertAdjacentHTML("beforeend",e)}function n(){var e='<div class="'+a.forceBannerClass+'">'+a.forceEnableText+"</div>";document.body.insertAdjacentHTML("beforeend",e)}function t(){i.bannerForce[0]&&(i.bannerForce[0].style.display="none"),i.banner[0]&&(i.banner[0].style.display="none"),"function"==typeof a.onDismiss&&a.onDismiss()}return{create:e,dismiss:t,forceAccept:n}}(),p=function(){function e(e){var n,t,s="undefined"!=typeof e?e:"Y";a.cookieDuration?(n=new Date,n.setTime(n.getTime()+24*a.cookieDuration*60*60*1e3),t="; expires="+n.toGMTString()):t="",document.cookie=a.cookieName+"="+s+t+"; path=/"}function n(){var e,n,t,s=document.cookie.split(";"),i=s.length;for(e=0;i>e;e++)if(n=s[e].substr(0,s[e].indexOf("=")),t=s[e].substr(s[e].indexOf("=")+1),n=n.replace(/^\s+|\s+$/g,""),n==a.cookieName)return unescape(t)}return{set:e,get:n}}(),g=function(){function e(e){var n=document.createElement("div");n.className=a.iframesPlaceholderClass,n.innerHTML=a.iframesPlaceholderHTML,e.parentNode.insertBefore(n,e)}function n(){var e,n=document.getElementsByClassName(a.iframesPlaceholderClass),t=n.length;for(e=t-1;e>=0;e--)n[e].remove()}function t(){var n,t,s=document.getElementsByClassName(a.iframeClass),i=s.length;for(t=0;i>t;t++)n=s[t],n.style.display="none",a.iframesPlaceholder&&e(n)}function s(){var e,n,t,s=document.getElementsByClassName(a.iframeClass),i=s.length;for(t=0;i>t;t++)n=s[t],e=n.attributes["data-ce-src"].value,n.src=e,n.style.display="block"}return{hide:t,get:s,removePlaceholders:n}}(),b=function(){function e(){var e,n,t,s,i=document.getElementsByClassName(a.scriptClass),r=i.length,o=document.createDocumentFragment();for(e=0;r>e;e++)if(i[e].hasAttribute("data-ce-src"))"undefined"==typeof postscribe&&postscribe(i[e].parentNode,'<script src="'+i[e].getAttribute("data-ce-src")+'"></script>');else{for(t=document.createElement("script"),t.type="text/javascript",n=0;n<i[e].attributes.length;n++)s=i[e].attributes[n],s.specified&&"type"!=s.name&&"class"!=s.name&&t.setAttribute(s.name,s.value);t.innerHTML=i[e].innerHTML,o.appendChild(t)}document.body.appendChild(o)}function n(){"undefined"!=typeof async_ginger_script}return{get:e,get_async:n}}(),y=function(){function e(){if("undefined"!=typeof async_ginger_script){var e,n=async_ginger_script;for(e=0;e<n.length;++e){var t=document.createElement("script");t.type="text/javascript",t.src=n[e],document.getElementsByTagName("head")[0].appendChild(t)}}}return{get_async:e}}();return{init:d,enableCookies:u,dismissBanner:m.dismiss}}();
|
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:
|
7 |
Author: Manafactory
|
8 |
Author URI: http://manafactory.it/
|
9 |
License: GPLv2 or later
|
@@ -14,15 +14,18 @@ if ( !defined('ABSPATH')) exit;
|
|
14 |
|
15 |
load_plugin_textdomain( 'ginger', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
|
16 |
|
|
|
|
|
|
|
17 |
//Gestione Backend
|
18 |
if(is_admin()){
|
19 |
require_once("admin/ginger.utils.php");
|
20 |
require_once("admin/ginger.pointer.php");
|
|
|
|
|
21 |
}
|
22 |
//Gestione Frontend
|
23 |
if(!is_admin()){
|
24 |
require_once("front/gingerfront.utils.php");
|
|
|
25 |
}
|
26 |
-
|
27 |
-
register_activation_hook( __FILE__, 'ginger_plugin_activate' );
|
28 |
-
|
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.0
|
7 |
Author: Manafactory
|
8 |
Author URI: http://manafactory.it/
|
9 |
License: GPLv2 or later
|
14 |
|
15 |
load_plugin_textdomain( 'ginger', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
|
16 |
|
17 |
+
// check existing addon
|
18 |
+
require_once('addon/ginger.addon.utils.php');
|
19 |
+
|
20 |
//Gestione Backend
|
21 |
if(is_admin()){
|
22 |
require_once("admin/ginger.utils.php");
|
23 |
require_once("admin/ginger.pointer.php");
|
24 |
+
// require_once("admin/add-on/available_add_on.php");
|
25 |
+
|
26 |
}
|
27 |
//Gestione Frontend
|
28 |
if(!is_admin()){
|
29 |
require_once("front/gingerfront.utils.php");
|
30 |
+
require_once("front/gingerfront.core.php");
|
31 |
}
|
|
|
|
|
|
languages/ginger-it_IT.mo
CHANGED
Binary file
|
languages/ginger-it_IT.po
CHANGED
@@ -4,8 +4,8 @@ msgid ""
|
|
4 |
msgstr ""
|
5 |
"Project-Id-Version: _s 1.0.0\n"
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tags/_s\n"
|
7 |
-
"POT-Creation-Date: 2015-
|
8 |
-
"PO-Revision-Date: 2015-
|
9 |
"Last-Translator: \n"
|
10 |
"Language-Team: \n"
|
11 |
"Language: it_IT\n"
|
@@ -19,15 +19,463 @@ msgstr ""
|
|
19 |
"X-Poedit-Basepath: .\n"
|
20 |
"X-Poedit-SearchPath-0: /var/www/sitolocale/wp-content/plugins/ginger\n"
|
21 |
|
22 |
-
#: /var/www/sitolocale/wp-content/plugins/ginger/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
msgid "Enable Cookies"
|
24 |
msgstr "Abilita Cookies"
|
25 |
|
26 |
-
#: /var/www/sitolocale/wp-content/plugins/ginger/front/gingerfront.utils.php:
|
27 |
msgid "Disable Cookies"
|
28 |
msgstr "Disabilita Cookies"
|
29 |
|
30 |
-
#: /var/www/sitolocale/wp-content/plugins/ginger/admin/ginger.admin.php:
|
31 |
msgid ""
|
32 |
"The page with the specified title already exists and is your current privacy "
|
33 |
"policy page!"
|
@@ -35,27 +483,23 @@ msgstr ""
|
|
35 |
"La pagina con il titolo specificato è già esistente ed impostata come pagina "
|
36 |
"di privacy attuale!"
|
37 |
|
38 |
-
#: /var/www/sitolocale/wp-content/plugins/ginger/admin/ginger.admin.php:
|
39 |
msgid "Updated!"
|
40 |
msgstr "Aggiornato!"
|
41 |
|
42 |
-
#: /var/www/sitolocale/wp-content/plugins/ginger/admin/ginger.admin.php:
|
43 |
msgid "General Configuration"
|
44 |
msgstr "Configurazione Generale"
|
45 |
|
46 |
-
#: /var/www/sitolocale/wp-content/plugins/ginger/admin/ginger.admin.php:
|
47 |
#: /var/www/sitolocale/wp-content/plugins/ginger/admin/partial/banner.php:5
|
48 |
msgid "Banner Setup"
|
49 |
msgstr "Banner Setup"
|
50 |
|
51 |
-
#: /var/www/sitolocale/wp-content/plugins/ginger/admin/ginger.admin.php:
|
52 |
msgid "Privacy Policy"
|
53 |
msgstr "Privacy Policy"
|
54 |
|
55 |
-
#: /var/www/sitolocale/wp-content/plugins/ginger/admin/ginger.admin.php:89
|
56 |
-
msgid "Save Changes"
|
57 |
-
msgstr "Aggiorna"
|
58 |
-
|
59 |
#: /var/www/sitolocale/wp-content/plugins/ginger/admin/ginger.utils.php:76
|
60 |
msgid ""
|
61 |
"This website uses cookies. By continuing to use the site you are agreeing to "
|
@@ -79,8 +523,8 @@ msgstr "<b>Ancora un passo</b>: devi abilitare il banner in "
|
|
79 |
|
80 |
#: /var/www/sitolocale/wp-content/plugins/ginger/admin/partial/link.php:8
|
81 |
#: /var/www/sitolocale/wp-content/plugins/ginger/admin/partial/url.php:8
|
82 |
-
#: /var/www/sitolocale/wp-content/plugins/ginger/admin/partial/banner.php:
|
83 |
-
#: /var/www/sitolocale/wp-content/plugins/ginger/admin/partial/banner.php:
|
84 |
#: /var/www/sitolocale/wp-content/plugins/ginger/admin/partial/dialog.php:64
|
85 |
#: /var/www/sitolocale/wp-content/plugins/ginger/admin/partial/dialog.php:67
|
86 |
msgid "Link"
|
@@ -296,7 +740,7 @@ msgstr "Testo Iframe"
|
|
296 |
|
297 |
#: /var/www/sitolocale/wp-content/plugins/ginger/admin/partial/banner.php:74
|
298 |
msgid "Customize your banner buttons"
|
299 |
-
msgstr "Personalizza i tuoi
|
300 |
|
301 |
#: /var/www/sitolocale/wp-content/plugins/ginger/admin/partial/banner.php:79
|
302 |
msgid "Accept cookie Button"
|
@@ -361,17 +805,22 @@ msgstr "Personalizza il tuo tema Ginger"
|
|
361 |
msgid "Background"
|
362 |
msgstr "Sfondo"
|
363 |
|
364 |
-
#: /var/www/sitolocale/wp-content/plugins/ginger/admin/partial/banner.php:
|
365 |
-
#: /var/www/sitolocale/wp-content/plugins/ginger/admin/partial/banner.php:
|
366 |
msgid "Button"
|
367 |
msgstr "Button"
|
368 |
|
369 |
-
#: /var/www/sitolocale/wp-content/plugins/ginger/admin/partial/banner.php:
|
|
|
|
|
|
|
|
|
|
|
370 |
msgid "Custom CSS"
|
371 |
msgstr "Custom CSS"
|
372 |
|
373 |
-
#: /var/www/sitolocale/wp-content/plugins/ginger/admin/partial/banner.php:
|
374 |
-
#: /var/www/sitolocale/wp-content/plugins/ginger/admin/partial/banner.php:
|
375 |
msgid "Insert here your banner custom CSS"
|
376 |
msgstr "Inserisci qui il CSS personalizzato per il tuo banner"
|
377 |
|
4 |
msgstr ""
|
5 |
"Project-Id-Version: _s 1.0.0\n"
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tags/_s\n"
|
7 |
+
"POT-Creation-Date: 2015-07-09 12:06+0100\n"
|
8 |
+
"PO-Revision-Date: 2015-07-09 15:18+0100\n"
|
9 |
"Last-Translator: \n"
|
10 |
"Language-Team: \n"
|
11 |
"Language: it_IT\n"
|
19 |
"X-Poedit-Basepath: .\n"
|
20 |
"X-Poedit-SearchPath-0: /var/www/sitolocale/wp-content/plugins/ginger\n"
|
21 |
|
22 |
+
#: /var/www/sitolocale/wp-content/plugins/ginger/addon/ginger.addon.utils.php:43
|
23 |
+
msgid "Add-on"
|
24 |
+
msgstr ""
|
25 |
+
|
26 |
+
#: /var/www/sitolocale/wp-content/plugins/ginger/addon/ginger.addon.utils.php:176
|
27 |
+
msgid "Available Add-on"
|
28 |
+
msgstr ""
|
29 |
+
|
30 |
+
#: /var/www/sitolocale/wp-content/plugins/ginger/addon/ginger.addon.utils.php:183
|
31 |
+
#: /var/www/sitolocale/wp-content/plugins/ginger/addon/ginger.addon.utils.php:188
|
32 |
+
msgid "Google Analytics"
|
33 |
+
msgstr ""
|
34 |
+
|
35 |
+
#: /var/www/sitolocale/wp-content/plugins/ginger/addon/ginger.addon.utils.php:191
|
36 |
+
msgid "It's FREE! Active it."
|
37 |
+
msgstr ""
|
38 |
+
|
39 |
+
#: /var/www/sitolocale/wp-content/plugins/ginger/addon/ginger.addon.utils.php:193
|
40 |
+
#: /var/www/sitolocale/wp-content/plugins/ginger/addon/ginger.addon.utils.php:235
|
41 |
+
msgid "Add-on description."
|
42 |
+
msgstr ""
|
43 |
+
|
44 |
+
#: /var/www/sitolocale/wp-content/plugins/ginger/addon/ginger.addon.utils.php:197
|
45 |
+
#: /var/www/sitolocale/wp-content/plugins/ginger/addon/ginger.addon.utils.php:239
|
46 |
+
msgid "Active add-on"
|
47 |
+
msgstr ""
|
48 |
+
|
49 |
+
#: /var/www/sitolocale/wp-content/plugins/ginger/addon/ginger.addon.utils.php:209
|
50 |
+
#: /var/www/sitolocale/wp-content/plugins/ginger/addon/ginger.addon.utils.php:251
|
51 |
+
msgid "Deactivate"
|
52 |
+
msgstr ""
|
53 |
+
|
54 |
+
#: /var/www/sitolocale/wp-content/plugins/ginger/addon/ginger.addon.utils.php:216
|
55 |
+
#: /var/www/sitolocale/wp-content/plugins/ginger/addon/ginger.addon.utils.php:258
|
56 |
+
msgid "Insert here the add-on activation code."
|
57 |
+
msgstr ""
|
58 |
+
|
59 |
+
#: /var/www/sitolocale/wp-content/plugins/ginger/addon/ginger.addon.utils.php:217
|
60 |
+
#: /var/www/sitolocale/wp-content/plugins/ginger/addon/ginger.addon.utils.php:259
|
61 |
+
#, fuzzy
|
62 |
+
msgid "Insert here your activation mail."
|
63 |
+
msgstr "Inserisci qui il CSS personalizzato per il tuo banner"
|
64 |
+
|
65 |
+
#: /var/www/sitolocale/wp-content/plugins/ginger/addon/ginger.addon.utils.php:220
|
66 |
+
#: /var/www/sitolocale/wp-content/plugins/ginger/addon/ginger.addon.utils.php:262
|
67 |
+
msgid "Activate"
|
68 |
+
msgstr ""
|
69 |
+
|
70 |
+
#: /var/www/sitolocale/wp-content/plugins/ginger/addon/ginger.addon.utils.php:229
|
71 |
+
#: /var/www/sitolocale/wp-content/plugins/ginger/addon/ginger.addon.utils.php:233
|
72 |
+
#: /var/www/sitolocale/wp-content/plugins/ginger/addon/privacy-policy-manager/ginger.privacy-policy-manager.php:11
|
73 |
+
#, fuzzy
|
74 |
+
msgid "Privacy Policy Manager"
|
75 |
+
msgstr "Privacy Policy Page"
|
76 |
+
|
77 |
+
#: /var/www/sitolocale/wp-content/plugins/ginger/addon/analytics/ginger.analytics.php:11
|
78 |
+
msgid "Ginger Analytics"
|
79 |
+
msgstr ""
|
80 |
+
|
81 |
+
#: /var/www/sitolocale/wp-content/plugins/ginger/addon/analytics/ginger.analytics.php:62
|
82 |
+
#: /var/www/sitolocale/wp-content/plugins/ginger/addon/privacy-policy-manager/ginger.privacy-policy-manager.php:65
|
83 |
+
msgid "Impostazioni Add on"
|
84 |
+
msgstr ""
|
85 |
+
|
86 |
+
#: /var/www/sitolocale/wp-content/plugins/ginger/addon/analytics/ginger.analytics.php:91
|
87 |
+
msgid "Inserisci qui il tuo traking code"
|
88 |
+
msgstr ""
|
89 |
+
|
90 |
+
#: /var/www/sitolocale/wp-content/plugins/ginger/addon/analytics/ginger.analytics.php:116
|
91 |
+
#: /var/www/sitolocale/wp-content/plugins/ginger/addon/privacy-policy-manager/ginger.privacy-policy-manager.php:345
|
92 |
+
#: /var/www/sitolocale/wp-content/plugins/ginger/admin/ginger.admin.php:93
|
93 |
+
msgid "Save Changes"
|
94 |
+
msgstr "Aggiorna"
|
95 |
+
|
96 |
+
#: /var/www/sitolocale/wp-content/plugins/ginger/addon/privacy-policy-manager/ginger.privacy-policy-manager.php:70
|
97 |
+
#, fuzzy
|
98 |
+
msgid "PPM crea la tua privacy policy page."
|
99 |
+
msgstr "oppure crea la tua pagina privacy policy "
|
100 |
+
|
101 |
+
#: /var/www/sitolocale/wp-content/plugins/ginger/addon/privacy-policy-manager/ginger.privacy-policy-manager.php:75
|
102 |
+
msgid "Informazioni Generali"
|
103 |
+
msgstr ""
|
104 |
+
|
105 |
+
#: /var/www/sitolocale/wp-content/plugins/ginger/addon/privacy-policy-manager/ginger.privacy-policy-manager.php:83
|
106 |
+
msgid "Nome Sito"
|
107 |
+
msgstr ""
|
108 |
+
|
109 |
+
#: /var/www/sitolocale/wp-content/plugins/ginger/addon/privacy-policy-manager/ginger.privacy-policy-manager.php:93
|
110 |
+
msgid "Titolare Sito"
|
111 |
+
msgstr ""
|
112 |
+
|
113 |
+
#: /var/www/sitolocale/wp-content/plugins/ginger/addon/privacy-policy-manager/ginger.privacy-policy-manager.php:103
|
114 |
+
msgid "Mail Titolare"
|
115 |
+
msgstr ""
|
116 |
+
|
117 |
+
#: /var/www/sitolocale/wp-content/plugins/ginger/addon/privacy-policy-manager/ginger.privacy-policy-manager.php:117
|
118 |
+
#, fuzzy
|
119 |
+
msgid "Privacy Policy Default Text"
|
120 |
+
msgstr "Privacy Policy Page"
|
121 |
+
|
122 |
+
#: /var/www/sitolocale/wp-content/plugins/ginger/addon/privacy-policy-manager/ginger.privacy-policy-manager.php:120
|
123 |
+
msgid "Default Text Area"
|
124 |
+
msgstr ""
|
125 |
+
"<h2><b>Tipologie di Dati raccolti</b></h2>Il Titolare non fornisce una lista "
|
126 |
+
"di tipologie di Dati Personali raccolti.Altri Dati Personali raccolti "
|
127 |
+
"potrebbero essere indicati in altre sezioni di questa privacy policy o "
|
128 |
+
"mediante testi informativi visualizzati contestualmente alla raccolta dei "
|
129 |
+
"Dati stessi.I Dati Personali possono essere inseriti volontariamente "
|
130 |
+
"dall’Utente, oppure raccolti in modo automatico durante l'uso di questa "
|
131 |
+
"Applicazione.L’eventuale utilizzo di Cookie - o di altri strumenti di "
|
132 |
+
"tracciamento - da parte di questa Applicazione o dei titolari dei servizi "
|
133 |
+
"terzi utilizzati da questa Applicazione, ove non diversamente precisato, ha "
|
134 |
+
"la finalità di identificare l’Utente e registrare le relative preferenze per "
|
135 |
+
"finalità strettamente legate all'erogazione del servizio richiesto "
|
136 |
+
"dall’Utente.Il mancato conferimento da parte dell’Utente di alcuni Dati "
|
137 |
+
"Personali potrebbe impedire a questa Applicazione di erogare i propri "
|
138 |
+
"servizi.L'Utente si assume la responsabilità dei Dati Personali di terzi "
|
139 |
+
"pubblicati o condivisi mediante questa Applicazione e garantisce di avere il "
|
140 |
+
"diritto di comunicarli o diffonderli, liberando il Titolare da qualsiasi "
|
141 |
+
"responsabilità verso terzi.<h2><b>Modalità e luogo del trattamento dei Dati "
|
142 |
+
"raccolti</b></h2><h4><b>Modalità di trattamento</b></h4>Il Titolare tratta i "
|
143 |
+
"Dati Personali degli Utenti adottando le opportune misure di sicurezza volte "
|
144 |
+
"ad impedire l’accesso, la divulgazione, la modifica o la distruzione non "
|
145 |
+
"autorizzate dei Dati Personali.Il trattamento viene effettuato mediante "
|
146 |
+
"strumenti informatici e/o telematici, con modalità organizzative e con "
|
147 |
+
"logiche strettamente correlate alle finalità indicate. Oltre al Titolare, in "
|
148 |
+
"alcuni casi, potrebbero avere accesso ai Dati categorie di incaricati "
|
149 |
+
"coinvolti nell’organizzazione del sito (personale amministrativo, "
|
150 |
+
"commerciale, marketing, legali, amministratori di sistema) ovvero soggetti "
|
151 |
+
"esterni (come fornitori di servizi tecnici terzi, corrieri postali, hosting "
|
152 |
+
"provider, società informatiche, agenzie di comunicazione) nominati anche, se "
|
153 |
+
"necessario, Responsabili del Trattamento da parte del Titolare. L’elenco "
|
154 |
+
"aggiornato dei Responsabili potrà sempre essere richiesto al Titolare del "
|
155 |
+
"Trattamento.<h4><b>Luogo</b></h4>I Dati sono trattati presso le sedi "
|
156 |
+
"operative del Titolare ed in ogni altro luogo in cui le parti coinvolte nel "
|
157 |
+
"trattamento siano localizzate. Per ulteriori informazioni, contatta il "
|
158 |
+
"Titolare.<h4><b>Tempi</b></h4>I Dati sono trattati per il tempo necessario "
|
159 |
+
"allo svolgimento del servizio richiesto dall’Utente, o richiesto dalle "
|
160 |
+
"finalità descritte in questo documento, e l’Utente può sempre chiedere "
|
161 |
+
"l’interruzione del Trattamento o la cancellazione dei Dati.Ulteriori "
|
162 |
+
"informazioni sul trattamento</b></h2><h4><b>Difesa in giudizio</b></h4>I "
|
163 |
+
"Dati Personali dell’Utente possono essere utilizzati per la difesa da parte "
|
164 |
+
"del Titolare in giudizio o nelle fasi propedeutiche alla sua eventuale "
|
165 |
+
"instaurazione, da abusi nell'utilizzo della stessa o dei servizi connessi da "
|
166 |
+
"parte dell’Utente.L’Utente dichiara di essere consapevole che il Titolare "
|
167 |
+
"potrebbe essere richiesto di rivelare i Dati su richiesta delle pubbliche "
|
168 |
+
"autorità.<h4><b>Informative specifiche</b></h4>Su richiesta dell’Utente, in "
|
169 |
+
"aggiunta alle informazioni contenute in questa privacy policy, questa "
|
170 |
+
"Applicazione potrebbe fornire all'Utente delle informative aggiuntive e "
|
171 |
+
"contestuali riguardanti servizi specifici, o la raccolta ed il trattamento "
|
172 |
+
"di Dati Personali.<h4><b>Log di sistema e manutenzione</b></h4>Per necessità "
|
173 |
+
"legate al funzionamento ed alla manutenzione, questa Applicazione e gli "
|
174 |
+
"eventuali servizi terzi da essa utilizzati potrebbero raccogliere Log di "
|
175 |
+
"sistema, ossia file che registrano le interazioni e che possono contenere "
|
176 |
+
"anche Dati Personali, quali l’indirizzo IP Utente.<h4><b>Informazioni non "
|
177 |
+
"contenute in questa policy</b></h4>Maggiori informazioni in relazione al "
|
178 |
+
"trattamento dei Dati Personali potranno essere richieste in qualsiasi "
|
179 |
+
"momento al Titolare del Trattamento utilizzando le informazioni di contatto."
|
180 |
+
"<h4><b>Esercizio dei diritti da parte degli Utenti</b></h4>I soggetti cui si "
|
181 |
+
"riferiscono i Dati Personali hanno il diritto in qualunque momento di "
|
182 |
+
"ottenere la conferma dell'esistenza o meno degli stessi presso il Titolare "
|
183 |
+
"del Trattamento, di conoscerne il contenuto e l'origine, di verificarne "
|
184 |
+
"l'esattezza o chiederne l’integrazione, la cancellazione, l'aggiornamento, "
|
185 |
+
"la rettifica, la trasformazione in forma anonima o il blocco dei Dati "
|
186 |
+
"Personali trattati in violazione di legge, nonché di opporsi in ogni caso, "
|
187 |
+
"per motivi legittimi, al loro trattamento. Le richieste vanno rivolte al "
|
188 |
+
"Titolare del Trattamento.Questa Applicazione non supporta le richieste “Do "
|
189 |
+
"Not Track”. Per conoscere se gli eventuali servizi di terze parti utilizzati "
|
190 |
+
"le supportano, consulta le loro privacy policy.<h4><b>Modifiche a questa "
|
191 |
+
"privacy policy</b></h4>Il Titolare del Trattamento si riserva il diritto di "
|
192 |
+
"apportare modifiche alla presente privacy policy in qualunque momento "
|
193 |
+
"dandone pubblicità agli Utenti su questa pagina. Si prega dunque di "
|
194 |
+
"consultare spesso questa pagina, prendendo come riferimento la data di "
|
195 |
+
"ultima modifica indicata in fondo. Nel caso di mancata accettazione delle "
|
196 |
+
"modifiche apportate alla presente privacy policy, l’Utente è tenuto a "
|
197 |
+
"cessare l’utilizzo di questa Applicazione e può richiedere al Titolare del "
|
198 |
+
"Trattamento di rimuovere i propri Dati Personali. Salvo quanto diversamente "
|
199 |
+
"specificato, la precedente privacy policy continuerà ad applicarsi ai Dati "
|
200 |
+
"Personali sino a quel momento raccolti.<h4><b>Informazioni su questa privacy "
|
201 |
+
"policy</b></h4>Il Titolare del Trattamento dei Dati è responsabile per "
|
202 |
+
"questa privacy policy, redatta partendo da moduli predisposti da Iubenda e "
|
203 |
+
"conservati sui suoi server."
|
204 |
+
|
205 |
+
#: /var/www/sitolocale/wp-content/plugins/ginger/addon/privacy-policy-manager/ginger.privacy-policy-manager.php:126
|
206 |
+
msgid "Add your services"
|
207 |
+
msgstr ""
|
208 |
+
|
209 |
+
#: /var/www/sitolocale/wp-content/plugins/ginger/addon/privacy-policy-manager/ginger.privacy-policy-manager.php:132
|
210 |
+
msgid "Social Login"
|
211 |
+
msgstr ""
|
212 |
+
|
213 |
+
#: /var/www/sitolocale/wp-content/plugins/ginger/addon/privacy-policy-manager/ginger.privacy-policy-manager.php:142
|
214 |
+
msgid "Login facebook text"
|
215 |
+
msgstr ""
|
216 |
+
"<h2><b>Permessi Facebook richiesti da questa Applicazione</b></h2>Questa "
|
217 |
+
"Applicazione può richiedere alcuni permessi Facebook che le consentono di "
|
218 |
+
"eseguire azioni con l’account Facebook dell’Utente e di raccogliere "
|
219 |
+
"informazioni, inclusi Dati Personali, da esso.Per maggiorni informazioni sui "
|
220 |
+
"permessi che seguono, fai riferimento alla <a href=”https://developers."
|
221 |
+
"facebook.com/docs/authentication/permissions/” "
|
222 |
+
"target=”_blank”>documentazione dei permessi Facebook</a> ed alla <a "
|
223 |
+
"href=”https://www.facebook.com/about/privacy/” target=”_blank”>privacy "
|
224 |
+
"policy di Facebook</a>.I permessi richiesti sono i seguenti:"
|
225 |
+
"<h4><b>Informazioni di base</b></h4>Le informazioni di base dell’Utente "
|
226 |
+
"registrato su Facebook che normalmente includono i seguenti Dati: id, nome, "
|
227 |
+
"immagine, genere e lingua di localizzazione ed, in alcuni casi gli “Amici” "
|
228 |
+
"di Facebook. Se l'Utente ha reso disponibili pubblicamente Dati ulteriori, "
|
229 |
+
"gli stessi saranno disponibili.<h4><b>'Su di me' degli amici</b></"
|
230 |
+
"h4>Fornisce accesso alla sezione 'Su di me' del profilo degli amici."
|
231 |
+
"<h4><b>Accesso ai dati privati</b></h4>Permette l'accesso ai dati privati "
|
232 |
+
"dell'utente e degli amici<h4><b>Accesso alle attività</b></h4>Fornisce "
|
233 |
+
"accesso alla lista di attività dell'utente<h4><b>Accesso alle liste di "
|
234 |
+
"amici</b></h4>Fornisce accesso alle liste di amici che l'utente ha "
|
235 |
+
"creato<h4><b>Accesso alle richieste</b></h4>Fornisce accesso di lettura alle "
|
236 |
+
"richieste di amicizia dell'utente<h4><b>Accesso allo News Feed</b></"
|
237 |
+
"h4>Fornisce accesso ai post dello News Feed e permette all'applicazione di "
|
238 |
+
"effettuare ricerche su di esso.<h4><b>Accesso offline</b></h4>Permette "
|
239 |
+
"l'accesso ai dati quanto l'utente non è connesso.<h4><b>Aderenze politiche e "
|
240 |
+
"religiose degli amici</b></h4>Fornisce accesso alle aderenze politiche e "
|
241 |
+
"religiose degli amici.<h4><b>Aggiornamento di stato</b></h4>Aggiorna lo "
|
242 |
+
"stato dell'utente.<h4><b>Attività degli amici</b></h4>Fornisce accesso alla "
|
243 |
+
"lista delle attività degli amici.<h4><b>Attività degli amici con App e "
|
244 |
+
"Giochi</b></h4>Permette di recuperare le attività degli amici dell'utente "
|
245 |
+
"con le App e i Giochi.<h4><b>Attività delle App e dei Giochi</b></"
|
246 |
+
"h4>Permette all'applicazione di pubblicare recuperare le attività delle App "
|
247 |
+
"e dei Giochi.<h4><b>Azione music.listen</b></h4>Permette all'applicazione di "
|
248 |
+
"recuperare le azioni pubblicate da tutte le applicazioni che usano l'azione "
|
249 |
+
"music.<h4><b>Azioni 'news.reads'</b></h4>Permette all'applicazione di "
|
250 |
+
"recuperare le azioni pubblicate da tutte le applicazioni che usano l'azione "
|
251 |
+
"'news.reads'.<h4><b>Azioni 'video.watches'</b></h4>Permette all'applicazione "
|
252 |
+
"di recuperare le azioni pubblicate da tutte le applicazioni che usano "
|
253 |
+
"l'azione 'video.watches'.<h4><b>Azioni 'video.watches' degli amici</b></"
|
254 |
+
"h4>Permette all'applicazione di recuperare le azioni pubblicate da tutte le "
|
255 |
+
"applicazioni che usano l'azione 'video.watches'.<h4><b>Azioni Fitness</b></"
|
256 |
+
"h4><h4><b>Azioni Libri</b></h4><h4><b>Azioni music.listens degli amici</b></"
|
257 |
+
"h4>Permette all'applicazione di recuperare le azioni pubblicate da tutte le "
|
258 |
+
"applicazioni che usano l'azione music.listens.<h4><b>Azioni news.read degli "
|
259 |
+
"amici</b></h4>Permette all'applicazione di recuperare le azioni pubblicate "
|
260 |
+
"da tutte le applicazioni che usano l'azione news.read.<h4><b>Azioni "
|
261 |
+
"personalizzate degli amici dell'utente</b></h4>Permette all'applicazione di "
|
262 |
+
"recuperare le azioni pubblicate da un'altra applicazione, secondo quando "
|
263 |
+
"specificato dall''app namespace'.<h4><b>Azioni personalizzate dell'utente</"
|
264 |
+
"b></h4>Permette all'applicazione di recuperare le azioni pubblicate da "
|
265 |
+
"un'altra applicazione, secondo quando specificato dall''app namespace'."
|
266 |
+
"<h4><b>Carica foto</b></h4>Aggiungi o modifica foto.<h4><b>Caricamento di "
|
267 |
+
"video</b></h4>Permette all'app di aggiungere o modificare video dell'utente."
|
268 |
+
"<h4><b>Chat</b></h4>Fornisce alle applicazioni che si integrano con la Chat "
|
269 |
+
"di Facebook la possibilità di effettuare il login dell'utente<h4><b>Checkin</"
|
270 |
+
"b></h4>Fornisce accesso di lettura ai checkin autorizzati dell'utente o a "
|
271 |
+
"quelli di un amico che l'utente può visualizzare<h4><b>Checkin degli amici</"
|
272 |
+
"b></h4>Fornisce accesso di lettura ai checkin degli amici che l'utente può "
|
273 |
+
"vedere.<h4><b>Città</b></h4>Fornisce accesso alla città indicata nel profilo "
|
274 |
+
"dell'utente<h4><b>Città degli amici</b></h4>Fornisce accesso alle città in "
|
275 |
+
"cui vivono gli amici.<h4><b>Città di origine</b></h4>Fornisce accesso alla "
|
276 |
+
"città di origine dell'utente.<h4><b>Città di origine degli amici</b></"
|
277 |
+
"h4>Fornisce accesso alla città di origine degli amici dell'utente."
|
278 |
+
"<h4><b>Condivisione</b></h4>Condivisione al posto dell'utente."
|
279 |
+
"<h4><b>Convinzioni politiche e religiose</b></h4>Fornisce accesso alle "
|
280 |
+
"convinzioni politiche e religiose dell'utente.<h4><b>Crea Eventi</b></"
|
281 |
+
"h4>Permette all'utente di creare e modificare eventi al posto "
|
282 |
+
"dell'utente<h4><b>Crea note</b></h4>Aggiungi o modifica note.<h4><b>Data di "
|
283 |
+
"compleanno</b></h4>Fornisce accesso alla data di compleanno<h4><b>Date di "
|
284 |
+
"compleanno degli amici</b></h4>Fornisce accesso alle date di compleanno "
|
285 |
+
"degli amici.<h4><b>Deal</b></h4>Legge l'attività dei deal<h4><b>Domande</b></"
|
286 |
+
"h4>Fornisce accesso alle domande che l'utente ha posto.<h4><b>Domande degli "
|
287 |
+
"amici</b></h4>Fornisce accesso alle domande degli amici.<h4><b>Educazione</"
|
288 |
+
"b></h4>Fornisce accesso alla sezione Educazione nel profilo "
|
289 |
+
"dell'utente<h4><b>Educazione degli amici</b></h4>Fornisce accesso alle "
|
290 |
+
"informazioni sull'educazione degli amici.<h4><b>Email</b></h4>Fornisce "
|
291 |
+
"accesso all'indirizzo email primario dell'Utente<h4><b>Email di contatto</"
|
292 |
+
"b></h4>Permette di accedere all'indirizzo email di contatto dell'utente."
|
293 |
+
"<h4><b>Esportare i post</b></h4>Esportare i post e renderli pubblici. Tutti "
|
294 |
+
"i post saranno esportati, compresi i messaggi di stato.<h4><b>Eventi</b></"
|
295 |
+
"h4>Fornisce accesso alla lista di eventi a cui l'utente "
|
296 |
+
"partecipa<h4><b>Eventi degli amici</b></h4>Fornisce accesso alla lista degli "
|
297 |
+
"eventi a cui gli amici dell'utente partecipano.<h4><b>Foto</b></h4>Fornisce "
|
298 |
+
"accesso alle foto che l'utente ha caricato ed a quelle in cui è stato "
|
299 |
+
"taggato.<h4><b>Foto degli amici</b></h4>Fornisce accesso alle foto che "
|
300 |
+
"l'utente ha caricato o in cui l'utente è stato taggato.<h4><b>Gestione degli "
|
301 |
+
"annunci</b></h4>Fornisce la possibilità di gestire gli annunci pubblicitari "
|
302 |
+
"e richiamare la Facebook Ads API al posto dell'utente.<h4><b>Gestione dei "
|
303 |
+
"gruppi</b></h4>Permette all'applicazione di gestire i gruppi dell'utente."
|
304 |
+
"<h4><b>Gestione della casella di posta</b></h4>Permette di leggere ed "
|
305 |
+
"inviare messaggi dalla casella di posta dell'utente.<h4><b>Gestione delle "
|
306 |
+
"notifiche</b></h4>Permette all'app di leggere le notifiche e di "
|
307 |
+
"contrassegnarle come lette.<h4><b>Gestione delle pagine</b></h4>Permette "
|
308 |
+
"all'applicazione di recuperare l'access_tokens per le Pagine e le "
|
309 |
+
"Applicazioni che l'utente amministra.<h4><b>Gestisci Liste di Amici</b></"
|
310 |
+
"h4>Permette all'applicazione di creare, eliminare e modificare le liste di "
|
311 |
+
"amici dell'utente.<h4><b>Gruppi</b></h4>Fornisce accesso alla lista di "
|
312 |
+
"gruppi di cui l'utente è membro.<h4><b>Gruppi degli amici</b></h4>Fornisce "
|
313 |
+
"accesso alla lista dei gruppi di cui gli amici dell'utente sono membri."
|
314 |
+
"<h4><b>Insight</b></h4>Fornisce accesso ai dati Insight per pagine, "
|
315 |
+
"applicazioni e domini che l'utente possiede.<h4><b>Interessi</b></"
|
316 |
+
"h4>Fornisce accesso alla lista di interessi dell'utente.<h4><b>Interessi "
|
317 |
+
"degli amici</b></h4>Fornisce accesso alla lista di interessi degli amici "
|
318 |
+
"dell'utente.<h4><b>Invio di notifiche</b></h4>Permette all'app d'inviare "
|
319 |
+
"notifiche<h4><b>Invio SMS</b></h4>Permette all'app di inviare SMS al numero "
|
320 |
+
"di telefono dell'utente.<h4><b>Leggi messaggi della pagina</b></"
|
321 |
+
"h4><h4><b>Lettura della casella di posta</b></h4>Permette all'applicazione "
|
322 |
+
"di leggere la casella di posta Facebook dell'utente.<h4><b>Lista degli "
|
323 |
+
"Amici</b></h4><h4><b>Luoghi taggati</b></h4><h4><b>Membri della famiglia e "
|
324 |
+
"Stato di relazione</b></h4>Fornisce accesso ai membri della famiglia "
|
325 |
+
"dell'utente, alle sue relazioni personali ed al suo stato di relazione."
|
326 |
+
"<h4><b>Membri della famiglia e Stato di relazione degli amici</b></"
|
327 |
+
"h4>Fornisce accesso ai membri della famiglia ed allo stato di relazione "
|
328 |
+
"degli amici dell'utente.<h4><b>Mi Piace</b></h4>Fornisce accesso alla lista "
|
329 |
+
"di tutte le pagine che l'utente ha contrassegnato con il Mi Piace.<h4><b>Mi "
|
330 |
+
"Piace degli amici</b></h4>Fornisce accesso alla lista di pagine su cui gli "
|
331 |
+
"amici dell'utente hanno fatto Mi Piace.<h4><b>Note</b></h4>Fornisce accesso "
|
332 |
+
"alle note dell'utente.<h4><b>Note degli amici</b></h4>Fornisce accesso alle "
|
333 |
+
"note degli amici.<h4><b>Presenza online</b></h4>Permette l'accesso alla "
|
334 |
+
"presenza online/offline dell'utente.<h4><b>Presenza online degli amici</b></"
|
335 |
+
"h4>Fornisce accesso alla presenza online/offline degli amici dell'utente."
|
336 |
+
"<h4><b>Pubblica Mi Piace sul Wall</b></h4>Pubblica sul Wall storie su ciò "
|
337 |
+
"che l'utente contrassegna con il Mi Piace.<h4><b>Pubblicazione dei checkin</"
|
338 |
+
"b></h4>Permette all'app di effettuare checkin al posto dell'utente."
|
339 |
+
"<h4><b>Pubblicazione dell'attività dell'app</b></h4>Permette all'app di "
|
340 |
+
"pubblicare sull'Open Graph usando Azioni integrate, Traguardi, Punteggi, "
|
341 |
+
"Azioni personalizzate. L'applicazione può anche pubblicare altre attività, "
|
342 |
+
"che sono dettagliate nel documento riguardante i permessi di pubblicazione "
|
343 |
+
"di Facebook.<h4><b>Pubblicazione sulla Bacheca</b></h4>Permette a questa app "
|
344 |
+
"di pubblicare contenuto, commenti e 'Mi piace' sulla bacheca dell'utente e "
|
345 |
+
"su quella dei suoi amici.<h4><b>Relazioni degli amici</b></h4>Fornisce "
|
346 |
+
"accesso alle informazioni sulle relazioni degli amici.<h4><b>Relazioni "
|
347 |
+
"dell'utente</b></h4>Fornisce accesso alle informazioni sulle relazioni "
|
348 |
+
"dell'utente.<h4><b>RSVP agli eventi</b></h4>Permette all'applicazione di "
|
349 |
+
"fare RSVP agli eventi al posto dell'utente.<h4><b>Siti web degli amici</b></"
|
350 |
+
"h4>Fornisce accesso agli URL dei siti web degli amici dell'utente."
|
351 |
+
"<h4><b>Sito web</b></h4>Fornisce accesso al sito web dell'utente."
|
352 |
+
"<h4><b>Sottoscrizioni degli amici</b></h4><h4><b>Sottoscrizioni dell'Utente</"
|
353 |
+
"b></h4><h4><b>Stato degli amici</b></h4>Fornisce accesso ai messaggi di "
|
354 |
+
"stato ed ai checkin degli amici.<h4><b>Stato dell'utente</b></h4>Fornisce "
|
355 |
+
"accesso ai messaggi di stato e ai checkin dell'utente.<h4><b>Storia "
|
356 |
+
"lavorativa</b></h4>Fornisce accesso alla storia lavorativa dell'utente."
|
357 |
+
"<h4><b>Storia lavorativa degli amici</b></h4>Fornisce accesso alla storia "
|
358 |
+
"lavorativa degli amici.<h4><b>Su di me</b></h4>Fornisce accesso alla sezione "
|
359 |
+
"'Su di me' del profilo<h4><b>Video</b></h4>Fornisce accesso ai video che "
|
360 |
+
"l'utente ha caricato ed a quelli in cui è stato taggato.<h4><b>Video degli "
|
361 |
+
"amici</b></h4>Fornisce accesso ai video che gli amici hanno caricato ed in "
|
362 |
+
"cui sono stati taggati.<h2><b>Accesso agli account su servizi terzi</b></"
|
363 |
+
"h2>Questi servizi permettono a questa Applicazione di prelevare Dati dai "
|
364 |
+
"tuoi account su servizi terzi ed eseguire azioni con essi.Questi servizi non "
|
365 |
+
"sono attivati automaticamente, ma richiedono l'espressa autorizzazione "
|
366 |
+
"dell'Utente.<h4><b>Accesso all'account Facebook (Questa Applicazione)</b></"
|
367 |
+
"h4>Questo servizio permette a questa Applicazione di connettersi con "
|
368 |
+
"l'account dell'Utente sul social network Facebook, fornito da Facebook, Inc."
|
369 |
+
"Permessi richiesti: 'Su di me' degli amici, Accesso ai dati privati, Accesso "
|
370 |
+
"alle attività, Accesso alle liste di amici, Accesso alle richieste, Accesso "
|
371 |
+
"allo News Feed, Accesso offline, Aderenze politiche e religiose degli amici, "
|
372 |
+
"Aggiornamento di stato, Attività degli amici, Attività degli amici con App e "
|
373 |
+
"Giochi, Attività delle App e dei Giochi, Azione music.listen, Azioni 'news."
|
374 |
+
"reads', Azioni 'video.watches', Azioni 'video.watches' degli amici, Azioni "
|
375 |
+
"Fitness, Azioni Libri, Azioni music.listens degli amici, Azioni news.read "
|
376 |
+
"degli amici, Azioni personalizzate degli amici dell'utente, Azioni "
|
377 |
+
"personalizzate dell'utente, Carica foto, Caricamento di video, Chat, "
|
378 |
+
"Checkin, Checkin degli amici, Città, Città degli amici, Città di origine, "
|
379 |
+
"Città di origine degli amici, Condivisione, Convinzioni politiche e "
|
380 |
+
"religiose, Crea Eventi, Crea note, Data di compleanno, Date di compleanno "
|
381 |
+
"degli amici, Deal, Domande, Domande degli amici, Educazione, Educazione "
|
382 |
+
"degli amici, Email, Email di contatto, Esportare i post, Eventi, Eventi "
|
383 |
+
"degli amici, Foto, Foto degli amici, Gestione degli annunci, Gestione dei "
|
384 |
+
"gruppi, Gestione della casella di posta, Gestione delle notifiche, Gestione "
|
385 |
+
"delle pagine, Gestisci Liste di Amici, Gruppi, Gruppi degli amici, Insight, "
|
386 |
+
"Interessi, Interessi degli amici, Invio di notifiche, Invio SMS, Leggi "
|
387 |
+
"messaggi della pagina, Lettura della casella di posta, Lista degli Amici, "
|
388 |
+
"Luoghi taggati, Membri della famiglia e Stato di relazione, Membri della "
|
389 |
+
"famiglia e Stato di relazione degli amici, Mi Piace, Mi Piace degli amici, "
|
390 |
+
"Note, Note degli amici, Presenza online, Presenza online degli amici, "
|
391 |
+
"Pubblica Mi Piace sul Wall, Pubblicazione dei checkin, Pubblicazione "
|
392 |
+
"dell'attività dell'app, Pubblicazione sulla Bacheca, Relazioni degli amici, "
|
393 |
+
"Relazioni dell'utente, RSVP agli eventi, Siti web degli amici, Sito web, "
|
394 |
+
"Sottoscrizioni degli amici, Sottoscrizioni dell'Utente, Stato degli amici, "
|
395 |
+
"Stato dell'utente, Storia lavorativa, Storia lavorativa degli amici, Su di "
|
396 |
+
"me, Video e Video degli amici.Luogo del trattamento : USA – <a href=”https://"
|
397 |
+
"www.facebook.com/policy.php” target=”_blank”>Privacy Policy</a>"
|
398 |
+
|
399 |
+
#: /var/www/sitolocale/wp-content/plugins/ginger/addon/privacy-policy-manager/ginger.privacy-policy-manager.php:154
|
400 |
+
#: /var/www/sitolocale/wp-content/plugins/ginger/addon/privacy-policy-manager/ginger.privacy-policy-manager.php:165
|
401 |
+
#: /var/www/sitolocale/wp-content/plugins/ginger/addon/privacy-policy-manager/ginger.privacy-policy-manager.php:175
|
402 |
+
msgid "Login Pinterest text"
|
403 |
+
msgstr ""
|
404 |
+
|
405 |
+
#: /var/www/sitolocale/wp-content/plugins/ginger/addon/privacy-policy-manager/ginger.privacy-policy-manager.php:161
|
406 |
+
msgid "Login Linkedin text"
|
407 |
+
msgstr ""
|
408 |
+
|
409 |
+
#: /var/www/sitolocale/wp-content/plugins/ginger/addon/privacy-policy-manager/ginger.privacy-policy-manager.php:185
|
410 |
+
msgid "Login Google Plus text"
|
411 |
+
msgstr ""
|
412 |
+
|
413 |
+
#: /var/www/sitolocale/wp-content/plugins/ginger/addon/privacy-policy-manager/ginger.privacy-policy-manager.php:193
|
414 |
+
msgid "Social Widget"
|
415 |
+
msgstr ""
|
416 |
+
|
417 |
+
#: /var/www/sitolocale/wp-content/plugins/ginger/addon/privacy-policy-manager/ginger.privacy-policy-manager.php:203
|
418 |
+
#: /var/www/sitolocale/wp-content/plugins/ginger/addon/privacy-policy-manager/ginger.privacy-policy-manager.php:236
|
419 |
+
msgid "Widget Facebook text"
|
420 |
+
msgstr ""
|
421 |
+
|
422 |
+
#: /var/www/sitolocale/wp-content/plugins/ginger/addon/privacy-policy-manager/ginger.privacy-policy-manager.php:215
|
423 |
+
msgid "Widget Twitter text"
|
424 |
+
msgstr ""
|
425 |
+
|
426 |
+
#: /var/www/sitolocale/wp-content/plugins/ginger/addon/privacy-policy-manager/ginger.privacy-policy-manager.php:226
|
427 |
+
msgid "Widget Linkedin text"
|
428 |
+
msgstr ""
|
429 |
+
|
430 |
+
#: /var/www/sitolocale/wp-content/plugins/ginger/addon/privacy-policy-manager/ginger.privacy-policy-manager.php:246
|
431 |
+
msgid "Widget Google Plus text"
|
432 |
+
msgstr ""
|
433 |
+
|
434 |
+
#: /var/www/sitolocale/wp-content/plugins/ginger/addon/privacy-policy-manager/ginger.privacy-policy-manager.php:256
|
435 |
+
msgid "Widget Disqus text"
|
436 |
+
msgstr ""
|
437 |
+
|
438 |
+
#: /var/www/sitolocale/wp-content/plugins/ginger/addon/privacy-policy-manager/ginger.privacy-policy-manager.php:264
|
439 |
+
msgid "Statistic Services"
|
440 |
+
msgstr ""
|
441 |
+
|
442 |
+
#: /var/www/sitolocale/wp-content/plugins/ginger/addon/privacy-policy-manager/ginger.privacy-policy-manager.php:275
|
443 |
+
msgid "Google Analytics text"
|
444 |
+
msgstr ""
|
445 |
+
|
446 |
+
#: /var/www/sitolocale/wp-content/plugins/ginger/addon/privacy-policy-manager/ginger.privacy-policy-manager.php:283
|
447 |
+
msgid "Piattaforme esterne"
|
448 |
+
msgstr ""
|
449 |
+
|
450 |
+
#: /var/www/sitolocale/wp-content/plugins/ginger/addon/privacy-policy-manager/ginger.privacy-policy-manager.php:294
|
451 |
+
msgid "Maps text"
|
452 |
+
msgstr ""
|
453 |
+
|
454 |
+
#: /var/www/sitolocale/wp-content/plugins/ginger/addon/privacy-policy-manager/ginger.privacy-policy-manager.php:305
|
455 |
+
msgid "Youtube text"
|
456 |
+
msgstr ""
|
457 |
+
|
458 |
+
#: /var/www/sitolocale/wp-content/plugins/ginger/addon/privacy-policy-manager/ginger.privacy-policy-manager.php:316
|
459 |
+
msgid "Vimeo text"
|
460 |
+
msgstr ""
|
461 |
+
|
462 |
+
#: /var/www/sitolocale/wp-content/plugins/ginger/addon/privacy-policy-manager/ginger.privacy-policy-manager.php:324
|
463 |
+
msgid "Piattaforme esterne e commenti social"
|
464 |
+
msgstr ""
|
465 |
+
|
466 |
+
#: /var/www/sitolocale/wp-content/plugins/ginger/addon/privacy-policy-manager/ginger.privacy-policy-manager.php:335
|
467 |
+
msgid "Share This text"
|
468 |
+
msgstr ""
|
469 |
+
|
470 |
+
#: /var/www/sitolocale/wp-content/plugins/ginger/front/gingerfront.utils.php:130
|
471 |
msgid "Enable Cookies"
|
472 |
msgstr "Abilita Cookies"
|
473 |
|
474 |
+
#: /var/www/sitolocale/wp-content/plugins/ginger/front/gingerfront.utils.php:136
|
475 |
msgid "Disable Cookies"
|
476 |
msgstr "Disabilita Cookies"
|
477 |
|
478 |
+
#: /var/www/sitolocale/wp-content/plugins/ginger/admin/ginger.admin.php:43
|
479 |
msgid ""
|
480 |
"The page with the specified title already exists and is your current privacy "
|
481 |
"policy page!"
|
483 |
"La pagina con il titolo specificato è già esistente ed impostata come pagina "
|
484 |
"di privacy attuale!"
|
485 |
|
486 |
+
#: /var/www/sitolocale/wp-content/plugins/ginger/admin/ginger.admin.php:64
|
487 |
msgid "Updated!"
|
488 |
msgstr "Aggiornato!"
|
489 |
|
490 |
+
#: /var/www/sitolocale/wp-content/plugins/ginger/admin/ginger.admin.php:74
|
491 |
msgid "General Configuration"
|
492 |
msgstr "Configurazione Generale"
|
493 |
|
494 |
+
#: /var/www/sitolocale/wp-content/plugins/ginger/admin/ginger.admin.php:75
|
495 |
#: /var/www/sitolocale/wp-content/plugins/ginger/admin/partial/banner.php:5
|
496 |
msgid "Banner Setup"
|
497 |
msgstr "Banner Setup"
|
498 |
|
499 |
+
#: /var/www/sitolocale/wp-content/plugins/ginger/admin/ginger.admin.php:76
|
500 |
msgid "Privacy Policy"
|
501 |
msgstr "Privacy Policy"
|
502 |
|
|
|
|
|
|
|
|
|
503 |
#: /var/www/sitolocale/wp-content/plugins/ginger/admin/ginger.utils.php:76
|
504 |
msgid ""
|
505 |
"This website uses cookies. By continuing to use the site you are agreeing to "
|
523 |
|
524 |
#: /var/www/sitolocale/wp-content/plugins/ginger/admin/partial/link.php:8
|
525 |
#: /var/www/sitolocale/wp-content/plugins/ginger/admin/partial/url.php:8
|
526 |
+
#: /var/www/sitolocale/wp-content/plugins/ginger/admin/partial/banner.php:219
|
527 |
+
#: /var/www/sitolocale/wp-content/plugins/ginger/admin/partial/banner.php:222
|
528 |
#: /var/www/sitolocale/wp-content/plugins/ginger/admin/partial/dialog.php:64
|
529 |
#: /var/www/sitolocale/wp-content/plugins/ginger/admin/partial/dialog.php:67
|
530 |
msgid "Link"
|
740 |
|
741 |
#: /var/www/sitolocale/wp-content/plugins/ginger/admin/partial/banner.php:74
|
742 |
msgid "Customize your banner buttons"
|
743 |
+
msgstr "Personalizza i tuoi Banner Buttons"
|
744 |
|
745 |
#: /var/www/sitolocale/wp-content/plugins/ginger/admin/partial/banner.php:79
|
746 |
msgid "Accept cookie Button"
|
805 |
msgid "Background"
|
806 |
msgstr "Sfondo"
|
807 |
|
808 |
+
#: /var/www/sitolocale/wp-content/plugins/ginger/admin/partial/banner.php:199
|
809 |
+
#: /var/www/sitolocale/wp-content/plugins/ginger/admin/partial/banner.php:202
|
810 |
msgid "Button"
|
811 |
msgstr "Button"
|
812 |
|
813 |
+
#: /var/www/sitolocale/wp-content/plugins/ginger/admin/partial/banner.php:209
|
814 |
+
#: /var/www/sitolocale/wp-content/plugins/ginger/admin/partial/banner.php:212
|
815 |
+
msgid "Button Text Color"
|
816 |
+
msgstr ""
|
817 |
+
|
818 |
+
#: /var/www/sitolocale/wp-content/plugins/ginger/admin/partial/banner.php:230
|
819 |
msgid "Custom CSS"
|
820 |
msgstr "Custom CSS"
|
821 |
|
822 |
+
#: /var/www/sitolocale/wp-content/plugins/ginger/admin/partial/banner.php:234
|
823 |
+
#: /var/www/sitolocale/wp-content/plugins/ginger/admin/partial/banner.php:237
|
824 |
msgid "Insert here your banner custom CSS"
|
825 |
msgstr "Inserisci qui il CSS personalizzato per il tuo banner"
|
826 |
|