PluginProbe ʕ •ᴥ•ʔ
Cookiebot by Usercentrics – Automatic Cookie Banner for GDPR/CCPA & Google Consent Mode / 4.1.1
Cookiebot by Usercentrics – Automatic Cookie Banner for GDPR/CCPA & Google Consent Mode v4.1.1
4.7.2 4.7.1 trunk 2.3.0 2.4.0 2.4.1 2.4.2 2.5.0 3.0.0 3.0.1 3.1.0 3.10.0 3.10.1 3.11.1 3.11.2 3.11.3 3.2.0 3.3.0 3.3.1 3.4.0 3.4.1 3.4.2 3.5.0 3.6.0 3.6.1 3.6.2 3.6.5 3.6.6 3.7.0 3.7.1 3.8.0 3.9.0 4.0.0 4.0.1 4.0.2 4.0.3 4.1.0 4.1.1 4.2.0 4.2.1 4.2.10 4.2.11 4.2.12 4.2.13 4.2.14 4.2.2 4.2.3 4.2.4 4.2.5 4.2.6 4.2.7 4.2.8 4.2.9 4.3.0 4.3.1 4.3.10 4.3.11 4.3.12 4.3.2 4.3.3 4.3.4 4.3.5 4.3.6 4.3.7 4.3.7.1 4.3.8 4.3.9 4.3.9.1 4.4.0 4.4.1 4.4.2 4.5.0 4.5.1 4.5.10 4.5.11 4.5.2 4.5.3 4.5.4 4.5.5 4.5.6 4.5.7 4.5.8 4.5.9 4.6.0 4.6.1 4.6.2 4.6.3 4.6.4 4.6.5 4.6.6 4.6.7 4.7.0
cookiebot / src / view / admin / settings / settings-page.php
cookiebot / src / view / admin / settings Last commit date
prior-consent 4 years ago debug-page.php 4 years ago gtm-page.php 4 years ago iab-page.php 4 years ago legislations-page.php 4 years ago network-settings-page.php 4 years ago settings-page.php 4 years ago support-page.php 4 years ago
settings-page.php
604 lines
1 <?php
2
3
4 /**
5 * @var string $cbid
6 * @var bool $is_ms
7 * @var string $network_cbid
8 * @var string $network_scrip_tag_uc_attr
9 * @var string $network_scrip_tag_cd_attr
10 * @var string $cookiebot_gdpr_url
11 * @var string $cookiebot_logo
12 * @var array $supported_languages
13 * @var string $current_lang
14 * @var bool $is_wp_consent_api_active
15 * @var array $m_default
16 * @var array $m
17 * @var string $cookie_blocking_mode
18 * @var string $add_language_gif_url
19 */
20 ?>
21 <div class="wrap">
22 <h1><?php esc_html_e( 'Cookiebot Settings', 'cookiebot' ); ?></h1>
23 <a href="https://www.cookiebot.com">
24 <img
25 src="<?php echo esc_url( $cookiebot_logo ); ?>"
26 alt="Cookiebot logo"
27 style="float:right;margin-left:1em;">
28 </a>
29 <p>
30 <?php
31 printf(
32 /* translators: %1$s: GDPR URL; %2$s: extra information about the requirements */
33 esc_html__(
34 'Cookiebot enables your website to comply with current legislation in the EU on the use of cookies for user tracking and profiling. The EU ePrivacy Directive requires prior, informed consent of your site users, while the %1$s %2$s.',
35 'cookiebot'
36 ),
37 sprintf(
38 '<a href="%s" target="_blank">%s</a>',
39 esc_url( $cookiebot_gdpr_url ),
40 esc_html__( 'General Data Protection Regulation (GDPR)', 'cookiebot' )
41 ),
42 esc_html__(
43 ' requires you to document each consent. At the same time you must be able to account for what user data you share with embedded third-party services on your website and where in the world the user data is sent.',
44 'cookiebot'
45 )
46 );
47 ?>
48 </p>
49 <form method="post" action="options.php">
50 <?php settings_fields( 'cookiebot' ); ?>
51 <?php do_settings_sections( 'cookiebot' ); ?>
52 <table class="form-table">
53 <tr>
54 <th scope="row"><?php esc_html_e( 'Cookiebot ID', 'cookiebot' ); ?></th>
55 <td>
56 <input <?php echo ( $is_ms ) ? ' placeholder="' . esc_attr( $network_cbid ) . '"' : ''; ?>
57 type="text" name="cookiebot-cbid"
58 value="<?php echo esc_attr( $cbid ); ?>"
59 style="width:300px"
60 />
61 <p class="description">
62 <?php esc_html_e( 'Need an ID?', 'cookiebot' ); ?>
63 <a href="https://www.cookiebot.com/goto/signup" target="_blank">
64 <?php
65 esc_html_e(
66 'Sign up for free on cookiebot.com',
67 'cookiebot'
68 );
69 ?>
70 </a>
71 </p>
72 </td>
73 </tr>
74 <tr>
75 <th scope="row">
76 <?php esc_html_e( 'Cookie-blocking mode', 'cookiebot' ); ?>
77 </th>
78 <td>
79 <label>
80 <input <?php checked( 'auto', $cookie_blocking_mode ); ?>
81 type="radio"
82 name="cookiebot-cookie-blocking-mode"
83 value="auto"
84 />
85 <?php esc_html_e( 'Automatic', 'cookiebot' ); ?>
86 </label>
87 &nbsp; &nbsp;
88 <label>
89 <input <?php checked( 'manual', $cookie_blocking_mode ); ?>
90 type="radio"
91 name="cookiebot-cookie-blocking-mode"
92 value="manual"
93 />
94 <?php esc_html_e( 'Manual', 'cookiebot' ); ?>
95 </label>
96 <p class="description">
97 <?php esc_html_e( 'Automatic block cookies (except necessary) until the user has given their consent.', 'cookiebot' ); ?>
98 <a
99 href="https://support.cookiebot.com/hc/en-us/articles/360009063100-Automatic-Cookie-Blocking-How-does-it-work-"
100 target="_blank">
101 <?php esc_html_e( 'Learn more', 'cookiebot' ); ?>
102 </a>
103 </p>
104 </td>
105 </tr>
106 <tr>
107 <th scope="row"><?php esc_html_e( 'Cookiebot Language', 'cookiebot' ); ?></th>
108 <td>
109 <div>
110 <select name="cookiebot-language" id="cookiebot-language">
111 <option value=""><?php esc_html_e( 'Default (Autodetect)', 'cookiebot' ); ?></option>
112 <option value="_wp"<?php echo ( $current_lang === '_wp' ) ? ' selected' : ''; ?>>
113 <?php
114 esc_html_e(
115 'Use WordPress Language',
116 'cookiebot'
117 );
118 ?>
119 </option>
120 <?php
121 foreach ( $supported_languages as $lang_code => $lang_name ) {
122 echo '<option value="' . esc_attr( $lang_code ) . '"' . ( ( $current_lang === esc_attr( $lang_code ) ) ? ' selected' : '' ) . '>' . esc_html( $lang_name ) . '</option>';
123 }
124 ?>
125 </select>
126 </div>
127 <div
128 class="notice inline notice-warning notice-alt cookiebot-notice"
129 style="padding:12px;font-size:13px;display:inline-block;">
130 <div
131 style="<?php echo ( $current_lang === '' ) ? 'display:none;' : ''; ?>"
132 id="info_lang_specified">
133 <?php esc_html_e( 'You need to add the language in the Cookiebot administration tool.', 'cookiebot' ); ?>
134 </div>
135 <div
136 style="<?php echo ( $current_lang === '' ) ? '' : 'display:none;'; ?>"
137 id="info_lang_autodetect">
138 <?php
139 esc_html_e(
140 'You need to add all languages that you want auto-detected in the Cookiebot administration tool.',
141 'cookiebot'
142 );
143 ?>
144 <br/>
145 <?php
146 esc_html_e(
147 'The auto-detect checkbox needs to be enabled in the Cookiebot administration tool.',
148 'cookiebot'
149 );
150 ?>
151 <br/>
152 <?php
153 esc_html_e(
154 'If the auto-detected language is not supported, Cookiebot will use the default language.',
155 'cookiebot'
156 );
157 ?>
158 </div>
159 <br>
160
161 <a
162 href="#"
163 id="show_add_language_guide">
164 <?php esc_html_e( 'Show guide to add languages', 'cookiebot' ); ?>
165 </a>
166 &nbsp;
167 <a
168 href="https://support.cookiebot.com/hc/en-us/articles/360003793394-How-do-I-set-the-language-of-the-consent-banner-dialog-"
169 target="_blank">
170 <?php esc_html_e( 'Read more here', 'cookiebot' ); ?>
171 </a>
172
173 <div id="add_language_guide" style="display:none;">
174 <img
175 src="<?php echo esc_attr( $add_language_gif_url ); ?>"
176 alt="Add language in Cookiebot administration tool"/>
177 <br/>
178 <a
179 href="#"
180 id="hide_add_language_guide">
181 <?php esc_html_e( 'Hide guide', 'cookiebot' ); ?>
182 </a>
183 </div>
184 </div>
185 </td>
186 </tr>
187 </table>
188 <h3 id="advanced_settings_link"
189 class="cookiebot_fieldset_header"><?php esc_html_e( 'Advanced settings', 'cookiebot' ); ?></h3>
190 <div id="advanced_settings" style="display:none;">
191 <table class="form-table">
192 <tr id="cookiebot-setting-async">
193 <th scope="row">
194 <?php esc_html_e( 'Add async or defer attribute', 'cookiebot' ); ?>
195 <br/><?php esc_html_e( 'Consent banner script tag', 'cookiebot' ); ?>
196 </th>
197 <td>
198 <?php
199 $cv = get_option( 'cookiebot-script-tag-uc-attribute', 'async' );
200 $disabled = false;
201 if ( $is_ms && $network_scrip_tag_uc_attr !== 'custom' ) {
202 $disabled = true;
203 $cv = $network_scrip_tag_uc_attr;
204 }
205 ?>
206 <label>
207 <input
208 type="radio"
209 name="cookiebot-script-tag-uc-attribute"<?php echo ( $disabled ) ? ' disabled' : ''; ?>
210 value="" <?php checked( '', $cv ); ?> />
211 <i><?php esc_html_e( 'None', 'cookiebot' ); ?></i>
212 </label>
213 &nbsp; &nbsp;
214 <label>
215 <input
216 type="radio"
217 name="cookiebot-script-tag-uc-attribute"<?php echo ( $disabled ) ? ' disabled' : ''; ?>
218 value="async" <?php checked( 'async', $cv ); ?> />
219 async
220 </label>
221 &nbsp; &nbsp;
222 <label>
223 <input
224 type="radio"
225 name="cookiebot-script-tag-uc-attribute"<?php echo ( $disabled ) ? ' disabled' : ''; ?>
226 value="defer" <?php checked( 'defer', $cv ); ?> />
227 defer
228 </label>
229 <p class="description">
230 <?php
231 if ( $disabled ) {
232 echo '<b>' . esc_html__(
233 'Network setting applied. Please contact website administrator to change this setting.',
234 'cookiebot'
235 ) . '</b><br />';
236 }
237 ?>
238 <?php esc_html_e( 'Add async or defer attribute to Cookiebot script tag. Default: async', 'cookiebot' ); ?>
239 </p>
240 </td>
241 </tr>
242 <tr>
243 <th scope="row">
244 <?php esc_html_e( 'Add async or defer attribute', 'cookiebot' ); ?>
245 <br/><?php esc_html_e( 'Cookie declaration script tag', 'cookiebot' ); ?>
246 </th>
247 <td>
248 <?php
249 $cv = get_option( 'cookiebot-script-tag-cd-attribute', 'async' );
250 $disabled = false;
251 if ( $is_ms && $network_scrip_tag_cd_attr !== 'custom' ) {
252 $disabled = true;
253 $cv = $network_scrip_tag_cd_attr;
254 }
255 ?>
256 <label>
257 <input
258 type="radio"
259 name="cookiebot-script-tag-cd-attribute"<?php echo ( $disabled ) ? ' disabled' : ''; ?>
260 value="" <?php checked( '', $cv ); ?>/>
261 <i><?php esc_html_e( 'None', 'cookiebot' ); ?></i>
262 </label>
263 &nbsp; &nbsp;
264 <label>
265 <input
266 type="radio"
267 name="cookiebot-script-tag-cd-attribute"<?php echo ( $disabled ) ? ' disabled' : ''; ?>
268 value="async" <?php checked( 'async', $cv ); ?>/>
269 async
270 </label>
271 &nbsp; &nbsp;
272 <label>
273 <input
274 type="radio"
275 name="cookiebot-script-tag-cd-attribute"<?php echo ( $disabled ) ? ' disabled' : ''; ?>
276 value="defer" <?php checked( 'defer', $cv ); ?>/>
277 defer
278 </label>
279 <p class="description">
280 <?php
281 if ( $disabled ) {
282 echo '<b>' . esc_html__(
283 'Network setting applied. Please contact website administrator to change this setting.',
284 'cookiebot'
285 ) . '</b><br />';
286 }
287 ?>
288 <?php esc_html_e( 'Add async or defer attribute to Cookiebot script tag. Default: async', 'cookiebot' ); ?>
289 </p>
290 </td>
291 </tr>
292 <?php
293 if ( ! is_multisite() ) {
294 ?>
295 <tr>
296 <th scope="row"><?php esc_html_e( 'Auto-update Cookiebot', 'cookiebot' ); ?></th>
297 <td>
298 <input type="checkbox" name="cookiebot-autoupdate" value="1"
299 <?php
300 checked(
301 1,
302 get_option( 'cookiebot-autoupdate', false )
303 );
304 ?>
305 />
306 <p class="description">
307 <?php esc_html_e( 'Automatic update your Cookiebot plugin when new releases becomes available.', 'cookiebot' ); ?>
308 </p>
309 </td>
310 </tr>
311 <?php
312 }
313 ?>
314 <tr id="cookiebot-setting-hide-popup">
315 <th scope="row"><?php esc_html_e( 'Hide Cookie Popup', 'cookiebot' ); ?></th>
316 <td>
317 <?php
318 $disabled = false;
319 if ( $is_ms && get_site_option( 'cookiebot-nooutput' ) ) {
320 $disabled = true;
321 echo '<input type="checkbox" checked disabled />';
322 } else {
323 ?>
324 <input type="checkbox" name="cookiebot-nooutput" value="1"
325 <?php
326 checked(
327 1,
328 get_option( 'cookiebot-nooutput', false )
329 );
330 ?>
331 />
332 <?php
333 }
334 ?>
335 <p class="description">
336 <?php
337 if ( $disabled ) {
338 echo '<b>' . esc_html__(
339 'Network setting applied. Please contact website administrator to change this setting.',
340 'cookiebot'
341 ) . '</b><br />';
342 }
343 ?>
344 <b>
345 <?php
346 esc_html_e(
347 'This checkbox will remove the cookie consent banner from your website. The <i>[cookie_declaration]</i> shortcode will still be available.',
348 'cookiebot'
349 );
350 ?>
351 </b><br/>
352 <?php
353 esc_html_e(
354 'If you are using Google Tag Manager (or equal), you need to add the Cookiebot script in your Tag Manager.',
355 'cookiebot'
356 );
357 ?>
358 <br/>
359 <a
360 href="https://support.cookiebot.com/hc/en-us/articles/360003793854-Google-Tag-Manager-deployment"
361 target="_blank">
362 <?php esc_html_e( 'See a detailed guide here', 'cookiebot' ); ?>
363 </a>
364 </p>
365 </td>
366 </tr>
367 <tr>
368 <th scope="row"><?php esc_html_e( 'Disable Cookiebot in WP Admin', 'cookiebot' ); ?></th>
369 <td>
370 <?php
371 $disabled = false;
372 if ( $is_ms && get_site_option( 'cookiebot-nooutput-admin' ) ) {
373 echo '<input type="checkbox" checked disabled />';
374 $disabled = true;
375 } else {
376 ?>
377 <input type="checkbox" name="cookiebot-nooutput-admin" value="1"
378 <?php
379 checked(
380 1,
381 get_option( 'cookiebot-nooutput-admin', false )
382 );
383 ?>
384 />
385 <?php
386 }
387 ?>
388 <p class="description">
389 <?php
390 if ( $disabled ) {
391 echo '<b>' . esc_html__( 'Network setting applied. Please contact website administrator to change this setting.', 'cookiebot' ) . '</b><br />';
392 }
393 ?>
394 <b><?php esc_html_e( 'This checkbox will disable Cookiebot in the WordPress Admin area.', 'cookiebot' ); ?></b>
395 </p>
396 </td>
397 </tr>
398 <tr>
399 <th scope="row"><?php esc_html_e( 'Enable Cookiebot on front end while logged in', 'cookiebot' ); ?></th>
400 <td>
401 <?php
402 $disabled = false;
403 if ( $is_ms && get_site_option( 'cookiebot-output-logged-in' ) ) {
404 echo '<input type="checkbox" checked disabled />';
405 $disabled = true;
406 } else {
407 ?>
408 <input type="checkbox" name="cookiebot-output-logged-in" value="1"
409 <?php
410 checked(
411 1,
412 get_option( 'cookiebot-output-logged-in', false )
413 );
414 ?>
415 />
416 <?php
417 }
418 ?>
419 <p class="description">
420 <?php
421 if ( $disabled ) {
422 echo '<b>' . esc_html__( 'Network setting applied. Please contact website administrator to change this setting.', 'cookiebot' ) . '</b><br />';
423 }
424 ?>
425 <b><?php esc_html_e( 'This checkbox will enable Cookiebot on front end while you\'re logged in', 'cookiebot' ); ?></b>
426 </p>
427 </td>
428 </tr>
429 <tr>
430 <th scope="row"><?php esc_html_e( 'Ignore enqueued scripts from cookiebot scan', 'cookiebot' ); ?></th>
431 <td>
432 <textarea
433 name="cookiebot-ignore-scripts"
434 rows="4"
435 cols="50"
436 placeholder="<?php esc_attr_e( 'add script source URL, one per line', 'cookiebot' ); ?>"
437 ><?php echo esc_html( get_option( 'cookiebot-ignore-scripts', false ) ); ?></textarea>
438 <br/>
439 <span>
440 <?php esc_html_e( 'List enqueued scripts source URL (one per line) to ignore cookiebot scan. Partial source URL will also work. Ex. wp-content/plugins/woocommerce will block every WooCommerce scripts.', 'cookiebot' ); ?>
441 <br>
442 <?php esc_html_e( 'This feature works only for scripts loaded via wp_enqueue_script! Manually added scripts must be manually edited!', 'cookiebot' ); ?>
443 </span>
444 </td>
445 </tr>
446 </table>
447 </div>
448 <?php if ( $is_wp_consent_api_active ) { ?>
449 <h3 id="consent_level_api_settings" class="cookiebot_fieldset_header">
450 <?php
451 esc_html_e(
452 'Consent Level API Settings',
453 'cookiebot'
454 );
455 ?>
456 </h3>
457 <div id="consent_level_api_settings" style="display:none;">
458 <p>
459 <?php
460 esc_html_e(
461 'WP Consent Level API and Cookiebot categorise cookies a bit different. The default settings should fit mosts needs - but if you need to change the mapping you are able to do it below.',
462 'cookiebot'
463 );
464 ?>
465 </p>
466
467 <?php
468 $consent_types = array( 'preferences', 'statistics', 'marketing' );
469 $states = array_reduce(
470 $consent_types,
471 function ( $t, $v ) {
472 $newt = array();
473 if ( empty( $t ) ) {
474 $newt = array(
475 array( $v => true ),
476 array( $v => false ),
477 );
478 } else {
479 foreach ( $t as $item ) {
480 $newt[] = array_merge( $item, array( $v => true ) );
481 $newt[] = array_merge( $item, array( $v => false ) );
482 }
483 }
484
485 return $newt;
486 },
487 array()
488 );
489
490 ?>
491
492
493 <table class="widefat striped consent_mapping_table">
494 <thead>
495 <tr>
496 <th><?php esc_html_e( 'Cookiebot categories', 'cookiebot' ); ?></th>
497 <th class="consent_mapping"><?php esc_html_e( 'WP Consent Level categories', 'cookiebot' ); ?></th>
498 </tr>
499 </thead>
500 <?php
501 foreach ( $states as $state ) {
502 $key = array();
503 $key[] = 'n=1';
504 $key[] = 'p=' . ( $state['preferences'] ? '1' : '0' );
505 $key[] = 's=' . ( $state['statistics'] ? '1' : '0' );
506 $key[] = 'm=' . ( $state['marketing'] ? '1' : '0' );
507 $key = implode( ';', $key );
508 ?>
509 <tr>
510 <td>
511 <div class="cb_consent">
512 <span class="forceconsent">
513 <?php esc_html_e( 'Necessary', 'cookiebot' ); ?>
514 </span>
515 <span class="<?php echo( $state['preferences'] ? 'consent' : 'noconsent' ); ?>">
516 <?php esc_html_e( 'Preferences', 'cookiebot' ); ?>
517 </span>
518 <span class="<?php echo( $state['statistics'] ? 'consent' : 'noconsent' ); ?>">
519 <?php esc_html_e( 'Statistics', 'cookiebot' ); ?>
520 </span>
521 <span class="<?php echo( $state['marketing'] ? 'consent' : 'noconsent' ); ?>">
522 <?php esc_html_e( 'Marketing', 'cookiebot' ); ?>
523 </span>
524 </div>
525 </td>
526 <td>
527 <div class="consent_mapping">
528 <label><input
529 type="checkbox"
530 name="cookiebot-consent-mapping[<?php echo esc_attr( $key ); ?>][functional]"
531 data-default-value="1" value="1" checked disabled
532 > <?php esc_html_e( 'Functional', 'cookiebot' ); ?> </label>
533 <label><input
534 type="checkbox"
535 name="cookiebot-consent-mapping[<?php echo esc_attr( $key ); ?>][preferences]"
536 data-default-value="<?php echo esc_attr( $m_default[ $key ]['preferences'] ); ?>"
537 value="1"
538 <?php
539 if ( $m[ $key ]['preferences'] ) {
540 echo 'checked';
541 }
542 ?>
543 > <?php esc_html_e( 'Preferences', 'cookiebot' ); ?> </label>
544 <label><input
545 type="checkbox"
546 name="cookiebot-consent-mapping[<?php echo esc_attr( $key ); ?>][statistics]"
547 data-default-value="<?php echo esc_attr( $m_default[ $key ]['statistics'] ); ?>"
548 value="1"
549 <?php
550 if ( $m[ $key ]['statistics'] ) {
551 echo 'checked';
552 }
553 ?>
554 > <?php esc_html_e( 'Statistics', 'cookiebot' ); ?> </label>
555 <label><input
556 type="checkbox"
557 name="cookiebot-consent-mapping[<?php echo esc_attr( $key ); ?>][statistics-anonymous]"
558 data-default-value="<?php echo esc_attr( $m_default[ $key ]['statistics-anonymous'] ); ?>"
559 value="1"
560 <?php
561 if ( $m[ $key ]['statistics-anonymous'] ) {
562 echo 'checked';
563 }
564 ?>
565 > <?php esc_html_e( 'Statistics Anonymous', 'cookiebot' ); ?>
566 </label>
567 <label><input
568 type="checkbox"
569 name="cookiebot-consent-mapping[<?php echo esc_attr( $key ); ?>][marketing]"
570 data-default-value="<?php echo esc_attr( $m_default[ $key ]['marketing'] ); ?>"
571 value="1"
572 <?php
573 if ( $m[ $key ]['marketing'] ) {
574 echo 'checked';
575 }
576 ?>
577 > <?php esc_html_e( 'Marketing', 'cookiebot' ); ?></label>
578 </div>
579 </td>
580 </tr>
581 <?php
582 }
583 ?>
584 <tfoot>
585 <tr>
586 <td colspan="2" style="text-align:right;">
587 <button class="button" onclick="return resetConsentMapping();">
588 <?php
589 esc_html_e(
590 'Reset to default mapping',
591 'cookiebot'
592 );
593 ?>
594 </button>
595 </td>
596 </tr>
597 </tfoot>
598 </table>
599 </div>
600 <?php } ?>
601 <?php submit_button(); ?>
602 </form>
603 </div>
604