Version Description
- GDPR compliance updates.
Download this release
Release Info
Developer | markwt |
Plugin | Cookie Law / GDPR Info |
Version | 1.5.5 |
Comparing to | |
See all releases |
Code changes from version 1.5.4 to 1.5.5
- admin/cli-admin-page.php +872 -742
- admin/cli-admin.php +8 -0
- cookie-law-info.php +5 -5
- php/custom-post-types.php +1 -0
- php/functions.php +36 -0
- php/shortcodes.php +41 -12
- readme.txt +37 -19
admin/cli-admin-page.php
CHANGED
@@ -1,755 +1,885 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
-
|
4 |
|
5 |
-
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
You should have received a copy of the GNU General Public License
|
17 |
-
along with this program; if not, write to the Free Software
|
18 |
-
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
19 |
-
*/
|
20 |
|
|
|
|
|
|
|
|
|
21 |
|
22 |
/** Displays admin page within WP dashboard */
|
23 |
function cookielawinfo_print_admin_page() {
|
24 |
-
|
25 |
-
// Lock out non-admins:
|
26 |
-
if ( !current_user_can( 'manage_options' ) ) {
|
27 |
-
wp_die( 'You do not have sufficient permission to perform this operation' );
|
28 |
-
}
|
29 |
-
|
30 |
-
// Get options:
|
31 |
-
$the_options = cookielawinfo_get_admin_settings();
|
32 |
-
|
33 |
-
// Check if form has been set:
|
34 |
-
if ( isset( $_POST['update_admin_settings_form'] ) ) {
|
35 |
-
// Check nonce:
|
36 |
-
check_admin_referer( 'cookielawinfo-update-' . CLI_SETTINGS_FIELD );
|
37 |
-
foreach ( $the_options as $key => $value ) {
|
38 |
-
if (isset($_POST[$key . '_field'])) {
|
39 |
-
// Store sanitised values only:
|
40 |
-
$the_options[$key] = cookielawinfo_sanitise($key, $_POST[$key . '_field']);
|
41 |
-
}
|
42 |
-
}
|
43 |
-
update_option(CLI_SETTINGS_FIELD, $the_options);
|
44 |
-
echo '<div class="updated"><p><strong>Settings Updated.</strong></p></div>';
|
45 |
-
}
|
46 |
-
else if ( isset ( $_POST['delete_all_settings'] ) ) {
|
47 |
-
// Check nonce:
|
48 |
-
check_admin_referer( 'cookielawinfo-update-' . CLI_SETTINGS_FIELD );
|
49 |
-
cookielawinfo_delete_settings();
|
50 |
-
$the_options = cookielawinfo_get_admin_settings();
|
51 |
-
}
|
52 |
-
else if ( isset ( $_POST['revert_to_previous_settings'] ) ) {
|
53 |
-
if ( !cookielawinfo_copy_old_settings_to_new() ) {
|
54 |
-
echo '<h3>ERROR MIGRATING SETTINGS (ERROR: 2)</h3>';
|
55 |
-
}
|
56 |
-
$the_options = cookielawinfo_get_admin_settings();
|
57 |
-
}
|
58 |
-
|
59 |
-
// Print form here:
|
60 |
-
|
61 |
-
|
62 |
-
echo '<div class="wrap">';
|
63 |
-
|
64 |
-
?>
|
65 |
-
<h2>Cookie Law Settings</h2>
|
66 |
-
|
67 |
-
|
68 |
-
<?php
|
69 |
-
|
70 |
-
// Migration controller:
|
71 |
-
if ( isset ( $_POST['cli-migration-button'] ) ) {
|
72 |
-
if ( isset( $_POST['cli-migration_field'] ) ) {
|
73 |
-
switch ( $_POST['cli-migration_field'] ) {
|
74 |
-
case '2':
|
75 |
-
// Migrate but keep
|
76 |
-
if ( !cookielawinfo_migrate_to_new_version() ) {
|
77 |
-
echo '<h3>ERROR MIGRATING SETTINGS (ERROR: 2)</h3>';
|
78 |
-
}
|
79 |
-
break;
|
80 |
-
case '3':
|
81 |
-
// Just use this version
|
82 |
-
cookielawinfo_update_to_latest_version_number();
|
83 |
-
break;
|
84 |
-
default:
|
85 |
-
// Form error, ignore
|
86 |
-
echo '<h3>Error processing migration request (ERROR: 4)</h3>';
|
87 |
-
break;
|
88 |
-
}
|
89 |
-
}
|
90 |
-
$the_options = cookielawinfo_get_admin_settings();
|
91 |
-
}
|
92 |
-
|
93 |
-
|
94 |
-
echo '<form method="post" action="' . esc_url ( $_SERVER["REQUEST_URI"] ) . '">';
|
95 |
-
|
96 |
-
// Set nonce:
|
97 |
-
if ( function_exists('wp_nonce_field') )
|
98 |
-
wp_nonce_field('cookielawinfo-update-' . CLI_SETTINGS_FIELD);
|
99 |
-
|
100 |
-
?>
|
101 |
-
|
102 |
-
<div class="cli-plugin-container">
|
103 |
-
<div class="cli-plugin-left-col width-62">
|
104 |
-
<div class="pad-10">
|
105 |
-
|
106 |
-
<!-- Toolbar -->
|
107 |
-
<div class="cli-plugin-toolbar top">
|
108 |
-
<div class="left">
|
109 |
-
|
110 |
-
<?php
|
111 |
-
// Outputs the "cookie bar is on/off" message in the header
|
112 |
-
$img_tag = '<img id="cli-plugin-status-icon" src="' . CLI_PLUGIN_URL . 'images/';
|
113 |
-
$span_tag = '<span id="header_on_off_alert">';
|
114 |
-
if ( $the_options['is_on'] == true ) {
|
115 |
-
$img_tag .= 'tick.png" alt="tick icon" />';
|
116 |
-
$span_tag .= 'Your Cookie Law Info bar is switched on</span>';
|
117 |
-
}
|
118 |
-
else {
|
119 |
-
$img_tag .= 'cross.png" alt="cross icon" />';
|
120 |
-
$span_tag .= 'Your Cookie Law Info bar is switched off</span>';
|
121 |
-
}
|
122 |
-
echo $img_tag . $span_tag;
|
123 |
-
?>
|
124 |
-
|
125 |
-
</div>
|
126 |
-
<div class="right">
|
127 |
-
<input type="submit" name="update_admin_settings_form" value="Update Settings" class="button-primary" />
|
128 |
-
</div>
|
129 |
-
</div>
|
130 |
-
|
131 |
-
<style>
|
132 |
-
/* http://css-tricks.com/snippets/jquery/simple-jquery-accordion/ ...with custom CSS */
|
133 |
-
dl.accordion dt {
|
134 |
-
background: #fff;
|
135 |
-
border: 1px #ccc solid;
|
136 |
-
color: #333;
|
137 |
-
font-size: 12px;
|
138 |
-
margin-bottom: 10px;
|
139 |
-
padding: 8px;
|
140 |
-
-moz-border-radius: 5px;
|
141 |
-
-webkit-border-radius: 5px;
|
142 |
-
border-radius: 5px;
|
143 |
-
-khtml-border-radius: 5px;
|
144 |
-
}
|
145 |
-
</style>
|
146 |
-
|
147 |
-
<!-- Accordion -->
|
148 |
-
<dl class="accordion">
|
149 |
-
|
150 |
-
|
151 |
-
<dt class="ui-icon ui-icon-triangle-1-s"><a href="#">Settings</a></dt>
|
152 |
-
<dd id="accordion_default">
|
153 |
-
<h4>The Cookie Bar</h4>
|
154 |
-
<table class="form-table">
|
155 |
-
<tr valign="top">
|
156 |
-
<th scope="row"><label for="is_on_field">Cookie Bar is currently:</label></th>
|
157 |
-
<td>
|
158 |
-
|
159 |
-
<input type="radio" id="is_on_field_yes" name="is_on_field" class="styled" value="true" <?php echo ( $the_options['is_on'] == true ) ? ' checked="checked" />' : ' />'; ?> On
|
160 |
-
<input type="radio" id="is_on_field_no" name="is_on_field" class="styled" value="false" <?php echo ( $the_options['is_on'] == false ) ? ' checked="checked" />' : ' />'; ?> Off
|
161 |
-
<span id="header_on_off_field_warning"></span>
|
162 |
-
</td>
|
163 |
-
</tr>
|
164 |
-
<tr valign="top">
|
165 |
-
<th scope="row"><label for="is_reject_on_field">Reject Button:</label></th>
|
166 |
-
<td>
|
167 |
-
<input type="radio" id="is_reject_on_field_yes" name="is_reject_on_field" class="styled" value="true" <?php echo ( $the_options['is_reject_on'] == true ) ? ' checked="checked" />' : ' />'; ?> On
|
168 |
-
<input type="radio" id="is_reject_on_field_no" name="is_reject_on_field" class="styled" value="false" <?php echo ( $the_options['is_reject_on'] == false ) ? ' checked="checked" />' : ' />'; ?> Off
|
169 |
-
<!--<span id="header_on_off_field_warning"></span>-->
|
170 |
-
</td>
|
171 |
-
</tr>
|
172 |
-
<tr valign="top">
|
173 |
-
<th scope="row"><label for="notify_position_vertical_field">Cookie Bar will be show in:</label></th>
|
174 |
-
<td>
|
175 |
-
<select name="notify_position_vertical_field" class="vvv_combobox">
|
176 |
-
<?php
|
177 |
-
if ( $the_options['notify_position_vertical'] == "top" ) {
|
178 |
-
echo '<option value="top" selected="selected">Header</option>';
|
179 |
-
echo '<option value="bottom">Footer</option>';
|
180 |
-
}
|
181 |
-
else {
|
182 |
-
echo '<option value="top">Header</option>';
|
183 |
-
echo '<option value="bottom" selected="selected">Footer</option>';
|
184 |
-
}
|
185 |
-
?>
|
186 |
-
</select>
|
187 |
-
</td>
|
188 |
-
</tr>
|
189 |
-
|
190 |
-
<!-- header_fix code here -->
|
191 |
-
<tr valign="top">
|
192 |
-
<th scope="row"><label for="header_fix_field">Fix Cookie Bar to Header?</label></th>
|
193 |
-
<td>
|
194 |
-
<input type="radio" id="header_fix_field_yes" name="header_fix_field" class="styled" value="true" <?php echo ( $the_options['header_fix'] == true ) ? ' checked="checked" />' : ' />'; ?> Yes
|
195 |
-
<input type="radio" id="iheader_fix_field_no" name="header_fix_field" class="styled" value="false" <?php echo ( $the_options['header_fix'] == false ) ? ' checked="checked" />' : ' />'; ?> No
|
196 |
-
<span class="cli-plugin-example">If you select "Header" then you can optionally stick the cookie bar to the header. Will not have any effect if you select "Footer".</span>
|
197 |
-
</td>
|
198 |
-
</tr>
|
199 |
-
<!-- /header_fix -->
|
200 |
-
|
201 |
-
<tr valign="top">
|
202 |
-
<th scope="row"><label for="notify_animate_show_field">On load</label></th>
|
203 |
-
<td>
|
204 |
-
<select name="notify_animate_show_field" class="vvv_combobox">
|
205 |
-
<?php
|
206 |
-
if ( $the_options['notify_animate_show'] == true ) {
|
207 |
-
echo '<option value="true" selected="selected">Animate</option>';
|
208 |
-
echo '<option value="false">Sticky</option>';
|
209 |
-
}
|
210 |
-
else {
|
211 |
-
echo '<option value="true">Animate</option>';
|
212 |
-
echo '<option value="false" selected="selected">Sticky</option>';
|
213 |
-
}
|
214 |
-
?>
|
215 |
-
</select>
|
216 |
-
</td>
|
217 |
-
</tr>
|
218 |
-
<tr valign="top">
|
219 |
-
<th scope="row"><label for="notify_animate_hide_field">On hide</label></th>
|
220 |
-
<td>
|
221 |
-
<select name="notify_animate_hide_field" class="vvv_combobox">
|
222 |
-
<?php
|
223 |
-
if ( $the_options['notify_animate_hide'] == true ) {
|
224 |
-
echo '<option value="true" selected="selected">Animate</option>';
|
225 |
-
echo '<option value="false">Disappear</option>';
|
226 |
-
}
|
227 |
-
else {
|
228 |
-
echo '<option value="true">Animate</option>';
|
229 |
-
echo '<option value="false" selected="selected">Disappear</option>';
|
230 |
-
}
|
231 |
-
?>
|
232 |
-
</select>
|
233 |
-
</td>
|
234 |
-
</tr>
|
235 |
-
|
236 |
-
<!-- SHOW ONCE / TIMER -->
|
237 |
-
<tr valign="top" class="hr-top">
|
238 |
-
<th scope="row"><label for="show_once_yn_field">Auto-hide cookie bar after delay?</label></th>
|
239 |
-
<td>
|
240 |
-
<input type="radio" id="show_once_yn_yes" name="show_once_yn_field" class="styled" value="true" <?php echo ( $the_options['show_once_yn'] == true ) ? ' checked="checked" />' : ' />'; ?> Yes
|
241 |
-
<input type="radio" id="show_once_yn_no" name="show_once_yn_field" class="styled" value="false" <?php echo ( $the_options['show_once_yn'] == false ) ? ' checked="checked" />' : ' />'; ?> No
|
242 |
-
</td>
|
243 |
-
</tr>
|
244 |
-
<tr valign="top">
|
245 |
-
<th scope="row"><label for="show_once_field">Milliseconds until hidden</label></th>
|
246 |
-
<td>
|
247 |
-
<input type="text" name="show_once_field" value="<?php echo $the_options['show_once'] ?>" />
|
248 |
-
<span class="cli-plugin-example">Specify milliseconds (not seconds) e.g. <em>8000 = 8 seconds</em></span>
|
249 |
-
</td>
|
250 |
-
</tr>
|
251 |
-
|
252 |
-
<!-- NEW: CLOSE ON SCROLL -->
|
253 |
-
<tr valign="top" class="hr-top">
|
254 |
-
<th scope="row"><label for="scroll_close_field">Auto-hide cookie bar if the user scrolls?</label></th>
|
255 |
-
<td>
|
256 |
-
<input type="radio" id="scroll_close_yes" name="scroll_close_field" class="styled" value="true" <?php echo ( $the_options['scroll_close'] == true ) ? ' checked="checked" />' : ' />'; ?> Yes
|
257 |
-
<input type="radio" id="scroll_close_no" name="scroll_close_field" class="styled" value="false" <?php echo ( $the_options['scroll_close'] == false ) ? ' checked="checked" />' : ' />'; ?> No
|
258 |
-
</td>
|
259 |
-
</tr>
|
260 |
-
<tr valign="top" class="hr-bottom">
|
261 |
-
<th scope="row"><label for="scroll_close_reload_field">Reload after "scroll accept" event?</label></th>
|
262 |
-
<td>
|
263 |
-
<!-- <input type="text" name="scroll_close_reload_field" value="<?php echo $the_options['scroll_close_reload'] ?>" />
|
264 |
-
<span class="cli-plugin-example">If the user accepts, do you want to reload the page? This feature is mostly for Italian users who have to deal with a very specific interpretation of the cookie law.</span>
|
265 |
-
-->
|
266 |
-
|
267 |
-
|
268 |
-
<input type="radio" id="scroll_close_reload_yes" name="scroll_close_reload_field" class="styled" value="true" <?php echo ( $the_options['scroll_close_reload'] == true ) ? ' checked="checked" />' : ' />'; ?> Yes
|
269 |
-
<input type="radio" id="scroll_close_reload_no" name="scroll_close_reload_field" class="styled" value="false" <?php echo ( $the_options['scroll_close_reload'] == false ) ? ' checked="checked" />' : ' />'; ?> No
|
270 |
-
|
271 |
-
|
272 |
-
</td>
|
273 |
-
</tr>
|
274 |
-
|
275 |
-
</table>
|
276 |
-
|
277 |
-
<h4>The Show Again Tab</h4>
|
278 |
-
<table class="form-table">
|
279 |
-
<tr valign="top">
|
280 |
-
<th scope="row"><label for="showagain_tab_field">Use Show Again Tab?</label></th>
|
281 |
-
<td>
|
282 |
-
<input type="radio" id="showagain_tab_field_yes" name="showagain_tab_field" class="styled" value="true" <?php echo ( $the_options['showagain_tab'] == true ) ? ' checked="checked" />' : ' />'; ?> Yes
|
283 |
-
<input type="radio" id="showagain_tab_field_no" name="showagain_tab_field" class="styled" value="false" <?php echo ( $the_options['showagain_tab'] == false ) ? ' checked="checked" />' : ' />'; ?> No
|
284 |
-
</td>
|
285 |
-
</tr>
|
286 |
-
<tr valign="top">
|
287 |
-
<th scope="row"><label for="notify_position_horizontal_field">Tab Position</label></th>
|
288 |
-
<td>
|
289 |
-
<select name="notify_position_horizontal_field" class="vvv_combobox">
|
290 |
-
<?php
|
291 |
-
if ( $the_options['notify_position_horizontal'] == "right" ) {
|
292 |
-
echo '<option value="right" selected="selected">Right</option>';
|
293 |
-
echo '<option value="left">Left</option>';
|
294 |
-
}
|
295 |
-
else {
|
296 |
-
echo '<option value="right">Right</option>';
|
297 |
-
echo '<option value="left" selected="selected">Left</option>';
|
298 |
-
}
|
299 |
-
?>
|
300 |
-
</select>
|
301 |
-
</td>
|
302 |
-
</tr>
|
303 |
-
<tr valign="top">
|
304 |
-
<th scope="row"><label for="showagain_x_position_field">From Left Margin</label></th>
|
305 |
-
<td>
|
306 |
-
<input type="text" name="showagain_x_position_field" value="<?php echo $the_options['showagain_x_position'] ?>" />
|
307 |
-
<span class="cli-plugin-example">Specify px or %, e.g. <em>"100px" or "30%"</em></span>
|
308 |
-
</td>
|
309 |
-
</tr>
|
310 |
-
<tr valign="top">
|
311 |
-
<th scope="row"><label for="showagain_text">Show More Text</label></th>
|
312 |
-
<td>
|
313 |
-
<input type="text" name="showagain_text_field" value="<?php echo $the_options['showagain_text'] ?>" />
|
314 |
-
|
315 |
-
</td>
|
316 |
-
</tr>
|
317 |
-
</table>
|
318 |
-
|
319 |
-
</dd>
|
320 |
-
|
321 |
-
|
322 |
-
<dt><a href="#">Cookie Law Message Bar</a></dt>
|
323 |
-
<dd>
|
324 |
-
<table class="form-table">
|
325 |
-
<tr valign="top">
|
326 |
-
<th scope="row"><label for="notify_message_field">Message</label></th>
|
327 |
-
<td>
|
328 |
-
<?php
|
329 |
-
echo '<textarea name="notify_message_field" class="vvv_textbox">';
|
330 |
-
echo apply_filters('format_to_edit', stripslashes($the_options['notify_message'])) . '</textarea>';
|
331 |
-
?>
|
332 |
-
<span class="cli-plugin-example">Shortcodes allowed: see settngs section "Using the Shortcodes". <br /><em>Examples: "We use cookies on this website [cookie_accept] to find out how to delete cookies [cookie_link]."</em></span>
|
333 |
-
</td>
|
334 |
-
</tr>
|
335 |
-
<tr valign="top">
|
336 |
-
<th scope="row"><label for="background_field">Cookie Bar Colour</label></th>
|
337 |
-
<td>
|
338 |
-
<?php
|
339 |
-
|
340 |
-
/** RICHARDASHBY EDIT */
|
341 |
-
//echo '<input type="text" name="background_field" id="cli-colour-background" value="' .$the_options['background']. '" />';
|
342 |
-
echo '<input type="text" name="background_field" id="cli-colour-background" value="' .$the_options['background']. '" class="my-color-field" data-default-color="#fff" />';
|
343 |
-
|
344 |
-
?>
|
345 |
-
</td>
|
346 |
-
</tr>
|
347 |
-
<tr valign="top">
|
348 |
-
<th scope="row"><label for="text_field">Text Colour</label></th>
|
349 |
-
<td>
|
350 |
-
<?php
|
351 |
-
/** RICHARDASHBY EDIT */
|
352 |
-
echo '<input type="text" name="text_field" id="cli-colour-text" value="' .$the_options['text']. '" class="my-color-field" data-default-color="#000" />';
|
353 |
-
?>
|
354 |
-
</td>
|
355 |
-
</tr>
|
356 |
-
<tr valign="top">
|
357 |
-
<th scope="row"><label for="border_on_field">Show Border?</label></th>
|
358 |
-
<td>
|
359 |
-
<!-- Border on/off -->
|
360 |
-
<input type="radio" id="border_on_field_yes" name="border_on_field" class="styled" value="true" <?php echo ( $the_options['border_on'] == true ) ? ' checked="checked" />' : ' />'; ?> Yes
|
361 |
-
<input type="radio" id="border_on_field_no" name="border_on_field" class="styled" value="false" <?php echo ( $the_options['border_on'] == false ) ? ' checked="checked" />' : ' />'; ?> No
|
362 |
-
</td>
|
363 |
-
</tr>
|
364 |
-
<tr valign="top">
|
365 |
-
<th scope="row"><label for="border_field">Border Colour</label></th>
|
366 |
-
<td>
|
367 |
-
<?php
|
368 |
-
echo '<input type="text" name="border_field" id="cli-colour-border" value="' .$the_options['border']. '" class="my-color-field" />';
|
369 |
-
?>
|
370 |
-
</td>
|
371 |
-
</tr>
|
372 |
-
<tr valign="top">
|
373 |
-
<th scope="row"><label for="font_family_field">Font</label></th>
|
374 |
-
<td>
|
375 |
-
<select name="font_family_field" class="vvv_combobox">
|
376 |
-
<?php cookielawinfo_print_combobox_options( cookielawinfo_get_fonts(), $the_options['font_family'] ) ?>
|
377 |
-
</select>
|
378 |
-
</td>
|
379 |
-
</tr>
|
380 |
-
</table>
|
381 |
-
</dd>
|
382 |
-
|
383 |
-
|
384 |
-
<dt><a href="#">Customise Buttons</a></dt>
|
385 |
-
<dd>
|
386 |
-
|
387 |
-
<h3 style="margin-bottom:30px;"> Accept Button </h3>
|
388 |
-
|
389 |
-
<h4>Main Button <code>[cookie_button]</code></h4>
|
390 |
-
<p>This button/link can be customised to either simply close the cookie bar, or follow a link. You can also customise the colours and styles, and show it as a link or a button.</p>
|
391 |
-
<table class="form-table">
|
392 |
-
<tr valign="top">
|
393 |
-
<th scope="row"><label for="button_1_text_field">Link Text</label></th>
|
394 |
-
<td>
|
395 |
-
<input type="text" name="button_1_text_field" value="<?php echo stripslashes( $the_options['button_1_text'] ) ?>" />
|
396 |
-
</td>
|
397 |
-
</tr>
|
398 |
-
<tr valign="top">
|
399 |
-
<th scope="row"><label for="button_1_action_field">Action</label></th>
|
400 |
-
<td>
|
401 |
-
<select name="button_1_action_field" id="cli-plugin-button-1-action" class="vvv_combobox">
|
402 |
-
<?php cookielawinfo_print_combobox_options( cookielawinfo_get_js_actions(), $the_options['button_1_action'] ) ?>
|
403 |
-
</select>
|
404 |
-
</td>
|
405 |
-
</tr>
|
406 |
-
<tr valign="top" class="cli-plugin-row">
|
407 |
-
<th scope="row"><label for="button_1_url_field">Link URL</label></th>
|
408 |
-
<td>
|
409 |
-
<input type="text" name="button_1_url_field" id="button_1_url_field" value="<?php echo $the_options['button_1_url'] ?>" />
|
410 |
-
<span class="cli-plugin-example"><em>Button will only link to URL if Action = Show URL</em></span>
|
411 |
-
</td>
|
412 |
-
</tr>
|
413 |
-
|
414 |
-
<tr valign="top" class="cli-plugin-row">
|
415 |
-
<th scope="row"><label for="button_1_new_win_field">Open link in new window?</label></th>
|
416 |
-
<td>
|
417 |
-
<input type="radio" id="button_1_new_win_field_yes" name="button_1_new_win_field" class="styled" value="true" <?php echo ( $the_options['button_1_new_win'] == true ) ? ' checked="checked" />' : ' />'; ?> Yes
|
418 |
-
<input type="radio" id="button_1_new_win_field_no" name="button_1_new_win_field" class="styled" value="false" <?php echo ( $the_options['button_1_new_win'] == false ) ? ' checked="checked" />' : ' />'; ?> No
|
419 |
-
</td>
|
420 |
-
</tr>
|
421 |
-
<tr valign="top">
|
422 |
-
<th scope="row"><label for="button_1_link_colour_field">Link colour</label></th>
|
423 |
-
<td>
|
424 |
-
<?php
|
425 |
-
echo '<input type="text" name="button_1_link_colour_field" id="cli-colour-link-button-1" value="' .$the_options['button_1_link_colour']. '" class="my-color-field" />';
|
426 |
-
?>
|
427 |
-
</td>
|
428 |
-
</tr>
|
429 |
-
<tr valign="top">
|
430 |
-
<th scope="row"><label for="button_1_as_button_field">Show as button?</label></th>
|
431 |
-
<td>
|
432 |
-
<input type="radio" id="button_1_as_button_field_yes" name="button_1_as_button_field" class="styled" value="true" <?php echo ( $the_options['button_1_as_button'] == true ) ? ' checked="checked" />' : ' />'; ?> Button
|
433 |
-
<input type="radio" id="button_1_as_button_field_no" name="button_1_as_button_field" class="styled" value="false" <?php echo ( $the_options['button_1_as_button'] == false ) ? ' checked="checked" />' : ' />'; ?> Link
|
434 |
-
</td>
|
435 |
-
</tr>
|
436 |
-
<tr valign="top">
|
437 |
-
<th scope="row"><label for="button_1_button_colour_field">Button colour</label></th>
|
438 |
-
<td>
|
439 |
-
<?php
|
440 |
-
echo '<input type="text" name="button_1_button_colour_field" id="cli-colour-btn-button-1" value="' .$the_options['button_1_button_colour']. '" class="my-color-field" />';
|
441 |
-
?>
|
442 |
-
</td>
|
443 |
-
</tr>
|
444 |
-
<tr valign="top">
|
445 |
-
<th scope="row"><label for="button_1_button_size_field">Button Size</label></th>
|
446 |
-
<td>
|
447 |
-
<select name="button_1_button_size_field" class="vvv_combobox">
|
448 |
-
<?php cookielawinfo_print_combobox_options( cookielawinfo_get_button_sizes(), $the_options['button_1_button_size'] ); ?>
|
449 |
-
</select>
|
450 |
-
</td>
|
451 |
-
</tr>
|
452 |
-
</table><!-- end custom button -->
|
453 |
-
|
454 |
-
<hr>
|
455 |
-
|
456 |
-
<h3 style="margin-top:50px;"> Reject Button </h3>
|
457 |
-
|
458 |
-
<table class="form-table" >
|
459 |
-
<tr valign="top">
|
460 |
-
<th scope="row"><label for="button_3_text_field">Link Text</label></th>
|
461 |
-
<td>
|
462 |
-
<input type="text" name="button_3_text_field" value="<?php echo stripslashes( $the_options['button_3_text'] ) ?>" />
|
463 |
-
</td>
|
464 |
-
</tr>
|
465 |
-
<tr valign="top">
|
466 |
-
<th scope="row"><label for="button_3_action_field">Action</label></th>
|
467 |
-
<td>
|
468 |
-
<select name="button_3_action_field" id="cli-plugin-button-3-action" class="vvv_combobox">
|
469 |
-
<?php
|
470 |
-
$action_list = cookielawinfo_get_js_actions();
|
471 |
-
$action_list['Close Header'] = '#cookie_action_close_header_reject';
|
472 |
-
cookielawinfo_print_combobox_options($action_list , $the_options['button_3_action'] ) ?>
|
473 |
-
</select>
|
474 |
-
</td>
|
475 |
-
</tr>
|
476 |
-
<tr valign="top" class="cli-plugin-row">
|
477 |
-
<th scope="row"><label for="button_3_url_field">Link URL</label></th>
|
478 |
-
<td>
|
479 |
-
<input type="text" name="button_3_url_field" id="button_3_url_field" value="<?php echo $the_options['button_3_url'] ?>" />
|
480 |
-
<span class="cli-plugin-example"><em>Button will only link to URL if Action = Show URL</em></span>
|
481 |
-
</td>
|
482 |
-
</tr>
|
483 |
-
|
484 |
-
<tr valign="top" class="cli-plugin-row">
|
485 |
-
<th scope="row"><label for="button_3_new_win_field">Open link in new window?</label></th>
|
486 |
-
<td>
|
487 |
-
<input type="radio" id="button_3_new_win_field_yes" name="button_3_new_win_field" class="styled" value="true" <?php echo ( $the_options['button_3_new_win'] == true ) ? ' checked="checked" />' : ' />'; ?> Yes
|
488 |
-
<input type="radio" id="button_3_new_win_field_no" name="button_3_new_win_field" class="styled" value="false" <?php echo ( $the_options['button_3_new_win'] == false ) ? ' checked="checked" />' : ' />'; ?> No
|
489 |
-
</td>
|
490 |
-
</tr>
|
491 |
-
<tr valign="top">
|
492 |
-
<th scope="row"><label for="button_3_link_colour_field">Link colour</label></th>
|
493 |
-
<td>
|
494 |
-
<?php
|
495 |
-
echo '<input type="text" name="button_3_link_colour_field" id="cli-colour-link-button-3" value="' .$the_options['button_3_link_colour']. '" class="my-color-field" />';
|
496 |
-
?>
|
497 |
-
</td>
|
498 |
-
</tr>
|
499 |
-
<tr valign="top">
|
500 |
-
<th scope="row"><label for="button_3_as_button_field">Show as button?</label></th>
|
501 |
-
<td>
|
502 |
-
<input type="radio" id="button_3_as_button_field_yes" name="button_3_as_button_field" class="styled" value="true" <?php echo ( $the_options['button_3_as_button'] == true ) ? ' checked="checked" />' : ' />'; ?> Button
|
503 |
-
<input type="radio" id="button_3_as_button_field_no" name="button_3_as_button_field" class="styled" value="false" <?php echo ( $the_options['button_3_as_button'] == false ) ? ' checked="checked" />' : ' />'; ?> Link
|
504 |
-
</td>
|
505 |
-
</tr>
|
506 |
-
<tr valign="top">
|
507 |
-
<th scope="row"><label for="button_3_button_colour_field">Button colour</label></th>
|
508 |
-
<td>
|
509 |
-
<?php
|
510 |
-
echo '<input type="text" name="button_3_button_colour_field" id="cli-colour-btn-button-3" value="' .$the_options['button_3_button_colour']. '" class="my-color-field" />';
|
511 |
-
?>
|
512 |
-
</td>
|
513 |
-
</tr>
|
514 |
-
<tr valign="top">
|
515 |
-
<th scope="row"><label for="button_3_button_size_field">Button Size</label></th>
|
516 |
-
<td>
|
517 |
-
<select name="button_3_button_size_field" class="vvv_combobox">
|
518 |
-
<?php cookielawinfo_print_combobox_options( cookielawinfo_get_button_sizes(), $the_options['button_3_button_size'] ); ?>
|
519 |
-
</select>
|
520 |
-
</td>
|
521 |
-
</tr>
|
522 |
-
</table><!-- end custom button -->
|
523 |
-
|
524 |
-
<hr>
|
525 |
-
<h4>Read More Link <code>[cookie_link]</code></h4>
|
526 |
-
<p>This button/link can be used to provide a link out to your Privacy & Cookie Policy. You can customise it any way you like.</p>
|
527 |
-
<table class="form-table">
|
528 |
-
<tr valign="top">
|
529 |
-
<th scope="row"><label for="button_2_text_field">Link Text</label></th>
|
530 |
-
<td>
|
531 |
-
<input type="text" name="button_2_text_field" value="<?php echo stripslashes( $the_options['button_2_text'] ) ?>" />
|
532 |
-
</td>
|
533 |
-
</tr>
|
534 |
-
<tr valign="top">
|
535 |
-
<th scope="row"><label for="button_2_url_field">Link URL</label></th>
|
536 |
-
<td>
|
537 |
-
<input type="text" name="button_2_url_field" id="button_2_url_field" value="<?php echo $the_options['button_2_url'] ?>" />
|
538 |
-
</td>
|
539 |
-
</tr>
|
540 |
-
<tr valign="top">
|
541 |
-
<th scope="row"><label for="button_2_link_colour_field">Link colour</label></th>
|
542 |
-
<td>
|
543 |
-
<?php
|
544 |
-
echo '<input type="text" name="button_2_link_colour_field" id="cli-colour-link-button-1" value="' .$the_options['button_2_link_colour']. '" class="my-color-field" />';
|
545 |
-
?>
|
546 |
-
</td>
|
547 |
-
</tr>
|
548 |
-
|
549 |
-
|
550 |
-
<tr valign="top">
|
551 |
-
<th scope="row"><label for="button_2_new_win_field">Open link in new window?</label></th>
|
552 |
-
<td>
|
553 |
-
<input type="radio" id="button_2_new_win_field_yes" name="button_2_new_win_field" class="styled" value="true" <?php echo ( $the_options['button_2_new_win'] == true ) ? ' checked="checked" />' : ' />'; ?> Yes
|
554 |
-
<input type="radio" id="button_2_new_win_field_no" name="button_2_new_win_field" class="styled" value="false" <?php echo ( $the_options['button_2_new_win'] == false ) ? ' checked="checked" />' : ' />'; ?> No
|
555 |
-
</td>
|
556 |
-
</tr>
|
557 |
-
<tr valign="top">
|
558 |
-
<th scope="row"><label for="button_2_as_button_field">Show as button?</label></th>
|
559 |
-
<td>
|
560 |
-
<input type="radio" id="button_2_as_button_field_yes" name="button_2_as_button_field" class="styled" value="true" <?php echo ( $the_options['button_2_as_button'] == true ) ? ' checked="checked" />' : ' />'; ?> Button
|
561 |
-
<input type="radio" id="button_2_as_button_field_no" name="button_2_as_button_field" class="styled" value="false" <?php echo ( $the_options['button_2_as_button'] == false ) ? ' checked="checked" />' : ' />'; ?> Link
|
562 |
-
</td>
|
563 |
-
</tr>
|
564 |
-
<tr valign="top">
|
565 |
-
<th scope="row"><label for="button_2_button_colour_field">Button colour</label></th>
|
566 |
-
<td>
|
567 |
-
<?php
|
568 |
-
echo '<input type="text" name="button_2_button_colour_field" id="cli-colour-btn-button-1" value="' .$the_options['button_2_button_colour']. '" class="my-color-field" />';
|
569 |
-
?>
|
570 |
-
</td>
|
571 |
-
</tr>
|
572 |
-
<tr valign="top">
|
573 |
-
<th scope="row"><label for="button_2_button_size_field">Button Size</label></th>
|
574 |
-
<td>
|
575 |
-
<select name="button_2_button_size_field" class="vvv_combobox">
|
576 |
-
<?php cookielawinfo_print_combobox_options( cookielawinfo_get_button_sizes(), $the_options['button_2_button_size'] ); ?>
|
577 |
-
</select>
|
578 |
-
</td>
|
579 |
-
</tr>
|
580 |
-
</table><!-- end custom button -->
|
581 |
-
|
582 |
-
</dd>
|
583 |
-
|
584 |
-
<dt><a href="#">Using the Shortcodes</a></dt>
|
585 |
-
<dd class="cli-help">
|
586 |
-
<h4>Cookie bar shortcodes</h4>
|
587 |
-
<p>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.</p>
|
588 |
-
<p>The shortcodes are:</p>
|
589 |
-
|
590 |
-
<pre>[cookie_accept]</pre><span>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.</span>
|
591 |
-
|
592 |
-
<pre>[cookie_accept colour="red"]</pre><span>Alternatively you can add a colour value. Choose from: red, blue, orange, yellow, green or pink.<br /><em>Careful to use the British spelling of "colour" for the attribute.</em></span>
|
593 |
-
|
594 |
-
<pre>[cookie_button]</pre><span>This is the "main button" you customise above.</span>
|
595 |
-
|
596 |
-
<pre>[cookie_link]</pre><span>This is the "read more" link you customise above.</span>
|
597 |
-
|
598 |
-
<h4>Other shortcodes</h4>
|
599 |
-
<p>These shortcodes can be used in pages and posts on your website. It is not recommended to use these inside the cookie bar itself.</p>
|
600 |
-
|
601 |
-
<pre>[cookie_audit]</pre><span>This prints out a nice table of cookies, in line with the guidance given by the ICO. <em>You need to enter the cookies your website uses via the Cookie Law Info menu in your WordPress dashboard.</em></span>
|
602 |
-
|
603 |
-
<pre>[delete_cookies]</pre><span>This shortcode will display a normal HTML link which when clicked, will delete the cookie set by Cookie Law Info (this cookie is used to remember that the cookie bar is closed).</span>
|
604 |
-
<pre>[delete_cookies text="Click here to delete"]</pre><span>Add any text you like- useful if you want e.g. another language to English.</span>
|
605 |
-
|
606 |
-
|
607 |
-
</dd>
|
608 |
-
|
609 |
-
|
610 |
-
<dt><a href="#">Advanced</a></dt>
|
611 |
-
<dd>
|
612 |
-
<p>Sometimes themes apply settings that clash with plugins. If that happens, try adjusting these settings.</p>
|
613 |
-
|
614 |
-
<table class="form-table">
|
615 |
-
<!--
|
616 |
-
<tr valign="top">
|
617 |
-
<th scope="row"><label for="use_colour_picker_field">Use colour picker on this page?</label></th>
|
618 |
-
<td>
|
619 |
-
<input type="radio" id="use_colour_picker_field_yes" name="use_colour_picker_field" class="styled" value="true" <?php echo ( $the_options['use_colour_picker'] == true ) ? ' checked="checked" />' : ' />'; ?> Yes
|
620 |
-
<input type="radio" id="use_colour_picker_field_no" name="use_colour_picker_field" class="styled" value="false" <?php echo ( $the_options['use_colour_picker'] == false ) ? ' checked="checked" />' : ' />'; ?> No
|
621 |
-
<span class="cli-plugin-example"><em>You will need to refresh your browser once the page re-loads in order to show the colour pickers.</em></span>
|
622 |
-
</td>
|
623 |
-
</tr>
|
624 |
-
-->
|
625 |
-
<tr valign="top">
|
626 |
-
<th scope="row">Reset all values</th>
|
627 |
-
<td>
|
628 |
-
<input type="submit" name="delete_all_settings" value="Delete settings and reset" class="button-secondary" onclick="return confirm('Are you sure you want to delete all your settings?');" />
|
629 |
-
<span class="cli-plugin-example"><em>Warning: this will actually delete your current settings.</em></span>
|
630 |
-
</td>
|
631 |
-
</tr>
|
632 |
-
<!--
|
633 |
-
<tr valign="top">
|
634 |
-
<th scope="row">Revert to previous version's settings</th>
|
635 |
-
<td>
|
636 |
-
<input type="submit" name="revert_to_previous_settings" value="Revert to old settings" class="button-secondary" onclick="return confirm('You will lose your current settings. Are you sure?');" />
|
637 |
-
<span class="cli-plugin-example"><em>Warning: this will actually delete your current settings.</em></span>
|
638 |
-
</td>
|
639 |
-
</tr>
|
640 |
-
-->
|
641 |
-
</table>
|
642 |
-
|
643 |
-
</dd>
|
644 |
-
|
645 |
-
</dl><!-- end of cookielawinfo-accordion -->
|
646 |
-
|
647 |
-
|
648 |
-
<!-- Second save button -->
|
649 |
-
<div class="cli-plugin-toolbar bottom">
|
650 |
-
<div class="left">
|
651 |
-
|
652 |
-
</div>
|
653 |
-
<div class="right">
|
654 |
-
<input type="submit" name="update_admin_settings_form" value="Update Settings" class="button-primary" />
|
655 |
-
</div>
|
656 |
-
</div>
|
657 |
-
|
658 |
-
|
659 |
-
</form><!-- end of main settings form -->
|
660 |
-
|
661 |
-
|
662 |
-
</div><!-- end of pad-5 -->
|
663 |
-
</div><!-- end of cli-plugin-left-col (62%) -->
|
664 |
-
|
665 |
-
<!-- Dashboard Sidebar -->
|
666 |
-
<div class="cli-plugin-right-col width-38">
|
667 |
-
<div class="pad-10">
|
668 |
-
|
669 |
-
|
670 |
-
<div id="cli-plugin-migrate">
|
671 |
-
<h3>Where did my settings go?</h3>
|
672 |
-
<p>Cookie Law Info version 0.9 has been updated and has new settings. <strong>Your previous settings are safe.</strong></p>
|
673 |
-
<p>You can either copy over your old settings to this version, or use the new default values. </p>
|
674 |
-
<form method="post" action="<?php esc_url ( $_SERVER["REQUEST_URI"] ) ?>">
|
675 |
-
<p><label for="cli-migration">Would you like to:</label></p>
|
676 |
-
<ul>
|
677 |
-
<li><input type="radio" id="cli-migration_field_yes" name="cli-migration_field" class="styled" value="2" /> Use previous settings</li>
|
678 |
-
<li><input type="radio" id="cli-migration_field_yes" name="cli-migration_field" class="styled" value="3" checked="checked" /> Start afresh with the new version</li>
|
679 |
-
</ul>
|
680 |
-
<input type="submit" name="cli-migration-button" value="Update" class="button-secondary" onclick="return confirm('Are you sure you want to migrate settings?');" />
|
681 |
-
</form>
|
682 |
-
<p>If you want to go back to the previous version you can always download it again from <a href="http://www.cookielawinfo.com">CookieLawInfo.com.</a></p>
|
683 |
-
</div>
|
684 |
-
|
685 |
-
<h3>Coming Soon: Cookie Law Info 2.0</h3>
|
686 |
-
<p>It's time for a completely new version! Cookie Law Info will always be free but there will also be a PRO version for those who want a bit more. You can <a href="http://cookielawinfo.com/cookie-law-info-2-0/">read about it here</a>. For both versions, you can sign up to the BETA version and be the first to try it out. It's completely free of charge and you could even win a free PRO version!</p>
|
687 |
-
<br />
|
688 |
-
|
689 |
-
<h3>Like this plugin?</h3>
|
690 |
-
<p>If you find this plugin useful please show your support and rate it <a href="http://wordpress.org/support/view/plugin-reviews/cookie-law-info?filter=5" target="_blank">★★★★★</a> on <a href="http://wordpress.org/support/view/plugin-reviews/cookie-law-info?filter=5" target="_blank">WordPress.org</a> - much appreciated! :)</p>
|
691 |
-
<br />
|
692 |
-
|
693 |
-
<h3>Help</h3>
|
694 |
-
<ul>
|
695 |
-
<li><a href="http://cookielawinfo.com/support/">Help and Support</a></li>
|
696 |
-
<li><a href="http://wordpress.org/support/plugin/cookie-law-info/">Report a Bug</a></li>
|
697 |
-
<li><a href="http://cookielawinfo.com/contact/">Suggest a Feature</a></li>
|
698 |
-
<li><a href="http://cookielawinfo.com">About the law</a></li>
|
699 |
-
</ul>
|
700 |
-
<br />
|
701 |
-
|
702 |
-
<div>
|
703 |
-
<form action="http://cookielawinfo.us5.list-manage.com/subscribe/post?u=b32779d828ef2e37e68e1580d&id=71af66b86e" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank">
|
704 |
-
<h3><label for="mce-EMAIL">Subscribe to our mailing list</label></h3>
|
705 |
-
<p>Occasional updates on plugin updates, compliance requirements, who's doing what and industry best practice.</p>
|
706 |
-
<input type="email" value="" name="EMAIL" class="vvv_textfield" id="mce-EMAIL" placeholder="email address" required>
|
707 |
-
<div class="">
|
708 |
-
<input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="button-secondary">
|
709 |
-
</div>
|
710 |
-
<p>We will not send you spam or pass your details to 3rd Parties.</p>
|
711 |
-
</form>
|
712 |
-
</div><!--End mc_embed_signup-->
|
713 |
-
|
714 |
-
</div>
|
715 |
-
</div><!-- end of cli-plugin-right-col (38%) -->
|
716 |
-
|
717 |
-
</div><!-- end of cli-plugin-container -->
|
718 |
-
|
719 |
-
|
720 |
-
<script type="text/javascript">
|
721 |
-
(function($) {
|
722 |
-
|
723 |
-
var allPanels = $('.accordion > dd').hide();
|
724 |
-
$('#accordion_default').show();
|
725 |
-
|
726 |
-
$('.accordion > dt > a').click(function() {
|
727 |
-
allPanels.slideUp();
|
728 |
-
$(this).parent().next().slideDown();
|
729 |
-
return false;
|
730 |
-
});
|
731 |
-
|
732 |
-
})(jQuery);
|
733 |
-
</script>
|
734 |
-
|
735 |
-
|
736 |
-
<?php
|
737 |
-
if ( !cookielawinfo_has_migrated() ) {
|
738 |
-
?>
|
739 |
-
<script type="text/javascript">
|
740 |
-
jQuery(document).ready(function() {
|
741 |
-
jQuery('#cli-plugin-migrate').slideDown();
|
742 |
-
});
|
743 |
-
</script>
|
744 |
-
<?php
|
745 |
-
}
|
746 |
-
|
747 |
-
//DEBUG:
|
748 |
-
echo cookielawinfo_debug_admin_settings( true );
|
749 |
-
echo cookielawinfo_debug_echo (cookielawinfo_get_json_settings() );
|
750 |
-
|
751 |
-
echo '</div><!-- end wrap -->';
|
752 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
753 |
}
|
754 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
755 |
?>
|
1 |
<?php
|
2 |
/*
|
3 |
+
===============================================================================
|
4 |
|
5 |
+
Copyright 2018 Markwt
|
6 |
|
7 |
+
This program is free software; you can redistribute it and/or modify
|
8 |
+
it under the terms of the GNU General Public License, version 2, as
|
9 |
+
published by the Free Software Foundation.
|
10 |
|
11 |
+
This program is distributed in the hope that it will be useful,
|
12 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14 |
+
GNU General Public License for more details.
|
|
|
|
|
|
|
|
|
|
|
15 |
|
16 |
+
You should have received a copy of the GNU General Public License
|
17 |
+
along with this program; if not, write to the Free Software
|
18 |
+
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
19 |
+
*/
|
20 |
|
21 |
/** Displays admin page within WP dashboard */
|
22 |
function cookielawinfo_print_admin_page() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
|
24 |
+
// Lock out non-admins:
|
25 |
+
if (!current_user_can('manage_options')) {
|
26 |
+
wp_die('You do not have sufficient permission to perform this operation');
|
27 |
+
}
|
28 |
+
|
29 |
+
// Get options:
|
30 |
+
$the_options = cookielawinfo_get_admin_settings();
|
31 |
+
|
32 |
+
// Check if form has been set:
|
33 |
+
if (isset($_POST['update_admin_settings_form'])) {
|
34 |
+
// Check nonce:
|
35 |
+
check_admin_referer('cookielawinfo-update-' . CLI_SETTINGS_FIELD);
|
36 |
+
foreach ($the_options as $key => $value) {
|
37 |
+
if (isset($_POST[$key . '_field'])) {
|
38 |
+
// Store sanitised values only:
|
39 |
+
$the_options[$key] = cookielawinfo_sanitise($key, $_POST[$key . '_field']);
|
40 |
+
}
|
41 |
+
}
|
42 |
+
update_option(CLI_SETTINGS_FIELD, $the_options);
|
43 |
+
echo '<div class="updated"><p><strong>Settings Updated.</strong></p></div>';
|
44 |
+
} else if (isset($_POST['delete_all_settings'])) {
|
45 |
+
// Check nonce:
|
46 |
+
check_admin_referer('cookielawinfo-update-' . CLI_SETTINGS_FIELD);
|
47 |
+
cookielawinfo_delete_settings();
|
48 |
+
$the_options = cookielawinfo_get_admin_settings();
|
49 |
+
} else if (isset($_POST['revert_to_previous_settings'])) {
|
50 |
+
if (!cookielawinfo_copy_old_settings_to_new()) {
|
51 |
+
echo '<h3>ERROR MIGRATING SETTINGS (ERROR: 2)</h3>';
|
52 |
+
}
|
53 |
+
$the_options = cookielawinfo_get_admin_settings();
|
54 |
+
}
|
55 |
+
|
56 |
+
// Print form here:
|
57 |
+
|
58 |
+
|
59 |
+
echo '<div class="wrap">';
|
60 |
+
?>
|
61 |
+
<h2>Cookie Law Settings</h2>
|
62 |
+
|
63 |
+
|
64 |
+
<?php
|
65 |
+
// Migration controller:
|
66 |
+
if (isset($_POST['cli-migration-button'])) {
|
67 |
+
if (isset($_POST['cli-migration_field'])) {
|
68 |
+
switch ($_POST['cli-migration_field']) {
|
69 |
+
case '2':
|
70 |
+
// Migrate but keep
|
71 |
+
if (!cookielawinfo_migrate_to_new_version()) {
|
72 |
+
echo '<h3>ERROR MIGRATING SETTINGS (ERROR: 2)</h3>';
|
73 |
+
}
|
74 |
+
break;
|
75 |
+
case '3':
|
76 |
+
// Just use this version
|
77 |
+
cookielawinfo_update_to_latest_version_number();
|
78 |
+
break;
|
79 |
+
default:
|
80 |
+
// Form error, ignore
|
81 |
+
echo '<h3>Error processing migration request (ERROR: 4)</h3>';
|
82 |
+
break;
|
83 |
+
}
|
84 |
+
}
|
85 |
+
$the_options = cookielawinfo_get_admin_settings();
|
86 |
+
}
|
87 |
+
|
88 |
+
|
89 |
+
echo '<form method="post" action="' . esc_url($_SERVER["REQUEST_URI"]) . '">';
|
90 |
+
|
91 |
+
// Set nonce:
|
92 |
+
if (function_exists('wp_nonce_field'))
|
93 |
+
wp_nonce_field('cookielawinfo-update-' . CLI_SETTINGS_FIELD);
|
94 |
+
?>
|
95 |
+
|
96 |
+
<div class="cli-plugin-container">
|
97 |
+
<div class="cli-plugin-left-col width-62">
|
98 |
+
<div class="pad-10">
|
99 |
+
|
100 |
+
<!-- Toolbar -->
|
101 |
+
<div class="cli-plugin-toolbar top">
|
102 |
+
<div class="left">
|
103 |
+
|
104 |
+
<?php
|
105 |
+
// Outputs the "cookie bar is on/off" message in the header
|
106 |
+
$img_tag = '<img id="cli-plugin-status-icon" src="' . CLI_PLUGIN_URL . 'images/';
|
107 |
+
$span_tag = '<span id="header_on_off_alert">';
|
108 |
+
if ($the_options['is_on'] == true) {
|
109 |
+
$img_tag .= 'tick.png" alt="tick icon" />';
|
110 |
+
$span_tag .= 'Your Cookie Law Info bar is switched on</span>';
|
111 |
+
} else {
|
112 |
+
$img_tag .= 'cross.png" alt="cross icon" />';
|
113 |
+
$span_tag .= 'Your Cookie Law Info bar is switched off</span>';
|
114 |
+
}
|
115 |
+
echo $img_tag . $span_tag;
|
116 |
+
?>
|
117 |
+
|
118 |
+
</div>
|
119 |
+
<div class="right">
|
120 |
+
<input type="submit" name="update_admin_settings_form" value="Update Settings" class="button-primary" />
|
121 |
+
</div>
|
122 |
+
</div>
|
123 |
+
|
124 |
+
<style>
|
125 |
+
/* http://css-tricks.com/snippets/jquery/simple-jquery-accordion/ ...with custom CSS */
|
126 |
+
dl.accordion dt {
|
127 |
+
background: #fff;
|
128 |
+
border: 1px #ccc solid;
|
129 |
+
color: #333;
|
130 |
+
font-size: 12px;
|
131 |
+
margin-bottom: 10px;
|
132 |
+
padding: 8px;
|
133 |
+
-moz-border-radius: 5px;
|
134 |
+
-webkit-border-radius: 5px;
|
135 |
+
border-radius: 5px;
|
136 |
+
-khtml-border-radius: 5px;
|
137 |
+
}
|
138 |
+
</style>
|
139 |
+
|
140 |
+
<!-- Accordion -->
|
141 |
+
<dl class="accordion">
|
142 |
+
|
143 |
+
|
144 |
+
<dt class="ui-icon ui-icon-triangle-1-s"><a href="#">Settings</a></dt>
|
145 |
+
<dd id="accordion_default">
|
146 |
+
<h4>The Cookie Bar</h4>
|
147 |
+
<table class="form-table">
|
148 |
+
<tr valign="top">
|
149 |
+
<th scope="row"><label for="is_on_field">Cookie Bar is currently:</label></th>
|
150 |
+
<td>
|
151 |
+
|
152 |
+
<input type="radio" id="is_on_field_yes" name="is_on_field" class="styled" value="true" <?php echo ( $the_options['is_on'] == true ) ? ' checked="checked" />' : ' />'; ?> On
|
153 |
+
<input type="radio" id="is_on_field_no" name="is_on_field" class="styled" value="false" <?php echo ( $the_options['is_on'] == false ) ? ' checked="checked" />' : ' />'; ?> Off
|
154 |
+
<span id="header_on_off_field_warning"></span>
|
155 |
+
</td>
|
156 |
+
</tr>
|
157 |
+
<tr valign="top">
|
158 |
+
<th scope="row"><label for="is_reject_on_field">Reject Button:</label></th>
|
159 |
+
<td>
|
160 |
+
<input type="radio" id="is_reject_on_field_yes" name="is_reject_on_field" class="styled" value="true" <?php echo ( $the_options['is_reject_on'] == true ) ? ' checked="checked" />' : ' />'; ?> On
|
161 |
+
<input type="radio" id="is_reject_on_field_no" name="is_reject_on_field" class="styled" value="false" <?php echo ( $the_options['is_reject_on'] == false ) ? ' checked="checked" />' : ' />'; ?> Off
|
162 |
+
<!--<span id="header_on_off_field_warning"></span>-->
|
163 |
+
</td>
|
164 |
+
</tr>
|
165 |
+
<tr valign="top">
|
166 |
+
<th scope="row"><label for="notify_position_vertical_field">Cookie Bar will be show in:</label></th>
|
167 |
+
<td>
|
168 |
+
<select name="notify_position_vertical_field" class="vvv_combobox">
|
169 |
+
<?php
|
170 |
+
if ($the_options['notify_position_vertical'] == "top") {
|
171 |
+
echo '<option value="top" selected="selected">Header</option>';
|
172 |
+
echo '<option value="bottom">Footer</option>';
|
173 |
+
} else {
|
174 |
+
echo '<option value="top">Header</option>';
|
175 |
+
echo '<option value="bottom" selected="selected">Footer</option>';
|
176 |
+
}
|
177 |
+
?>
|
178 |
+
</select>
|
179 |
+
</td>
|
180 |
+
</tr>
|
181 |
+
|
182 |
+
<!-- header_fix code here -->
|
183 |
+
<tr valign="top">
|
184 |
+
<th scope="row"><label for="header_fix_field">Fix Cookie Bar to Header?</label></th>
|
185 |
+
<td>
|
186 |
+
<input type="radio" id="header_fix_field_yes" name="header_fix_field" class="styled" value="true" <?php echo ( $the_options['header_fix'] == true ) ? ' checked="checked" />' : ' />'; ?> Yes
|
187 |
+
<input type="radio" id="iheader_fix_field_no" name="header_fix_field" class="styled" value="false" <?php echo ( $the_options['header_fix'] == false ) ? ' checked="checked" />' : ' />'; ?> No
|
188 |
+
<span class="cli-plugin-example">If you select "Header" then you can optionally stick the cookie bar to the header. Will not have any effect if you select "Footer".</span>
|
189 |
+
</td>
|
190 |
+
</tr>
|
191 |
+
<!-- /header_fix -->
|
192 |
+
|
193 |
+
<tr valign="top">
|
194 |
+
<th scope="row"><label for="notify_animate_show_field">On load</label></th>
|
195 |
+
<td>
|
196 |
+
<select name="notify_animate_show_field" class="vvv_combobox">
|
197 |
+
<?php
|
198 |
+
if ($the_options['notify_animate_show'] == true) {
|
199 |
+
echo '<option value="true" selected="selected">Animate</option>';
|
200 |
+
echo '<option value="false">Sticky</option>';
|
201 |
+
} else {
|
202 |
+
echo '<option value="true">Animate</option>';
|
203 |
+
echo '<option value="false" selected="selected">Sticky</option>';
|
204 |
+
}
|
205 |
+
?>
|
206 |
+
</select>
|
207 |
+
</td>
|
208 |
+
</tr>
|
209 |
+
<tr valign="top">
|
210 |
+
<th scope="row"><label for="notify_animate_hide_field">On hide</label></th>
|
211 |
+
<td>
|
212 |
+
<select name="notify_animate_hide_field" class="vvv_combobox">
|
213 |
+
<?php
|
214 |
+
if ($the_options['notify_animate_hide'] == true) {
|
215 |
+
echo '<option value="true" selected="selected">Animate</option>';
|
216 |
+
echo '<option value="false">Disappear</option>';
|
217 |
+
} else {
|
218 |
+
echo '<option value="true">Animate</option>';
|
219 |
+
echo '<option value="false" selected="selected">Disappear</option>';
|
220 |
+
}
|
221 |
+
?>
|
222 |
+
</select>
|
223 |
+
</td>
|
224 |
+
</tr>
|
225 |
+
|
226 |
+
<!-- SHOW ONCE / TIMER -->
|
227 |
+
<tr valign="top" class="hr-top">
|
228 |
+
<th scope="row"><label for="show_once_yn_field">Auto-hide cookie bar after delay?</label></th>
|
229 |
+
<td>
|
230 |
+
<input type="radio" id="show_once_yn_yes" name="show_once_yn_field" class="styled" value="true" <?php echo ( $the_options['show_once_yn'] == true ) ? ' checked="checked" />' : ' />'; ?> Yes
|
231 |
+
<input type="radio" id="show_once_yn_no" name="show_once_yn_field" class="styled" value="false" <?php echo ( $the_options['show_once_yn'] == false ) ? ' checked="checked" />' : ' />'; ?> No
|
232 |
+
</td>
|
233 |
+
</tr>
|
234 |
+
<tr valign="top">
|
235 |
+
<th scope="row"><label for="show_once_field">Milliseconds until hidden</label></th>
|
236 |
+
<td>
|
237 |
+
<input type="text" name="show_once_field" value="<?php echo $the_options['show_once'] ?>" />
|
238 |
+
<span class="cli-plugin-example">Specify milliseconds (not seconds) e.g. <em>8000 = 8 seconds</em></span>
|
239 |
+
</td>
|
240 |
+
</tr>
|
241 |
+
|
242 |
+
<!-- NEW: CLOSE ON SCROLL -->
|
243 |
+
<tr valign="top" class="hr-top">
|
244 |
+
<th scope="row"><label for="scroll_close_field">Auto-hide cookie bar if the user scrolls?</label></th>
|
245 |
+
<td>
|
246 |
+
<input type="radio" id="scroll_close_yes" name="scroll_close_field" class="styled" value="true" <?php echo ( $the_options['scroll_close'] == true ) ? ' checked="checked" />' : ' />'; ?> Yes
|
247 |
+
<input type="radio" id="scroll_close_no" name="scroll_close_field" class="styled" value="false" <?php echo ( $the_options['scroll_close'] == false ) ? ' checked="checked" />' : ' />'; ?> No
|
248 |
+
</td>
|
249 |
+
</tr>
|
250 |
+
<tr valign="top" class="hr-bottom">
|
251 |
+
<th scope="row"><label for="scroll_close_reload_field">Reload after "scroll accept" event?</label></th>
|
252 |
+
<td>
|
253 |
+
<!-- <input type="text" name="scroll_close_reload_field" value="<?php echo $the_options['scroll_close_reload'] ?>" />
|
254 |
+
<span class="cli-plugin-example">If the user accepts, do you want to reload the page? This feature is mostly for Italian users who have to deal with a very specific interpretation of the cookie law.</span>
|
255 |
+
-->
|
256 |
+
|
257 |
+
|
258 |
+
<input type="radio" id="scroll_close_reload_yes" name="scroll_close_reload_field" class="styled" value="true" <?php echo ( $the_options['scroll_close_reload'] == true ) ? ' checked="checked" />' : ' />'; ?> Yes
|
259 |
+
<input type="radio" id="scroll_close_reload_no" name="scroll_close_reload_field" class="styled" value="false" <?php echo ( $the_options['scroll_close_reload'] == false ) ? ' checked="checked" />' : ' />'; ?> No
|
260 |
+
|
261 |
+
|
262 |
+
</td>
|
263 |
+
</tr>
|
264 |
+
|
265 |
+
</table>
|
266 |
+
|
267 |
+
<h4>The Show Again Tab</h4>
|
268 |
+
<table class="form-table">
|
269 |
+
<tr valign="top">
|
270 |
+
<th scope="row"><label for="showagain_tab_field">Use Show Again Tab?</label></th>
|
271 |
+
<td>
|
272 |
+
<input type="radio" id="showagain_tab_field_yes" name="showagain_tab_field" class="styled" value="true" <?php echo ( $the_options['showagain_tab'] == true ) ? ' checked="checked" />' : ' />'; ?> Yes
|
273 |
+
<input type="radio" id="showagain_tab_field_no" name="showagain_tab_field" class="styled" value="false" <?php echo ( $the_options['showagain_tab'] == false ) ? ' checked="checked" />' : ' />'; ?> No
|
274 |
+
</td>
|
275 |
+
</tr>
|
276 |
+
<tr valign="top">
|
277 |
+
<th scope="row"><label for="notify_position_horizontal_field">Tab Position</label></th>
|
278 |
+
<td>
|
279 |
+
<select name="notify_position_horizontal_field" class="vvv_combobox">
|
280 |
+
<?php
|
281 |
+
if ($the_options['notify_position_horizontal'] == "right") {
|
282 |
+
echo '<option value="right" selected="selected">Right</option>';
|
283 |
+
echo '<option value="left">Left</option>';
|
284 |
+
} else {
|
285 |
+
echo '<option value="right">Right</option>';
|
286 |
+
echo '<option value="left" selected="selected">Left</option>';
|
287 |
+
}
|
288 |
+
?>
|
289 |
+
</select>
|
290 |
+
</td>
|
291 |
+
</tr>
|
292 |
+
<tr valign="top">
|
293 |
+
<th scope="row"><label for="showagain_x_position_field">From Left Margin</label></th>
|
294 |
+
<td>
|
295 |
+
<input type="text" name="showagain_x_position_field" value="<?php echo $the_options['showagain_x_position'] ?>" />
|
296 |
+
<span class="cli-plugin-example">Specify px or %, e.g. <em>"100px" or "30%"</em></span>
|
297 |
+
</td>
|
298 |
+
</tr>
|
299 |
+
<tr valign="top">
|
300 |
+
<th scope="row"><label for="showagain_text">Show More Text</label></th>
|
301 |
+
<td>
|
302 |
+
<input type="text" name="showagain_text_field" value="<?php echo $the_options['showagain_text'] ?>" />
|
303 |
+
|
304 |
+
</td>
|
305 |
+
</tr>
|
306 |
+
</table>
|
307 |
+
|
308 |
+
</dd>
|
309 |
+
|
310 |
+
|
311 |
+
<dt><a href="#">Cookie Law Message Bar</a></dt>
|
312 |
+
<dd>
|
313 |
+
<table class="form-table">
|
314 |
+
<tr valign="top">
|
315 |
+
<th scope="row"><label for="notify_message_field">Message</label></th>
|
316 |
+
<td>
|
317 |
+
<?php
|
318 |
+
echo '<textarea name="notify_message_field" class="vvv_textbox">';
|
319 |
+
echo apply_filters('format_to_edit', stripslashes($the_options['notify_message'])) . '</textarea>';
|
320 |
+
?>
|
321 |
+
<span class="cli-plugin-example">Shortcodes allowed: see settngs section "Using the Shortcodes". <br /><em>Examples: "We use cookies on this website [cookie_accept] to find out how to delete cookies [cookie_link]."</em></span>
|
322 |
+
</td>
|
323 |
+
</tr>
|
324 |
+
<tr valign="top">
|
325 |
+
<th scope="row"><label for="background_field">Cookie Bar Colour</label></th>
|
326 |
+
<td>
|
327 |
+
<?php
|
328 |
+
/** RICHARDASHBY EDIT */
|
329 |
+
//echo '<input type="text" name="background_field" id="cli-colour-background" value="' .$the_options['background']. '" />';
|
330 |
+
echo '<input type="text" name="background_field" id="cli-colour-background" value="' . $the_options['background'] . '" class="my-color-field" data-default-color="#fff" />';
|
331 |
+
?>
|
332 |
+
</td>
|
333 |
+
</tr>
|
334 |
+
<tr valign="top">
|
335 |
+
<th scope="row"><label for="text_field">Text Colour</label></th>
|
336 |
+
<td>
|
337 |
+
<?php
|
338 |
+
/** RICHARDASHBY EDIT */
|
339 |
+
echo '<input type="text" name="text_field" id="cli-colour-text" value="' . $the_options['text'] . '" class="my-color-field" data-default-color="#000" />';
|
340 |
+
?>
|
341 |
+
</td>
|
342 |
+
</tr>
|
343 |
+
<tr valign="top">
|
344 |
+
<th scope="row"><label for="border_on_field">Show Border?</label></th>
|
345 |
+
<td>
|
346 |
+
<!-- Border on/off -->
|
347 |
+
<input type="radio" id="border_on_field_yes" name="border_on_field" class="styled" value="true" <?php echo ( $the_options['border_on'] == true ) ? ' checked="checked" />' : ' />'; ?> Yes
|
348 |
+
<input type="radio" id="border_on_field_no" name="border_on_field" class="styled" value="false" <?php echo ( $the_options['border_on'] == false ) ? ' checked="checked" />' : ' />'; ?> No
|
349 |
+
</td>
|
350 |
+
</tr>
|
351 |
+
<tr valign="top">
|
352 |
+
<th scope="row"><label for="border_field">Border Colour</label></th>
|
353 |
+
<td>
|
354 |
+
<?php
|
355 |
+
echo '<input type="text" name="border_field" id="cli-colour-border" value="' . $the_options['border'] . '" class="my-color-field" />';
|
356 |
+
?>
|
357 |
+
</td>
|
358 |
+
</tr>
|
359 |
+
<tr valign="top">
|
360 |
+
<th scope="row"><label for="font_family_field">Font</label></th>
|
361 |
+
<td>
|
362 |
+
<select name="font_family_field" class="vvv_combobox">
|
363 |
+
<?php cookielawinfo_print_combobox_options(cookielawinfo_get_fonts(), $the_options['font_family']) ?>
|
364 |
+
</select>
|
365 |
+
</td>
|
366 |
+
</tr>
|
367 |
+
</table>
|
368 |
+
</dd>
|
369 |
+
|
370 |
+
|
371 |
+
<dt><a href="#">Customise Buttons</a></dt>
|
372 |
+
<dd>
|
373 |
+
|
374 |
+
<h3 style="margin-bottom:30px;"> Accept Button </h3>
|
375 |
+
|
376 |
+
<h4>Main Button <code>[cookie_button]</code></h4>
|
377 |
+
<p>This button/link can be customised to either simply close the cookie bar, or follow a link. You can also customise the colours and styles, and show it as a link or a button.</p>
|
378 |
+
<table class="form-table">
|
379 |
+
<tr valign="top">
|
380 |
+
<th scope="row"><label for="button_1_text_field">Link Text</label></th>
|
381 |
+
<td>
|
382 |
+
<input type="text" name="button_1_text_field" value="<?php echo stripslashes($the_options['button_1_text']) ?>" />
|
383 |
+
</td>
|
384 |
+
</tr>
|
385 |
+
<tr valign="top">
|
386 |
+
<th scope="row"><label for="button_1_action_field">Action</label></th>
|
387 |
+
<td>
|
388 |
+
<select name="button_1_action_field" id="cli-plugin-button-1-action" class="vvv_combobox">
|
389 |
+
<?php cookielawinfo_print_combobox_options(cookielawinfo_get_js_actions(), $the_options['button_1_action']) ?>
|
390 |
+
</select>
|
391 |
+
</td>
|
392 |
+
</tr>
|
393 |
+
<tr valign="top" class="cli-plugin-row">
|
394 |
+
<th scope="row"><label for="button_1_url_field">Link URL</label></th>
|
395 |
+
<td>
|
396 |
+
<input type="text" name="button_1_url_field" id="button_1_url_field" value="<?php echo $the_options['button_1_url'] ?>" />
|
397 |
+
<span class="cli-plugin-example"><em>Button will only link to URL if Action = Show URL</em></span>
|
398 |
+
</td>
|
399 |
+
</tr>
|
400 |
+
|
401 |
+
<tr valign="top" class="cli-plugin-row">
|
402 |
+
<th scope="row"><label for="button_1_new_win_field">Open link in new window?</label></th>
|
403 |
+
<td>
|
404 |
+
<input type="radio" id="button_1_new_win_field_yes" name="button_1_new_win_field" class="styled" value="true" <?php echo ( $the_options['button_1_new_win'] == true ) ? ' checked="checked" />' : ' />'; ?> Yes
|
405 |
+
<input type="radio" id="button_1_new_win_field_no" name="button_1_new_win_field" class="styled" value="false" <?php echo ( $the_options['button_1_new_win'] == false ) ? ' checked="checked" />' : ' />'; ?> No
|
406 |
+
</td>
|
407 |
+
</tr>
|
408 |
+
<tr valign="top">
|
409 |
+
<th scope="row"><label for="button_1_link_colour_field">Link colour</label></th>
|
410 |
+
<td>
|
411 |
+
<?php
|
412 |
+
echo '<input type="text" name="button_1_link_colour_field" id="cli-colour-link-button-1" value="' . $the_options['button_1_link_colour'] . '" class="my-color-field" />';
|
413 |
+
?>
|
414 |
+
</td>
|
415 |
+
</tr>
|
416 |
+
<tr valign="top">
|
417 |
+
<th scope="row"><label for="button_1_as_button_field">Show as button?</label></th>
|
418 |
+
<td>
|
419 |
+
<input type="radio" id="button_1_as_button_field_yes" name="button_1_as_button_field" class="styled" value="true" <?php echo ( $the_options['button_1_as_button'] == true ) ? ' checked="checked" />' : ' />'; ?> Button
|
420 |
+
<input type="radio" id="button_1_as_button_field_no" name="button_1_as_button_field" class="styled" value="false" <?php echo ( $the_options['button_1_as_button'] == false ) ? ' checked="checked" />' : ' />'; ?> Link
|
421 |
+
</td>
|
422 |
+
</tr>
|
423 |
+
<tr valign="top">
|
424 |
+
<th scope="row"><label for="button_1_button_colour_field">Button colour</label></th>
|
425 |
+
<td>
|
426 |
+
<?php
|
427 |
+
echo '<input type="text" name="button_1_button_colour_field" id="cli-colour-btn-button-1" value="' . $the_options['button_1_button_colour'] . '" class="my-color-field" />';
|
428 |
+
?>
|
429 |
+
</td>
|
430 |
+
</tr>
|
431 |
+
<tr valign="top">
|
432 |
+
<th scope="row"><label for="button_1_button_size_field">Button Size</label></th>
|
433 |
+
<td>
|
434 |
+
<select name="button_1_button_size_field" class="vvv_combobox">
|
435 |
+
<?php cookielawinfo_print_combobox_options(cookielawinfo_get_button_sizes(), $the_options['button_1_button_size']); ?>
|
436 |
+
</select>
|
437 |
+
</td>
|
438 |
+
</tr>
|
439 |
+
</table><!-- end custom button -->
|
440 |
+
|
441 |
+
<hr>
|
442 |
+
|
443 |
+
<h3 style="margin-top:50px;"> Reject Button </h3>
|
444 |
+
|
445 |
+
<table class="form-table" >
|
446 |
+
<tr valign="top">
|
447 |
+
<th scope="row"><label for="button_3_text_field">Link Text</label></th>
|
448 |
+
<td>
|
449 |
+
<input type="text" name="button_3_text_field" value="<?php echo stripslashes($the_options['button_3_text']) ?>" />
|
450 |
+
</td>
|
451 |
+
</tr>
|
452 |
+
<tr valign="top">
|
453 |
+
<th scope="row"><label for="button_3_action_field">Action</label></th>
|
454 |
+
<td>
|
455 |
+
<select name="button_3_action_field" id="cli-plugin-button-3-action" class="vvv_combobox">
|
456 |
+
<?php
|
457 |
+
$action_list = cookielawinfo_get_js_actions();
|
458 |
+
$action_list['Close Header'] = '#cookie_action_close_header_reject';
|
459 |
+
cookielawinfo_print_combobox_options($action_list, $the_options['button_3_action'])
|
460 |
+
?>
|
461 |
+
</select>
|
462 |
+
</td>
|
463 |
+
</tr>
|
464 |
+
<tr valign="top" class="cli-plugin-row">
|
465 |
+
<th scope="row"><label for="button_3_url_field">Link URL</label></th>
|
466 |
+
<td>
|
467 |
+
<input type="text" name="button_3_url_field" id="button_3_url_field" value="<?php echo $the_options['button_3_url'] ?>" />
|
468 |
+
<span class="cli-plugin-example"><em>Button will only link to URL if Action = Show URL</em></span>
|
469 |
+
</td>
|
470 |
+
</tr>
|
471 |
+
|
472 |
+
<tr valign="top" class="cli-plugin-row">
|
473 |
+
<th scope="row"><label for="button_3_new_win_field">Open link in new window?</label></th>
|
474 |
+
<td>
|
475 |
+
<input type="radio" id="button_3_new_win_field_yes" name="button_3_new_win_field" class="styled" value="true" <?php echo ( $the_options['button_3_new_win'] == true ) ? ' checked="checked" />' : ' />'; ?> Yes
|
476 |
+
<input type="radio" id="button_3_new_win_field_no" name="button_3_new_win_field" class="styled" value="false" <?php echo ( $the_options['button_3_new_win'] == false ) ? ' checked="checked" />' : ' />'; ?> No
|
477 |
+
</td>
|
478 |
+
</tr>
|
479 |
+
<tr valign="top">
|
480 |
+
<th scope="row"><label for="button_3_link_colour_field">Link colour</label></th>
|
481 |
+
<td>
|
482 |
+
<?php
|
483 |
+
echo '<input type="text" name="button_3_link_colour_field" id="cli-colour-link-button-3" value="' . $the_options['button_3_link_colour'] . '" class="my-color-field" />';
|
484 |
+
?>
|
485 |
+
</td>
|
486 |
+
</tr>
|
487 |
+
<tr valign="top">
|
488 |
+
<th scope="row"><label for="button_3_as_button_field">Show as button?</label></th>
|
489 |
+
<td>
|
490 |
+
<input type="radio" id="button_3_as_button_field_yes" name="button_3_as_button_field" class="styled" value="true" <?php echo ( $the_options['button_3_as_button'] == true ) ? ' checked="checked" />' : ' />'; ?> Button
|
491 |
+
<input type="radio" id="button_3_as_button_field_no" name="button_3_as_button_field" class="styled" value="false" <?php echo ( $the_options['button_3_as_button'] == false ) ? ' checked="checked" />' : ' />'; ?> Link
|
492 |
+
</td>
|
493 |
+
</tr>
|
494 |
+
<tr valign="top">
|
495 |
+
<th scope="row"><label for="button_3_button_colour_field">Button colour</label></th>
|
496 |
+
<td>
|
497 |
+
<?php
|
498 |
+
echo '<input type="text" name="button_3_button_colour_field" id="cli-colour-btn-button-3" value="' . $the_options['button_3_button_colour'] . '" class="my-color-field" />';
|
499 |
+
?>
|
500 |
+
</td>
|
501 |
+
</tr>
|
502 |
+
<tr valign="top">
|
503 |
+
<th scope="row"><label for="button_3_button_size_field">Button Size</label></th>
|
504 |
+
<td>
|
505 |
+
<select name="button_3_button_size_field" class="vvv_combobox">
|
506 |
+
<?php cookielawinfo_print_combobox_options(cookielawinfo_get_button_sizes(), $the_options['button_3_button_size']); ?>
|
507 |
+
</select>
|
508 |
+
</td>
|
509 |
+
</tr>
|
510 |
+
</table><!-- end custom button -->
|
511 |
+
|
512 |
+
<hr>
|
513 |
+
<h4>Read More Link <code>[cookie_link]</code></h4>
|
514 |
+
<p>This button/link can be used to provide a link out to your Privacy & Cookie Policy. You can customise it any way you like.</p>
|
515 |
+
<table class="form-table">
|
516 |
+
<tr valign="top">
|
517 |
+
<th scope="row"><label for="button_2_text_field">Link Text</label></th>
|
518 |
+
<td>
|
519 |
+
<input type="text" name="button_2_text_field" value="<?php echo stripslashes($the_options['button_2_text']) ?>" />
|
520 |
+
</td>
|
521 |
+
</tr>
|
522 |
+
<tr valign="top">
|
523 |
+
<th scope="row"><label for="button_2_url_field">Link URL</label></th>
|
524 |
+
<td>
|
525 |
+
<input type="text" name="button_2_url_field" id="button_2_url_field" value="<?php echo $the_options['button_2_url'] ?>" />
|
526 |
+
</td>
|
527 |
+
</tr>
|
528 |
+
<tr valign="top">
|
529 |
+
<th scope="row"><label for="button_2_link_colour_field">Link colour</label></th>
|
530 |
+
<td>
|
531 |
+
<?php
|
532 |
+
echo '<input type="text" name="button_2_link_colour_field" id="cli-colour-link-button-1" value="' . $the_options['button_2_link_colour'] . '" class="my-color-field" />';
|
533 |
+
?>
|
534 |
+
</td>
|
535 |
+
</tr>
|
536 |
+
|
537 |
+
|
538 |
+
<tr valign="top">
|
539 |
+
<th scope="row"><label for="button_2_new_win_field">Open link in new window?</label></th>
|
540 |
+
<td>
|
541 |
+
<input type="radio" id="button_2_new_win_field_yes" name="button_2_new_win_field" class="styled" value="true" <?php echo ( $the_options['button_2_new_win'] == true ) ? ' checked="checked" />' : ' />'; ?> Yes
|
542 |
+
<input type="radio" id="button_2_new_win_field_no" name="button_2_new_win_field" class="styled" value="false" <?php echo ( $the_options['button_2_new_win'] == false ) ? ' checked="checked" />' : ' />'; ?> No
|
543 |
+
</td>
|
544 |
+
</tr>
|
545 |
+
<tr valign="top">
|
546 |
+
<th scope="row"><label for="button_2_as_button_field">Show as button?</label></th>
|
547 |
+
<td>
|
548 |
+
<input type="radio" id="button_2_as_button_field_yes" name="button_2_as_button_field" class="styled" value="true" <?php echo ( $the_options['button_2_as_button'] == true ) ? ' checked="checked" />' : ' />'; ?> Button
|
549 |
+
<input type="radio" id="button_2_as_button_field_no" name="button_2_as_button_field" class="styled" value="false" <?php echo ( $the_options['button_2_as_button'] == false ) ? ' checked="checked" />' : ' />'; ?> Link
|
550 |
+
</td>
|
551 |
+
</tr>
|
552 |
+
<tr valign="top">
|
553 |
+
<th scope="row"><label for="button_2_button_colour_field">Button colour</label></th>
|
554 |
+
<td>
|
555 |
+
<?php
|
556 |
+
echo '<input type="text" name="button_2_button_colour_field" id="cli-colour-btn-button-1" value="' . $the_options['button_2_button_colour'] . '" class="my-color-field" />';
|
557 |
+
?>
|
558 |
+
</td>
|
559 |
+
</tr>
|
560 |
+
<tr valign="top">
|
561 |
+
<th scope="row"><label for="button_2_button_size_field">Button Size</label></th>
|
562 |
+
<td>
|
563 |
+
<select name="button_2_button_size_field" class="vvv_combobox">
|
564 |
+
<?php cookielawinfo_print_combobox_options(cookielawinfo_get_button_sizes(), $the_options['button_2_button_size']); ?>
|
565 |
+
</select>
|
566 |
+
</td>
|
567 |
+
</tr>
|
568 |
+
</table><!-- end custom button -->
|
569 |
+
|
570 |
+
</dd>
|
571 |
+
|
572 |
+
<dt><a href="#">Using the Shortcodes</a></dt>
|
573 |
+
<dd class="cli-help">
|
574 |
+
<h4>Cookie bar shortcodes</h4>
|
575 |
+
<p>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.</p>
|
576 |
+
<p>The shortcodes are:</p>
|
577 |
+
|
578 |
+
<pre>[cookie_accept]</pre><span>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.</span>
|
579 |
+
|
580 |
+
<pre>[cookie_accept colour="red"]</pre><span>Alternatively you can add a colour value. Choose from: red, blue, orange, yellow, green or pink.<br /><em>Careful to use the British spelling of "colour" for the attribute.</em></span>
|
581 |
+
|
582 |
+
<pre>[cookie_button]</pre><span>This is the "main button" you customise above.</span>
|
583 |
+
|
584 |
+
<pre>[cookie_link]</pre><span>This is the "read more" link you customise above.</span>
|
585 |
+
|
586 |
+
<h4>Other shortcodes</h4>
|
587 |
+
<p>These shortcodes can be used in pages and posts on your website. It is not recommended to use these inside the cookie bar itself.</p>
|
588 |
+
|
589 |
+
<pre>[cookie_audit]</pre><span>This prints out a nice table of cookies, in line with the guidance given by the ICO. <em>You need to enter the cookies your website uses via the Cookie Law Info menu in your WordPress dashboard.</em></span>
|
590 |
+
|
591 |
+
<pre>[delete_cookies]</pre><span>This shortcode will display a normal HTML link which when clicked, will delete the cookie set by Cookie Law Info (this cookie is used to remember that the cookie bar is closed).</span>
|
592 |
+
<pre>[delete_cookies text="Click here to delete"]</pre><span>Add any text you like- useful if you want e.g. another language to English.</span>
|
593 |
+
|
594 |
+
|
595 |
+
</dd>
|
596 |
+
|
597 |
+
|
598 |
+
<dt><a href="#">Advanced</a></dt>
|
599 |
+
<dd>
|
600 |
+
<p>Sometimes themes apply settings that clash with plugins. If that happens, try adjusting these settings.</p>
|
601 |
+
|
602 |
+
<table class="form-table">
|
603 |
+
<!--
|
604 |
+
<tr valign="top">
|
605 |
+
<th scope="row"><label for="use_colour_picker_field">Use colour picker on this page?</label></th>
|
606 |
+
<td>
|
607 |
+
<input type="radio" id="use_colour_picker_field_yes" name="use_colour_picker_field" class="styled" value="true" <?php echo ( $the_options['use_colour_picker'] == true ) ? ' checked="checked" />' : ' />'; ?> Yes
|
608 |
+
<input type="radio" id="use_colour_picker_field_no" name="use_colour_picker_field" class="styled" value="false" <?php echo ( $the_options['use_colour_picker'] == false ) ? ' checked="checked" />' : ' />'; ?> No
|
609 |
+
<span class="cli-plugin-example"><em>You will need to refresh your browser once the page re-loads in order to show the colour pickers.</em></span>
|
610 |
+
</td>
|
611 |
+
</tr>
|
612 |
+
-->
|
613 |
+
<tr valign="top">
|
614 |
+
<th scope="row">Reset all values</th>
|
615 |
+
<td>
|
616 |
+
<input type="submit" name="delete_all_settings" value="Delete settings and reset" class="button-secondary" onclick="return confirm('Are you sure you want to delete all your settings?');" />
|
617 |
+
<span class="cli-plugin-example"><em>Warning: this will actually delete your current settings.</em></span>
|
618 |
+
</td>
|
619 |
+
</tr>
|
620 |
+
<!--
|
621 |
+
<tr valign="top">
|
622 |
+
<th scope="row">Revert to previous version's settings</th>
|
623 |
+
<td>
|
624 |
+
<input type="submit" name="revert_to_previous_settings" value="Revert to old settings" class="button-secondary" onclick="return confirm('You will lose your current settings. Are you sure?');" />
|
625 |
+
<span class="cli-plugin-example"><em>Warning: this will actually delete your current settings.</em></span>
|
626 |
+
</td>
|
627 |
+
</tr>
|
628 |
+
-->
|
629 |
+
</table>
|
630 |
+
|
631 |
+
</dd>
|
632 |
+
|
633 |
+
</dl><!-- end of cookielawinfo-accordion -->
|
634 |
+
|
635 |
+
|
636 |
+
<!-- Second save button -->
|
637 |
+
<div class="cli-plugin-toolbar bottom">
|
638 |
+
<div class="left">
|
639 |
+
|
640 |
+
</div>
|
641 |
+
<div class="right">
|
642 |
+
<input type="submit" name="update_admin_settings_form" value="Update Settings" class="button-primary" />
|
643 |
+
</div>
|
644 |
+
</div>
|
645 |
+
|
646 |
+
|
647 |
+
</form><!-- end of main settings form -->
|
648 |
+
|
649 |
+
|
650 |
+
</div><!-- end of pad-5 -->
|
651 |
+
</div><!-- end of cli-plugin-left-col (62%) -->
|
652 |
+
|
653 |
+
<!-- Dashboard Sidebar -->
|
654 |
+
<div class="cli-plugin-right-col width-38">
|
655 |
+
<div class="pad-10">
|
656 |
+
|
657 |
+
|
658 |
+
<div id="cli-plugin-migrate">
|
659 |
+
<h3>Where did my settings go?</h3>
|
660 |
+
<p>Cookie Law Info version 0.9 has been updated and has new settings. <strong>Your previous settings are safe.</strong></p>
|
661 |
+
<p>You can either copy over your old settings to this version, or use the new default values. </p>
|
662 |
+
<form method="post" action="<?php esc_url($_SERVER["REQUEST_URI"]) ?>">
|
663 |
+
<p><label for="cli-migration">Would you like to:</label></p>
|
664 |
+
<ul>
|
665 |
+
<li><input type="radio" id="cli-migration_field_yes" name="cli-migration_field" class="styled" value="2" /> Use previous settings</li>
|
666 |
+
<li><input type="radio" id="cli-migration_field_yes" name="cli-migration_field" class="styled" value="3" checked="checked" /> Start afresh with the new version</li>
|
667 |
+
</ul>
|
668 |
+
<input type="submit" name="cli-migration-button" value="Update" class="button-secondary" onclick="return confirm('Are you sure you want to migrate settings?');" />
|
669 |
+
</form>
|
670 |
+
<p>If you want to go back to the previous version you can always download it again from <a href="http://www.cookielawinfo.com">CookieLawInfo.com.</a></p>
|
671 |
+
</div>
|
672 |
+
|
673 |
+
<h3>GDPR Cookie Consent Pro</h3>
|
674 |
+
<p>
|
675 |
+
<ul>
|
676 |
+
<li>--Manage list of cookies ( Name, CookieID, Description, Duration, Type, Category, Header Script, Footer Script)</li>
|
677 |
+
<li>--Manage Cookie Categories</li>
|
678 |
+
<li>--Allow to display Cookie Settings popup where site visitors can opt-in or give consent to Cookie Categories</li>
|
679 |
+
<li>--Fully customisable to look just like your own website's style: customise the colours, styles and fonts</li>
|
680 |
+
<li>--Put the cookie bar in either the header or the footer</li>
|
681 |
+
<li>--(Optional) accept cookie policy if the user scrolls</li>
|
682 |
+
<li>--(Optional) automatically close the cookie bar after a delay (delay is configurable)</li>
|
683 |
+
<li>--(Optional) cookie bar can be permanently dismissed or accessible through a "show again" tab</li>
|
684 |
+
<li>--"Cookie Audit" shortcode to construct a nicely-styled ‘Privacy & Cookie Policy’</li>
|
685 |
+
<li>--qTranslate support</li>
|
686 |
+
</ul><br/>
|
687 |
+
<a href="https://www.webtoffee.com/product/gdpr-cookie-consent/" target="_blank" class="cli-button cli-button-go-pro">Upgrade to GDPR Pro</a>
|
688 |
+
<style>
|
689 |
+
.cli-button-go-pro {
|
690 |
+
box-shadow: none;
|
691 |
+
border: 0;
|
692 |
+
text-shadow: none;
|
693 |
+
padding: 10px 15px;
|
694 |
+
height: auto;
|
695 |
+
font-size: 18px;
|
696 |
+
border-radius: 4px;
|
697 |
+
font-weight: 600;
|
698 |
+
background: #00cb95;
|
699 |
+
margin-top: 20px;
|
700 |
+
}
|
701 |
+
|
702 |
+
.cli-button {
|
703 |
+
margin-bottom: 20px;
|
704 |
+
color: #fff;
|
705 |
+
}
|
706 |
+
.cli-button:hover, .cli-button:visited {
|
707 |
+
color: #fff;
|
708 |
+
}
|
709 |
+
</style>
|
710 |
+
|
711 |
+
</p>
|
712 |
+
<br />
|
713 |
+
|
714 |
+
<h3>Like this plugin?</h3>
|
715 |
+
<p>If you find this plugin useful please show your support and rate it <a href="http://wordpress.org/support/view/plugin-reviews/cookie-law-info?filter=5" target="_blank">★★★★★</a> on <a href="http://wordpress.org/support/view/plugin-reviews/cookie-law-info?filter=5" target="_blank">WordPress.org</a> - much appreciated! :)</p>
|
716 |
+
<br />
|
717 |
+
|
718 |
+
<h3>Help</h3>
|
719 |
+
<ul>
|
720 |
+
<li><a href="http://cookielawinfo.com/support/">Help and Support</a></li>
|
721 |
+
<li><a href="http://wordpress.org/support/plugin/cookie-law-info/">Report a Bug</a></li>
|
722 |
+
<li><a href="http://cookielawinfo.com/contact/">Suggest a Feature</a></li>
|
723 |
+
<li><a href="http://cookielawinfo.com">About the law</a></li>
|
724 |
+
</ul>
|
725 |
+
<br />
|
726 |
+
|
727 |
+
<!-- <div>
|
728 |
+
<form action="http://cookielawinfo.us5.list-manage.com/subscribe/post?u=b32779d828ef2e37e68e1580d&id=71af66b86e" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank">
|
729 |
+
<h3><label for="mce-EMAIL">Subscribe to our mailing list</label></h3>
|
730 |
+
<p>Occasional updates on plugin updates, compliance requirements, who's doing what and industry best practice.</p>
|
731 |
+
<input type="email" value="" name="EMAIL" class="vvv_textfield" id="mce-EMAIL" placeholder="email address" required>
|
732 |
+
<div class="">
|
733 |
+
<input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="button-secondary">
|
734 |
+
</div>
|
735 |
+
<p>We will not send you spam or pass your details to 3rd Parties.</p>
|
736 |
+
</form>
|
737 |
+
</div>-->
|
738 |
+
<!--End mc_embed_signup-->
|
739 |
+
|
740 |
+
</div>
|
741 |
+
</div><!-- end of cli-plugin-right-col (38%) -->
|
742 |
+
|
743 |
+
</div><!-- end of cli-plugin-container -->
|
744 |
+
|
745 |
+
|
746 |
+
<script type="text/javascript">
|
747 |
+
(function ($) {
|
748 |
+
|
749 |
+
var allPanels = $('.accordion > dd').hide();
|
750 |
+
$('#accordion_default').show();
|
751 |
+
|
752 |
+
$('.accordion > dt > a').click(function () {
|
753 |
+
allPanels.slideUp();
|
754 |
+
$(this).parent().next().slideDown();
|
755 |
+
return false;
|
756 |
+
});
|
757 |
+
|
758 |
+
})(jQuery);
|
759 |
+
</script>
|
760 |
+
|
761 |
+
|
762 |
+
<?php
|
763 |
+
if (!cookielawinfo_has_migrated()) {
|
764 |
+
?>
|
765 |
+
<script type="text/javascript">
|
766 |
+
jQuery(document).ready(function () {
|
767 |
+
jQuery('#cli-plugin-migrate').slideDown();
|
768 |
+
});
|
769 |
+
</script>
|
770 |
+
<?php
|
771 |
+
}
|
772 |
+
|
773 |
+
//DEBUG:
|
774 |
+
echo cookielawinfo_debug_admin_settings(true);
|
775 |
+
echo cookielawinfo_debug_echo(cookielawinfo_get_json_settings());
|
776 |
+
|
777 |
+
echo '</div><!-- end wrap -->';
|
778 |
}
|
779 |
|
780 |
+
function cookielawinfo_print_thirdparty_page() {
|
781 |
+
?>
|
782 |
+
|
783 |
+
<h2>Non-necessary Cookie Settings</h2>
|
784 |
+
<?php
|
785 |
+
$options = array('thirdparty_on_field',
|
786 |
+
'thirdparty_head_section',
|
787 |
+
'thirdparty_body_section',
|
788 |
+
// 'thirdparty_footer_section',
|
789 |
+
);
|
790 |
+
// Get options:
|
791 |
+
$stored_options = get_option('cookielawinfo_thirdparty_settings', array(
|
792 |
+
'thirdparty_on_field' => false,
|
793 |
+
'thirdparty_head_section' => '',
|
794 |
+
'thirdparty_body_section' => '',
|
795 |
+
// 'thirdparty_footer_section' => '',
|
796 |
+
));
|
797 |
+
|
798 |
+
// Check if form has been set:
|
799 |
+
if (isset($_POST['update_thirdparty_settings_form'])) {
|
800 |
+
|
801 |
+
// Check nonce:
|
802 |
+
check_admin_referer('cookielawinfo-update-thirdparty');
|
803 |
+
|
804 |
+
foreach ($options as $key) {
|
805 |
+
|
806 |
+
if (isset($_POST[$key])) {
|
807 |
+
|
808 |
+
// Store sanitised values only:
|
809 |
+
|
810 |
+
$stored_options[$key] = wp_unslash($_POST[$key]);
|
811 |
+
}
|
812 |
+
}
|
813 |
+
|
814 |
+
update_option('cookielawinfo_thirdparty_settings', $stored_options);
|
815 |
+
echo '<div class="updated"><p><strong>Settings Updated.</strong></p></div>';
|
816 |
+
}
|
817 |
+
|
818 |
+
$stored_options = get_option('cookielawinfo_thirdparty_settings', array(
|
819 |
+
'thirdparty_on_field' => false,
|
820 |
+
'thirdparty_head_section' => '',
|
821 |
+
'thirdparty_body_section' => '',
|
822 |
+
// 'thirdparty_footer_section' => '',
|
823 |
+
));
|
824 |
+
?>
|
825 |
+
|
826 |
+
<style>
|
827 |
+
.vvv_textbox{
|
828 |
+
height: 150px;
|
829 |
+
width: 80%;
|
830 |
+
}
|
831 |
+
</style>
|
832 |
+
<form method="post" action="<?php echo esc_url($_SERVER["REQUEST_URI"]); ?>">
|
833 |
+
<?php wp_nonce_field('cookielawinfo-update-thirdparty'); ?>
|
834 |
+
<table class="form-table" >
|
835 |
+
|
836 |
+
<tr valign="top">
|
837 |
+
<th scope="row" style="width:25%;"><label for="thirdparty_on_field">Enable Non-necessary Cookie</label></th>
|
838 |
+
<td>
|
839 |
+
<!-- Border on/off -->
|
840 |
+
<input type="radio" id="thirdparty_on_field_yes" name="thirdparty_on_field" class="styled" value="true" <?php echo ( filter_var($stored_options['thirdparty_on_field'], FILTER_VALIDATE_BOOLEAN) == true ) ? ' checked="checked" />' : ' />'; ?> Yes
|
841 |
+
<input type="radio" id="thirdparty_on_field_no" name="thirdparty_on_field" class="styled" value="false" <?php echo ( filter_var($stored_options['thirdparty_on_field'], FILTER_VALIDATE_BOOLEAN) == false ) ? ' checked="checked" />' : ' />'; ?> No
|
842 |
+
</td>
|
843 |
+
</tr>
|
844 |
+
<tr valign="top">
|
845 |
+
<th scope="row" style="width:25%;"><label for="thirdparty_head_section">This script will be added to the page HEAD section if the above settings is enabled and user has give consent.</label></th>
|
846 |
+
<td>
|
847 |
+
<?php
|
848 |
+
echo '<textarea name="thirdparty_head_section" class="vvv_textbox">';
|
849 |
+
echo apply_filters('format_to_edit', stripslashes($stored_options['thirdparty_head_section'])) . '</textarea>';
|
850 |
+
?>
|
851 |
+
<div class="clearfix"></div>
|
852 |
+
<span class="cli-plugin-example"><em>Print scripts in the head tag on the front end if above cookie settings is enabled and user has given consent. eg:- <script>console.log("header script");</script> </em></span>
|
853 |
+
</td>
|
854 |
+
</tr>
|
855 |
+
<tr valign="top">
|
856 |
+
<th scope="row" style="width:25%;"><label for="thirdparty_body_section">This script will be added right after the BODY section if the above settings is enabled and user has given consent.</label></th>
|
857 |
+
<td>
|
858 |
+
<?php
|
859 |
+
echo '<textarea name="thirdparty_body_section" class="vvv_textbox">';
|
860 |
+
echo apply_filters('format_to_edit', stripslashes($stored_options['thirdparty_body_section'])) . '</textarea>';
|
861 |
+
?>
|
862 |
+
<div class="clearfix"></div>
|
863 |
+
<span class="cli-plugin-example"><em>Print scripts before the closing body tag on the front end if above cookie settings is enabled and user has given consent. eg:- <script>console.log("body script");</script> </em></span>
|
864 |
+
</td>
|
865 |
+
</tr>
|
866 |
+
<!-- <tr valign="top">
|
867 |
+
<th scope="row"><label for="thirdparty_footer_section">Thi script will be added to the page FOOTER section if user enables this cookie.</label></th>
|
868 |
+
<td>
|
869 |
+
<?php
|
870 |
+
//echo '<textarea name="thirdparty_footer_section" class="vvv_textbox">';
|
871 |
+
//echo apply_filters('format_to_edit', stripslashes($stored_options['thirdparty_footer_section'])) . '</textarea>';
|
872 |
+
?>
|
873 |
+
<div class="clearfix"></div>
|
874 |
+
<span class="cli-plugin-example">Shortcodes allowed: see settings section "Using the Shortcodes". <br /><em>Examples: "We use cookies on this website [cookie_accept] to find out how to delete cookies [cookie_link]."</em></span>
|
875 |
+
</td>
|
876 |
+
</tr>-->
|
877 |
+
|
878 |
+
</table>
|
879 |
+
<input type="submit" name="update_thirdparty_settings_form" value="Save Settings" class="button-primary" />
|
880 |
+
</form>
|
881 |
+
|
882 |
+
|
883 |
+
<?php
|
884 |
+
}
|
885 |
?>
|
admin/cli-admin.php
CHANGED
@@ -356,6 +356,14 @@ function cookielawinfo_register_custom_menu_page() {
|
|
356 |
'cookie-law-info',
|
357 |
'cookielawinfo_print_admin_page'
|
358 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
359 |
}
|
360 |
|
361 |
|
356 |
'cookie-law-info',
|
357 |
'cookielawinfo_print_admin_page'
|
358 |
);
|
359 |
+
add_submenu_page(
|
360 |
+
'edit.php?post_type=cookielawinfo',
|
361 |
+
'Non-necessary Cookie',
|
362 |
+
'Non-necessary Cookie',
|
363 |
+
'manage_options',
|
364 |
+
'cookie-law-info-thirdparty',
|
365 |
+
'cookielawinfo_print_thirdparty_page'
|
366 |
+
);
|
367 |
}
|
368 |
|
369 |
|
cookie-law-info.php
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
-
Plugin Name: Cookie
|
4 |
Plugin URI: https://wordpress.org/plugins/cookie-law-info/
|
5 |
Description: A simple way of to show your website complies with the EU Cookie Law / GDPR.
|
6 |
-
Author:
|
7 |
-
Author URI:
|
8 |
-
Version: 1.5.
|
9 |
License: GPL2
|
10 |
*/
|
11 |
|
@@ -86,7 +86,7 @@ add_action( 'manage_posts_custom_column', 'cookielawinfo_custom_columns' );
|
|
86 |
add_filter( 'plugin_action_links_' . plugin_basename(__FILE__), 'cookielawinfo_plugin_action_links' );
|
87 |
function cookielawinfo_plugin_action_links( $links ) {
|
88 |
$links[] = '<a href="'. get_admin_url(null, 'edit.php?post_type=cookielawinfo&page=cookie-law-info') .'">Settings</a>';
|
89 |
-
$links[] = '<a href="
|
90 |
return $links;
|
91 |
}
|
92 |
|
1 |
<?php
|
2 |
/*
|
3 |
+
Plugin Name: GDPR Cookie Consent
|
4 |
Plugin URI: https://wordpress.org/plugins/cookie-law-info/
|
5 |
Description: A simple way of to show your website complies with the EU Cookie Law / GDPR.
|
6 |
+
Author: webtoffee
|
7 |
+
Author URI: https://www.webtoffee.com/product/gdpr-cookie-consent/
|
8 |
+
Version: 1.5.5
|
9 |
License: GPL2
|
10 |
*/
|
11 |
|
86 |
add_filter( 'plugin_action_links_' . plugin_basename(__FILE__), 'cookielawinfo_plugin_action_links' );
|
87 |
function cookielawinfo_plugin_action_links( $links ) {
|
88 |
$links[] = '<a href="'. get_admin_url(null, 'edit.php?post_type=cookielawinfo&page=cookie-law-info') .'">Settings</a>';
|
89 |
+
$links[] = '<a href="https://www.webtoffee.com/product/gdpr-cookie-consent/" target="_blank">Go PRO</a>';
|
90 |
return $links;
|
91 |
}
|
92 |
|
php/custom-post-types.php
CHANGED
@@ -23,6 +23,7 @@
|
|
23 |
function cookielawinfo_register_custom_post_type() {
|
24 |
$labels = array(
|
25 |
'name' => _x('Cookie Law Info', 'post type general name'),
|
|
|
26 |
'singular_name' => _x('Cookie', 'post type singular name'),
|
27 |
'add_new' => _x('Add New', 'cookie type'),
|
28 |
'add_new_item' => __('Add New Cookie Type'),
|
23 |
function cookielawinfo_register_custom_post_type() {
|
24 |
$labels = array(
|
25 |
'name' => _x('Cookie Law Info', 'post type general name'),
|
26 |
+
'all_items' => __('Cookie List'),
|
27 |
'singular_name' => _x('Cookie', 'post type singular name'),
|
28 |
'add_new' => _x('Add New', 'cookie type'),
|
29 |
'add_new_item' => __('Add New Cookie Type'),
|
php/functions.php
CHANGED
@@ -326,4 +326,40 @@ function cookielawinfo_debug_admin_settings( $break ) {
|
|
326 |
return $ret;
|
327 |
}
|
328 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
329 |
?>
|
326 |
return $ret;
|
327 |
}
|
328 |
|
329 |
+
|
330 |
+
/* Print scripts or data in the head tag on the front end. */
|
331 |
+
add_action('wp_head', 'include_admin_hdrscript_addedin_cookielawinfo');
|
332 |
+
function include_admin_hdrscript_addedin_cookielawinfo(){
|
333 |
+
|
334 |
+
$third_party_cookie_options = get_option('cookielawinfo_thirdparty_settings');
|
335 |
+
if(!is_admin())
|
336 |
+
{
|
337 |
+
|
338 |
+
if(!empty($third_party_cookie_options)){
|
339 |
+
if($third_party_cookie_options['thirdparty_on_field'] == 'true' && $_COOKIE['viewed_cookie_policy'] == 'yes'){
|
340 |
+
echo $third_party_cookie_options['thirdparty_head_section'];
|
341 |
+
}
|
342 |
+
|
343 |
+
}
|
344 |
+
|
345 |
+
}
|
346 |
+
}
|
347 |
+
|
348 |
+
/* Prints scripts or data before the closing body tag on the front end */
|
349 |
+
add_action('wp_footer', 'include_admin_bodyscript_addedin_cookielawinfo');
|
350 |
+
function include_admin_bodyscript_addedin_cookielawinfo(){
|
351 |
+
|
352 |
+
$third_party_cookie_options = get_option('cookielawinfo_thirdparty_settings');
|
353 |
+
if(!is_admin())
|
354 |
+
{
|
355 |
+
if(!empty($third_party_cookie_options)){
|
356 |
+
if($third_party_cookie_options['thirdparty_on_field'] == 'true' && $_COOKIE['viewed_cookie_policy'] == 'yes'){
|
357 |
+
echo $third_party_cookie_options['thirdparty_body_section'];
|
358 |
+
}
|
359 |
+
|
360 |
+
}
|
361 |
+
|
362 |
+
}
|
363 |
+
}
|
364 |
+
|
365 |
?>
|
php/shortcodes.php
CHANGED
@@ -127,18 +127,47 @@ function cookielawinfo_shortcode_accept_button( $atts ) {
|
|
127 |
|
128 |
/** Returns HTML for a standard (green, medium sized) 'Accept' button */
|
129 |
function cookielawinfo_shortcode_reject_button( $atts ) {
|
130 |
-
extract( shortcode_atts( array(
|
131 |
-
'colour' => 'green'
|
132 |
-
), $atts ) );
|
133 |
-
|
134 |
-
// Fixing button translate text bug
|
135 |
-
// 18/05/2015 by RA
|
136 |
-
$defaults = array(
|
137 |
-
'button_3_text' => 'Reject'
|
138 |
-
);
|
139 |
-
|
140 |
-
|
141 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
142 |
}
|
143 |
|
144 |
|
127 |
|
128 |
/** Returns HTML for a standard (green, medium sized) 'Accept' button */
|
129 |
function cookielawinfo_shortcode_reject_button( $atts ) {
|
130 |
+
// extract( shortcode_atts( array(
|
131 |
+
// 'colour' => 'green'
|
132 |
+
// ), $atts ) );
|
133 |
+
//
|
134 |
+
// // Fixing button translate text bug
|
135 |
+
// // 18/05/2015 by RA
|
136 |
+
// $defaults = array(
|
137 |
+
// 'button_3_text' => 'Reject'
|
138 |
+
// );
|
139 |
+
//
|
140 |
+
// $settings = wp_parse_args( cookielawinfo_get_admin_settings(), $defaults );
|
141 |
+
// return '<a href="#" id="cookie_action_close_header_reject" class="medium cli-plugin-button ' . $colour . '">' . stripslashes( $settings['button_3_text'] ) . '</a>';
|
142 |
+
|
143 |
+
$defaults = array(
|
144 |
+
'button_3_text' => 'Reject',
|
145 |
+
'button_3_url' => '#',
|
146 |
+
'button_3_action' => '#cookie_action_close_header_reject',
|
147 |
+
'button_3_link_colour' => '#fff',
|
148 |
+
'button_3_new_win' => false,
|
149 |
+
'button_3_as_button' => true,
|
150 |
+
'button_3_button_colour' => '#000',
|
151 |
+
'button_3_button_size' => 'medium',
|
152 |
+
);
|
153 |
+
$settings = wp_parse_args( cookielawinfo_get_admin_settings(), $defaults );
|
154 |
+
|
155 |
+
$classr = '';
|
156 |
+
if ( $settings['button_3_as_button'] ) {
|
157 |
+
$classr .= ' class="' . $settings['button_3_button_size'] . ' cli-plugin-button cli-plugin-main-button"';
|
158 |
+
}
|
159 |
+
else {
|
160 |
+
$classr .= ' class="cli-plugin-main-button" ' ;
|
161 |
+
}
|
162 |
+
|
163 |
+
$url_reject = ( $settings['button_3_action'] == "CONSTANT_OPEN_URL" ) ? $settings['button_3_url'] : "#";
|
164 |
+
|
165 |
+
$link_tag = '';
|
166 |
+
$link_tag .= '<a href="' . $url_reject . '" id="' . cookielawinfo_remove_hash ( $settings['button_3_action'] ) . '" ';
|
167 |
+
$link_tag .= ( $settings['button_3_new_win'] ) ? 'target="_blank" ' : '' ;
|
168 |
+
$link_tag .= $classr . ' >' . stripslashes( $settings['button_3_text'] ) . '</a>';
|
169 |
+
return $link_tag;
|
170 |
+
|
171 |
}
|
172 |
|
173 |
|
readme.txt
CHANGED
@@ -1,18 +1,18 @@
|
|
1 |
-
=== Cookie
|
2 |
-
Contributors: markwt
|
3 |
-
Donate link:
|
4 |
-
Tags: eu cookie law, GDPR, cookie law, eu privacy directive, privacy directive, cookies, privacy, compliance
|
5 |
Requires at least: 3.3.1
|
6 |
Tested up to: 4.9.6
|
7 |
-
Stable tag: 1.5.
|
8 |
License: GPLv2
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
11 |
-
A simple way to
|
12 |
|
13 |
== Description ==
|
14 |
|
15 |
-
NOTE: INSTALLING THIS PLUGIN ALONE
|
16 |
|
17 |
Our plugin will help you to become GDPR compliant with following features.
|
18 |
|
@@ -36,11 +36,6 @@ It also has a Cookie Audit module so you can easily show what cookies your site
|
|
36 |
This plugin supports WPML and qTranslate so your translation needs are covered.
|
37 |
|
38 |
|
39 |
-
Inline with official ICO guidelines and current industry best practice, this plugin uses 'implied consent' to aid you in showing your compliance status. This is a deliberate design choice that does not proactively block cookies: it doesn't make your visitors take action before they can use your website, and will not interfere with blog comments and [Google] Analytics. This approach is aimed at reducing website visitor dropout and maintaining your vital analytics data.
|
40 |
-
|
41 |
-
For a demo, [check out the EU Cookie Law website](http://cookielawinfo.com/ "Demo the EU Cookie Law plugin"), including the table of cookies on the Privacy Policy page.
|
42 |
-
|
43 |
-
|
44 |
Features:
|
45 |
|
46 |
* Fully customisable to look just like your own website's style: customise the colours, styles and fonts
|
@@ -55,6 +50,27 @@ Features:
|
|
55 |
|
56 |
[Read more about the EU Cookie Law](http://cookielawinfo.com/ "More information about the EU Cookie Law")
|
57 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
|
59 |
== Installation ==
|
60 |
|
@@ -123,17 +139,17 @@ This plugin will:
|
|
123 |
3. Neatly display a list of these cookies (via a shortcode). You can put this list on your Privacy & Cookie Policy page, for example.
|
124 |
|
125 |
= Does this plugin block all cookies? =
|
126 |
-
No
|
127 |
-
A more realistic approach for WordPress website owners is to
|
128 |
|
129 |
|
130 |
= Do visitors now have to accept/refuse cookies in order to use websites? =
|
131 |
-
|
132 |
|
133 |
= Does this plugin stop cookies from being stored? =
|
134 |
-
|
135 |
|
136 |
-
|
137 |
|
138 |
= Does this plugin guarantee that I comply with this law? =
|
139 |
No.
|
@@ -150,6 +166,9 @@ See http://cookielawinfo.com for more information on what is required.
|
|
150 |
|
151 |
== Changelog ==
|
152 |
|
|
|
|
|
|
|
153 |
= 1.5.4 =
|
154 |
* Tested OK with WordPress 4.9.5
|
155 |
* GDPR compliance updates.
|
@@ -238,6 +257,5 @@ See http://cookielawinfo.com for more information on what is required.
|
|
238 |
|
239 |
== Upgrade Notice ==
|
240 |
|
241 |
-
= 1.5.
|
242 |
-
* Tested OK with WordPress 4.9.6
|
243 |
* GDPR compliance updates.
|
1 |
+
=== GDPR Cookie Consent ===
|
2 |
+
Contributors: webtoffee,markwt
|
3 |
+
Donate link:
|
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: 4.9.6
|
7 |
+
Stable tag: 1.5.5
|
8 |
License: GPLv2
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
11 |
+
A simple way to get GDPR Cookie Consent as per EU GDPR/Cookie Law regulations. Style it to match your own website.
|
12 |
|
13 |
== Description ==
|
14 |
|
15 |
+
NOTE: INSTALLING THIS PLUGIN ALONE DOES NOT MAKE YOUR SITE GDPR COMPLIANT. SINCE EACH SITE USES DIFFERENT COOKIES, YOU MAY NEED TO ENSURE YOU HAVE NECESSARY CONFIGURATIONS IN PLACE.
|
16 |
|
17 |
Our plugin will help you to become GDPR compliant with following features.
|
18 |
|
36 |
This plugin supports WPML and qTranslate so your translation needs are covered.
|
37 |
|
38 |
|
|
|
|
|
|
|
|
|
|
|
39 |
Features:
|
40 |
|
41 |
* Fully customisable to look just like your own website's style: customise the colours, styles and fonts
|
50 |
|
51 |
[Read more about the EU Cookie Law](http://cookielawinfo.com/ "More information about the EU Cookie Law")
|
52 |
|
53 |
+
<blockquote>
|
54 |
+
|
55 |
+
= GDPR Cookie Consent Premium Version Features =
|
56 |
+
<ul>
|
57 |
+
<li>Manage list of cookies ( Name, CookieID, Description, Duration, Type, Category, Header Script, Footer Script)</li>
|
58 |
+
<li>Manage Cookie Categories</li>
|
59 |
+
<li>Allow to display Cookie Settings popup where site visitors can opt-in or give consent to Cookie Categories</li>
|
60 |
+
<li>Fully customisable to look just like your own website’s style: customise the colours, styles and fonts</li>
|
61 |
+
<li>Put the cookie bar in either the header or the footer</li>
|
62 |
+
<li>(Optional) accept cookie policy if the user scrolls</li>
|
63 |
+
<li>(Optional) automatically close the cookie bar after a delay (delay is configurable)</li>
|
64 |
+
<li>(Optional) cookie bar can be permanently dismissed or accessible through a “show again” tab</li>
|
65 |
+
<li>(Optional) “show again” tab is fully customisable including position shown on page and styles</li>
|
66 |
+
<li>“Cookie Audit” shortcode to construct a nicely-styled ‘Privacy & Cookie Policy’</li>
|
67 |
+
<li>WPML compatible</li>
|
68 |
+
<li>qTranslate support</li>
|
69 |
+
</ul>
|
70 |
+
|
71 |
+
For complete list of features and details, Please visit <a rel="nofollow" href="https://www.webtoffee.com/product/gdpr-cookie-consent/">GDPR Cookie Consent Premium Plugin</a> for more details
|
72 |
+
|
73 |
+
</blockquote>
|
74 |
|
75 |
== Installation ==
|
76 |
|
139 |
3. Neatly display a list of these cookies (via a shortcode). You can put this list on your Privacy & Cookie Policy page, for example.
|
140 |
|
141 |
= Does this plugin block all cookies? =
|
142 |
+
No. This plugin restricts cookies by optionally loading the scripts. For this you have to add all cookies using the add cookie feature. It is not currently technically possible to completely block all cookies on your WordPress website without first updating all plugins that use cookies in some way. That is beyond the scope of any single plugin.
|
143 |
+
A more realistic approach for WordPress website owners is to move the scripts that place cookies( for eg Google Analytics tracking code) to the GDPR Cookie Consent plugin and then allow visitors to control it by giving consent.
|
144 |
|
145 |
|
146 |
= Do visitors now have to accept/refuse cookies in order to use websites? =
|
147 |
+
No. Only the 'necessary' cookies will be loaded till the user gives consent.
|
148 |
|
149 |
= Does this plugin stop cookies from being stored? =
|
150 |
+
We provide you the facility to add cookies and the corresponding scripts (This works if the cookies are placed when a script is added to the site header or footer as in the case of Google analytics, Hotjar etc..). In our premium version, visitors can reject the category of cookies they don't want to get installed. In such cases all cookies in that category will be blocked for the user. In the free version you can still block the scripts but doesn't have category level granularity.
|
151 |
|
152 |
+
But if another plugin adds scripts or places a cookie then we do not have any control. We have no way of knowing what plugins you use or how they work, so blocking/deleting cookies on a WordPress website/blog would possibly/probably break your site. Larger websites with huge budgets may well invest in such technology, but this plugin aims to help you provide a certain level of compliance without taking drastic action.
|
153 |
|
154 |
= Does this plugin guarantee that I comply with this law? =
|
155 |
No.
|
166 |
|
167 |
== Changelog ==
|
168 |
|
169 |
+
= 1.5.5 =
|
170 |
+
* GDPR compliance updates.
|
171 |
+
|
172 |
= 1.5.4 =
|
173 |
* Tested OK with WordPress 4.9.5
|
174 |
* GDPR compliance updates.
|
257 |
|
258 |
== Upgrade Notice ==
|
259 |
|
260 |
+
= 1.5.5 =
|
|
|
261 |
* GDPR compliance updates.
|