Cookie Law / GDPR Info - Version 1.7.4

Version Description

  • Cookie policy generator
  • Added a shortcode [user_consent_state]
  • Updated shortcode [cookie_audit] with option to configure columns
  • Margin option added in all button shortcodes
  • Introduced an option to hide cookie bar on policy page
  • Tested ok with WP 5.1
Download this release

Release Info

Developer webtoffee
Plugin Icon Cookie Law / GDPR Info
Version 1.7.4
Comparing to
See all releases

Code changes from version 1.7.3 to 1.7.4

Files changed (27) hide show
  1. admin/class-cookie-law-info-admin.php +3 -1
  2. admin/js/cookie-law-info-admin.js +23 -23
  3. admin/modules/cli-policy-generator/assets/css/editor-style.css +1 -0
  4. admin/modules/cli-policy-generator/assets/js/cli-policy-generator-admin.js +245 -0
  5. admin/modules/cli-policy-generator/classes/class-policy-generator-ajax.php +134 -0
  6. admin/modules/cli-policy-generator/classes/class-preview-page.php +152 -0
  7. admin/modules/cli-policy-generator/cli-policy-generator.php +189 -0
  8. admin/modules/cli-policy-generator/data/data.block1.php +6 -0
  9. admin/modules/cli-policy-generator/data/data.block2.php +1 -0
  10. admin/modules/cli-policy-generator/data/data.block3.php +3 -0
  11. admin/modules/cli-policy-generator/data/data.block4.php +11 -0
  12. admin/modules/cli-policy-generator/data/data.block5.php +5 -0
  13. admin/modules/cli-policy-generator/data/data.policy-generator.php +37 -0
  14. admin/modules/cli-policy-generator/views/policy-generator.php +97 -0
  15. admin/views/admin-settings-buttons.php +17 -0
  16. admin/views/admin-settings-help.php +34 -10
  17. cookie-law-info.php +2 -2
  18. includes/class-cookie-law-info.php +34 -9
  19. public/class-cookie-law-info-public.php +4 -4
  20. public/css/cookie-law-info-gdpr-1.6.7.css +0 -604
  21. public/css/cookie-law-info-public-1.6.7.css +0 -109
  22. public/css/cookie-law-info-public.css +3 -1
  23. public/css/cookie-law-info-table-1.6.7.css +0 -129
  24. public/js/cookie-law-info-public-1.6.7.js +0 -427
  25. public/js/cookie-law-info-public.js +46 -38
  26. public/modules/shortcode/shortcode.php +174 -29
  27. readme.txt +18 -6
admin/class-cookie-law-info-admin.php CHANGED
@@ -46,7 +46,9 @@ class Cookie_Law_Info_Admin {
46
  * admin module list, Module folder and main file must be same as that of module name
47
  * Please check the `admin_modules` method for more details
48
  */
49
- private $modules=array();
 
 
50
 
51
  public static $existing_modules=array();
52
 
46
  * admin module list, Module folder and main file must be same as that of module name
47
  * Please check the `admin_modules` method for more details
48
  */
49
+ private $modules=array(
50
+ 'cli-policy-generator'
51
+ );
52
 
53
  public static $existing_modules=array();
54
 
admin/js/cookie-law-info-admin.js CHANGED
@@ -233,33 +233,33 @@
233
  }
234
  });
235
 
236
- var cli_notify_msg=
237
- {
238
- error:function(message)
239
- {
240
- var er_elm=$('<div class="notify_msg" style="background:#dd4c27; border:solid 1px #dd431c;">'+message+'</div>');
241
- this.setNotify(er_elm);
242
- },
243
- success:function(message)
244
- {
245
- var suss_elm=$('<div class="notify_msg" style="background:#1de026; border:solid 1px #2bcc1c;">'+message+'</div>');
246
- this.setNotify(suss_elm);
247
- },
248
- setNotify:function(elm)
249
- {
250
- $('body').append(elm);
251
- elm.stop(true,true).animate({'opacity':1,'top':'50px'},1000);
252
- setTimeout(function(){
253
- elm.animate({'opacity':0,'top':'100px'},1000,function(){
254
- elm.remove();
255
- });
256
- },3000);
257
- }
258
- }
259
  cli_form_toggler.set();
260
 
261
  });
262
  })( jQuery );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
263
  function cli_store_settings_btn_click(vl)
264
  {
265
  document.getElementById('cli_update_action').value=vl;
233
  }
234
  });
235
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
236
  cli_form_toggler.set();
237
 
238
  });
239
  })( jQuery );
240
+ var cli_notify_msg=
241
+ {
242
+ error:function(message)
243
+ {
244
+ var er_elm=jQuery('<div class="notify_msg" style="background:#dd4c27; border:solid 1px #dd431c;">'+message+'</div>');
245
+ this.setNotify(er_elm);
246
+ },
247
+ success:function(message)
248
+ {
249
+ var suss_elm=jQuery('<div class="notify_msg" style="background:#1de026; border:solid 1px #2bcc1c;">'+message+'</div>');
250
+ this.setNotify(suss_elm);
251
+ },
252
+ setNotify:function(elm)
253
+ {
254
+ jQuery('body').append(elm);
255
+ elm.stop(true,true).animate({'opacity':1,'top':'50px'},1000);
256
+ setTimeout(function(){
257
+ elm.animate({'opacity':0,'top':'100px'},1000,function(){
258
+ elm.remove();
259
+ });
260
+ },3000);
261
+ }
262
+ }
263
  function cli_store_settings_btn_click(vl)
264
  {
265
  document.getElementById('cli_update_action').value=vl;
admin/modules/cli-policy-generator/assets/css/editor-style.css ADDED
@@ -0,0 +1 @@
 
1
+ .mce-content-body{ max-width:none !important; }
admin/modules/cli-policy-generator/assets/js/cli-policy-generator-admin.js ADDED
@@ -0,0 +1,245 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function( $ ) {
2
+ //'use strict';
3
+ $(function() {
4
+
5
+ var CLI_pg=
6
+ {
7
+ cli_pg_lefth_tmr:null,
8
+ cli_pg_editormode_tmr:null,
9
+ active_elm:null,
10
+ autosave_interval:2000,
11
+ onPrg:false,
12
+ Set:function()
13
+ {
14
+ this.leftBoxHeight();
15
+ this.tabView();
16
+ this.regAddNew();
17
+ setTimeout(function(){
18
+ CLI_pg.editOnChange();
19
+ },1000);
20
+ this.regAutoSaveForPreview();
21
+ this.regSaveData();
22
+ this.refreshCurrentPolicyPageId();
23
+ },
24
+ refreshCurrentPolicyPageId:function()
25
+ {
26
+ var data = {
27
+ action: 'cli_policy_generator',
28
+ security: cli_policy_generator.nonces.cli_policy_generator,
29
+ cli_policy_generator_action:'get_policy_pageid',
30
+ };
31
+ $.ajax({
32
+ url: cli_policy_generator.ajax_url,
33
+ data: data,
34
+ //datatype:'json',
35
+ type: 'POST',
36
+ success:function(data)
37
+ {
38
+ data=JSON.parse(data);
39
+ if(data.response===true)
40
+ {
41
+ $('[name="cli_pg_policy_pageid"]').val(data.page_id);
42
+ if(data.page_id==0){
43
+ $('[name="cli_pg_save_currentpage"]').hide();
44
+ }else
45
+ {
46
+ $('[name="cli_pg_save_currentpage"]').show();
47
+ }
48
+ }
49
+ },
50
+ error:function()
51
+ {
52
+
53
+ }
54
+ });
55
+ },
56
+ genContentData:function()
57
+ {
58
+ var content_data={};
59
+ var v=0;
60
+ $('.cli_pg_left .cli_pg_left_menu').each(function(){
61
+ var elm=$(this);
62
+ if(elm.find('[name="cli_pg_enabled_block_checkbox"]').is(':checked'))
63
+ {
64
+ var temp={
65
+ 'ord':v,
66
+ 'hd':elm.find('.cli_pg_content_hd').text(),
67
+ 'content':elm.find('.cli_pg_content_hid').html()
68
+ };
69
+ content_data[v]=temp;
70
+ v++;
71
+ }
72
+ });
73
+ return content_data;
74
+ },
75
+ regSaveData:function()
76
+ {
77
+ $('[name="cli_pg_save_newpage"], [name="cli_pg_save_currentpage"]').on('click',function(){
78
+ if(CLI_pg.onPrg)
79
+ {
80
+ return false;
81
+ }
82
+ var pg_id=$(this).attr('name')=='cli_pg_save_currentpage' ? $('[name="cli_pg_policy_pageid"]').val() : 0;
83
+ var content_data=CLI_pg.genContentData();
84
+ var data = {
85
+ action: 'cli_policy_generator',
86
+ security: cli_policy_generator.nonces.cli_policy_generator,
87
+ cli_policy_generator_action:'save_contentdata',
88
+ content_data:content_data,
89
+ page_id:pg_id,
90
+ enable_webtofee_powered_by:($('[name="enable_webtofee_powered_by"]').is(':checked') ? 1 : 0)
91
+ };
92
+ $('.cli_pg_footer a').css({'opacity':.5,'cursor':'default'});
93
+ CLI_pg.onPrg=true;
94
+ $.ajax({
95
+ url: cli_policy_generator.ajax_url,
96
+ data: data,
97
+ //datatype:'json',
98
+ type: 'POST',
99
+ success:function(data)
100
+ {
101
+ data=JSON.parse(data); console.log(data);
102
+ CLI_pg.onPrg=false;
103
+ $('.cli_pg_footer a').css({'opacity':1,'cursor':'pointer'});
104
+ if(data.response===true)
105
+ {
106
+ cli_notify_msg.success(cli_policy_generator.labels.success);
107
+ var edit_page_url=$("<textarea></textarea>").html(data.url).text();
108
+ window.location.href=edit_page_url;
109
+ }else
110
+ {
111
+ cli_notify_msg.error(cli_policy_generator.labels.error);
112
+ }
113
+ },
114
+ error:function()
115
+ {
116
+ CLI_pg.onPrg=false;
117
+ $('.cli_pg_footer a').css({'opacity':1,'cursor':'pointer'});
118
+ cli_notify_msg.error(cli_policy_generator.labels.error);
119
+ }
120
+ });
121
+ });
122
+ },
123
+ regAutoSaveForPreview:function()
124
+ {
125
+ var content_data=this.genContentData();
126
+
127
+ var data = {
128
+ action: 'cli_policy_generator',
129
+ security: cli_policy_generator.nonces.cli_policy_generator,
130
+ cli_policy_generator_action:'autosave_contant_data',
131
+ content_data:content_data,
132
+ page_id:cli_policy_generator.page_id,
133
+ enable_webtofee_powered_by:($('[name="enable_webtofee_powered_by"]').is(':checked') ? 1 : 0)
134
+ };
135
+ $.ajax({
136
+ url: cli_policy_generator.ajax_url,
137
+ data: data,
138
+ datatype:'json',
139
+ type: 'POST',
140
+ success:function(data)
141
+ {
142
+ setTimeout(function(){
143
+ CLI_pg.regAutoSaveForPreview();
144
+ },CLI_pg.autosave_interval);
145
+ },
146
+ error:function()
147
+ {
148
+ setTimeout(function(){
149
+ CLI_pg.regAutoSaveForPreview();
150
+ },CLI_pg.autosave_interval);
151
+ }
152
+ });
153
+
154
+ },
155
+ editOnChange:function()
156
+ {
157
+ $('[name="cli_pg_hd_field"]').keyup(function(){
158
+ CLI_pg.active_elm.find('.cli_pg_content_hd').html($(this).val());
159
+ });
160
+ $('#cli_pg_content').change(function(){
161
+ CLI_pg.active_elm.find('.cli_pg_content_hid').html($(this).val());
162
+ });
163
+ this.cli_pg_editormode_tmr=setInterval(function(){
164
+ var act_ed=tinymce.activeEditor;
165
+ if(act_ed!==null)
166
+ {
167
+ clearInterval(CLI_pg.cli_pg_editormode_tmr);
168
+ act_ed.on('keyup',function(){
169
+ var act_ed_content=act_ed.getContent();
170
+ CLI_pg.active_elm.find('.cli_pg_content_hid').html(act_ed_content);
171
+ });
172
+ }
173
+ },1000);
174
+ },
175
+ regAddNew:function()
176
+ {
177
+ $('.cli_pg_addnew_hd_btn').click(function(){
178
+ $('.cli_pg_samplehid_block .cli_pg_left_menu').clone().insertBefore($(this));
179
+ });
180
+ },
181
+ tabView:function()
182
+ {
183
+ $(document).on('click','.cli_pg_left .cli_pg_left_menu',function(e){
184
+ e.stopPropagation();
185
+ CLI_pg.active_elm=$(this);
186
+
187
+ /* active menu */
188
+ $('.cli_pg_left_menu').css({'background':'#f3f3f3'}).removeClass('cli_pg_menu_active');
189
+ $(this).css({'background':'#fff'}).addClass('cli_pg_menu_active');
190
+
191
+ /* heading */
192
+ var hd=$(this).find('.cli_pg_content_hd').text();
193
+ $('[name="cli_pg_hd_field"]').val(hd);
194
+
195
+ /* description */
196
+ var html=$(this).find('.cli_pg_content_hid').html();
197
+ var editor_id='cli_pg_content';
198
+ if($('#wp-'+editor_id+'-wrap').hasClass('html-active'))
199
+ {
200
+ $('#'+editor_id+'').val(html);
201
+ }else
202
+ {
203
+ var activeEditor=tinyMCE.get(editor_id);
204
+ if(activeEditor!==null)
205
+ {
206
+ $('#'+editor_id+'').val(html);
207
+ activeEditor.setContent(html);
208
+ }
209
+ }
210
+ });
211
+ $(document).on('click','.cli_pg_content_delete',function(e){
212
+ e.stopPropagation();
213
+ var elm=$(this).parents('.cli_pg_left_menu');
214
+ if(elm.hasClass('cli_pg_menu_active'))
215
+ {
216
+ elm.remove();
217
+ $('.cli_pg_left .cli_pg_left_menu:eq(0)').click();
218
+ }else
219
+ {
220
+ elm.remove();
221
+ }
222
+ });
223
+ setTimeout(function(){
224
+ $('.cli_pg_left .cli_pg_left_menu:eq(0)').click();
225
+ },1000);
226
+ },
227
+ leftBoxHeight:function()
228
+ {
229
+ clearTimeout(CLI_pg.cli_pg_lefth_tmr);
230
+ $(window).resize(function() {
231
+ CLI_pg.cli_pg_lefth_tmr=setTimeout(function()
232
+ {
233
+ $('.cli_pg_left').css({'min-height':$('.cli_pg_right').outerHeight()});
234
+ },500);
235
+ });
236
+ setTimeout(function()
237
+ {
238
+ $('.cli_pg_left').css({'min-height':$('.cli_pg_right').outerHeight()});
239
+ },300);
240
+ }
241
+ }
242
+ CLI_pg.Set();
243
+
244
+ });
245
+ })( jQuery );
admin/modules/cli-policy-generator/classes/class-policy-generator-ajax.php ADDED
@@ -0,0 +1,134 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( ! defined( 'ABSPATH' ) ) {
3
+ exit;
4
+ }
5
+ class Cookie_Law_Info_Policy_Generator_Ajax extends Cookie_Law_Info_Cli_Policy_Generator
6
+ {
7
+
8
+ public function __construct()
9
+ {
10
+ add_action('wp_ajax_cli_policy_generator',array($this,'ajax_policy_generator'));
11
+ }
12
+
13
+ /*
14
+ *
15
+ * Main Ajax hook for processing requests
16
+ */
17
+ public function ajax_policy_generator()
18
+ {
19
+ $out=array(
20
+ 'response'=>false,
21
+ 'message'=>__('Unable to handle your request.','cookie-law-info'),
22
+ );
23
+ $non_json_response=array();
24
+ if(isset($_POST['cli_policy_generator_action']))
25
+ {
26
+ $cli_policy_generator_action=$_POST['cli_policy_generator_action'];
27
+ $allowed_actions=array('autosave_contant_data','save_contentdata','get_policy_pageid');
28
+ if(in_array($cli_policy_generator_action,$allowed_actions) && method_exists($this,$cli_policy_generator_action))
29
+ {
30
+ $out=$this->{$cli_policy_generator_action}();
31
+ }
32
+ }
33
+ if(in_array($cli_policy_generator_action,$non_json_response))
34
+ {
35
+ echo is_array($out) ? $out['message'] : $out;
36
+ }else
37
+ {
38
+ echo json_encode($out);
39
+ }
40
+ exit();
41
+ }
42
+
43
+ /*
44
+ * @since 1.7.4
45
+ * Get current policy page ID (Ajax-main)
46
+ * This is used to update the hidden field for policy page id. (In some case user press back button)
47
+ */
48
+ public function get_policy_pageid()
49
+ {
50
+ $page_id=Cookie_Law_Info_Cli_Policy_Generator::get_cookie_policy_pageid();
51
+ $policy_page_status=get_post_status($page_id);
52
+ if($policy_page_status && $policy_page_status!='trash')
53
+ {
54
+
55
+ }else
56
+ {
57
+ $page_id=0;
58
+ }
59
+ return array(
60
+ 'response'=>true,
61
+ 'page_id'=>$page_id,
62
+ );
63
+ }
64
+
65
+ /*
66
+ * @since 1.7.4
67
+ * Save current data (Ajax-main)
68
+ */
69
+ public function save_contentdata()
70
+ {
71
+ $out=array(
72
+ 'response'=>true,
73
+ 'er'=>''
74
+ );
75
+ $content_data=isset($_POST['content_data']) ? $_POST['content_data'] : array();
76
+ $page_id=(int) isset($_POST['page_id']) ? $_POST['page_id']*1 : 0;
77
+ $enable_webtofee_powered_by=(int) isset($_POST['enable_webtofee_powered_by']) ? $_POST['enable_webtofee_powered_by']*1 : 0;
78
+ $id=wp_insert_post(
79
+ array(
80
+ 'ID'=>$page_id, //if ID is zero it will create new page otherwise update
81
+ 'post_title'=>'Cookie Policy',
82
+ 'post_type'=>'page',
83
+ 'post_content'=>Cookie_Law_Info_Cli_Policy_Generator::generate_page_content($enable_webtofee_powered_by,$content_data,0),
84
+ 'post_status' => 'draft', //default is draft
85
+ )
86
+ );
87
+ if(is_wp_error($id))
88
+ {
89
+ $out=array(
90
+ 'response'=>false,
91
+ 'er'=>__('Error','cookie-law-info'),
92
+ //'er'=>$id->get_error_message(),
93
+ );
94
+ }else
95
+ {
96
+ Cookie_Law_Info_Cli_Policy_Generator::set_cookie_policy_pageid($id);
97
+ $out['url']=get_edit_post_link($id);
98
+ }
99
+ return $out;
100
+ }
101
+
102
+
103
+
104
+ /*
105
+ * @since 1.7.4
106
+ * Autosave Current content to session (Ajax-main)
107
+ */
108
+ public function autosave_contant_data()
109
+ {
110
+ global $wpdb;
111
+ $scan_table=$wpdb->prefix.$this->main_tb;
112
+ $out=array(
113
+ 'response'=>true,
114
+ 'er'=>''
115
+ );
116
+ $content_data=isset($_POST['content_data']) ? $_POST['content_data'] : array();
117
+ $page_id=isset($_POST['page_id']) ? $_POST['page_id'] : '';
118
+ $enable_webtofee_powered_by=(int) isset($_POST['enable_webtofee_powered_by']) ? $_POST['enable_webtofee_powered_by']*1 : 0;
119
+ if(is_array($content_data))
120
+ {
121
+ $content_html=Cookie_Law_Info_Cli_Policy_Generator::generate_page_content($enable_webtofee_powered_by,$content_data);
122
+ update_option('cli_pg_content_data',$content_html);
123
+ }else
124
+ {
125
+ $out=array(
126
+ 'response'=>false,
127
+ 'er'=>__('Error','cookie-law-info')
128
+ );
129
+ }
130
+ return $out;
131
+ }
132
+
133
+ }
134
+ new Cookie_Law_Info_Policy_Generator_Ajax();
admin/modules/cli-policy-generator/classes/class-preview-page.php ADDED
@@ -0,0 +1,152 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( ! defined( 'ABSPATH' ) ) {
3
+ exit;
4
+ }
5
+ /**
6
+ * Author: Scott Sherrill-Mix
7
+ * URI: http://scott.sherrillmix.com/blog/blogger/creating-a-better-fake-post-with-a-wordpress-plugin/
8
+ * @since 1.7.4
9
+ */
10
+
11
+ class Cli_PreviewPage
12
+ {
13
+
14
+ public function __construct()
15
+ {
16
+ add_filter('the_posts',array($this,'preview_page'));
17
+ }
18
+
19
+ /**
20
+ * Generating preview page data
21
+ * @since 1.7.4
22
+ */
23
+ private static function get_preview_page()
24
+ {
25
+ $out=array();
26
+ $out['cli-policy-preview'] = array(
27
+ 'title' => __('Cookie Policy','cookie-law-info'),
28
+ 'content' =>Cookie_Law_Info_Cli_Policy_Generator::get_page_content()
29
+ );
30
+ return $out;
31
+ }
32
+
33
+ /**
34
+ *
35
+ * @since 1.7.4
36
+ * @param $posts
37
+ * @return array|null
38
+ */
39
+ public function preview_page($posts)
40
+ {
41
+ global $wp,$wp_query;
42
+
43
+ $preview_pages=self::get_preview_page();
44
+ $preview_pages_slugs = array();
45
+ foreach($preview_pages as $slug=>$v)
46
+ {
47
+ $preview_pages_slugs[]=$slug;
48
+ }
49
+ if(in_array(strtolower($wp->request),$preview_pages_slugs) ||
50
+ (isset($wp->query_vars['page_id']) && in_array(strtolower($wp->query_vars['page_id']),$preview_pages_slugs)))
51
+ {
52
+ if(in_array(strtolower($wp->request),$preview_pages_slugs))
53
+ {
54
+ $preview_page=strtolower($wp->request);
55
+ }else
56
+ {
57
+ $preview_page=strtolower($wp->query_vars['page_id']);
58
+ }
59
+
60
+ $posts = null;
61
+ $posts[] = self::create_preview_page($preview_page,$preview_pages[$preview_page]);
62
+ $wp_query->is_page = true;
63
+ $wp_query->is_singular = true;
64
+ $wp_query->is_home = false;
65
+ $wp_query->is_archive = false;
66
+ $wp_query->is_category = false;
67
+ $wp_query->is_fake_page = true;
68
+ $wp_query->preview_page = $wp->request;
69
+ unset( $wp_query->query["error"] );
70
+ $wp_query->query_vars["error"] = "";
71
+ $wp_query->is_404 = false;
72
+
73
+ add_action('admin_bar_menu',array($this,'add_admin_bar_menu'),100);
74
+ add_action('wp_footer',array($this,'reg_preview_auto_btn'),100);
75
+ }
76
+ return $posts;
77
+ }
78
+
79
+ public function add_admin_bar_menu($wp_admin_bar)
80
+ {
81
+ $wp_admin_bar->add_node(array(
82
+ 'id' => 'cli_pg_live_preview',
83
+ 'title' => '<span style="color:red;"><input type="checkbox" name="cli_pg_toggle_preview_autoreload" /> '.__('Auto reload preview','cookie-law-info').'</span>',
84
+ ));
85
+ }
86
+ public function reg_preview_auto_btn()
87
+ {
88
+ ?>
89
+ <script type="text/javascript">
90
+ var cli_pg_autorealod_tmr=null;
91
+ function cli_page_auto_reload()
92
+ {
93
+ if(jQuery('[name="cli_pg_toggle_preview_autoreload"]').is(':checked'))
94
+ {
95
+ jQuery.get(window.location.href+'?rnd='+Math.random(), function(data) {
96
+ var html=jQuery('<div />').html(data).find('.cli_pg_page_contaner').html();
97
+ jQuery('.cli_pg_page_contaner').html(html);
98
+ cli_pg_autorealod_tmr=setTimeout(function(){
99
+ cli_page_auto_reload();
100
+ },2000);
101
+ });
102
+ }
103
+ }
104
+ function cli_page_reg_auto_reload()
105
+ {
106
+ clearTimeout(cli_pg_autorealod_tmr);
107
+ if(jQuery('[name="cli_pg_toggle_preview_autoreload"]').is(':checked'))
108
+ {
109
+ cli_page_auto_reload();
110
+ }
111
+ }
112
+ jQuery(document).ready(function(){
113
+ jQuery('[name="cli_pg_toggle_preview_autoreload"]').click(function(){
114
+ cli_page_reg_auto_reload();
115
+ });
116
+ if(jQuery('[name="cli_pg_toggle_preview_autoreload"]').is(':checked'))
117
+ {
118
+ cli_page_reg_auto_reload();
119
+ }
120
+ });
121
+ </script>
122
+ <?php
123
+ }
124
+
125
+ /**
126
+ * Creates virtual preview page
127
+ *
128
+ * @param $pagename
129
+ * @param $page
130
+ *
131
+ * @return stdClass
132
+ */
133
+ private static function create_preview_page($pagename,$page)
134
+ {
135
+ $post = new stdClass;
136
+ $post->post_author = 1;
137
+ $post->post_name = $pagename;
138
+ $post->guid = get_bloginfo('wpurl').'/'.$pagename;
139
+ $post->post_title = $page['title'];
140
+ $post->post_content = $page['content'];
141
+ $post->ID = -1;
142
+ $post->post_status = 'static';
143
+ $post->comment_status = 'closed';
144
+ $post->ping_status = 'closed';
145
+ $post->comment_count = 0;
146
+ $post->post_date = current_time('mysql');
147
+ $post->post_date_gmt = current_time('mysql',1);
148
+ $post->type = 'page';
149
+ return $post;
150
+ }
151
+ }
152
+ new Cli_PreviewPage();
admin/modules/cli-policy-generator/cli-policy-generator.php ADDED
@@ -0,0 +1,189 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Policy generator
4
+ *
5
+ * @link http://cookielawinfo.com/
6
+ * @since 1.7.4
7
+ *
8
+ */
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit;
11
+ }
12
+ include( plugin_dir_path( __FILE__ ).'classes/class-policy-generator-ajax.php');
13
+ include( plugin_dir_path( __FILE__ ).'classes/class-preview-page.php');
14
+ class Cookie_Law_Info_Cli_Policy_Generator
15
+ {
16
+ public static $policy_pageid='cli_pg_policy_page_id';
17
+ public function __construct()
18
+ {
19
+ add_action('admin_menu',array($this,'add_admin_pages'));
20
+ add_filter('display_post_states',array($this,'add_display_post_states'),10,2);
21
+ }
22
+
23
+ /**
24
+ * Add a post display state for Cookie Policy page in the page list table.
25
+ *
26
+ * @since 1.7.4
27
+ **/
28
+ public function add_display_post_states($post_states,$post)
29
+ {
30
+ if($post->ID==$this->get_cookie_policy_pageid())
31
+ {
32
+ $post_states['page_for_cookie_policy']='Cookie Policy Page';
33
+ }
34
+ return $post_states;
35
+ }
36
+
37
+ private static function gen_page_html($content_data_arr=array(),$render_shortcode=1)
38
+ {
39
+ $html='';
40
+ foreach($content_data_arr as $key=>$value)
41
+ {
42
+ $html.='<h3>'.$value['hd'].'</h3>';
43
+ $html.='<div>'.($render_shortcode==1 ? do_shortcode(stripslashes($value['content'])) : stripslashes($value['content'])).'</div>';
44
+ }
45
+ return $html;
46
+ }
47
+
48
+ public static function get_page_content()
49
+ {
50
+ $contant_val=get_option('cli_pg_content_data');
51
+ $html=isset($contant_val) ? $contant_val : '';
52
+ return $html;
53
+ }
54
+
55
+ /**
56
+ * Generating content for page from session/post
57
+ * @since 1.7.4
58
+ * @return string
59
+ */
60
+ public static function generate_page_content($powered_by,$content_data_post_arr=array(),$render_shortcode=1)
61
+ {
62
+ $html='<div class="cli_pg_page_contaner">';
63
+ $html.=self::gen_page_html($content_data_post_arr,$render_shortcode);
64
+ $html.=($powered_by==1 ? '[webtoffee_powered_by]' : '').'</div>';
65
+ return $html;
66
+ }
67
+
68
+ /**
69
+ * Get policy page id from option table
70
+ * @since 1.7.4
71
+ * @return int
72
+ */
73
+ public static function get_cookie_policy_pageid()
74
+ {
75
+ $pageid=get_option(self::$policy_pageid);
76
+ if($pageid===false)
77
+ {
78
+ return 0;
79
+ }else
80
+ {
81
+ return $pageid;
82
+ }
83
+ }
84
+
85
+ /**
86
+ * Update policy page id
87
+ * @since 1.7.4
88
+ *
89
+ */
90
+ public static function set_cookie_policy_pageid($pageid)
91
+ {
92
+ update_option(self::$policy_pageid,$pageid);
93
+ }
94
+
95
+
96
+ /**
97
+ * Add administration menus
98
+ *
99
+ * @since 1.7.4
100
+ **/
101
+ public function add_admin_pages()
102
+ {
103
+ add_submenu_page(
104
+ 'edit.php?post_type='.CLI_POST_TYPE,
105
+ __('Policy generator','cookie-law-info'),
106
+ __('Policy generator','cookie-law-info'),
107
+ 'manage_options',
108
+ 'cookie-law-info-policy-generator',
109
+ array($this,'policy_generator_page')
110
+ );
111
+ }
112
+
113
+ /*
114
+ *
115
+ * Policy generator page (Admin page)
116
+ *
117
+ * @since 1.7.4
118
+ **/
119
+ public function policy_generator_page()
120
+ {
121
+ add_editor_style(plugin_dir_url( __FILE__ ).'assets/css/editor-style.css');
122
+ wp_enqueue_script('cli_policy_generator',plugin_dir_url( __FILE__ ).'assets/js/cli-policy-generator-admin.js', array( 'jquery'),CLI_VERSION,false);
123
+ wp_enqueue_script($this->plugin_name);
124
+ $params = array(
125
+ 'nonces' => array(
126
+ 'cli_policy_generator' => wp_create_nonce('cli_policy_generator'),
127
+ ),
128
+ 'ajax_url' => admin_url('admin-ajax.php'),
129
+ 'page_id' =>'',
130
+ 'labels'=>array(
131
+ 'error'=>__('Error','cookie-law-info'),
132
+ 'success'=>__('Success','cookie-law-info'),
133
+ )
134
+ );
135
+ wp_localize_script('cli_policy_generator','cli_policy_generator',$params);
136
+ $default_data=$this->process_default_data();
137
+ $preview_url=home_url().'/cli-policy-preview/';
138
+ include plugin_dir_path( __FILE__ ).'views/policy-generator.php';
139
+ }
140
+
141
+ /*
142
+ *
143
+ * Process default data, read template file
144
+ * @since 1.7.4
145
+ **/
146
+ private function process_default_data()
147
+ {
148
+ $data_path=plugin_dir_path( __FILE__ ).'data/';
149
+ include $data_path.'data.policy-generator.php';
150
+ $out=array();
151
+ if($cli_pg_default_data)
152
+ {
153
+ foreach($cli_pg_default_data as $data)
154
+ {
155
+ $temp=$data;
156
+ //reading template file
157
+ if($data['body']=="" && $data['body_file']!="" && file_exists($data_path.$data['body_file']))
158
+ {
159
+ ob_start();
160
+ include $data_path.$data['body_file'];
161
+ $temp['body']=$this->process_data(ob_get_clean());
162
+ }
163
+ $out[]=$temp;
164
+ }
165
+ }
166
+ return $out;
167
+ }
168
+
169
+ /*
170
+ *
171
+ * Process default data, read template file
172
+ * @since 1.7.4
173
+ **/
174
+ private function process_data($txt)
175
+ {
176
+ $home_url=home_url();
177
+ $home_domain=parse_url($home_url,PHP_URL_HOST);
178
+ $txt=str_replace(array(
179
+ '{{site_url}}'
180
+ ),
181
+ array(
182
+ '<a href="'.$home_url.'">'.$home_domain.'</a>'
183
+ ),$txt);
184
+ //$txt=do_shortcode($txt);
185
+ return $txt;
186
+ }
187
+ }
188
+ $cli_pg=new Cookie_Law_Info_Cli_Policy_Generator();
189
+ $cli_pg->plugin_name=$this->plugin_name;
admin/modules/cli-policy-generator/data/data.block1.php ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ <p>This Cookie Policy explains what cookies are and how we use them. You should read this policy to understand what cookies are, how we use them, the types of cookies we use i.e, the information we collect using cookies and how that information is used and how to control the cookie preferences. For further information on how we use, store and keep your personal data secure, see our Privacy Policy.</p>
2
+
3
+ <p>You can at any time change or withdraw your consent from the Cookie Declaration on our website.</p>
4
+ <p>Learn more about who we are, how you can contact us and how we process personal data in our Privacy Policy.</p>
5
+ <p>Your consent applies to the following domains: {{site_url}}</p>
6
+ <p>[user_consent_state]</p>
admin/modules/cli-policy-generator/data/data.block2.php ADDED
@@ -0,0 +1 @@
 
1
+ <p>Cookies are small text files that are used to store small pieces of information. The cookies are stored on your device when the website is loaded on your browser. These cookies help us make the website function properly, make the website more secure, provide better user experience, and understand how the website performs and to analyze what works and where it needs improvement.</p>
admin/modules/cli-policy-generator/data/data.block3.php ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ <p>As most of the online services, our website uses cookies first-party and third-party cookies for a number of purposes. The first-party cookies are mostly necessary for the website to function the right way, and they do not collect any of your personally identifiable data.</p>
2
+
3
+ <p>The third-party cookies used on our websites are used mainly for understanding how the website performs, how you interact with our website, keeping our services secure, providing advertisements that are relevant to you, and all in all providing you with a better and improved user experience and help speed up your future interactions with our website.</p>
admin/modules/cli-policy-generator/data/data.block4.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <p><span style="font-weight:bold;">Essential</span>: Some cookies are essential for you to be able to experience the full functionality of our site. They allow us to maintain user sessions and prevent any security threats. They do not collect or store any personal information. For example, these cookies allow you to log-in to your account and add products to your basket and checkout securely. </p>
2
+
3
+ <p><span style="font-weight:bold;">Statistics:</span> These cookies store information like the number of visitors to the website, the number of unique visitors, which pages of the website have been visited, the source of the visit etc. These data help us understand and analyze how well the website performs and where it needs improvement.</p>
4
+
5
+ <p><span style="font-weight:bold;">Marketing:</span> Our website displays advertisements. These cookies are used to personalize the advertisements that we show to you so that they are meaningful to you. These cookies also help us keep track of the efficiency of these ad campaigns. </p>
6
+ <p>The information stored in these cookies may also be used by the third-party ad providers to show you ads on other websites on the browser as well.</p>
7
+
8
+ <p><span style="font-weight:bold;">Functional:</span> These are the cookies that help certain non-essential functionalities on our website. These functionalities include embedding content like videos or sharing contents on the website on social media platforms. </p>
9
+
10
+ <p><span style="font-weight:bold;">Preferences:</span> These cookies help us store your settings and browsing preferences like language preferences so that you have a better and efficient experience on future visits to the website.</p>
11
+ [cookie_audit columns="cookie,description" heading="The below list details the cookies used in our website."]
admin/modules/cli-policy-generator/data/data.block5.php ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+
2
+ <p>Should you decide to change your preferences later through your browsing session, you can click on the "Privacy & Cookie Policy" tab on your screen. This will display the consent notice again enabling you to change your preferences or withdraw your consent entirely.</p>
3
+
4
+ <p>In addition to this, different browsers provide different methods to block and delete cookies used by websites. You can change the settings of your browser to block/delete the cookies. To find out more out more on how to manage and delete cookies, visit <a href="https://en.wikipedia.org/wiki/HTTP_cookie" rel="nofollow" target="_blank">wikipedia.org</a>, <a href="http://www.allaboutcookies.org/" rel="nofollow" target="_blank">www.allaboutcookies.org.</a>
5
+ </p>
admin/modules/cli-policy-generator/data/data.policy-generator.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Default text for Privacy Generator
4
+ *
5
+ **/
6
+ $cli_pg_default_data=array(
7
+ array(
8
+ 'head'=>"About this cookie policy",
9
+ 'body'=>"",
10
+ 'body_file'=>"data.block1.php",
11
+ 'status'=>1,
12
+ ),
13
+ array(
14
+ 'head'=>"What are cookies ?",
15
+ 'body'=>"",
16
+ 'body_file'=>"data.block2.php",
17
+ 'status'=>1,
18
+ ),
19
+ array(
20
+ 'head'=>"How do we use cookies ?",
21
+ 'body'=>"",
22
+ 'body_file'=>"data.block3.php",
23
+ 'status'=>1,
24
+ ),
25
+ array(
26
+ 'head'=>"What types of cookies do we use ?",
27
+ 'body'=>"",
28
+ 'body_file'=>"data.block4.php",
29
+ 'status'=>1,
30
+ ),
31
+ array(
32
+ 'head'=>"How can I control the cookie preferences ?",
33
+ 'body'=>"",
34
+ 'body_file'=>"data.block5.php",
35
+ 'status'=>1,
36
+ ),
37
+ );
admin/modules/cli-policy-generator/views/policy-generator.php ADDED
@@ -0,0 +1,97 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( ! defined( 'ABSPATH' ) ) {
3
+ exit;
4
+ }
5
+ ?>
6
+ <style type="text/css">
7
+ .cli_pg_main{ float:left; width:100%; height:auto; min-height:600px; background:#fff; box-shadow:0px 2px 2px #ccc; border:solid 1px #ddd; margin-top:15px;}
8
+ .cli_pg_main *{box-sizing:border-box;}
9
+ .cli_pg_left{ float:left; width:25%; height:100%; background:#f3f3f3; border-right:solid 1px #cccccc;}
10
+ .cli_pg_left_menu{ float:left; width:100%; padding:10px; border-top:solid 1px #fff; border-bottom:solid 1px #ccc; cursor:pointer;}
11
+ .cli_pg_addnew_hd_btn{background:#fff !important; margin-top:5px !important; margin-right:5px !important; float:right; }
12
+ .cli_pg_right{ float:left; width:75%; padding:15px; min-height:540px; overflow:auto; font-size:12px; border-bottom:solid 1px #cccccc; }
13
+ .cli_pg_formrow{ float:left; width:100%; height:auto;}
14
+ .cli_pg_formrow label{ float:left; width:100%; height:auto; font-weight:bold; font-size:14px; margin-top:20px;}
15
+ .cli_pg_formrow .cli_pg_txt_field{ float:left; width:100%; border:1px solid #ced4da; border-radius:0.25rem; padding:0.375rem 0.75rem; font-size:1rem; line-height:1.5; margin-top:10px; }
16
+ .cli_pg_footer{ float:left; width:100%; background-color:#f3f3f3; min-height:60px; margin-top:0px; padding-bottom:10px;}
17
+ .cli_pg_main_buttons{height:28px; float:right; margin-right:15px !important; margin-top:15px !important; }
18
+ .cli_pg_content_hid, .cli_pg_samplehid_block{ display:none; }
19
+ </style>
20
+ <div class="wrap">
21
+ <h1><?php _e('Policy generator', 'cookie-law-info'); ?></h1>
22
+ <div class="cli_pg_samplehid_block">
23
+ <div class="cli_pg_left_menu">
24
+ <input type="checkbox" name="cli_pg_enabled_block_checkbox" checked="checked">
25
+ <span class="cli_pg_content_hd"><?php _e('Sample heading','cookie-law-info'); ?></span>
26
+ <div class="cli_pg_content_hid"><?php _e('Sample content','cookie-law-info'); ?></div>
27
+ <span class="dashicons dashicons-trash cli_pg_content_delete" style="float:right;" title="<?php _e('Delete','cookie-law-info');?>"></span>
28
+ </div>
29
+ </div>
30
+ <div class="cli_pg_main">
31
+ <div class="cli_pg_left">
32
+ <?php
33
+ if(isset($default_data))
34
+ {
35
+ foreach($default_data as $data)
36
+ {
37
+ ?>
38
+ <div class="cli_pg_left_menu">
39
+ <input type="checkbox" name="cli_pg_enabled_block_checkbox" checked="checked">
40
+ <span class="cli_pg_content_hd"><?php echo $data['head'];?></span>
41
+ <div class="cli_pg_content_hid"><?php echo $data['body'];?></div>
42
+ </div>
43
+ <?php
44
+ }
45
+ }
46
+ ?>
47
+ <button class="cli_pg_addnew_hd_btn button-secondary">
48
+ <span class="dashicons dashicons-plus" style="line-height:28px;"></span>
49
+ <?php _e('Add new','cookie-law-info');?></button>
50
+ </div>
51
+ <div class="cli_pg_right">
52
+ <div class="cli_pg_formrow">
53
+ <label><?php _e('Heading','cookie-law-info');?></label>
54
+ <input type="text" class="cli_pg_txt_field" name="cli_pg_hd_field">
55
+ </div>
56
+ <div class="cli_pg_formrow">
57
+ <label><?php _e('Description','cookie-law-info');?></label>
58
+ <?php
59
+ wp_editor('','cli_pg_content',array('textarea_name'=>'cli_pg_content','editor_class'=>'cli_pg_txt_field','editor_height'=>250));
60
+ ?>
61
+ </div>
62
+ </div>
63
+ <div class="cli_pg_footer">
64
+ <div style="float:right; width:75%;">
65
+ <p><input type="checkbox" id="enable_webtofee_powered_by" name="enable_webtofee_powered_by"> <label for="enable_webtofee_powered_by"><?php _e('Enabling this option will help us spread the word by placing a credit to WebToffee at the very end of the Cookie Policy page.','cookie-law-info');?></label></p>
66
+
67
+ <?php
68
+ $policy_pageid=$this->get_cookie_policy_pageid();
69
+ $update_exists_page_visibility='display:none;';
70
+ if($policy_pageid)
71
+ {
72
+ $policy_page_status=get_post_status($policy_pageid);
73
+ if($policy_page_status && $policy_page_status!='trash')
74
+ {
75
+ $update_exists_page_visibility='';
76
+ }
77
+ }
78
+ ?>
79
+
80
+ <a name="cli_pg_save_currentpage" style="<?php echo $update_exists_page_visibility;?>" class="button-primary cli_pg_main_buttons">
81
+ <span class="dashicons dashicons-yes" style="line-height: 28px;"></span>
82
+ <?php _e('Update existing Cookie Policy page','cookie-law-info');?>
83
+ </a>
84
+
85
+ <input type="hidden" name="cli_pg_policy_pageid" value="<?php echo $policy_pageid ? $policy_pageid : 0 ?>">
86
+ <a name="cli_pg_save_newpage" class="button-primary cli_pg_main_buttons">
87
+ <span class="dashicons dashicons-welcome-add-page" style="line-height: 28px;"></span>
88
+ <?php _e('Create Cookie Policy page','cookie-law-info');?>
89
+ </a>
90
+ <a name="cli_pg_live_preview" class="button-secondary cli_pg_main_buttons" href="<?php echo $preview_url;?>" target="_blank">
91
+ <span class="dashicons dashicons-external" style="line-height: 28px;"></span>
92
+ <?php _e('Live preview','cookie-law-info');?>
93
+ </a>
94
+ </div>
95
+ </div>
96
+ </div>
97
+ </div>
admin/views/admin-settings-buttons.php CHANGED
@@ -161,6 +161,16 @@ if ( ! defined( 'WPINC' ) ) {
161
  <div class="cli_sub_tab_content" data-id="read-more-button">
162
  <h3><?php _e('Read More Link', 'cookie-law-info'); ?> <code>[cookie_link]</code></h3>
163
  <p><?php _e('This button/link can be used to provide a link out to your Privacy & Cookie Policy. You can customise it any way you like.', 'cookie-law-info'); ?></p>
 
 
 
 
 
 
 
 
 
 
164
  <table class="form-table">
165
  <tr valign="top">
166
  <th scope="row"><label for="button_2_text_field"><?php _e('Text', 'cookie-law-info'); ?></label></th>
@@ -244,6 +254,13 @@ if ( ! defined( 'WPINC' ) ) {
244
  ?>
245
  </td>
246
  </tr>
 
 
 
 
 
 
 
247
  <tr valign="top">
248
  <th scope="row"><label for="button_2_new_win_field"><?php _e('Open in new window?', 'cookie-law-info'); ?></label></th>
249
  <td>
161
  <div class="cli_sub_tab_content" data-id="read-more-button">
162
  <h3><?php _e('Read More Link', 'cookie-law-info'); ?> <code>[cookie_link]</code></h3>
163
  <p><?php _e('This button/link can be used to provide a link out to your Privacy & Cookie Policy. You can customise it any way you like.', 'cookie-law-info'); ?></p>
164
+ <?php
165
+ if(Cookie_Law_Info_Admin::module_exists('cli-policy-generator'))
166
+ {
167
+ ?>
168
+ <p><?php _e('Click', 'cookie-law-info'); ?> <a href="<?php echo admin_url('edit.php?post_type='.CLI_POST_TYPE.'&page=cookie-law-info-policy-generator'); ?>"><?php _e('here', 'cookie-law-info'); ?></a> <?php _e(' to generate content for Cookie Policy page.', 'cookie-law-info'); ?>
169
+ </p>
170
+ <?php
171
+ }
172
+ ?>
173
+
174
  <table class="form-table">
175
  <tr valign="top">
176
  <th scope="row"><label for="button_2_text_field"><?php _e('Text', 'cookie-law-info'); ?></label></th>
254
  ?>
255
  </td>
256
  </tr>
257
+ <tr valign="top">
258
+ <th scope="row"><label for="button_2_new_win_field"><?php _e('Minimize Cookie Bar in this page/URL?', 'cookie-law-info'); ?></label></th>
259
+ <td>
260
+ <input type="radio" id="button_2_hidebar_field_yes" name="button_2_hidebar_field" class="styled" value="true" <?php echo ( $the_options['button_2_hidebar'] == true ) ? ' checked="checked"' : ''; ?> /> <?php _e('Yes', 'cookie-law-info'); ?>
261
+ <input type="radio" id="button_2_hidebar_field_no" name="button_2_hidebar_field" class="styled" value="false" <?php echo ( $the_options['button_2_hidebar'] == false ) ? ' checked="checked"' : ''; ?> /> <?php _e('No', 'cookie-law-info'); ?>
262
+ </td>
263
+ </tr>
264
  <tr valign="top">
265
  <th scope="row"><label for="button_2_new_win_field"><?php _e('Open in new window?', 'cookie-law-info'); ?></label></th>
266
  <td>
admin/views/admin-settings-help.php CHANGED
@@ -17,14 +17,6 @@ if ( ! defined( 'WPINC' ) ) {
17
  <?php _e('You can enter the shortcodes in the "message" field of the Cookie Law Info bar. They add nicely formatted buttons and/or links into the cookie bar, without you having to add any HTML.', 'cookie-law-info'); ?>
18
  </div>
19
  <ul class="cli-shortcodes">
20
- <li>
21
- <div style="font-weight: bold;">[cookie_accept]</div>
22
- <span><?php _e('If you just want a standard green "Accept" button that closes the header and nothing more, use this shortcode. It is already styled, you don\'t need to customise it.', 'cookie-law-info'); ?></span>
23
- </li>
24
- <li>
25
- <div style="font-weight: bold;">[cookie_accept colour="red"]</div>
26
- <?php _e('Alternatively you can add a colour value. Choose from: red, blue, orange, yellow, green or pink.', 'cookie-law-info'); ?><br /><em><?php _e('Careful to use the British spelling of "colour" for the attribute.', 'cookie-law-info'); ?></em>
27
- </li>
28
  <li>
29
  <div style="font-weight: bold;">[cookie_button]</div>
30
  <?php _e('This is the "main button" you customise above.', 'cookie-law-info'); ?>
@@ -37,6 +29,34 @@ if ( ! defined( 'WPINC' ) ) {
37
  <li><div style="font-weight: bold;">[cookie_link]</div>
38
  <?php _e('This is the "read more" link you customise above.', 'cookie-law-info'); ?>
39
  </li>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
40
  </ul>
41
  <div style="font-size: 14px;">
42
  <h3 style="margin-bottom:5px; margin-top:25px;"><?php _e('Other shortcodes', 'cookie-law-info'); ?></h3>
@@ -50,9 +70,13 @@ if ( ! defined( 'WPINC' ) ) {
50
  <div style="font-weight: bold;">
51
  [cookie_audit style="winter"] <br />
52
  [cookie_audit not_shown_message="No records found"] <br />
53
- [cookie_audit style="winter" not_shown_message="Not found"]
 
 
54
  </div>
55
- Styles included: simple, classic, modern, rounded, elegant, winter. Default is classic.
 
 
56
  </li>
57
  <li>
58
  <div style="font-weight: bold;">[delete_cookies]</div>
17
  <?php _e('You can enter the shortcodes in the "message" field of the Cookie Law Info bar. They add nicely formatted buttons and/or links into the cookie bar, without you having to add any HTML.', 'cookie-law-info'); ?>
18
  </div>
19
  <ul class="cli-shortcodes">
 
 
 
 
 
 
 
 
20
  <li>
21
  <div style="font-weight: bold;">[cookie_button]</div>
22
  <?php _e('This is the "main button" you customise above.', 'cookie-law-info'); ?>
29
  <li><div style="font-weight: bold;">[cookie_link]</div>
30
  <?php _e('This is the "read more" link you customise above.', 'cookie-law-info'); ?>
31
  </li>
32
+
33
+ <li><div style="font-weight: bold;"><?php _e("Setup margin for above buttons");?></div>
34
+ Eg: [cookie_button margin="10px"]
35
+ <pre>
36
+ margin: 5%; /* All sides: 5% margin */
37
+
38
+ margin: 10px; /* All sides: 10px margin */
39
+
40
+ margin: 1.6em 20px; /* top and bottom: 1.6em margin */
41
+ /* left and right: 20px margin */
42
+
43
+ margin: 10px 3% -1em; /* top: 10px margin */
44
+ /* left and right: 3% margin */
45
+ /* bottom: -1em margin */
46
+
47
+ margin: 10px 3px 30px 5px; /* top: 10px margin */
48
+ /* right: 3px margin */
49
+ /* bottom: 30px margin */
50
+ /* left: 5px margin */
51
+
52
+ margin: 2em auto; /* top and bottom: 2em margin */
53
+ /* Box is horizontally centered */
54
+
55
+ margin: auto; /* top and bottom: 0 margin */
56
+ /* Box is horizontally centered */
57
+ </pre>
58
+ </li>
59
+
60
  </ul>
61
  <div style="font-size: 14px;">
62
  <h3 style="margin-bottom:5px; margin-top:25px;"><?php _e('Other shortcodes', 'cookie-law-info'); ?></h3>
70
  <div style="font-weight: bold;">
71
  [cookie_audit style="winter"] <br />
72
  [cookie_audit not_shown_message="No records found"] <br />
73
+ [cookie_audit style="winter" not_shown_message="Not found"]<br />
74
+ [cookie_audit columns="cookie,description"] <br />
75
+ [cookie_audit heading="The below list details the cookies used in our website."]
76
  </div>
77
+ <?php _e('Styles included','cookie-law-info'); ?>: simple, classic, modern, rounded, elegant, winter. Default is classic.
78
+ <br />
79
+ <?php _e('Columns available','cookie-law-info'); ?>: cookie, description, type, duration. <?php _e('Will print all columns by default.','cookie-law-info'); ?>
80
  </li>
81
  <li>
82
  <div style="font-weight: bold;">[delete_cookies]</div>
cookie-law-info.php CHANGED
@@ -16,7 +16,7 @@
16
  * Plugin Name: GDPR Cookie Consent
17
  * Plugin URI: https://www.webtoffee.com/product/gdpr-cookie-consent/
18
  * Description: A simple way to show your website complies with the EU Cookie Law / GDPR.
19
- * Version: 1.7.3
20
  * Author: WebToffee
21
  * Author URI: http://cookielawinfo.com/
22
  * License: GPLv3
@@ -63,7 +63,7 @@ define ( 'CLI_POST_TYPE','cookielawinfo');
63
  * Currently plugin version.
64
  * Rename this for your plugin and update it as you release new versions.
65
  */
66
- define( 'CLI_VERSION', '1.7.3' );
67
 
68
 
69
  /**
16
  * Plugin Name: GDPR Cookie Consent
17
  * Plugin URI: https://www.webtoffee.com/product/gdpr-cookie-consent/
18
  * Description: A simple way to show your website complies with the EU Cookie Law / GDPR.
19
+ * Version: 1.7.4
20
  * Author: WebToffee
21
  * Author URI: http://cookielawinfo.com/
22
  * License: GPLv3
63
  * Currently plugin version.
64
  * Rename this for your plugin and update it as you release new versions.
65
  */
66
+ define( 'CLI_VERSION', '1.7.4' );
67
 
68
 
69
  /**
includes/class-cookie-law-info.php CHANGED
@@ -76,7 +76,7 @@ class Cookie_Law_Info {
76
  }
77
  else
78
  {
79
- $this->version = '1.7.3';
80
  }
81
  $this->plugin_name = 'cookie-law-info';
82
 
@@ -378,6 +378,7 @@ class Cookie_Law_Info {
378
  'button_2_button_size' => 'medium',
379
  'button_2_url_type' =>'url',
380
  'button_2_page' =>get_option('wp_page_for_privacy_policy') ? get_option('wp_page_for_privacy_policy') : 0,
 
381
 
382
  'button_3_text' => 'Reject',
383
  'button_3_url' => '#',
@@ -462,6 +463,7 @@ class Cookie_Law_Info {
462
  'button_2_button_hover' => (self::su_hex_shift( $settings['button_2_button_colour'], 'down', 20 )),
463
  'button_2_link_colour' => $settings['button_2_link_colour'],
464
  'button_2_as_button' => $settings['button_2_as_button'],
 
465
  'button_3_button_colour' => $settings['button_3_button_colour'],
466
  'button_3_button_hover' => (self::su_hex_shift( $settings['button_3_button_colour'], 'down', 20 )),
467
  'button_3_link_colour' => $settings['button_3_link_colour'],
@@ -530,6 +532,7 @@ class Cookie_Law_Info {
530
  case 'button_1_as_button':
531
  case 'button_2_new_win':
532
  case 'button_2_as_button':
 
533
  case 'button_3_new_win':
534
  case 'button_3_as_button':
535
  case 'button_4_new_win':
@@ -741,41 +744,63 @@ class Cookie_Law_Info {
741
  'class' => array(),
742
  'title' => array(),
743
  'target' => array(),
744
- 'rel' => array()
 
745
  ),
746
  'b' => array(),
747
  'br' => array(
748
  'id' => array(),
749
- 'class' => array()
 
750
  ),
751
  'div' => array(
752
  'id' => array(),
753
- 'class' => array()
 
754
  ),
755
  'em' => array (
756
  'id' => array(),
757
- 'class' => array()
 
758
  ),
759
  'i' => array(),
760
  'img' => array(
761
  'src' => array(),
762
  'id' => array(),
763
  'class' => array(),
764
- 'alt' => array()
 
765
  ),
766
  'p' => array (
767
  'id' => array(),
768
- 'class' => array()
 
769
  ),
770
  'span' => array(
771
  'id' => array(),
772
- 'class' => array()
 
773
  ),
774
  'strong' => array(
775
  'id' => array(),
776
- 'class' => array()
 
777
  ),
 
 
 
 
 
778
  );
 
 
 
 
 
 
 
 
 
779
  return $allowed_html;
780
  }
781
 
76
  }
77
  else
78
  {
79
+ $this->version = '1.7.4';
80
  }
81
  $this->plugin_name = 'cookie-law-info';
82
 
378
  'button_2_button_size' => 'medium',
379
  'button_2_url_type' =>'url',
380
  'button_2_page' =>get_option('wp_page_for_privacy_policy') ? get_option('wp_page_for_privacy_policy') : 0,
381
+ 'button_2_hidebar' =>true,
382
 
383
  'button_3_text' => 'Reject',
384
  'button_3_url' => '#',
463
  'button_2_button_hover' => (self::su_hex_shift( $settings['button_2_button_colour'], 'down', 20 )),
464
  'button_2_link_colour' => $settings['button_2_link_colour'],
465
  'button_2_as_button' => $settings['button_2_as_button'],
466
+ 'button_2_hidebar' =>$settings['button_2_hidebar'],
467
  'button_3_button_colour' => $settings['button_3_button_colour'],
468
  'button_3_button_hover' => (self::su_hex_shift( $settings['button_3_button_colour'], 'down', 20 )),
469
  'button_3_link_colour' => $settings['button_3_link_colour'],
532
  case 'button_1_as_button':
533
  case 'button_2_new_win':
534
  case 'button_2_as_button':
535
+ case 'button_2_hidebar':
536
  case 'button_3_new_win':
537
  case 'button_3_as_button':
538
  case 'button_4_new_win':
744
  'class' => array(),
745
  'title' => array(),
746
  'target' => array(),
747
+ 'rel' => array(),
748
+ 'style' => array()
749
  ),
750
  'b' => array(),
751
  'br' => array(
752
  'id' => array(),
753
+ 'class' => array(),
754
+ 'style' => array()
755
  ),
756
  'div' => array(
757
  'id' => array(),
758
+ 'class' => array(),
759
+ 'style' => array()
760
  ),
761
  'em' => array (
762
  'id' => array(),
763
+ 'class' => array(),
764
+ 'style' => array()
765
  ),
766
  'i' => array(),
767
  'img' => array(
768
  'src' => array(),
769
  'id' => array(),
770
  'class' => array(),
771
+ 'alt' => array(),
772
+ 'style' => array()
773
  ),
774
  'p' => array (
775
  'id' => array(),
776
+ 'class' => array(),
777
+ 'style' => array()
778
  ),
779
  'span' => array(
780
  'id' => array(),
781
+ 'class' => array(),
782
+ 'style' => array()
783
  ),
784
  'strong' => array(
785
  'id' => array(),
786
+ 'class' => array(),
787
+ 'style' => array()
788
  ),
789
+ 'label' => array(
790
+ 'id' => array(),
791
+ 'class' => array(),
792
+ 'style' => array()
793
+ )
794
  );
795
+ $html5_tags=array('article','section','aside','details','figcaption','figure','footer','header','main','mark','nav','summary','time');
796
+ foreach($html5_tags as $html5_tag)
797
+ {
798
+ $allowed_html[$html5_tag]=array(
799
+ 'id' => array(),
800
+ 'class' => array(),
801
+ 'style' => array()
802
+ );
803
+ }
804
  return $allowed_html;
805
  }
806
 
public/class-cookie-law-info-public.php CHANGED
@@ -233,11 +233,11 @@ class Cookie_Law_Info_Public {
233
  ($head!="" ? '<h5 class="cli_messagebar_head">'.$head.'</h5>' : '')
234
  .'<span>' . $str . '</span></div>';
235
 
236
- if($the_options['showagain_tab'] === true)
237
- {
238
  $show_again=__($the_options["showagain_text"],'cookie-law-info');
239
- $notify_html .= '<div id="' . $this->cookielawinfo_remove_hash( $the_options["showagain_div_id"] ) . '"><span id="cookie_hdr_showagain">'.$show_again.'</span></div>';
240
- }
241
  global $wp_query;
242
  $current_obj = get_queried_object();
243
  $post_slug ='';
233
  ($head!="" ? '<h5 class="cli_messagebar_head">'.$head.'</h5>' : '')
234
  .'<span>' . $str . '</span></div>';
235
 
236
+ //if($the_options['showagain_tab'] === true)
237
+ //{
238
  $show_again=__($the_options["showagain_text"],'cookie-law-info');
239
+ $notify_html .= '<div id="' . $this->cookielawinfo_remove_hash( $the_options["showagain_div_id"] ) . '" style="display:none;"><span id="cookie_hdr_showagain">'.$show_again.'</span></div>';
240
+ //}
241
  global $wp_query;
242
  $current_obj = get_queried_object();
243
  $post_slug ='';
public/css/cookie-law-info-gdpr-1.6.7.css DELETED
@@ -1,604 +0,0 @@
1
- .gdpr-container-fluid {
2
- width: 100%;
3
- padding-right: 15px;
4
- padding-left: 15px;
5
- margin-right: auto;
6
- margin-left: auto;
7
- }
8
- .gdpr-row {
9
- display: -ms-flexbox;
10
- display: flex;
11
- -ms-flex-wrap: wrap;
12
- flex-wrap: wrap;
13
- margin-right: -15px;
14
- margin-left: -15px;
15
- }
16
- .gdpr-col-4 {
17
- -ms-flex: 0 0 33.333333%;
18
- flex: 0 0 33.333333%;
19
- max-width: 33.333333%;
20
- }
21
- .gdpr-col-8 {
22
- -ms-flex: 0 0 66.666667%;
23
- flex: 0 0 66.666667%;
24
- max-width: 66.666667%;
25
- }
26
- .gdpr-align-items-stretch {
27
- -ms-flex-align: stretch!important;
28
- align-items: stretch!important;
29
- }
30
- .gdpr-d-flex {
31
- display: -ms-flexbox!important;
32
- display: flex!important;
33
- }
34
- .gdpr-px-0 {
35
- padding-left: 0;
36
- padding-right: 0;
37
- }
38
- .modal-backdrop.show {
39
- opacity: .8;
40
- }
41
- .modal-open {
42
- overflow: hidden
43
- }
44
-
45
- .modal-open .gdpr-modal {
46
- overflow-x: hidden;
47
- overflow-y: auto
48
- }
49
-
50
- .gdpr-modal.fade .gdpr-modal-dialog {
51
- transition: -webkit-transform .3s ease-out;
52
- transition: transform .3s ease-out;
53
- transition: transform .3s ease-out,-webkit-transform .3s ease-out;
54
- -webkit-transform: translate(0,-25%);
55
- transform: translate(0,-25%)
56
- }
57
-
58
- .gdpr-modal.show .gdpr-modal-dialog {
59
- -webkit-transform: translate(0,0);
60
- transform: translate(0,0)
61
- }
62
-
63
- .modal-backdrop {
64
- position: fixed;
65
- top: 0;
66
- right: 0;
67
- bottom: 0;
68
- left: 0;
69
- z-index: 1039;
70
- background-color: #000
71
- }
72
-
73
- .modal-backdrop.fade {
74
- opacity: 0
75
- }
76
-
77
- .modal-backdrop.show {
78
- opacity: .5
79
- }
80
-
81
- .gdpr-modal {
82
- position: fixed;
83
- top: 0;
84
- right: 0;
85
- bottom: 0;
86
- left: 0;
87
- z-index: 1050;
88
- display: none;
89
- overflow: hidden;
90
- outline: 0
91
- }
92
- .gdpr-modal a {
93
- text-decoration: none;
94
- }
95
- .gdpr-modal .gdpr-modal-dialog {
96
- position: relative;
97
- width: auto;
98
- margin: .5rem;
99
- pointer-events: none;
100
- font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";
101
- font-size: 1rem;
102
- font-weight: 400;
103
- line-height: 1.5;
104
- color: #212529;
105
- text-align: left;
106
- display: -ms-flexbox;
107
- display: flex;
108
- -ms-flex-align: center;
109
- align-items: center;
110
- min-height: calc(100% - (.5rem * 2))
111
- }
112
- @media (min-width: 576px) {
113
- .gdpr-modal .gdpr-modal-dialog {
114
- max-width:500px;
115
- margin: 1.75rem auto;
116
- min-height: calc(100% - (1.75rem * 2));
117
- }
118
- }
119
- @media (min-width: 992px) {
120
- .gdpr-modal .gdpr-modal-dialog {
121
- max-width: 900px;
122
- }
123
- }
124
- .gdpr-modal-content {
125
- position: relative;
126
- display: -ms-flexbox;
127
- display: flex;
128
- -ms-flex-direction: column;
129
- flex-direction: column;
130
- width: 100%;
131
- pointer-events: auto;
132
- background-color: #fff;
133
- background-clip: padding-box;
134
- border: 1px solid rgba(0,0,0,.2);
135
- border-radius: .3rem;
136
- outline: 0
137
- }
138
- .gdpr-modal .row {
139
- margin: 0 -15px;
140
- }
141
- .gdpr-modal .modal-body {
142
- padding: 0;
143
- position: relative;
144
- -ms-flex: 1 1 auto;
145
- flex: 1 1 auto;
146
- }
147
- .gdpr-modal .close {
148
- position: absolute;
149
- right: 10px;
150
- top: 10px;
151
- z-index: 1;
152
- padding: 0;
153
- background-color: transparent;
154
- border: 0;
155
- -webkit-appearance: none;
156
- font-size: 1.5rem;
157
- font-weight: 700;
158
- line-height: 1;
159
- color: #000;
160
- text-shadow: 0 1px 0 #fff;
161
- }
162
- .gdpr-modal .close:focus {
163
- outline: 0;
164
- }
165
- .gdpr-switch {
166
- display: inline-block;
167
- position: relative;
168
- min-height: 1px;
169
- padding-left: 70px;
170
- font-size: 14px;
171
- }
172
- .gdpr-switch input[type="checkbox"] {
173
- display:none;
174
- }
175
- .gdpr-switch .gdpr-slider {
176
- background-color: #e3e1e8;
177
- height: 24px;
178
- width: 50px;
179
- bottom: 0;
180
- cursor: pointer;
181
- left: 0;
182
- position: absolute;
183
- right: 0;
184
- top: 0;
185
- transition: .4s;
186
- }
187
- .gdpr-switch .gdpr-slider:before {
188
- background-color: #fff;
189
- bottom: 2px;
190
- content: "";
191
- height: 20px;
192
- left: 2px;
193
- position: absolute;
194
- transition: .4s;
195
- width: 20px;
196
- }
197
- .gdpr-switch input:checked + .gdpr-slider {
198
- background-color:rgb(99, 179, 95);
199
- }
200
- .gdpr-switch input:checked + .gdpr-slider:before {
201
- transform: translateX(26px);
202
- }
203
- .gdpr-switch .gdpr-slider {
204
- border-radius: 34px;
205
- }
206
- .gdpr-switch .gdpr-slider:before {
207
- border-radius: 50%;
208
- }
209
- .gdpr-tab-content>.gdpr-tab-pane {
210
- display: none;
211
- }
212
- .gdpr-tab-content>.active {
213
- display: block;
214
- }
215
- .gdpr-fade {
216
- transition: opacity .15s linear;
217
- }
218
- .gdpr-nav-pills {
219
- display: -ms-flexbox;
220
- display: flex;
221
- -ms-flex-wrap: wrap;
222
- flex-wrap: wrap;
223
- padding-left: 0;
224
- margin-bottom: 0;
225
- list-style: none;
226
- -ms-flex-direction: column !important;
227
- flex-direction: column !important;
228
- align-items: stretch !important;
229
- -ms-align-items: stretch !important;
230
- }
231
- .nav.gdpr-nav-pills, .gdpr-tab-content {
232
- width: 100%;
233
- padding: 30px;
234
- }
235
- .nav.gdpr-nav-pills {
236
- background: #f3f3f3;
237
- }
238
- .nav.gdpr-nav-pills .gdpr-nav-link {
239
- border: 1px solid #0070ad;
240
- margin-bottom: 10px;
241
- color: #0070ad;
242
- font-size: 14px;
243
- display: block;
244
- padding: .5rem 1rem;
245
- border-radius: .25rem;
246
- }
247
- .nav.gdpr-nav-pills .gdpr-nav-link.active, .nav.gdpr-nav-pills .show>.gdpr-nav-link {
248
- background-color: #0070ad;
249
- border: 1px solid #0070ad;
250
- }
251
- .nav.gdpr-nav-pills .gdpr-nav-link.active {
252
- color: #ffffff;
253
- }
254
- .gdpr-tab-content .gdpr-button-wrapper {
255
- padding-top: 30px;
256
- margin-top: 30px;
257
- border-top: 1px solid #d6d6d6;
258
- }
259
- .gdpr-tab-content .gdpr-button-wrapper .btn-gdpr {
260
- background-color: #0070ad;
261
- border-color: #0070ad;
262
- color: #ffffff;
263
- font-size: 14px;
264
- display: inline-block;
265
- font-weight: 400;
266
- text-align: center;
267
- white-space: nowrap;
268
- vertical-align: middle;
269
- -webkit-user-select: none;
270
- -moz-user-select: none;
271
- -ms-user-select: none;
272
- user-select: none;
273
- border: 1px solid transparent;
274
- padding: .375rem .75rem;
275
- font-size: 1rem;
276
- line-height: 1.5;
277
- border-radius: .25rem;
278
- transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;
279
- }
280
- .gdpr-tab-content p {
281
- color: #343438;
282
- font-size: 14px;
283
- margin-top: 0;
284
- }
285
- .gdpr-tab-content h4 {
286
- font-size: 20px;
287
- margin-bottom: .5rem;
288
- margin-top: 0;
289
- font-family: inherit;
290
- font-weight: 500;
291
- line-height: 1.2;
292
- color: inherit;
293
- }
294
-
295
-
296
- .cli-container-fluid {
297
- padding-right: 15px;
298
- padding-left: 15px;
299
- margin-right: auto;
300
- margin-left: auto;
301
- }
302
- .cli-row {
303
- display: -ms-flexbox;
304
- display: flex;
305
- -ms-flex-wrap: wrap;
306
- flex-wrap: wrap;
307
- margin-right: -15px;
308
- margin-left: -15px;
309
- }
310
- .cli-col-4 {
311
- -ms-flex: 0 0 33.333333%;
312
- flex: 0 0 33.333333%;
313
- max-width: 33.333333%;
314
- }
315
- .cli-col-8 {
316
- -ms-flex: 0 0 66.666667%;
317
- flex: 0 0 66.666667%;
318
- max-width: 66.666667%;
319
- }
320
- .cli-align-items-stretch {
321
- -ms-flex-align: stretch!important;
322
- align-items: stretch!important;
323
- }
324
- .cli-d-flex {
325
- display: -ms-flexbox!important;
326
- display: flex!important;
327
- }
328
- .cli-px-0 {
329
- padding-left: 0;
330
- padding-right: 0;
331
- }
332
- .cli-btn {
333
- cursor: pointer;
334
- font-size: 14px;
335
- display: inline-block;
336
- font-weight: 400;
337
- text-align: center;
338
- white-space: nowrap;
339
- vertical-align: middle;
340
- -webkit-user-select: none;
341
- -moz-user-select: none;
342
- -ms-user-select: none;
343
- user-select: none;
344
- border: 1px solid transparent;
345
- padding: .5rem 1.25rem;
346
- line-height: 1;
347
- border-radius: .25rem;
348
- transition: all .15s ease-in-out;
349
- }
350
- .cli-btn:hover {
351
- opacity: .8;
352
- }
353
- .cli-read-more-link {
354
- cursor: pointer;
355
- font-size: 15px;
356
- font-weight: 500;
357
- text-decoration: underline;
358
- }
359
- .cli-btn:focus {
360
- outline: 0;
361
- }
362
- .cli-modal-backdrop.cli-show {
363
- opacity: .8;
364
- }
365
- .cli-modal-open {
366
- overflow: hidden
367
- }
368
- .cli-barmodal-open {
369
- overflow: hidden
370
- }
371
- .cli-modal-open .cli-modal {
372
- overflow-x: hidden;
373
- overflow-y: auto
374
- }
375
- .cli-modal.cli-fade .cli-modal-dialog {
376
- transition: -webkit-transform .3s ease-out;
377
- transition: transform .3s ease-out;
378
- transition: transform .3s ease-out,-webkit-transform .3s ease-out;
379
- -webkit-transform: translate(0,-25%);
380
- transform: translate(0,-25%)
381
- }
382
- .cli-modal.cli-show .cli-modal-dialog {
383
- -webkit-transform: translate(0,0);
384
- transform: translate(0,0)
385
- }
386
- .cli-modal-backdrop {
387
- position: fixed;
388
- top: 0;
389
- right: 0;
390
- bottom: 0;
391
- left: 0;
392
- z-index: 1040;
393
- background-color: #000;
394
- display: none;
395
- }
396
- .cli-modal-backdrop.cli-fade {
397
- opacity: 0
398
- }
399
- .cli-modal-backdrop.cli-show {
400
- opacity: .5;
401
- display: block;
402
- }
403
- .cli-modal {
404
- position: fixed;
405
- top: 0;
406
- right: 0;
407
- bottom: 0;
408
- left: 0;
409
- z-index: 99999;
410
- display: none;
411
- overflow: hidden;
412
- outline: 0
413
- }
414
- .cli-modal.cli-show {
415
- display: block;
416
- }
417
- .cli-modal a {
418
- text-decoration: none;
419
- }
420
- .cli-modal .cli-modal-dialog {
421
- position: relative;
422
- width: auto;
423
- margin: .5rem;
424
- pointer-events: none;
425
- font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";
426
- font-size: 1rem;
427
- font-weight: 400;
428
- line-height: 1.5;
429
- color: #212529;
430
- text-align: left;
431
- display: -ms-flexbox;
432
- display: flex;
433
- -ms-flex-align: center;
434
- align-items: center;
435
- min-height: calc(100% - (.5rem * 2))
436
- }
437
- @media (min-width: 576px) {
438
- .cli-modal .cli-modal-dialog {
439
- max-width:500px;
440
- margin: 1.75rem auto;
441
- min-height: calc(100% - (1.75rem * 2))
442
- }
443
- }
444
- @media (min-width: 992px) {
445
- .cli-modal .cli-modal-dialog {
446
- max-width: 900px;
447
- }
448
- }
449
- .cli-modal-content {
450
- position: relative;
451
- display: -ms-flexbox;
452
- display: flex;
453
- -ms-flex-direction: column;
454
- flex-direction: column;
455
- width: 100%;
456
- pointer-events: auto;
457
- background-color: #fff;
458
- background-clip: padding-box;
459
- border: 1px solid rgba(0,0,0,.2);
460
- border-radius: .3rem;
461
- outline: 0
462
- }
463
- .cli-modal .row {
464
- margin: 0 -15px;
465
- }
466
- .cli-modal .modal-body {
467
- padding: 0;
468
- position: relative;
469
- -ms-flex: 1 1 auto;
470
- flex: 1 1 auto;
471
- }
472
- .cli-modal .cli-modal-close {
473
- position: absolute;
474
- right: 10px;
475
- top: 10px;
476
- z-index: 1;
477
- padding: 0;
478
- background-color: transparent;
479
- border: 0;
480
- -webkit-appearance: none;
481
- font-size: 1.5rem;
482
- font-weight: 700;
483
- line-height: 1;
484
- color: #000;
485
- text-shadow: 0 1px 0 #fff;
486
- }
487
- .cli-modal .cli-modal-close:focus {
488
- outline: 0;
489
- }
490
- .cli-switch {
491
- display: inline-block;
492
- position: relative;
493
- min-height: 1px;
494
- padding-left: 70px;
495
- font-size: 14px;
496
- }
497
- .cli-switch input[type="checkbox"] {
498
- display:none;
499
- }
500
- .cli-switch .cli-slider {
501
- background-color: #e3e1e8;
502
- height: 24px;
503
- width: 50px;
504
- bottom: 0;
505
- cursor: pointer;
506
- left: 0;
507
- position: absolute;
508
- right: 0;
509
- top: 0;
510
- transition: .4s;
511
- }
512
- .cli-switch .cli-slider:before {
513
- background-color: #fff;
514
- bottom: 2px;
515
- content: "";
516
- height: 20px;
517
- left: 2px;
518
- position: absolute;
519
- transition: .4s;
520
- width: 20px;
521
- }
522
- .cli-switch input:checked + .cli-slider {
523
- background-color: #00acad
524
- }
525
- .cli-switch input:checked + .cli-slider:before {
526
- transform: translateX(26px);
527
- }
528
- .cli-switch .cli-slider {
529
- border-radius: 34px;
530
- }
531
- .cli-switch .cli-slider:before {
532
- border-radius: 50%;
533
- }
534
- .cli-tab-content {
535
- background: #ffffff;
536
- }
537
- .cli-tab-content>.cli-tab-pane {
538
- display: none;
539
- }
540
- .cli-tab-content>.cli-active {
541
- display: block;
542
- }
543
- .cli-fade {
544
- transition: opacity .15s linear;
545
- }
546
- .cli-nav-pills {
547
- display: -ms-flexbox;
548
- display: flex;
549
- -ms-flex-wrap: wrap;
550
- flex-wrap: wrap;
551
- padding-left: 0;
552
- margin-bottom: 0;
553
- list-style: none;
554
- -ms-flex-direction: column;
555
- flex-direction: column;
556
- }
557
- .cli-nav-pills, .cli-tab-content {
558
- width: 100%;
559
- padding: 30px;
560
- }
561
- @media (max-width: 767px) {
562
- .cli-nav-pills, .cli-tab-content {
563
- padding: 30px 10px;
564
- }
565
- }
566
- .cli-nav-pills {
567
- background: #f3f3f3;
568
- }
569
- .cli-nav-pills .cli-nav-link {
570
- border: 1px solid #00acad;
571
- margin-bottom: 10px;
572
- color: #00acad;
573
- font-size: 14px;
574
- display: block;
575
- padding: .5rem 1rem;
576
- border-radius: .25rem;
577
- cursor: pointer
578
- }
579
- .cli-nav-pills .cli-nav-link.cli-active, .cli-nav-pills .cli-show>.cli-nav-link {
580
- background-color: #00acad;
581
- border: 1px solid #00acad;
582
- }
583
- .cli-nav-pills .cli-nav-link.cli-active {
584
- color: #ffffff;
585
- }
586
- .cli-tab-content .cli-button-wrapper {
587
- padding-top: 30px;
588
- margin-top: 30px;
589
- border-top: 1px solid #d6d6d6;
590
- }
591
- .cli-tab-content p {
592
- color: #343438;
593
- font-size: 14px;
594
- margin-top: 0;
595
- }
596
- .cli-tab-content h4 {
597
- font-size: 20px;
598
- margin-bottom: 1.5rem;
599
- margin-top: 0;
600
- font-family: inherit;
601
- font-weight: 500;
602
- line-height: 1.2;
603
- color: inherit;
604
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
public/css/cookie-law-info-public-1.6.7.css DELETED
@@ -1,109 +0,0 @@
1
- #cookie-law-info-bar {
2
- /*border: 0; */
3
- font-size: 10pt;
4
- margin: 0 auto;
5
- padding: 10px 0;
6
- position: absolute;
7
- text-align: center;
8
- width: 100%;
9
- z-index: 9999;
10
- box-shadow:rgba(0,0,0,.5) 0px 5px 50px;
11
- }
12
- #cookie-law-info-again {
13
- font-size: 10pt;
14
- margin: 0;
15
- padding:5px 10px;
16
- text-align: center;
17
- z-index: 9999;
18
- cursor: pointer;
19
- box-shadow: #161616 2px 2px 5px 2px;
20
- }
21
- #cookie-law-info-bar span {
22
- vertical-align: middle;
23
- }
24
-
25
- /** Buttons (http://papermashup.com/demos/css-buttons) */
26
- .cli-plugin-button, .cli-plugin-button:visited {
27
- display: inline-block;
28
- padding: 8px 16px 8px;
29
- color: #fff;
30
- text-decoration: none;
31
- -moz-border-radius: 4px;
32
- -webkit-border-radius: 4px;
33
- position: relative;
34
- cursor: pointer;
35
- margin-left: 0px;
36
- text-decoration: none;
37
- }
38
- .cli-plugin-main-link {
39
- margin-left:0px;
40
- }
41
- .cli-plugin-button:hover {
42
- background-color: #111;
43
- color: #fff;
44
- text-decoration: none;
45
- }
46
- .small.cli-plugin-button, .small.cli-plugin-button:visited {
47
- font-size: 11px;
48
- }
49
- .cli-plugin-button, .cli-plugin-button:visited,
50
- .medium.cli-plugin-button, .medium.cli-plugin-button:visited {
51
- font-size: 13px;
52
- font-weight: 500;
53
- line-height: 1;
54
- }
55
- .large.cli-plugin-button, .large.cli-plugin-button:visited {
56
- font-size: 14px;
57
- padding: 8px 14px 9px;
58
- }
59
- .super.cli-plugin-button, .super.cli-plugin-button:visited {
60
- font-size: 34px;
61
- padding: 8px 14px 9px;
62
- }
63
- .pink.cli-plugin-button, .magenta.cli-plugin-button:visited {
64
- background-color: #e22092;
65
- }
66
- .pink.cli-plugin-button:hover {
67
- background-color: #c81e82;
68
- }
69
- .green.cli-plugin-button, .green.cli-plugin-button:visited {
70
- background-color: #91bd09;
71
- }
72
- .green.cli-plugin-button:hover {
73
- background-color: #749a02;
74
- }
75
- .red.cli-plugin-button, .red.cli-plugin-button:visited {
76
- background-color: #e62727;
77
- }
78
- .red.cli-plugin-button:hover {
79
- background-color: #cf2525;
80
- }
81
- .orange.cli-plugin-button, .orange.cli-plugin-button:visited {
82
- background-color: #ff5c00;
83
- }
84
- .orange.cli-plugin-button:hover {
85
- background-color: #d45500;
86
- }
87
- .blue.cli-plugin-button, .blue.cli-plugin-button:visited {
88
- background-color: #2981e4;
89
- }
90
- .blue.cli-plugin-button:hover {
91
- background-color: #2575cf;
92
- }
93
- .yellow.cli-plugin-button, .yellow.cli-plugin-button:visited {
94
- background-color: #ffb515;
95
- }
96
- .yellow.cli-plugin-button:hover {
97
- background-color: #fc9200;
98
- }
99
- .cli-plugin-button{ margin-top:5px; }
100
- .cli-bar-popup{
101
- -moz-background-clip: padding;
102
- -webkit-background-clip: padding;
103
- background-clip: padding-box;
104
- border:20px solid rgba(0,0,0,0.5) !important;
105
- -webkit-border-radius:30px;
106
- -moz-border-radius:30px;
107
- border-radius:30px;
108
- padding:20px;
109
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
public/css/cookie-law-info-public.css CHANGED
@@ -109,4 +109,6 @@
109
  -moz-border-radius:30px;
110
  border-radius:30px;
111
  padding:20px;
112
- }
 
 
109
  -moz-border-radius:30px;
110
  border-radius:30px;
111
  padding:20px;
112
+ }
113
+ .cli-powered_by_p{width:100% !important; display:block !important; color:#333; clear:both; font-style:italic !important; font-size:12px !important; margin-top:15px !important; }
114
+ .cli-powered_by_a{color:#333; font-weight:600 !important; font-size:12px !important;}
public/css/cookie-law-info-table-1.6.7.css DELETED
@@ -1,129 +0,0 @@
1
- /**
2
- Responsive table courtesy of Mark Wiltshire: mark@bamboorocketapps.com (thanks!)
3
-
4
- For more styles try: http://icant.co.uk/csstablegallery/
5
- ----
6
- Generic styles:
7
- Here you could e.g. customise width of column 1 and 2,
8
- or add a generic roll-over effect on table rows
9
- */
10
- .cookielawinfo-column-1 {width: 25%;}
11
- .cookielawinfo-column-2 {width: 10%;}
12
- .cookielawinfo-column-3 {width: 15%;}
13
- .cookielawinfo-column-4 {width: 50%;}
14
-
15
- /** Simple style */
16
- .cookielawinfo-simple thead {width: 100%;}
17
- .cookielawinfo-simple td {padding: 5px 5px 5px 0;vertical-align: top;}
18
- .cookielawinfo-simple thead th {padding-right: 10px;text-align: left;}
19
-
20
- /** Modern style */
21
- .cookielawinfo-modern {border: 1px solid #e3e3e3;background-color: #f2f2f2;width: 100%;border-radius: 6px;-webkit-border-radius: 6px;-moz-border-radius: 6px;}
22
- .cookielawinfo-modern td, .cookielawinfo-modern th {padding: 5px;color: #333;}
23
- .cookielawinfo-modern thead {font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif;padding: .2em 0 .2em .5em;text-align: left;color: #4B4B4B;background-color: #C8C8C8;background-image: -webkit-gradient(linear, left top, left bottom, from(#f2f2f2), to(#e3e3e3), color-stop(.6,#B3B3B3));background-image: -moz-linear-gradient(top, #D6D6D6, #B0B0B0, #B3B3B3 90%);border-bottom: solid 1px #999;}
24
- .cookielawinfo-modern th {font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size: 17px;line-height: 20px;font-style: normal;font-weight: normal;text-align: left;text-shadow: white 1px 1px 1px;}
25
- .cookielawinfo-modern td {line-height: 20px;font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size: 14px;border-bottom: 1px solid #fff;border-top: 1px solid #fff;}
26
- .cookielawinfo-modern tr.cookielawinfo-row:hover {background-color: #fff;}
27
-
28
- /** Elegant style */
29
- .cookielawinfo-elegant {border: 1px solid #DFDFDF;background-color: #F9F9F9;width: 100%;-moz-border-radius: 3px;-webkit-border-radius: 3px;border-radius: 3px;font-family: Arial,"Bitstream Vera Sans",Helvetica,Verdana,sans-serif;color: #333;}
30
- .cookielawinfo-elegant tr {border-top-color: white;border-bottom: 1px solid #DFDFDF;color: #555;}
31
- .cookielawinfo-elegant th {text-shadow: rgba(255, 255, 255, 0.796875) 0px 1px 0px;font-family: Georgia,"Times New Roman","Bitstream Charter",Times,serif;font-weight: normal;padding: 7px 7px 8px;text-align: left;line-height: 1.3em;font-size: 14px;}
32
- .cookielawinfo-elegant td {font-size: 12px;padding: 4px 7px 2px;vertical-align: top;}
33
-
34
- /** Rounded style */
35
- .cookielawinfo-rounded {background-color: #f5f5f5;padding: 5px;border-radius: 5px;-moz-border-radius: 5px;-webkit-border-radius: 5px;border: 1px solid #ebebeb;}
36
- .cookielawinfo-rounded td, .rounded th {padding: 1px 5px;}
37
- .cookielawinfo-rounded thead {text-shadow: 0 1px 0 white;color: #999;}
38
- .cookielawinfo-rounded th {text-align: left;text-transform: uppercase;font-size: 11pt;border-bottom: 1px solid #fff;padding: 1px 5px;}
39
- .cookielawinfo-rounded td {font-size: 10pt;padding: 5px;}
40
- .cookielawinfo-rounded tr.cookielawinfo-row:hover {background-color: #fff;}
41
-
42
- /** Classic Style */
43
- table.cookielawinfo-classic {font-family: Verdana, Arial, Helvetica, sans-serif;border-collapse: collapse;border-left: 1px solid #ccc;border-top: 1px solid #ccc; color: #333;}
44
- table.cookielawinfo-classic thead tr th {text-transform: uppercase;background: #e2e2e2;}
45
- table.cookielawinfo-classic tfoot tr th, table.cookielawinfo-classic tfoot tr td {text-transform: uppercase;color: #000;font-weight: bold;}
46
- table.cookielawinfo-classic tfoot tr th {width: 20%;}
47
- table.cookielawinfo-classic tfoot tr td {width: 80%;}
48
- table.cookielawinfo-classic td, table.cookielawinfo-classic th {border-right: 1px solid #ccc;border-bottom: 1px solid #ccc;padding: 5px;line-height: 1.8em;font-size: 0.8em;vertical-align: top;width: 20%;}
49
- table.cookielawinfo-classic tr.odd th, table.cookielawinfo-classic tr.odd td {background: #efefef;}
50
-
51
- /* "Winter Blues" CSS theme for CSS Table Gallery (http://icant.co.uk/csstablegallery/) by Gunta Klavina (http://www.klavina.com) */
52
- table.cookielawinfo-winter {font: 85% "Lucida Grande", "Lucida Sans Unicode", "Trebuchet MS", sans-serif;padding: 0; margin: 10px 0 20px; border-collapse: collapse; color: #333; background: #F3F5F7;}
53
- table.cookielawinfo-winter a {color: #3A4856; text-decoration: none; border-bottom: 1px solid #C6C8CB;}
54
- table.cookielawinfo-winter a:visited {color: #777;}
55
- table.cookielawinfo-winter a:hover {color: #000;}
56
- table.cookielawinfo-winter caption {text-align: left; text-transform: uppercase; padding-bottom: 10px; font: 200% "Lucida Grande", "Lucida Sans Unicode", "Trebuchet MS", sans-serif;}
57
- table.cookielawinfo-winter thead th {background: #3A4856; padding: 15px 10px; color: #fff; text-align: left; font-weight: normal;}
58
- table.cookielawinfo-winter tbody {border-left: 1px solid #EAECEE; border-right: 1px solid #EAECEE;}
59
- table.cookielawinfo-winter tbody {border-bottom: 1px solid #EAECEE;}
60
- table.cookielawinfo-winter tbody td, table.cookielawinfo-winter tbody th {padding: 10px; background: url("../images/td_back.gif") repeat-x; text-align: left;}
61
- table.cookielawinfo-winter tbody tr {background: #F3F5F7;}
62
- table.cookielawinfo-winter tbody tr.odd {background: #F0F2F4;}
63
- table.cookielawinfo-winter tbody tr:hover {background: #EAECEE; color: #111;}
64
- table.cookielawinfo-winter tfoot td, table.cookielawinfo-winter tfoot th, table.cookielawinfo-winter tfoot tr {text-align: left; font: 120% "Lucida Grande", "Lucida Sans Unicode", "Trebuchet MS", sans-serif; text-transform: uppercase; background: #fff; padding: 10px;}
65
-
66
- /** 27/05/2013: responsive table by Mark Wiltshire */
67
- @media(max-width:800px) {
68
- /* cookielawinfo responsive tables when smaller */
69
- /* table.cookielawinfo-winter, table.cookielawinfo-winter thead,
70
- table.cookielawinfo-winter tbody, table.cookielawinfo-winter th,
71
- table.cookielawinfo-winter td, table.cookielawinfo-winter tr,
72
- th.cookielawinfo-column-1, td.cookielawinfo-column-1,
73
- th.cookielawinfo-column-2, td.cookielawinfo-column-2,
74
- th.cookielawinfo-column-3, td.cookielawinfo-column-3,
75
- th.cookielawinfo-column-4, td.cookielawinfo-column-4,
76
- tr.cookielawinfo-row{
77
- display:block;
78
- }*/
79
-
80
- /* Hide table headers (but not display: none;, for accessibility) */
81
- table.cookielawinfo-winter thead tr {
82
- position: absolute;
83
- top: -9999px;
84
- left: -9999px;
85
- }
86
- table.cookielawinfo-winter tr { border: 1px solid #ccc; }
87
- table.cookielawinfo-winter td ,
88
- table.cookielawinfo-winter td.cookielawinfo-column-1,
89
- table.cookielawinfo-winter td.cookielawinfo-column-2,
90
- table.cookielawinfo-winter td.cookielawinfo-column-3,
91
- table.cookielawinfo-winter td.cookielawinfo-column-4 {
92
- /* Behave like a "row" */
93
- border: none;
94
- border-bottom: 1px solid #eee;
95
- position: relative;
96
- padding-left: 50%;
97
- width: 50%;
98
- }
99
- tr.cookielawinfo-row {
100
- padding-right: 1.2em;
101
- }
102
- table.cookielawinfo-winter td:before {
103
- /* Now like a table header */
104
- position: absolute;
105
- /* Top/left values mimic padding */
106
- top: 1.5em;
107
- left: 0.5em;
108
- width: 45%;
109
- padding-right: 1em;
110
- white-space: nowrap;
111
- }
112
- /* label the data */
113
- table.cookielawinfo-winter td:nth-of-type(1):before { content: "COOKIE"; }
114
- table.cookielawinfo-winter td:nth-of-type(2):before { content: "TYPE"; }
115
- table.cookielawinfo-winter td:nth-of-type(3):before { content: "DURATION"; }
116
- table.cookielawinfo-winter td:nth-of-type(4):before { content: "DESCRIPTION"; }
117
- }
118
-
119
- .cookielawinfo-row-cat-title{
120
- border-bottom: 1px solid #eee;
121
- text-align: center;
122
- }
123
- .cookielawinfo-row-cat-title-head{
124
- text-align: center;
125
- }
126
- .cookielawinfo-row-cat-table{
127
- width: 99%;
128
- margin-left: 5px;
129
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
public/js/cookie-law-info-public-1.6.7.js DELETED
@@ -1,427 +0,0 @@
1
- CLI_ACCEPT_COOKIE_NAME =(typeof CLI_ACCEPT_COOKIE_NAME !== 'undefined' ? CLI_ACCEPT_COOKIE_NAME : 'viewed_cookie_policy');
2
- CLI_ACCEPT_COOKIE_EXPIRE =(typeof CLI_ACCEPT_COOKIE_EXPIRE !== 'undefined' ? CLI_ACCEPT_COOKIE_EXPIRE : 365);
3
- CLI_COOKIEBAR_AS_POPUP=(typeof CLI_COOKIEBAR_AS_POPUP !== 'undefined' ? CLI_COOKIEBAR_AS_POPUP : false);
4
- var CLI_Cookie={
5
- set: function (name, value, days) {
6
- if (days) {
7
- var date = new Date();
8
- date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
9
- var expires = "; expires=" + date.toGMTString();
10
- } else
11
- var expires = "";
12
- document.cookie = name + "=" + value + expires + "; path=/";
13
- if(days<1)
14
- {
15
- host_name=window.location.hostname;
16
- document.cookie = name + "=" + value + expires + "; path=/; domain=."+host_name+";";
17
- host_name=host_name.substring(host_name.lastIndexOf(".", host_name.lastIndexOf(".")-1));
18
- document.cookie = name + "=" + value + expires + "; path=/; domain="+host_name+";";
19
- }
20
- },
21
- read: function (name) {
22
- var nameEQ = name + "=";
23
- var ca = document.cookie.split(';');
24
- for (var i = 0; i < ca.length; i++) {
25
- var c = ca[i];
26
- while (c.charAt(0) == ' ') {
27
- c = c.substring(1, c.length);
28
- }
29
- if (c.indexOf(nameEQ) === 0) {
30
- return c.substring(nameEQ.length, c.length);
31
- }
32
- }
33
- return null;
34
- },
35
- erase: function (name) {
36
- this.set(name, "", -10);
37
- },
38
- exists: function (name) {
39
- return (this.read(name) !== null);
40
- },
41
- getallcookies:function()
42
- {
43
- var pairs = document.cookie.split(";");
44
- var cookieslist = {};
45
- for (var i = 0; i < pairs.length; i++) {
46
- var pair = pairs[i].split("=");
47
- cookieslist[(pair[0] + '').trim()] = unescape(pair[1]);
48
- }
49
- return cookieslist;
50
- }
51
- }
52
- var CLI=
53
- {
54
- bar_config:{},
55
- showagain_config:{},
56
- set:function(args)
57
- {
58
- if(typeof JSON.parse !== "function")
59
- {
60
- console.log("CookieLawInfo requires JSON.parse but your browser doesn't support it");
61
- return;
62
- }
63
- this.settings = JSON.parse(args.settings);
64
- this.bar_elm=jQuery(this.settings.notify_div_id);
65
- this.showagain_elm = jQuery(this.settings.showagain_div_id);
66
-
67
- //buttons
68
- this.main_button=jQuery('.cli-plugin-main-button');
69
- this.main_link = jQuery('.cli-plugin-main-link');
70
- this.reject_link = jQuery('.cookie_action_close_header_reject');
71
- this.delete_link=jQuery(".cookielawinfo-cookie-delete");
72
-
73
- if(this.settings.as_popup)
74
- {
75
- CLI_COOKIEBAR_AS_POPUP=true;
76
- }
77
- this.configShowAgain();
78
- this.configBar();
79
- this.attachStyles();
80
- this.toggleBar();
81
- this.attachDelete();
82
- this.attachEvents();
83
- this.configButtons();
84
- if(this.settings.scroll_close === true)
85
- {
86
- window.addEventListener("scroll",CLI.closeOnScroll, false);
87
- }
88
- },
89
- attachEvents:function()
90
- {
91
- jQuery('.cli_action_button').click(function(e){
92
- e.preventDefault();
93
- var elm=jQuery(this);
94
- var button_action=elm.attr('data-cli_action');
95
- var open_link=elm[0].hasAttribute("href") && elm.attr("href") != '#' ? true : false;
96
- var new_window=false;
97
- if(button_action=='accept')
98
- {
99
- CLI.accept_close();
100
- new_window=CLI.settings.button_1_new_win ? true : false;
101
- }else if(button_action=='reject')
102
- {
103
- CLI.reject_close();
104
- new_window=CLI.settings.button_3_new_win ? true : false;
105
- }
106
- CLI.saveLog(button_action);
107
- if(open_link)
108
- {
109
- if(new_window)
110
- {
111
- window.open(elm.attr("href"),'_blank');
112
- }else
113
- {
114
- window.location.href =elm.attr("href");
115
- }
116
- }
117
- });
118
- },
119
- saveLog:function(button_action)
120
- {
121
- if(CLI.settings.logging_on)
122
- {
123
- jQuery.ajax({
124
- url: log_object.ajax_url,
125
- type: 'POST',
126
- data:{
127
- action: 'wt_log_visitor_action',
128
- wt_clicked_button_id: '',
129
- wt_user_action:button_action,
130
- cookie_list:CLI_Cookie.getallcookies()
131
- },
132
- success:function (response)
133
- {
134
-
135
- }
136
- });
137
- }
138
- },
139
- attachDelete:function()
140
- {
141
- this.delete_link.click(function () {
142
- CLI_Cookie.erase(CLI_ACCEPT_COOKIE_NAME);
143
- for(var k in Cli_Data.nn_cookie_ids)
144
- {
145
- CLI_Cookie.erase(Cli_Data.nn_cookie_ids[k]);
146
- }
147
- return false;
148
- });
149
- },
150
- configButtons:function()
151
- {
152
- //[cookie_button]
153
- this.main_button.css('color',this.settings.button_1_link_colour);
154
- if(this.settings.button_1_as_button)
155
- {
156
- this.main_button.css('background-color',this.settings.button_1_button_colour);
157
- this.main_button.hover(function () {
158
- jQuery(this).css('background-color',CLI.settings.button_1_button_hover);
159
- },function (){
160
- jQuery(this).css('background-color',CLI.settings.button_1_button_colour);
161
- });
162
- }
163
-
164
- //[cookie_link]
165
- this.main_link.css('color',this.settings.button_2_link_colour);
166
- if(this.settings.button_2_as_button)
167
- {
168
- this.main_link.css('background-color',this.settings.button_2_button_colour);
169
- this.main_link.hover(function () {
170
- jQuery(this).css('background-color',CLI.settings.button_2_button_hover);
171
- },function (){
172
- jQuery(this).css('background-color',CLI.settings.button_2_button_colour);
173
- });
174
- }
175
-
176
-
177
- //[cookie_reject]
178
- this.reject_link.css('color',this.settings.button_3_link_colour);
179
- if(this.settings.button_3_as_button)
180
- {
181
- this.reject_link.css('background-color',this.settings.button_3_button_colour);
182
- this.reject_link.hover(function () {
183
- jQuery(this).css('background-color',CLI.settings.button_3_button_hover);
184
- },function () {
185
- jQuery(this).css('background-color',CLI.settings.button_3_button_colour);
186
- });
187
- }
188
- },
189
- toggleBar:function()
190
- {
191
- if(CLI_COOKIEBAR_AS_POPUP)
192
- {
193
- this.barAsPopUp();
194
- }
195
- if(!CLI_Cookie.exists(CLI_ACCEPT_COOKIE_NAME))
196
- {
197
- this.displayHeader();
198
- } else {
199
- this.bar_elm.hide();
200
- }
201
- if(this.settings.show_once_yn)
202
- {
203
- setTimeout(function(){
204
- CLI.close_header();
205
- },CLI.settings.show_once);
206
- }
207
-
208
- this.showagain_elm.click(function (e) {
209
- e.preventDefault();
210
- CLI.showagain_elm.slideUp(CLI.settings.animate_speed_hide,function()
211
- {
212
- CLI.bar_elm.slideDown(CLI.settings.animate_speed_show);
213
- if(CLI_COOKIEBAR_AS_POPUP)
214
- {
215
- CLI.showPopupOverlay();
216
- }
217
- });
218
- });
219
- },
220
- attachStyles:function()
221
- {
222
- this.bar_elm.css(this.bar_config).hide();
223
- this.showagain_elm.css(this.showagain_config);
224
- },
225
- configShowAgain:function()
226
- {
227
- this.showagain_config = {
228
- 'background-color': this.settings.background,
229
- 'color':this.l1hs(this.settings.text),
230
- 'position': 'fixed',
231
- 'font-family': this.settings.font_family
232
- };
233
- if(this.settings.border_on)
234
- {
235
- var border_to_hide = 'border-' + this.settings.notify_position_vertical;
236
- this.showagain_config['border'] = '1px solid ' + this.l1hs(this.settings.border);
237
- this.showagain_config[border_to_hide] = 'none';
238
- }
239
- if(this.settings.notify_position_horizontal == "left")
240
- {
241
- this.showagain_config.left = this.settings.showagain_x_position;
242
- }else if(this.settings.notify_position_horizontal == "right")
243
- {
244
- this.showagain_config.right = this.settings.showagain_x_position;
245
- }
246
- },
247
- configBar:function()
248
- {
249
- this.bar_config = {
250
- 'background-color':this.settings.background,
251
- 'color':this.settings.text,
252
- 'font-family':this.settings.font_family
253
- };
254
- if(this.settings.notify_position_vertical=="top")
255
- {
256
- this.bar_config['top'] = '0';
257
- if(this.settings.header_fix === true)
258
- {
259
- this.bar_config['position'] = 'fixed';
260
- }
261
- }else
262
- {
263
- this.bar_config['bottom'] = '0';
264
- }
265
- if(this.settings.notify_position_vertical == "top")
266
- {
267
- if(this.settings.border_on)
268
- {
269
- this.bar_config['border-bottom'] = '2px solid ' +this.l1hs(this.settings.border);
270
- }
271
- this.showagain_config.top = '0';
272
- }
273
- else if(this.settings.notify_position_vertical == "bottom")
274
- {
275
- if(this.settings.border_on)
276
- {
277
- this.bar_config['border-top'] = '2px solid ' + this.l1hs(this.settings.border);
278
- }
279
- this.bar_config['position'] = 'fixed';
280
- this.bar_config['bottom'] = '0';
281
- this.showagain_config.bottom = '0';
282
- }
283
- },
284
- l1hs:function(str)
285
- {
286
- if (str.charAt(0) == "#") {
287
- str = str.substring(1, str.length);
288
- } else {
289
- return "#" + str;
290
- }
291
- return this.l1hs(str);
292
- },
293
- close_header:function()
294
- {
295
- CLI_Cookie.set(CLI_ACCEPT_COOKIE_NAME,'yes',CLI_ACCEPT_COOKIE_EXPIRE);
296
- this.hideHeader();
297
- },
298
- accept_close:function()
299
- {
300
- this.hidePopupOverlay();
301
- CLI_Cookie.set(CLI_ACCEPT_COOKIE_NAME,'yes',CLI_ACCEPT_COOKIE_EXPIRE);
302
- if(this.settings.notify_animate_hide)
303
- {
304
- this.bar_elm.slideUp(this.settings.animate_speed_hide);
305
- }else
306
- {
307
- this.bar_elm.hide();
308
- }
309
- this.showagain_elm.slideDown(this.settings.animate_speed_show);
310
- if(this.settings.accept_close_reload === true)
311
- {
312
- window.location.reload();
313
- }
314
- return false;
315
- },
316
- reject_close:function()
317
- {
318
- this.hidePopupOverlay();
319
- for(var k in Cli_Data.nn_cookie_ids)
320
- {
321
- CLI_Cookie.erase(Cli_Data.nn_cookie_ids[k]);
322
- }
323
- CLI_Cookie.set(CLI_ACCEPT_COOKIE_NAME,'no',CLI_ACCEPT_COOKIE_EXPIRE);
324
- if(this.settings.notify_animate_hide)
325
- {
326
- this.bar_elm.slideUp(this.settings.animate_speed_hide);
327
- } else
328
- {
329
- this.bar_elm.hide();
330
- }
331
- this.showagain_elm.slideDown(this.settings.animate_speed_show);
332
- if(this.settings.reject_close_reload === true)
333
- {
334
- window.location.reload();
335
- }
336
- return false;
337
- },
338
- closeOnScroll:function()
339
- {
340
- if(window.pageYOffset > 100 && !CLI_Cookie.read(CLI_ACCEPT_COOKIE_NAME))
341
- {
342
- CLI.accept_close();
343
- if(CLI.settings.scroll_close_reload === true)
344
- {
345
- window.location.reload();
346
- }
347
- window.removeEventListener("scroll",CLI.closeOnScroll,false);
348
- }
349
- },
350
- displayHeader:function()
351
- {
352
- if(this.settings.notify_animate_show)
353
- {
354
- this.bar_elm.slideDown(this.settings.animate_speed_show);
355
- }else
356
- {
357
- this.bar_elm.show();
358
- }
359
- this.showagain_elm.hide();
360
- if(CLI_COOKIEBAR_AS_POPUP)
361
- {
362
- this.showPopupOverlay();
363
- }
364
- },
365
- hideHeader:function()
366
- {
367
- if(this.settings.notify_animate_show)
368
- {
369
- this.showagain_elm.slideDown(this.settings.animate_speed_show);
370
- } else {
371
- this.showagain_elm.show();
372
- }
373
- this.bar_elm.slideUp(this.settings.animate_speed_show);
374
- this.hidePopupOverlay();
375
- },
376
- hidePopupOverlay:function()
377
- {
378
- jQuery('body').removeClass("cli-barmodal-open");
379
- jQuery(".cli-popupbar-overlay").removeClass("cli-show");
380
- },
381
- showPopupOverlay:function()
382
- {
383
- if(this.settings.popup_overlay)
384
- {
385
- jQuery('body').addClass("cli-barmodal-open");
386
- jQuery(".cli-popupbar-overlay").addClass("cli-show");
387
- }
388
- },
389
- barAsPopUp:function()
390
- {
391
- if(typeof cookie_law_info_bar_as_popup==='function')
392
- {
393
- return false;
394
- }
395
- var cli_elm=this.bar_elm;
396
- var cli_win=jQuery(window);
397
- var cli_winh=cli_win.height()-40;
398
- var cli_winw=cli_win.width();
399
- var cli_defw=cli_winw>700 ? 500 : cli_winw-20;
400
- //var cli_defw=cli_defw<500 ? 500 : cli_defw;
401
-
402
- cli_elm.css({
403
- 'width':cli_defw,'height':'auto','max-height':cli_winh,'bottom':'','top':'50%','left':'50%','margin-left':(cli_defw/2)*-1,'margin-top':'-100px','padding':'25px 15px','overflow':'auto'
404
- }).addClass('cli-bar-popup cli-modal-content');
405
- cli_elm.append('<div style="width:100%; padding-top:15px; float:left; display:block" class="cli_pop_btn_container"></div>');
406
- cli_elm.find('a').appendTo('.cli_pop_btn_container');
407
- cli_elm.find('a').css({'margin-top':'10px','margin-left':'5px'});
408
- cli_elm.find('span').css({'float':'left','display':'block','width':'100%','height':'auto','max-height':(cli_winh-100),'overflow':'auto','text-align':'left'});
409
-
410
- cli_h=cli_elm.height();
411
- li_h=cli_h<200 ? 200 : cli_h;
412
- cli_elm.css({'top':'50%','margin-top':((cli_h/2)+30)*-1});
413
- setTimeout(function(){
414
- cli_elm.css({
415
- 'bottom':''
416
- });
417
- },100);
418
- }
419
- }
420
- jQuery(document).ready(function() {
421
- if(typeof cli_cookiebar_settings!='undefined')
422
- {
423
- CLI.set({
424
- settings:cli_cookiebar_settings
425
- });
426
- }
427
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
public/js/cookie-law-info-public.js CHANGED
@@ -14,6 +14,11 @@ var CLI_Cookie={
14
  {
15
  host_name=window.location.hostname;
16
  document.cookie = name + "=" + value + expires + "; path=/; domain=."+host_name+";";
 
 
 
 
 
17
  host_name=host_name.substring(host_name.lastIndexOf(".", host_name.lastIndexOf(".")-1));
18
  document.cookie = name + "=" + value + expires + "; path=/; domain="+host_name+";";
19
  }
@@ -64,7 +69,7 @@ var CLI=
64
  this.bar_elm=jQuery(this.settings.notify_div_id);
65
  this.showagain_elm = jQuery(this.settings.showagain_div_id);
66
 
67
- //buttons
68
  this.main_button=jQuery('.cli-plugin-main-button');
69
  this.main_link = jQuery('.cli-plugin-main-link');
70
  this.reject_link = jQuery('.cookie_action_close_header_reject');
@@ -79,11 +84,22 @@ var CLI=
79
  this.attachDelete();
80
  this.attachEvents();
81
  this.configButtons();
82
- if(this.settings.scroll_close === true)
 
83
  {
84
  window.addEventListener("scroll",CLI.closeOnScroll, false);
85
  }
86
  },
 
 
 
 
 
 
 
 
 
 
87
  attachEvents:function()
88
  {
89
  jQuery('.cli_action_button').click(function(e){
@@ -101,7 +117,6 @@ var CLI=
101
  CLI.reject_close();
102
  new_window=CLI.settings.button_3_new_win ? true : false;
103
  }
104
- CLI.saveLog(button_action);
105
  if(open_link)
106
  {
107
  if(new_window)
@@ -114,26 +129,6 @@ var CLI=
114
  }
115
  });
116
  },
117
- saveLog:function(button_action)
118
- {
119
- if(CLI.settings.logging_on)
120
- {
121
- jQuery.ajax({
122
- url: log_object.ajax_url,
123
- type: 'POST',
124
- data:{
125
- action: 'wt_log_visitor_action',
126
- wt_clicked_button_id: '',
127
- wt_user_action:button_action,
128
- cookie_list:CLI_Cookie.getallcookies()
129
- },
130
- success:function (response)
131
- {
132
-
133
- }
134
- });
135
- }
136
- },
137
  attachDelete:function()
138
  {
139
  this.delete_link.click(function () {
@@ -147,7 +142,7 @@ var CLI=
147
  },
148
  configButtons:function()
149
  {
150
- //[cookie_button]
151
  this.main_button.css('color',this.settings.button_1_link_colour);
152
  if(this.settings.button_1_as_button)
153
  {
@@ -159,7 +154,7 @@ var CLI=
159
  });
160
  }
161
 
162
- //[cookie_link]
163
  this.main_link.css('color',this.settings.button_2_link_colour);
164
  if(this.settings.button_2_as_button)
165
  {
@@ -172,7 +167,7 @@ var CLI=
172
  }
173
 
174
 
175
- //[cookie_reject]
176
  this.reject_link.css('color',this.settings.button_3_link_colour);
177
  if(this.settings.button_3_as_button)
178
  {
@@ -197,8 +192,9 @@ var CLI=
197
  if(!CLI_Cookie.exists(CLI_ACCEPT_COOKIE_NAME))
198
  {
199
  this.displayHeader();
200
- } else {
201
- this.bar_elm.hide();
 
202
  }
203
  if(this.settings.show_once_yn)
204
  {
@@ -245,7 +241,7 @@ var CLI=
245
  this.showagain_config.width='auto';
246
  }
247
  var cli_defw=cli_winw>400 ? 500 : cli_winw-20;
248
- if(CLI_COOKIEBAR_AS_POPUP) //cookie bar as popup
249
  {
250
  var sa_pos=this.settings.popup_showagain_position;
251
  var sa_pos_arr=sa_pos.split('-');
@@ -345,7 +341,10 @@ var CLI=
345
  {
346
  this.bar_elm.hide();
347
  }
348
- this.showagain_elm.slideDown(this.settings.animate_speed_show);
 
 
 
349
  if(this.settings.accept_close_reload === true)
350
  {
351
  this.reload_current_page();
@@ -367,7 +366,10 @@ var CLI=
367
  {
368
  this.bar_elm.hide();
369
  }
370
- this.showagain_elm.slideDown(this.settings.animate_speed_show);
 
 
 
371
  if(this.settings.reject_close_reload === true)
372
  {
373
  this.reload_current_page();
@@ -446,13 +448,19 @@ var CLI=
446
  }
447
  },
448
  hideHeader:function()
449
- {
450
- if(this.settings.notify_animate_show)
451
  {
452
- this.showagain_elm.slideDown(this.settings.animate_speed_show);
453
- } else {
454
- this.showagain_elm.show();
455
- }
 
 
 
 
 
 
456
  this.bar_elm.slideUp(this.settings.animate_speed_show);
457
  this.hidePopupOverlay();
458
  },
@@ -477,7 +485,7 @@ var CLI=
477
  var cli_winw=cli_win.width();
478
  var cli_defw=cli_winw>400 ? 300 : cli_winw-30;
479
  cli_elm.css({
480
- 'width':cli_defw,'height':'auto','max-height':cli_winh,'padding':'25px 15px','overflow':'auto','position':'fixed'
481
  });
482
  if(this.settings.widget_position=='left')
483
  {
14
  {
15
  host_name=window.location.hostname;
16
  document.cookie = name + "=" + value + expires + "; path=/; domain=."+host_name+";";
17
+ if(host_name.indexOf("www")!=1)
18
+ {
19
+ var host_name_withoutwww=host_name.replace('www','');
20
+ document.cookie = name + "=" + value + expires + "; path=/; domain="+host_name_withoutwww+";";
21
+ }
22
  host_name=host_name.substring(host_name.lastIndexOf(".", host_name.lastIndexOf(".")-1));
23
  document.cookie = name + "=" + value + expires + "; path=/; domain="+host_name+";";
24
  }
69
  this.bar_elm=jQuery(this.settings.notify_div_id);
70
  this.showagain_elm = jQuery(this.settings.showagain_div_id);
71
 
72
+ /* buttons */
73
  this.main_button=jQuery('.cli-plugin-main-button');
74
  this.main_link = jQuery('.cli-plugin-main-link');
75
  this.reject_link = jQuery('.cookie_action_close_header_reject');
84
  this.attachDelete();
85
  this.attachEvents();
86
  this.configButtons();
87
+ var cli_hidebar_on_readmore=this.hideBarInReadMoreLink();
88
+ if(this.settings.scroll_close===true && cli_hidebar_on_readmore===false)
89
  {
90
  window.addEventListener("scroll",CLI.closeOnScroll, false);
91
  }
92
  },
93
+ hideBarInReadMoreLink:function()
94
+ {
95
+ if(CLI.settings.button_2_hidebar===true && this.main_link.length>0 && this.main_link.hasClass('cli-minimize-bar'))
96
+ {
97
+ this.hideHeader();
98
+ this.showagain_elm.slideDown(this.settings.animate_speed_show);
99
+ return true;
100
+ }
101
+ return false;
102
+ },
103
  attachEvents:function()
104
  {
105
  jQuery('.cli_action_button').click(function(e){
117
  CLI.reject_close();
118
  new_window=CLI.settings.button_3_new_win ? true : false;
119
  }
 
120
  if(open_link)
121
  {
122
  if(new_window)
129
  }
130
  });
131
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
132
  attachDelete:function()
133
  {
134
  this.delete_link.click(function () {
142
  },
143
  configButtons:function()
144
  {
145
+ /*[cookie_button] */
146
  this.main_button.css('color',this.settings.button_1_link_colour);
147
  if(this.settings.button_1_as_button)
148
  {
154
  });
155
  }
156
 
157
+ /* [cookie_link] */
158
  this.main_link.css('color',this.settings.button_2_link_colour);
159
  if(this.settings.button_2_as_button)
160
  {
167
  }
168
 
169
 
170
+ /* [cookie_reject] */
171
  this.reject_link.css('color',this.settings.button_3_link_colour);
172
  if(this.settings.button_3_as_button)
173
  {
192
  if(!CLI_Cookie.exists(CLI_ACCEPT_COOKIE_NAME))
193
  {
194
  this.displayHeader();
195
+ }else
196
+ {
197
+ this.hideHeader();
198
  }
199
  if(this.settings.show_once_yn)
200
  {
241
  this.showagain_config.width='auto';
242
  }
243
  var cli_defw=cli_winw>400 ? 500 : cli_winw-20;
244
+ if(CLI_COOKIEBAR_AS_POPUP) /* cookie bar as popup */
245
  {
246
  var sa_pos=this.settings.popup_showagain_position;
247
  var sa_pos_arr=sa_pos.split('-');
341
  {
342
  this.bar_elm.hide();
343
  }
344
+ if(this.settings.showagain_tab)
345
+ {
346
+ this.showagain_elm.slideDown(this.settings.animate_speed_show);
347
+ }
348
  if(this.settings.accept_close_reload === true)
349
  {
350
  this.reload_current_page();
366
  {
367
  this.bar_elm.hide();
368
  }
369
+ if(this.settings.showagain_tab)
370
+ {
371
+ this.showagain_elm.slideDown(this.settings.animate_speed_show);
372
+ }
373
  if(this.settings.reject_close_reload === true)
374
  {
375
  this.reload_current_page();
448
  }
449
  },
450
  hideHeader:function()
451
+ {
452
+ if(this.settings.showagain_tab)
453
  {
454
+ if(this.settings.notify_animate_show)
455
+ {
456
+ this.showagain_elm.slideDown(this.settings.animate_speed_show);
457
+ } else {
458
+ this.showagain_elm.show();
459
+ }
460
+ }else
461
+ {
462
+ this.showagain_elm.hide();
463
+ }
464
  this.bar_elm.slideUp(this.settings.animate_speed_show);
465
  this.hidePopupOverlay();
466
  },
485
  var cli_winw=cli_win.width();
486
  var cli_defw=cli_winw>400 ? 300 : cli_winw-30;
487
  cli_elm.css({
488
+ 'width':cli_defw,'height':'auto','max-height':cli_winh,'padding':'25px 15px','overflow':'auto','position':'fixed','box-sizing':'border-box'
489
  });
490
  if(this.settings.widget_position=='left')
491
  {
public/modules/shortcode/shortcode.php CHANGED
@@ -47,8 +47,65 @@ class Cookie_Law_Info_Shortcode {
47
  add_shortcode( 'cookie_link',array($this,'cookielawinfo_shortcode_more_link')); // a shortcode [cookie_link]
48
  add_shortcode( 'cookie_button',array($this,'cookielawinfo_shortcode_main_button')); // a shortcode [cookie_button]
49
  add_shortcode('cookie_after_accept',array($this,'cookie_after_accept_shortcode'));
 
 
50
  }
51
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
52
  /*
53
  * Add content after accepting the cookie notice.
54
  * Usage :
@@ -118,8 +175,11 @@ class Cookie_Law_Info_Shortcode {
118
 
119
  extract( shortcode_atts( array(
120
  'style' => 'classic',
121
- 'not_shown_message' => ''
 
 
122
  ), $atts ) );
 
123
 
124
  $args = array(
125
  'post_type' => CLI_POST_TYPE,
@@ -130,10 +190,22 @@ class Cookie_Law_Info_Shortcode {
130
  );
131
  $posts = get_posts($args);
132
  $ret = '<table class="cookielawinfo-' . $style . '"><thead><tr>';
133
- $ret .= '<th class="cookielawinfo-column-1">'.__('Cookie', 'cookie-law-info').'</th>';
134
- $ret .= '<th class="cookielawinfo-column-2">'.__('Type', 'cookie-law-info').'</th>';
135
- $ret .= '<th class="cookielawinfo-column-3">'.__('Duration', 'cookie-law-info').'</th>';
136
- $ret .= '<th class="cookielawinfo-column-4">'.__('Description', 'cookie-law-info').'</th>';
 
 
 
 
 
 
 
 
 
 
 
 
137
  $ret = apply_filters('cli_new_columns_to_audit_table',$ret);
138
  $ret .= '</tr>';
139
  $ret .= '</thead><tbody>';
@@ -151,16 +223,35 @@ class Cookie_Law_Info_Shortcode {
151
  $custom = get_post_custom( $post->ID );
152
  $cookie_type = ( isset ( $custom["_cli_cookie_type"][0] ) ) ? $custom["_cli_cookie_type"][0] : '';
153
  $cookie_duration = ( isset ( $custom["_cli_cookie_duration"][0] ) ) ? $custom["_cli_cookie_duration"][0] : '';
154
- // Output HTML:
155
- $ret .= '<tr class="cookielawinfo-row"><td class="cookielawinfo-column-1">' . $post->post_title . '</td>';
156
- $ret .= '<td class="cookielawinfo-column-2">' . $cookie_type .'</td>';
157
- $ret .= '<td class="cookielawinfo-column-3">' . $cookie_duration .'</td>';
158
- $ret .= '<td class="cookielawinfo-column-4">' . $post->post_content .'</td>';
 
 
 
 
 
 
 
 
 
 
 
 
159
  $ret = apply_filters('cli_new_column_values_to_audit_table',$ret, $custom);
160
  $ret .= '</tr>';
161
  }
162
  }
163
  $ret .= '</tbody></table>';
 
 
 
 
 
 
 
164
  return $ret;
165
  }
166
 
@@ -190,17 +281,24 @@ class Cookie_Law_Info_Shortcode {
190
  public function cookielawinfo_shortcode_accept_button( $atts )
191
  {
192
  extract(shortcode_atts(array(
193
- 'colour' => 'green'
 
194
  ), $atts ));
195
  $defaults =Cookie_Law_Info::get_default_settings('button_1_text');
196
  $settings = wp_parse_args(Cookie_Law_Info::get_settings(),$defaults);
197
  $button_1_text=__($settings['button_1_text'],'cookie-law-info');
198
- return '<a href="#" class="cli_action_button cli-accept-button medium cli-plugin-button ' . $colour . '" data-cli_action="accept" >' . stripslashes($button_1_text) . '</a>';
 
199
  }
200
 
201
  /** Returns HTML for a standard (green, medium sized) 'Reject' button */
202
  public function cookielawinfo_shortcode_reject_button( $atts )
203
  {
 
 
 
 
 
204
  $defaults = Cookie_Law_Info::get_default_settings();
205
  $settings = wp_parse_args(Cookie_Law_Info::get_settings(),$defaults);
206
 
@@ -213,24 +311,28 @@ class Cookie_Law_Info_Shortcode {
213
  {
214
  $classr=' class="cookie_action_close_header_reject cli_action_button" ';
215
  }
216
-
217
- $url_reject = ($settings['button_3_action'] == "CONSTANT_OPEN_URL" ) ? $settings['button_3_url'] : "#";
218
  $link_tag = '';
219
- $link_tag .= ' <a href="'.$url_reject.'" id="'.Cookie_Law_Info_Public::cookielawinfo_remove_hash($settings['button_3_action']).'" ';
220
  $link_tag .= ($settings['button_3_new_win'] ) ? 'target="_blank" ' : '' ;
221
- $link_tag .= $classr . ' data-cli_action="reject">' . stripslashes(__($settings['button_3_text'],'cookie-law-info')) . '</a>';
222
  return $link_tag;
223
  }
224
 
225
  /** Returns HTML for a generic button */
226
  public function cookielawinfo_shortcode_more_link( $atts ) {
227
- return $this->cookielawinfo_shortcode_button_DRY_code('button_2');
228
  }
229
 
230
 
231
  /** Returns HTML for a generic button */
232
  public function cookielawinfo_shortcode_main_button( $atts )
233
  {
 
 
 
 
 
234
  $defaults =Cookie_Law_Info::get_default_settings();
235
  $settings = wp_parse_args( Cookie_Law_Info::get_settings(),$defaults);
236
  $class = '';
@@ -243,12 +345,10 @@ class Cookie_Law_Info_Shortcode {
243
  }
244
 
245
  // If is action not URL then don't use URL!
246
- $url = ( $settings['button_1_action'] == "CONSTANT_OPEN_URL" ) ? $settings['button_1_url'] : "#";
247
-
248
-
249
- $link_tag = '<a href="'.$url.'" data-cli_action="accept" id="' . Cookie_Law_Info_Public::cookielawinfo_remove_hash ( $settings['button_1_action'] ) . '" ';
250
  $link_tag .= ( $settings['button_1_new_win'] ) ? 'target="_blank" ' : '' ;
251
- $link_tag .= $class . ' >' . stripslashes( __($settings['button_1_text'],'cookie-law-info') ) . '</a>';
252
 
253
 
254
  return $link_tag;
@@ -256,7 +356,13 @@ class Cookie_Law_Info_Shortcode {
256
 
257
 
258
  /** Returns HTML for a generic button */
259
- public function cookielawinfo_shortcode_button_DRY_code( $name ) {
 
 
 
 
 
 
260
  $arr = Cookie_Law_Info::get_settings();
261
  $settings = array();
262
  $class_name = '';
@@ -275,7 +381,8 @@ class Cookie_Law_Info_Shortcode {
275
  );
276
  $class_name = 'cli-plugin-main-button';
277
  }
278
- elseif ( $name == "button_2" ) {
 
279
  $settings = array(
280
  'button_x_text' => stripslashes( $arr['button_2_text'] ),
281
  'button_x_action' => $arr['button_2_action'],
@@ -286,9 +393,37 @@ class Cookie_Law_Info_Shortcode {
286
  'button_x_button_colour' => $arr['button_2_button_colour'],
287
  'button_x_button_size' => $arr['button_2_button_size']
288
  );
 
289
  if($arr['button_2_url_type']=='url')
290
  {
291
  $settings['button_x_url']=$arr['button_2_url'];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
292
  }else
293
  {
294
  $privacy_page_exists=0;
@@ -301,6 +436,18 @@ class Cookie_Law_Info_Shortcode {
301
  {
302
  $privacy_page_exists=1;
303
  $settings['button_x_url']=get_page_link($privacy_policy_page);
 
 
 
 
 
 
 
 
 
 
 
 
304
  }
305
  }
306
  }
@@ -309,7 +456,6 @@ class Cookie_Law_Info_Shortcode {
309
  return '';
310
  }
311
  }
312
- $class_name = 'cli-plugin-main-link';
313
  }
314
 
315
  $settings = apply_filters('wt_readmore_link_settings', $settings);
@@ -323,11 +469,10 @@ class Cookie_Law_Info_Shortcode {
323
  }
324
 
325
  // If is action not URL then don't use URL!
326
- $url = ( $settings['button_x_action'] == "CONSTANT_OPEN_URL" ) ? $settings['button_x_url'] : "#";
327
-
328
- $link_tag = '<a href="' . $url . '" id="' . Cookie_Law_Info_Public::cookielawinfo_remove_hash ( $settings['button_x_action'] ) . '" ';
329
  $link_tag .= ( $settings['button_x_new_win'] ) ? 'target="_blank" ' : '' ;
330
- $link_tag .= $class . ' >' . $settings['button_x_text'] . '</a>';
331
  return $link_tag;
332
  }
333
  }
47
  add_shortcode( 'cookie_link',array($this,'cookielawinfo_shortcode_more_link')); // a shortcode [cookie_link]
48
  add_shortcode( 'cookie_button',array($this,'cookielawinfo_shortcode_main_button')); // a shortcode [cookie_button]
49
  add_shortcode('cookie_after_accept',array($this,'cookie_after_accept_shortcode'));
50
+ add_shortcode('user_consent_state',array($this,'user_consent_state_shortcode'));
51
+ add_shortcode('webtoffee_powered_by',array($this,'wf_powered_by'));
52
  }
53
 
54
+ /*
55
+ * Powered by WebToffe
56
+ * @since 1.7.4
57
+ */
58
+ public function wf_powered_by()
59
+ {
60
+ return '<p class="powered_by_p" style="width:100% !important; display:block !important; color:#333; clear:both; font-style:italic !important; font-size:12px !important; margin-top:15px !important;">Powered By <a href="https://www.webtoffee.com/" class="powered_by_a" style="color:#333; font-weight:600 !important; font-size:12px !important;">WebToffee</a></p>';
61
+ }
62
+
63
+ /*
64
+ * User can manage his current consent. This function is used in [user_consent_state] shortcode
65
+ * @since 1.7.4
66
+ */
67
+ public function manage_user_consent_jsblock()
68
+ {
69
+ ?>
70
+ <script type="text/javascript">
71
+ jQuery(document).ready(function(){
72
+ jQuery('.cli_manage_current_consent').click(function(){
73
+ jQuery('#cookie-law-info-again').click();
74
+ setTimeout(function(){
75
+ jQuery(window).scrollTop(jQuery('#cookie-law-info-bar').offset().top);
76
+ },1000);
77
+ });
78
+ });
79
+ </script>
80
+ <?php
81
+ }
82
+
83
+ /*
84
+ * Show current user's consent state
85
+ * @since 1.7.4
86
+ */
87
+ public function user_consent_state_shortcode($atts=array())
88
+ {
89
+ add_action('wp_footer',array($this,'manage_user_consent_jsblock'),15);
90
+
91
+ $html='<div class="cli_user_consent_state">'.__('Your current state:','cookie-law-info');
92
+ if(isset($_COOKIE["viewed_cookie_policy"])) //consent given by user
93
+ {
94
+ if($_COOKIE["viewed_cookie_policy"]=='yes')
95
+ {
96
+ $html.=__('Consent Accepted. ','cookie-law-info');
97
+ }else
98
+ {
99
+ $html.=__('Consent rejected.','cookie-law-info');
100
+ }
101
+ }else //no conset given
102
+ {
103
+ $html.=__('No consent given.','cookie-law-info');
104
+ }
105
+ $html.=' <a class="cli_manage_current_consent" style="cursor:pointer;">'.__('Manage your consent.','cookie-law-info').'</a> </div>';
106
+ return $html;
107
+ }
108
+
109
  /*
110
  * Add content after accepting the cookie notice.
111
  * Usage :
175
 
176
  extract( shortcode_atts( array(
177
  'style' => 'classic',
178
+ 'not_shown_message' => '',
179
+ 'columns' =>'cookie,type,duration,description',
180
+ 'heading' =>'',
181
  ), $atts ) );
182
+ $columns=explode(",",$columns);
183
 
184
  $args = array(
185
  'post_type' => CLI_POST_TYPE,
190
  );
191
  $posts = get_posts($args);
192
  $ret = '<table class="cookielawinfo-' . $style . '"><thead><tr>';
193
+ if(in_array('cookie',$columns))
194
+ {
195
+ $ret .= '<th class="cookielawinfo-column-1">'.__('Cookie', 'cookie-law-info').'</th>';
196
+ }
197
+ if(in_array('type',$columns))
198
+ {
199
+ $ret .= '<th class="cookielawinfo-column-2">'.__('Type', 'cookie-law-info').'</th>';
200
+ }
201
+ if(in_array('duration',$columns))
202
+ {
203
+ $ret .= '<th class="cookielawinfo-column-3">'.__('Duration', 'cookie-law-info').'</th>';
204
+ }
205
+ if(in_array('description',$columns))
206
+ {
207
+ $ret .= '<th class="cookielawinfo-column-4">'.__('Description', 'cookie-law-info').'</th>';
208
+ }
209
  $ret = apply_filters('cli_new_columns_to_audit_table',$ret);
210
  $ret .= '</tr>';
211
  $ret .= '</thead><tbody>';
223
  $custom = get_post_custom( $post->ID );
224
  $cookie_type = ( isset ( $custom["_cli_cookie_type"][0] ) ) ? $custom["_cli_cookie_type"][0] : '';
225
  $cookie_duration = ( isset ( $custom["_cli_cookie_duration"][0] ) ) ? $custom["_cli_cookie_duration"][0] : '';
226
+ $ret.='<tr class="cookielawinfo-row">';
227
+ if(in_array('cookie',$columns))
228
+ {
229
+ $ret .= '<td class="cookielawinfo-column-1">' . $post->post_title . '</td>';
230
+ }
231
+ if(in_array('type',$columns))
232
+ {
233
+ $ret .= '<td class="cookielawinfo-column-2">' . $cookie_type .'</td>';
234
+ }
235
+ if(in_array('duration',$columns))
236
+ {
237
+ $ret .= '<td class="cookielawinfo-column-3">' . $cookie_duration .'</td>';
238
+ }
239
+ if(in_array('description',$columns))
240
+ {
241
+ $ret .= '<td class="cookielawinfo-column-4">' . $post->post_content .'</td>';
242
+ }
243
  $ret = apply_filters('cli_new_column_values_to_audit_table',$ret, $custom);
244
  $ret .= '</tr>';
245
  }
246
  }
247
  $ret .= '</tbody></table>';
248
+ if(count($posts)>0 && $heading!="")
249
+ {
250
+ $ret='<p>'.__($heading,'cookie-law-info').'</p>'.$ret;
251
+ }else
252
+ {
253
+ $ret='';
254
+ }
255
  return $ret;
256
  }
257
 
281
  public function cookielawinfo_shortcode_accept_button( $atts )
282
  {
283
  extract(shortcode_atts(array(
284
+ 'colour' => 'green',
285
+ 'margin' => '',
286
  ), $atts ));
287
  $defaults =Cookie_Law_Info::get_default_settings('button_1_text');
288
  $settings = wp_parse_args(Cookie_Law_Info::get_settings(),$defaults);
289
  $button_1_text=__($settings['button_1_text'],'cookie-law-info');
290
+ $margin_style=$margin!="" ? ' style="margin:'.$margin.';" ' : '';
291
+ return '<a class="cli_action_button cli-accept-button medium cli-plugin-button ' . $colour . '" data-cli_action="accept"'.$margin_style.'>' . stripslashes($button_1_text) . '</a>';
292
  }
293
 
294
  /** Returns HTML for a standard (green, medium sized) 'Reject' button */
295
  public function cookielawinfo_shortcode_reject_button( $atts )
296
  {
297
+ extract(shortcode_atts(array(
298
+ 'margin' => '',
299
+ ), $atts ));
300
+ $margin_style=$margin!="" ? ' style="margin:'.$margin.';" ' : '';
301
+
302
  $defaults = Cookie_Law_Info::get_default_settings();
303
  $settings = wp_parse_args(Cookie_Law_Info::get_settings(),$defaults);
304
 
311
  {
312
  $classr=' class="cookie_action_close_header_reject cli_action_button" ';
313
  }
314
+ $url_reject = ( $settings['button_3_action'] == "CONSTANT_OPEN_URL" && $settings['button_3_url'] != "#" ) ? "href='$settings[button_3_url]'" : "";
 
315
  $link_tag = '';
316
+ $link_tag .= ' <a '.$url_reject.' id="'.Cookie_Law_Info_Public::cookielawinfo_remove_hash($settings['button_3_action']).'" ';
317
  $link_tag .= ($settings['button_3_new_win'] ) ? 'target="_blank" ' : '' ;
318
+ $link_tag .= $classr . ' data-cli_action="reject"'.$margin_style.'>' . stripslashes(__($settings['button_3_text'],'cookie-law-info')) . '</a>';
319
  return $link_tag;
320
  }
321
 
322
  /** Returns HTML for a generic button */
323
  public function cookielawinfo_shortcode_more_link( $atts ) {
324
+ return $this->cookielawinfo_shortcode_button_DRY_code('button_2',$atts);
325
  }
326
 
327
 
328
  /** Returns HTML for a generic button */
329
  public function cookielawinfo_shortcode_main_button( $atts )
330
  {
331
+ extract(shortcode_atts(array(
332
+ 'margin' => '',
333
+ ), $atts ));
334
+ $margin_style=$margin!="" ? ' margin:'.$margin.'; ' : '';
335
+
336
  $defaults =Cookie_Law_Info::get_default_settings();
337
  $settings = wp_parse_args( Cookie_Law_Info::get_settings(),$defaults);
338
  $class = '';
345
  }
346
 
347
  // If is action not URL then don't use URL!
348
+ $url = ( $settings['button_1_action'] == "CONSTANT_OPEN_URL" && $settings['button_1_url'] != "#" ) ? "href='$settings[button_1_url]'" : "";
349
+ $link_tag = '<a '.$url.' data-cli_action="accept" id="' . Cookie_Law_Info_Public::cookielawinfo_remove_hash ( $settings['button_1_action'] ) . '" ';
 
 
350
  $link_tag .= ( $settings['button_1_new_win'] ) ? 'target="_blank" ' : '' ;
351
+ $link_tag .= $class.' style="display:inline-block; '.$margin_style.'">' . stripslashes( __($settings['button_1_text'],'cookie-law-info') ) . '</a>';
352
 
353
 
354
  return $link_tag;
356
 
357
 
358
  /** Returns HTML for a generic button */
359
+ public function cookielawinfo_shortcode_button_DRY_code($name,$atts=array()) {
360
+
361
+ extract(shortcode_atts(array(
362
+ 'margin' => '',
363
+ ), $atts ));
364
+ $margin_style=$margin!="" ? ' margin:'.$margin.'; ' : '';
365
+
366
  $arr = Cookie_Law_Info::get_settings();
367
  $settings = array();
368
  $class_name = '';
381
  );
382
  $class_name = 'cli-plugin-main-button';
383
  }
384
+ elseif($name=="button_2" )
385
+ {
386
  $settings = array(
387
  'button_x_text' => stripslashes( $arr['button_2_text'] ),
388
  'button_x_action' => $arr['button_2_action'],
393
  'button_x_button_colour' => $arr['button_2_button_colour'],
394
  'button_x_button_size' => $arr['button_2_button_size']
395
  );
396
+ $class_name = 'cli-plugin-main-link';
397
  if($arr['button_2_url_type']=='url')
398
  {
399
  $settings['button_x_url']=$arr['button_2_url'];
400
+
401
+ /*
402
+ * @since 1.7.4
403
+ * Checks if user enabled minify bar in the current page
404
+ */
405
+ if($arr['button_2_hidebar']===true)
406
+ {
407
+ global $wp;
408
+ $current_url=home_url(add_query_arg(array(),$wp->request));
409
+ $btn2_url=$current_url[strlen($current_url)-1]=='/' ? substr($current_url,0,-1) : $current_url;
410
+ $btn2_url=$arr['button_2_url'][strlen($arr['button_2_url'])-1]=='/' ? substr($arr['button_2_url'],0,-1) : $arr['button_2_url'];
411
+ if(strpos($btn2_url,$current_url)!==false)
412
+ {
413
+ if($btn2_url!=$current_url)
414
+ {
415
+ $qry_var_arr=explode("?",$current_url);
416
+ $hash_var_arr=explode("#",$current_url);
417
+ if($qry_var_arr[0]==$btn2_url || $hash_var_arr[0]==$btn2_url)
418
+ {
419
+ $class_name.=' cli-minimize-bar';
420
+ }
421
+ }else
422
+ {
423
+ $class_name.=' cli-minimize-bar';
424
+ }
425
+ }
426
+ }
427
  }else
428
  {
429
  $privacy_page_exists=0;
436
  {
437
  $privacy_page_exists=1;
438
  $settings['button_x_url']=get_page_link($privacy_policy_page);
439
+
440
+ /*
441
+ * @since 1.7.4
442
+ * Checks if user enabled minify bar in the current page
443
+ */
444
+ if($arr['button_2_hidebar']===true)
445
+ {
446
+ if(is_page($arr['button_2_page']))
447
+ {
448
+ $class_name.=' cli-minimize-bar';
449
+ }
450
+ }
451
  }
452
  }
453
  }
456
  return '';
457
  }
458
  }
 
459
  }
460
 
461
  $settings = apply_filters('wt_readmore_link_settings', $settings);
469
  }
470
 
471
  // If is action not URL then don't use URL!
472
+ $url = ( $settings['button_x_action'] == "CONSTANT_OPEN_URL" && $settings['button_x_url'] != "#" ) ? "href='$settings[button_x_url]'" : "";
473
+ $link_tag = '<a '. $url . ' id="' . Cookie_Law_Info_Public::cookielawinfo_remove_hash ( $settings['button_x_action'] ) . '" ';
 
474
  $link_tag .= ( $settings['button_x_new_win'] ) ? 'target="_blank" ' : '' ;
475
+ $link_tag .= $class.' style="display:inline-block;'.$margin_style.'" >' . $settings['button_x_text'] . '</a>';
476
  return $link_tag;
477
  }
478
  }
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: webtoffee,markwt
3
  Donate link: https://www.webtoffee.com/plugins/
4
  Tags: eu cookie law, GDPR, cookie law, cookie consent, eu privacy directive, privacy directive, cookies, privacy, compliance
5
  Requires at least: 3.3.1
6
- Tested up to: 5.0.2
7
- Stable tag: 1.7.3
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -172,6 +172,15 @@ See http://cookielawinfo.com for more information on what is required.
172
 
173
  == Changelog ==
174
 
 
 
 
 
 
 
 
 
 
175
  = 1.7.3 =
176
 
177
  * Translation updated - Danish, French, German
@@ -354,8 +363,11 @@ See http://cookielawinfo.com for more information on what is required.
354
 
355
  == Upgrade Notice ==
356
 
357
- = 1.7.3 =
358
 
359
- * Translation updated - Danish, French, German
360
- * Readme updates
361
- * Minor UI changes
 
 
 
3
  Donate link: https://www.webtoffee.com/plugins/
4
  Tags: eu cookie law, GDPR, cookie law, cookie consent, eu privacy directive, privacy directive, cookies, privacy, compliance
5
  Requires at least: 3.3.1
6
+ Tested up to: 5.1.0
7
+ Stable tag: 1.7.4
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
172
 
173
  == Changelog ==
174
 
175
+ = 1.7.4 =
176
+
177
+ * Cookie policy generator
178
+ * Added a shortcode [user_consent_state]
179
+ * Updated shortcode [cookie_audit] with option to configure columns
180
+ * Margin option added in all button shortcodes
181
+ * Introduced an option to hide cookie bar on policy page
182
+ * Tested ok with WP 5.1
183
+
184
  = 1.7.3 =
185
 
186
  * Translation updated - Danish, French, German
363
 
364
  == Upgrade Notice ==
365
 
366
+ = 1.7.4 =
367
 
368
+ * Cookie policy generator
369
+ * Added a shortcode [user_consent_state]
370
+ * Updated shortcode [cookie_audit] with option to configure columns
371
+ * Margin option added in all button shortcodes
372
+ * Introduced an option to hide cookie bar on policy page
373
+ * Tested ok with WP 5.1