Version Description
- Added: Polylang support for more_info setting
- Added: setting to opt out of tracking
- Updated: tracking class
Download this release
Release Info
Developer | Catapult_Themes |
Plugin | Cookie Consent |
Version | 2.3.3 |
Comparing to | |
See all releases |
Code changes from version 2.1.1 to 2.3.3
- admin/class-ctcc-admin.php +175 -58
- admin/class-ctcc-metafield.php +189 -0
- assets/css/style.css +14 -2
- assets/images/Thumbs.db +0 -0
- assets/images/dbpro-ad-view.png +0 -0
- assets/images/hero-3d-banner.jpg +0 -0
- assets/images/mode-3d-banner-cc.jpg +0 -0
- assets/images/mode-3d-banner.jpg +0 -0
- assets/images/sellastic-ad1.jpg +0 -0
- assets/images/shs-3d-banner.png +0 -0
- assets/images/superhero-ad1.png +0 -0
- assets/images/themes-ad1.jpg +0 -0
- assets/images/themes-ad1.png +0 -0
- assets/js/uk-cookie-consent-js.js +1 -0
- languages/uk-cookie-consent-it_IT.mo +0 -0
- languages/uk-cookie-consent-it_IT.po +453 -0
- public/class-ctcc-public.php +302 -230
- public/customizer.php +237 -237
- readme.txt +77 -17
- tracking/class-plugin-usage-tracker.php +842 -0
- trunk/admin/class-ctcc-admin.php +816 -0
- trunk/admin/class-ctcc-metafield.php +189 -0
- trunk/admin/index.php +1 -0
- trunk/assets/css/admin-style.css +41 -0
- trunk/assets/css/index.php +1 -0
- trunk/assets/css/style.css +169 -0
- trunk/assets/images/dbpro-ad-view.png +0 -0
- trunk/assets/images/index.php +1 -0
- trunk/assets/images/sellastic-ad1.jpg +0 -0
- trunk/assets/images/superhero-ad1.png +0 -0
- trunk/assets/images/themes-ad1.jpg +0 -0
- trunk/assets/images/themes-ad1.png +0 -0
- trunk/assets/index.php +1 -0
- trunk/assets/js/index.php +1 -0
- trunk/assets/js/uk-cookie-consent-js.js +42 -0
- trunk/index.php +1 -0
- trunk/languages/index.php +1 -0
- trunk/languages/uk-cookie-consent-en_GB.mo +0 -0
- trunk/languages/uk-cookie-consent-en_GB.po +410 -0
- trunk/languages/uk-cookie-consent-it_IT.mo +0 -0
- trunk/languages/uk-cookie-consent-it_IT.po +453 -0
- trunk/languages/uk-cookie-consent-pl_PL.mo +0 -0
- trunk/languages/uk-cookie-consent-pl_PL.po +672 -0
- trunk/languages/uk-cookie-consent-ru_RU.mo +0 -0
- trunk/languages/uk-cookie-consent-ru_RU.po +439 -0
- trunk/languages/uk-cookie-consent-sk_SK.mo +0 -0
- trunk/languages/uk-cookie-consent-sk_SK.po +436 -0
- trunk/languages/uk-cookie-consent.pot +408 -0
- trunk/public/class-ctcc-public.php +389 -0
- trunk/public/customizer.php +238 -0
- trunk/public/index.php +1 -0
- trunk/readme.txt +242 -0
- trunk/tracking/class-plugin-usage-tracker.php +842 -0
- trunk/uk-cookie-consent.php +99 -0
- trunk/wpml-config.xml +12 -0
- uk-cookie-consent.php +39 -5
- wpml-config.xml +12 -0
admin/class-ctcc-admin.php
CHANGED
@@ -32,6 +32,17 @@ if ( ! class_exists ( 'CTCC_Admin' ) ) {
|
|
32 |
add_action ( 'admin_enqueue_scripts', array ( $this, 'enqueue_scripts' ) );
|
33 |
add_action ( 'admin_footer', array ( $this, 'add_js' ) );
|
34 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
}
|
36 |
|
37 |
public function enqueue_scripts() {
|
@@ -84,6 +95,22 @@ if ( ! class_exists ( 'CTCC_Admin' ) ) {
|
|
84 |
'ctcc_options_section'
|
85 |
);
|
86 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
87 |
add_settings_field (
|
88 |
'duration',
|
89 |
__( 'Notification Duration', 'uk-cookie-consent' ),
|
@@ -92,6 +119,14 @@ if ( ! class_exists ( 'CTCC_Admin' ) ) {
|
|
92 |
'ctcc_options_section'
|
93 |
);
|
94 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
95 |
add_settings_field (
|
96 |
'cookie_expiry',
|
97 |
__( 'Cookie Expiry', 'uk-cookie-consent' ),
|
@@ -108,6 +143,14 @@ if ( ! class_exists ( 'CTCC_Admin' ) ) {
|
|
108 |
'ctcc_options_section'
|
109 |
);
|
110 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
111 |
// Set default options
|
112 |
$options = get_option ( 'ctcc_options_settings' );
|
113 |
if ( false === $options ) {
|
@@ -118,9 +161,25 @@ if ( ! class_exists ( 'CTCC_Admin' ) ) {
|
|
118 |
|
119 |
}
|
120 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
121 |
public function register_content_init() {
|
122 |
|
123 |
-
register_setting ( 'ctcc_content', 'ctcc_content_settings' );
|
124 |
|
125 |
add_settings_section (
|
126 |
'ctcc_content_section',
|
@@ -331,7 +390,10 @@ if ( ! class_exists ( 'CTCC_Admin' ) ) {
|
|
331 |
public function get_default_options_settings() {
|
332 |
$defaults = array (
|
333 |
'closure' => 'click',
|
|
|
334 |
'first_page' => 0,
|
|
|
|
|
335 |
'duration' => 60,
|
336 |
'cookie_expiry' => 30,
|
337 |
'cookie_version' => 1
|
@@ -418,38 +480,73 @@ if ( ! class_exists ( 'CTCC_Admin' ) ) {
|
|
418 |
public function closure_render() {
|
419 |
$options = get_option( 'ctcc_options_settings' ); ?>
|
420 |
<select name='ctcc_options_settings[closure]'>
|
421 |
-
<option value='click' <?php selected( $options['closure'], 'click' ); ?>><?php _e
|
422 |
-
<option value='
|
|
|
|
|
423 |
</select>
|
424 |
-
<p class="description"><?php _e
|
425 |
<?php
|
426 |
}
|
427 |
|
428 |
public function first_page_render() {
|
429 |
$options = get_option( 'ctcc_options_settings' ); ?>
|
430 |
-
<input type='checkbox'
|
431 |
-
<p class="description"><?php _e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
432 |
<?php
|
433 |
}
|
434 |
|
435 |
public function duration_render() {
|
436 |
$options = get_option( 'ctcc_options_settings' ); ?>
|
437 |
-
<input type="number" min="1" name="ctcc_options_settings[duration]" value="<?php echo $options['duration']; ?>">
|
438 |
-
<p class="description"><?php _e
|
439 |
<?php
|
440 |
}
|
441 |
|
442 |
public function cookie_expiry_render() {
|
443 |
$options = get_option( 'ctcc_options_settings' ); ?>
|
444 |
-
<input type="number" min="1" name="ctcc_options_settings[cookie_expiry]" value="<?php echo $options['cookie_expiry']; ?>">
|
445 |
-
<p class="description"><?php _e
|
446 |
<?php
|
447 |
}
|
448 |
|
449 |
public function cookie_version_render() {
|
450 |
$options = get_option( 'ctcc_options_settings' ); ?>
|
451 |
-
<input type="text" name="ctcc_options_settings[cookie_version]" value="<?php echo $options['cookie_version']; ?>">
|
452 |
-
<p class="description"><?php _e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
453 |
<?php
|
454 |
}
|
455 |
|
@@ -459,29 +556,29 @@ if ( ! class_exists ( 'CTCC_Admin' ) ) {
|
|
459 |
|
460 |
public function heading_text_render() {
|
461 |
$ctcc_content_settings = get_option( 'ctcc_content_settings' ); ?>
|
462 |
-
<input type="text" name="ctcc_content_settings[heading_text]" value="<?php echo $ctcc_content_settings['heading_text']; ?>">
|
463 |
-
<p class="description"><?php _e
|
464 |
<?php
|
465 |
}
|
466 |
|
467 |
public function notification_text_render() {
|
468 |
$ctcc_content_settings = get_option( 'ctcc_content_settings' ); ?>
|
469 |
-
<input type="text" name="ctcc_content_settings[notification_text]" value="<?php echo $ctcc_content_settings['notification_text']; ?>">
|
470 |
-
<p class="description"><?php _e
|
471 |
<?php
|
472 |
}
|
473 |
|
474 |
public function accept_text_render() {
|
475 |
$ctcc_content_settings = get_option( 'ctcc_content_settings' ); ?>
|
476 |
-
<input type="text" name="ctcc_content_settings[accept_text]" value="<?php echo $ctcc_content_settings['accept_text']; ?>">
|
477 |
-
<p class="description"><?php _e
|
478 |
<?php
|
479 |
}
|
480 |
|
481 |
public function more_info_text_render() {
|
482 |
$ctcc_content_settings = get_option( 'ctcc_content_settings' ); ?>
|
483 |
-
<input type="text" name="ctcc_content_settings[more_info_text]" value="<?php echo $ctcc_content_settings['more_info_text']; ?>">
|
484 |
-
<p class="description"><?php _e
|
485 |
<?php
|
486 |
}
|
487 |
|
@@ -497,24 +594,24 @@ if ( ! class_exists ( 'CTCC_Admin' ) ) {
|
|
497 |
<option value='<?php echo $page -> ID; ?>' <?php selected( $ctcc_content_settings['more_info_page'], $page -> ID ); ?>><?php echo $page -> post_title; ?></option>
|
498 |
<?php } ?>
|
499 |
</select>
|
500 |
-
<p class="description"><?php _e
|
501 |
<?php }
|
502 |
}
|
503 |
|
504 |
public function more_info_url_render() {
|
505 |
$ctcc_content_settings = get_option( 'ctcc_content_settings' ); ?>
|
506 |
-
<input type="url" name="ctcc_content_settings[more_info_url]" value="<?php echo $ctcc_content_settings['more_info_url']; ?>">
|
507 |
-
<p class="description"><?php _e
|
508 |
<?php
|
509 |
}
|
510 |
|
511 |
public function more_info_target_render() {
|
512 |
$ctcc_content_settings = get_option( 'ctcc_content_settings' ); ?>
|
513 |
<select name='ctcc_content_settings[more_info_target]'>
|
514 |
-
<option value='_blank' <?php selected( $ctcc_content_settings['more_info_target'], '_blank' ); ?>><?php _e
|
515 |
-
<option value='_self' <?php selected( $ctcc_content_settings['more_info_target'], '_self' ); ?>><?php _e
|
516 |
</select>
|
517 |
-
<p class="description"><?php _e
|
518 |
<?php
|
519 |
}
|
520 |
|
@@ -525,111 +622,126 @@ if ( ! class_exists ( 'CTCC_Admin' ) ) {
|
|
525 |
public function position_render() {
|
526 |
$options = get_option( 'ctcc_styles_settings' ); ?>
|
527 |
<select name='ctcc_styles_settings[position]'>
|
528 |
-
<option value='top-bar' <?php selected( $options['position'], 'top-bar' ); ?>><?php _e
|
529 |
-
<option value='bottom-bar' <?php selected( $options['position'], 'bottom-bar' ); ?>><?php _e
|
530 |
-
<option value='top-left-block' <?php selected( $options['position'], 'top-left-block' ); ?>><?php _e
|
531 |
-
<option value='top-right-block' <?php selected( $options['position'], 'top-right-block' ); ?>><?php _e
|
532 |
-
<option value='bottom-left-block' <?php selected( $options['position'], 'bottom-left-block' ); ?>><?php _e
|
533 |
-
<option value='bottom-right-block' <?php selected( $options['position'], 'bottom-right-block' ); ?>><?php _e
|
534 |
</select>
|
535 |
-
<p class="description"><?php _e
|
536 |
<?php
|
537 |
}
|
538 |
|
539 |
public function container_class_render() {
|
540 |
$options = get_option( 'ctcc_styles_settings' ); ?>
|
541 |
-
<input type="text" name="ctcc_styles_settings[container_class]" value="<?php echo $options['container_class']; ?>">
|
542 |
-
<p class="description"><?php _e
|
543 |
<?php
|
544 |
}
|
545 |
|
546 |
public function enqueue_styles_render() {
|
547 |
$options = get_option( 'ctcc_styles_settings' ); ?>
|
548 |
<input type='checkbox' name='ctcc_styles_settings[enqueue_styles]' <?php checked ( ! empty ( $options['enqueue_styles'] ), 1 ); ?> value='1'>
|
549 |
-
<p class="description"><?php _e
|
550 |
<?php
|
551 |
}
|
552 |
|
553 |
public function rounded_corners_render() {
|
554 |
$options = get_option( 'ctcc_styles_settings' ); ?>
|
555 |
<input type='checkbox' name='ctcc_styles_settings[rounded_corners]' <?php checked ( ! empty ( $options['rounded_corners'] ), 1 ); ?> value='1'>
|
556 |
-
<p class="description"><?php _e
|
557 |
<?php
|
558 |
}
|
559 |
|
560 |
public function drop_shadow_render() {
|
561 |
$options = get_option( 'ctcc_styles_settings' ); ?>
|
562 |
<input type='checkbox' name='ctcc_styles_settings[drop_shadow]' <?php checked ( ! empty ( $options['drop_shadow'] ), 1 ); ?> value='1'>
|
563 |
-
<p class="description"><?php _e
|
564 |
<?php
|
565 |
}
|
566 |
|
567 |
public function display_accept_with_text_render() {
|
568 |
$options = get_option( 'ctcc_styles_settings' ); ?>
|
569 |
<input type='checkbox' name='ctcc_styles_settings[display_accept_with_text]' <?php checked ( ! empty ( $options['display_accept_with_text'] ), 1 ); ?> value='1'>
|
570 |
-
<p class="description"><?php _e
|
571 |
<?php
|
572 |
}
|
573 |
|
574 |
public function x_close_render() {
|
575 |
$options = get_option( 'ctcc_styles_settings' ); ?>
|
576 |
<input type='checkbox' name='ctcc_styles_settings[x_close]' <?php checked ( ! empty ( $options['x_close'] ), 1 ); ?> value='1'>
|
577 |
-
<p class="description"><?php _e
|
578 |
<?php
|
579 |
}
|
580 |
|
581 |
public function text_color_render() {
|
582 |
$options = get_option( 'ctcc_styles_settings' ); ?>
|
583 |
-
<input type="text" class="cctc-color-field" name="ctcc_styles_settings[text_color]" value="<?php echo $options['text_color']; ?>">
|
584 |
-
<p class="description"><?php _e
|
585 |
<?php
|
586 |
}
|
587 |
|
588 |
public function bg_color_render() {
|
589 |
$options = get_option( 'ctcc_styles_settings' ); ?>
|
590 |
-
<input type="text" class="cctc-color-field" name="ctcc_styles_settings[bg_color]" value="<?php echo $options['bg_color']; ?>">
|
591 |
-
<p class="description"><?php _e
|
592 |
<?php
|
593 |
}
|
594 |
|
595 |
public function link_color_render() {
|
596 |
$options = get_option( 'ctcc_styles_settings' ); ?>
|
597 |
-
<input type="text" class="cctc-color-field" name="ctcc_styles_settings[link_color]" value="<?php echo $options['link_color']; ?>">
|
598 |
-
<p class="description"><?php _e
|
599 |
<?php
|
600 |
}
|
601 |
|
602 |
public function button_color_render() {
|
603 |
$options = get_option( 'ctcc_styles_settings' ); ?>
|
604 |
-
<input type="text" class="cctc-color-field" name="ctcc_styles_settings[button_color]" value="<?php echo $options['button_color']; ?>">
|
605 |
-
<p class="description"><?php _e
|
606 |
<?php
|
607 |
}
|
608 |
|
609 |
public function button_bg_color_render() {
|
610 |
$options = get_option( 'ctcc_styles_settings' ); ?>
|
611 |
-
<input type="text" class="cctc-color-field" name="ctcc_styles_settings[button_bg_color]" value="<?php echo $options['button_bg_color']; ?>">
|
612 |
-
<p class="description"><?php _e
|
613 |
<?php
|
614 |
}
|
615 |
|
616 |
public function flat_button_render() {
|
617 |
$options = get_option( 'ctcc_styles_settings' ); ?>
|
618 |
<input type='checkbox' name='ctcc_styles_settings[flat_button]' <?php checked ( ! empty ( $options['flat_button'] ), 1 ); ?> value='1'>
|
619 |
-
<p class="description"><?php _e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
620 |
<?php
|
621 |
}
|
622 |
|
623 |
public function settings_section_callback() {
|
624 |
-
echo __( '
|
|
|
625 |
}
|
626 |
|
627 |
public function content_settings_section_callback() {
|
628 |
-
echo __( '
|
|
|
629 |
}
|
630 |
|
631 |
public function styles_settings_section_callback() {
|
632 |
-
echo __( '
|
|
|
|
|
|
|
|
|
|
|
|
|
633 |
}
|
634 |
|
635 |
public function options_page() {
|
@@ -670,22 +782,27 @@ if ( ! class_exists ( 'CTCC_Admin' ) ) {
|
|
670 |
</form>
|
671 |
<form method="post" action="">
|
672 |
<p class="submit">
|
673 |
-
<input name="reset" class="button button-secondary" type="submit" value="<?php _e
|
674 |
<input type="hidden" name="action" value="reset" />
|
675 |
</p>
|
676 |
</form>
|
677 |
</div><!-- .ctdb-inner-wrap -->
|
|
|
678 |
<div class="ctdb-banners">
|
|
|
|
|
|
|
679 |
<div class="ctdb-banner">
|
680 |
-
<a href="
|
681 |
</div>
|
682 |
<div class="ctdb-banner">
|
683 |
-
<a href="https://sellastic.com/?ref=1&utm_source=plugin_ad&utm_medium=wp_plugin&utm_content=cookieconsent&utm_campaign=sellastic"><img src="<?php echo CTCC_PLUGIN_URL . 'assets/images/sellastic-
|
684 |
</div>
|
685 |
<div class="ctdb-banner">
|
686 |
-
<a href="
|
687 |
</div>
|
688 |
</div>
|
|
|
689 |
</div><!-- .ctdb-outer-wrap -->
|
690 |
</div><!-- .wrap -->
|
691 |
<?php
|
32 |
add_action ( 'admin_enqueue_scripts', array ( $this, 'enqueue_scripts' ) );
|
33 |
add_action ( 'admin_footer', array ( $this, 'add_js' ) );
|
34 |
|
35 |
+
add_action( 'admin_init', array( $this, 'save_registered_setting' ) );
|
36 |
+
|
37 |
+
}
|
38 |
+
|
39 |
+
/**
|
40 |
+
* We save this artificially to let the tracker know that we're allowed to export this option's data
|
41 |
+
*/
|
42 |
+
public function save_registered_setting() {
|
43 |
+
$options = get_option( 'ctcc_options_settings' );
|
44 |
+
$options['wisdom_registered_setting'] = 1;
|
45 |
+
update_option( 'ctcc_options_settings', $options );
|
46 |
}
|
47 |
|
48 |
public function enqueue_scripts() {
|
95 |
'ctcc_options_section'
|
96 |
);
|
97 |
|
98 |
+
add_settings_field (
|
99 |
+
'enable_metafield',
|
100 |
+
__( 'Selectively Exclude Pages', 'uk-cookie-consent' ),
|
101 |
+
array ( $this, 'enable_metafield_render' ),
|
102 |
+
'ctcc_options',
|
103 |
+
'ctcc_options_section'
|
104 |
+
);
|
105 |
+
|
106 |
+
add_settings_field (
|
107 |
+
'exclude_zones',
|
108 |
+
__( 'Exclude Zones', 'uk-cookie-consent' ),
|
109 |
+
array ( $this, 'exclude_zones_render' ),
|
110 |
+
'ctcc_options',
|
111 |
+
'ctcc_options_section'
|
112 |
+
);
|
113 |
+
|
114 |
add_settings_field (
|
115 |
'duration',
|
116 |
__( 'Notification Duration', 'uk-cookie-consent' ),
|
119 |
'ctcc_options_section'
|
120 |
);
|
121 |
|
122 |
+
add_settings_field (
|
123 |
+
'scroll_height',
|
124 |
+
__( 'Scroll Height', 'uk-cookie-consent' ),
|
125 |
+
array ( $this, 'scroll_height_render' ),
|
126 |
+
'ctcc_options',
|
127 |
+
'ctcc_options_section'
|
128 |
+
);
|
129 |
+
|
130 |
add_settings_field (
|
131 |
'cookie_expiry',
|
132 |
__( 'Cookie Expiry', 'uk-cookie-consent' ),
|
143 |
'ctcc_options_section'
|
144 |
);
|
145 |
|
146 |
+
add_settings_field (
|
147 |
+
'wisdom_opt_out',
|
148 |
+
__( 'Opt out of tracking', 'uk-cookie-consent' ),
|
149 |
+
array ( $this, 'opt_out_render' ),
|
150 |
+
'ctcc_options',
|
151 |
+
'ctcc_options_section'
|
152 |
+
);
|
153 |
+
|
154 |
// Set default options
|
155 |
$options = get_option ( 'ctcc_options_settings' );
|
156 |
if ( false === $options ) {
|
161 |
|
162 |
}
|
163 |
|
164 |
+
public function sanitize_content( $input ){
|
165 |
+
$output = array();
|
166 |
+
foreach( $input as $key=>$value ) {
|
167 |
+
if( isset($input[$key] ) ) {
|
168 |
+
if( $key == 'notification_text' ) {
|
169 |
+
$output[$key] = esc_attr( $input[$key] );
|
170 |
+
} else if( $key == 'more_info_url' ) {
|
171 |
+
$output[$key] = esc_url( $input[$key] );
|
172 |
+
} else {
|
173 |
+
$output[$key] = sanitize_text_field( $input[$key] );
|
174 |
+
}
|
175 |
+
}
|
176 |
+
}
|
177 |
+
return $output;
|
178 |
+
}
|
179 |
+
|
180 |
public function register_content_init() {
|
181 |
|
182 |
+
register_setting ( 'ctcc_content', 'ctcc_content_settings', array( $this, 'sanitize_content') );
|
183 |
|
184 |
add_settings_section (
|
185 |
'ctcc_content_section',
|
390 |
public function get_default_options_settings() {
|
391 |
$defaults = array (
|
392 |
'closure' => 'click',
|
393 |
+
'scroll_height' => 200,
|
394 |
'first_page' => 0,
|
395 |
+
'enable_metafield' => 0,
|
396 |
+
'zones_only' => '',
|
397 |
'duration' => 60,
|
398 |
'cookie_expiry' => 30,
|
399 |
'cookie_version' => 1
|
480 |
public function closure_render() {
|
481 |
$options = get_option( 'ctcc_options_settings' ); ?>
|
482 |
<select name='ctcc_options_settings[closure]'>
|
483 |
+
<option value='click' <?php selected( $options['closure'], 'click' ); ?>><?php _e( 'On Click', 'uk-cookie-consent' ); ?></option>
|
484 |
+
<option value='scroll' <?php selected( $options['closure'], 'scroll' ); ?>><?php _e( 'On Scroll', 'uk-cookie-consent' ); ?></option>
|
485 |
+
<option value='timed' <?php selected( $options['closure'], 'timed' ); ?>><?php _e( 'Timed', 'uk-cookie-consent' ); ?></option>
|
486 |
+
|
487 |
</select>
|
488 |
+
<p class="description"><?php _e( 'How you want the user to close the notification', 'uk-cookie-consent' ); ?></p>
|
489 |
<?php
|
490 |
}
|
491 |
|
492 |
public function first_page_render() {
|
493 |
$options = get_option( 'ctcc_options_settings' ); ?>
|
494 |
+
<input type='checkbox' name='ctcc_options_settings[first_page]' <?php checked ( ! empty ( $options['first_page'] ), 1 ); ?> value='1'>
|
495 |
+
<p class="description"><?php _e( 'Select this to show the notification only on the first page the user visits', 'uk-cookie-consent' ); ?></p>
|
496 |
+
<?php
|
497 |
+
}
|
498 |
+
|
499 |
+
public function exclude_zones_render() {
|
500 |
+
$options = get_option( 'ctcc_options_settings' );
|
501 |
+
$zones = array();
|
502 |
+
if( isset( $options['exclude_zones'] ) ) {
|
503 |
+
$zones = $options['exclude_zones'];
|
504 |
+
} ?>
|
505 |
+
<select multiple name='ctcc_options_settings[exclude_zones][]'>
|
506 |
+
<option value='AF' <?php selected( in_array( 'AF', $zones ) ); ?>><?php _e( 'Africa', 'uk-cookie-consent' ); ?></option>
|
507 |
+
<option value='AN' <?php selected( in_array( 'AN', $zones ) ); ?>><?php _e( 'Antarctica', 'uk-cookie-consent' ); ?></option>
|
508 |
+
<option value='AS' <?php selected( in_array( 'AS', $zones ) ); ?>><?php _e( 'Asia', 'uk-cookie-consent' ); ?></option>
|
509 |
+
<option value='EU' <?php selected( in_array( 'EU', $zones ) ); ?>><?php _e( 'Europe', 'uk-cookie-consent' ); ?></option>
|
510 |
+
<option value='NA' <?php selected( in_array( 'NA', $zones ) ); ?>><?php _e( 'North America', 'uk-cookie-consent' ); ?></option>
|
511 |
+
<option value='OC' <?php selected( in_array( 'OC', $zones ) ); ?>><?php _e( 'Oceania', 'uk-cookie-consent' ); ?></option>
|
512 |
+
<option value='SA' <?php selected( in_array( 'SA', $zones ) ); ?>><?php _e( 'South America', 'uk-cookie-consent' ); ?></option>
|
513 |
+
</select>
|
514 |
+
<p class="description"><?php _e( 'If you have the <a href="https://wordpress.org/plugins/geoip-detect/" target="_blank">GeoIP Detect</a> plugin activated, you can specify which areas of the world to exclude from displaying the notification.', 'uk-cookie-consent' ); ?></p>
|
515 |
+
<?php
|
516 |
+
}
|
517 |
+
|
518 |
+
public function scroll_height_render() {
|
519 |
+
$options = get_option( 'ctcc_options_settings' ); ?>
|
520 |
+
<input type="number" min="1" name="ctcc_options_settings[scroll_height]" value="<?php echo esc_attr( $options['scroll_height'] ); ?>">
|
521 |
+
<p class="description"><?php _e( 'If you chose Scroll as the close method, enter the distance in pixels the user should scroll before the notification closes', 'uk-cookie-consent' ); ?></p>
|
522 |
<?php
|
523 |
}
|
524 |
|
525 |
public function duration_render() {
|
526 |
$options = get_option( 'ctcc_options_settings' ); ?>
|
527 |
+
<input type="number" min="1" name="ctcc_options_settings[duration]" value="<?php echo esc_attr( $options['duration'] ); ?>">
|
528 |
+
<p class="description"><?php _e( 'If you chose Timer as the close method, enter how many seconds the notification should display for', 'uk-cookie-consent' ); ?></p>
|
529 |
<?php
|
530 |
}
|
531 |
|
532 |
public function cookie_expiry_render() {
|
533 |
$options = get_option( 'ctcc_options_settings' ); ?>
|
534 |
+
<input type="number" min="1" name="ctcc_options_settings[cookie_expiry]" value="<?php echo esc_attr( $options['cookie_expiry'] ); ?>">
|
535 |
+
<p class="description"><?php _e( 'The number of days that the cookie is set for', 'uk-cookie-consent' ); ?></p>
|
536 |
<?php
|
537 |
}
|
538 |
|
539 |
public function cookie_version_render() {
|
540 |
$options = get_option( 'ctcc_options_settings' ); ?>
|
541 |
+
<input type="text" name="ctcc_options_settings[cookie_version]" value="<?php echo esc_attr( $options['cookie_version'] ); ?>">
|
542 |
+
<p class="description"><?php _e( 'A version number for the cookie - update this to invalidate the cookie and force all users to view the notification again', 'uk-cookie-consent' ); ?></p>
|
543 |
+
<?php
|
544 |
+
}
|
545 |
+
|
546 |
+
public function opt_out_render() {
|
547 |
+
$options = get_option( 'ctcc_options_settings' ); ?>
|
548 |
+
<input type='checkbox' name='ctcc_options_settings[wisdom_opt_out]' <?php checked ( ! empty ( $options['wisdom_opt_out'] ), 1 ); ?> value='1'>
|
549 |
+
<p class="description"><?php _e( 'If you previously opted into allowing this plugin to track non-sensitive data, you can opt out here', 'uk-cookie-consent' ); ?></p>
|
550 |
<?php
|
551 |
}
|
552 |
|
556 |
|
557 |
public function heading_text_render() {
|
558 |
$ctcc_content_settings = get_option( 'ctcc_content_settings' ); ?>
|
559 |
+
<input type="text" name="ctcc_content_settings[heading_text]" value="<?php echo esc_attr( $ctcc_content_settings['heading_text'] ); ?>">
|
560 |
+
<p class="description"><?php _e( 'The heading text - only applies if you are not using a top or bottom bar', 'uk-cookie-consent' ); ?></p>
|
561 |
<?php
|
562 |
}
|
563 |
|
564 |
public function notification_text_render() {
|
565 |
$ctcc_content_settings = get_option( 'ctcc_content_settings' ); ?>
|
566 |
+
<input class="widefat" type="text" name="ctcc_content_settings[notification_text]" value="<?php echo esc_attr( $ctcc_content_settings['notification_text'] ); ?>">
|
567 |
+
<p class="description"><?php _e( 'The default text to indicate that your site uses cookies', 'uk-cookie-consent' ); ?></p>
|
568 |
<?php
|
569 |
}
|
570 |
|
571 |
public function accept_text_render() {
|
572 |
$ctcc_content_settings = get_option( 'ctcc_content_settings' ); ?>
|
573 |
+
<input type="text" name="ctcc_content_settings[accept_text]" value="<?php echo esc_attr( $ctcc_content_settings['accept_text'] ); ?>">
|
574 |
+
<p class="description"><?php _e( 'The default text to dismiss the notification', 'uk-cookie-consent' ); ?></p>
|
575 |
<?php
|
576 |
}
|
577 |
|
578 |
public function more_info_text_render() {
|
579 |
$ctcc_content_settings = get_option( 'ctcc_content_settings' ); ?>
|
580 |
+
<input type="text" name="ctcc_content_settings[more_info_text]" value="<?php echo esc_attr( $ctcc_content_settings['more_info_text'] ); ?>">
|
581 |
+
<p class="description"><?php _e( 'The default text to use to link to a page providing further information', 'uk-cookie-consent' ); ?></p>
|
582 |
<?php
|
583 |
}
|
584 |
|
594 |
<option value='<?php echo $page -> ID; ?>' <?php selected( $ctcc_content_settings['more_info_page'], $page -> ID ); ?>><?php echo $page -> post_title; ?></option>
|
595 |
<?php } ?>
|
596 |
</select>
|
597 |
+
<p class="description"><?php _e( 'The page containing further information about your cookie policy', 'uk-cookie-consent' ); ?></p>
|
598 |
<?php }
|
599 |
}
|
600 |
|
601 |
public function more_info_url_render() {
|
602 |
$ctcc_content_settings = get_option( 'ctcc_content_settings' ); ?>
|
603 |
+
<input type="url" name="ctcc_content_settings[more_info_url]" value="<?php echo esc_url( $ctcc_content_settings['more_info_url'] ); ?>">
|
604 |
+
<p class="description"><?php _e( 'You can add an absolute URL here to override the More Info Page setting above. Use this to link to an external website for further information about cookies.', 'uk-cookie-consent' ); ?></p>
|
605 |
<?php
|
606 |
}
|
607 |
|
608 |
public function more_info_target_render() {
|
609 |
$ctcc_content_settings = get_option( 'ctcc_content_settings' ); ?>
|
610 |
<select name='ctcc_content_settings[more_info_target]'>
|
611 |
+
<option value='_blank' <?php selected( $ctcc_content_settings['more_info_target'], '_blank' ); ?>><?php _e( 'New Tab', 'uk-cookie-consent' ); ?></option>
|
612 |
+
<option value='_self' <?php selected( $ctcc_content_settings['more_info_target'], '_self' ); ?>><?php _e( 'Same Tab', 'uk-cookie-consent' ); ?></option>
|
613 |
</select>
|
614 |
+
<p class="description"><?php _e( 'Open the More Information page in the same or new tab.', 'uk-cookie-consent' ); ?></p>
|
615 |
<?php
|
616 |
}
|
617 |
|
622 |
public function position_render() {
|
623 |
$options = get_option( 'ctcc_styles_settings' ); ?>
|
624 |
<select name='ctcc_styles_settings[position]'>
|
625 |
+
<option value='top-bar' <?php selected( $options['position'], 'top-bar' ); ?>><?php _e( 'Top Bar', 'uk-cookie-consent' ); ?></option>
|
626 |
+
<option value='bottom-bar' <?php selected( $options['position'], 'bottom-bar' ); ?>><?php _e( 'Bottom Bar', 'uk-cookie-consent' ); ?></option>
|
627 |
+
<option value='top-left-block' <?php selected( $options['position'], 'top-left-block' ); ?>><?php _e( 'Top Left Block', 'uk-cookie-consent' ); ?></option>
|
628 |
+
<option value='top-right-block' <?php selected( $options['position'], 'top-right-block' ); ?>><?php _e( 'Top Right Block', 'uk-cookie-consent' ); ?></option>
|
629 |
+
<option value='bottom-left-block' <?php selected( $options['position'], 'bottom-left-block' ); ?>><?php _e( 'Bottom Left Block', 'uk-cookie-consent' ); ?></option>
|
630 |
+
<option value='bottom-right-block' <?php selected( $options['position'], 'bottom-right-block' ); ?>><?php _e( 'Bottom Right Block', 'uk-cookie-consent' ); ?></option>
|
631 |
</select>
|
632 |
+
<p class="description"><?php _e( 'Where the notification should appear', 'uk-cookie-consent' ); ?></p>
|
633 |
<?php
|
634 |
}
|
635 |
|
636 |
public function container_class_render() {
|
637 |
$options = get_option( 'ctcc_styles_settings' ); ?>
|
638 |
+
<input type="text" name="ctcc_styles_settings[container_class]" value="<?php echo esc_attr( $options['container_class'] ); ?>">
|
639 |
+
<p class="description"><?php _e( 'You can add an optional wrapper class, eg container, here to align the notification text with the rest of your content', 'uk-cookie-consent' ); ?></p>
|
640 |
<?php
|
641 |
}
|
642 |
|
643 |
public function enqueue_styles_render() {
|
644 |
$options = get_option( 'ctcc_styles_settings' ); ?>
|
645 |
<input type='checkbox' name='ctcc_styles_settings[enqueue_styles]' <?php checked ( ! empty ( $options['enqueue_styles'] ), 1 ); ?> value='1'>
|
646 |
+
<p class="description"><?php _e( 'Deselect this to dequeue the plugin stylesheet', 'uk-cookie-consent' ); ?></p>
|
647 |
<?php
|
648 |
}
|
649 |
|
650 |
public function rounded_corners_render() {
|
651 |
$options = get_option( 'ctcc_styles_settings' ); ?>
|
652 |
<input type='checkbox' name='ctcc_styles_settings[rounded_corners]' <?php checked ( ! empty ( $options['rounded_corners'] ), 1 ); ?> value='1'>
|
653 |
+
<p class="description"><?php _e( 'Round the corners on the block (doesn\'t apply to the top or bottom bar)', 'uk-cookie-consent' ); ?></p>
|
654 |
<?php
|
655 |
}
|
656 |
|
657 |
public function drop_shadow_render() {
|
658 |
$options = get_option( 'ctcc_styles_settings' ); ?>
|
659 |
<input type='checkbox' name='ctcc_styles_settings[drop_shadow]' <?php checked ( ! empty ( $options['drop_shadow'] ), 1 ); ?> value='1'>
|
660 |
+
<p class="description"><?php _e( 'Add drop shadow to the block (doesn\'t apply to the top or bottom bar)', 'uk-cookie-consent' ); ?></p>
|
661 |
<?php
|
662 |
}
|
663 |
|
664 |
public function display_accept_with_text_render() {
|
665 |
$options = get_option( 'ctcc_styles_settings' ); ?>
|
666 |
<input type='checkbox' name='ctcc_styles_settings[display_accept_with_text]' <?php checked ( ! empty ( $options['display_accept_with_text'] ), 1 ); ?> value='1'>
|
667 |
+
<p class="description"><?php _e( 'Display the confirmation button with notification text', 'uk-cookie-consent' ); ?></p>
|
668 |
<?php
|
669 |
}
|
670 |
|
671 |
public function x_close_render() {
|
672 |
$options = get_option( 'ctcc_styles_settings' ); ?>
|
673 |
<input type='checkbox' name='ctcc_styles_settings[x_close]' <?php checked ( ! empty ( $options['x_close'] ), 1 ); ?> value='1'>
|
674 |
+
<p class="description"><?php _e( 'Remove confirmation button and use \'X\' icon instead', 'uk-cookie-consent' ); ?></p>
|
675 |
<?php
|
676 |
}
|
677 |
|
678 |
public function text_color_render() {
|
679 |
$options = get_option( 'ctcc_styles_settings' ); ?>
|
680 |
+
<input type="text" class="cctc-color-field" name="ctcc_styles_settings[text_color]" value="<?php echo esc_attr( $options['text_color'] ); ?>">
|
681 |
+
<p class="description"><?php _e( 'The text color on the notification', 'uk-cookie-consent' ); ?></p>
|
682 |
<?php
|
683 |
}
|
684 |
|
685 |
public function bg_color_render() {
|
686 |
$options = get_option( 'ctcc_styles_settings' ); ?>
|
687 |
+
<input type="text" class="cctc-color-field" name="ctcc_styles_settings[bg_color]" value="<?php echo esc_attr( $options['bg_color'] ); ?>">
|
688 |
+
<p class="description"><?php _e( 'The background color for the notification', 'uk-cookie-consent' ); ?></p>
|
689 |
<?php
|
690 |
}
|
691 |
|
692 |
public function link_color_render() {
|
693 |
$options = get_option( 'ctcc_styles_settings' ); ?>
|
694 |
+
<input type="text" class="cctc-color-field" name="ctcc_styles_settings[link_color]" value="<?php echo esc_attr( $options['link_color'] ); ?>">
|
695 |
+
<p class="description"><?php _e( 'The link color on the notification', 'uk-cookie-consent' ); ?></p>
|
696 |
<?php
|
697 |
}
|
698 |
|
699 |
public function button_color_render() {
|
700 |
$options = get_option( 'ctcc_styles_settings' ); ?>
|
701 |
+
<input type="text" class="cctc-color-field" name="ctcc_styles_settings[button_color]" value="<?php echo esc_attr( $options['button_color'] ); ?>">
|
702 |
+
<p class="description"><?php _e( 'The text color on the notification button', 'uk-cookie-consent' ); ?></p>
|
703 |
<?php
|
704 |
}
|
705 |
|
706 |
public function button_bg_color_render() {
|
707 |
$options = get_option( 'ctcc_styles_settings' ); ?>
|
708 |
+
<input type="text" class="cctc-color-field" name="ctcc_styles_settings[button_bg_color]" value="<?php echo esc_attr( $options['button_bg_color'] ); ?>">
|
709 |
+
<p class="description"><?php _e( 'The background color on the notification button', 'uk-cookie-consent' ); ?></p>
|
710 |
<?php
|
711 |
}
|
712 |
|
713 |
public function flat_button_render() {
|
714 |
$options = get_option( 'ctcc_styles_settings' ); ?>
|
715 |
<input type='checkbox' name='ctcc_styles_settings[flat_button]' <?php checked ( ! empty ( $options['flat_button'] ), 1 ); ?> value='1'>
|
716 |
+
<p class="description"><?php _e( 'Remove the border from the button', 'uk-cookie-consent' ); ?></p>
|
717 |
+
<?php
|
718 |
+
}
|
719 |
+
|
720 |
+
public function enable_metafield_render() {
|
721 |
+
$options = get_option( 'ctcc_options_settings' ); ?>
|
722 |
+
<input type='checkbox' name='ctcc_options_settings[enable_metafield]' <?php checked ( ! empty ( $options['enable_metafield'] ), 1 ); ?> value='1'>
|
723 |
+
<p class="description"><?php _e( 'Select this to enable a metafield on pages and posts. Checking the metafield on a page or post will exclude that page from displaying the notification.', 'uk-cookie-consent' ); ?></p>
|
724 |
<?php
|
725 |
}
|
726 |
|
727 |
public function settings_section_callback() {
|
728 |
+
echo '<p>' . __( 'Basic settings', 'uk-cookie-consent' ) . '</p>';
|
729 |
+
echo '<p><a href="http://iubenda.refr.cc/JKNZ55D" target="_blank">' . __( 'Create your own privacy policy here') . '</a></p>';
|
730 |
}
|
731 |
|
732 |
public function content_settings_section_callback() {
|
733 |
+
echo '<p>' .__( 'Update the content displayed to the user', 'uk-cookie-consent' ) . '</p>';
|
734 |
+
echo '<p><a href="http://iubenda.refr.cc/JKNZ55D" target="_blank">' . __( 'Create your own privacy policy here') . '</a></p>';
|
735 |
}
|
736 |
|
737 |
public function styles_settings_section_callback() {
|
738 |
+
echo '<p>' .__( 'Change the styles here if you like - but it\'s better in the Customizer', 'uk-cookie-consent' ) . '</p>';
|
739 |
+
echo '<p><a href="http://iubenda.refr.cc/JKNZ55D" target="_blank">' . __( 'Create your own privacy policy here') . '</a></p>';
|
740 |
+
}
|
741 |
+
|
742 |
+
public function pages_settings_section_callback() {
|
743 |
+
echo '<p>' . __( 'Use this section to set exclusion rules for pages and posts.', 'uk-cookie-consent' ) . '</p>';
|
744 |
+
echo '<p><a href="http://iubenda.refr.cc/JKNZ55D" target="_blank">' . __( 'Create your own privacy policy here') . '</a></p>';
|
745 |
}
|
746 |
|
747 |
public function options_page() {
|
782 |
</form>
|
783 |
<form method="post" action="">
|
784 |
<p class="submit">
|
785 |
+
<input name="reset" class="button button-secondary" type="submit" value="<?php _e( 'Reset plugin defaults', 'uk-cookie-consent' ); ?>" >
|
786 |
<input type="hidden" name="action" value="reset" />
|
787 |
</p>
|
788 |
</form>
|
789 |
</div><!-- .ctdb-inner-wrap -->
|
790 |
+
|
791 |
<div class="ctdb-banners">
|
792 |
+
<div class="ctdb-banner hide-dbpro">
|
793 |
+
<a href="http://discussionboard.pro/?utm_source=plugin_ad&utm_medium=wp_plugin&utm_content=cookieconsent&utm_campaign=dbpro"><img src="<?php echo CTCC_PLUGIN_URL . 'assets/images/dbpro-ad-view.png'; ?>" alt="" ></a>
|
794 |
+
</div>
|
795 |
<div class="ctdb-banner">
|
796 |
+
<a href="http://superheroslider.catapultthemes.com/?utm_source=plugin_ad&utm_medium=wp_plugin&utm_content=cookieconsent&utm_campaign=superhero"><img src="<?php echo CTCC_PLUGIN_URL . 'assets/images/superhero-ad1.png'; ?>" alt="" ></a>
|
797 |
</div>
|
798 |
<div class="ctdb-banner">
|
799 |
+
<a href="https://sellastic.com/?ref=1&utm_source=plugin_ad&utm_medium=wp_plugin&utm_content=cookieconsent&utm_campaign=sellastic"><img src="<?php echo CTCC_PLUGIN_URL . 'assets/images/sellastic-ad1.jpg'; ?>" alt="" ></a>
|
800 |
</div>
|
801 |
<div class="ctdb-banner">
|
802 |
+
<a href="http://mode.catapultthemes.com/?utm_source=plugin_ad&utm_medium=wp_plugin&utm_content=cookieconsent&utm_campaign=themes"><img src="<?php echo CTCC_PLUGIN_URL . 'assets/images/themes-ad1.png'; ?>" alt="" ></a>
|
803 |
</div>
|
804 |
</div>
|
805 |
+
|
806 |
</div><!-- .ctdb-outer-wrap -->
|
807 |
</div><!-- .wrap -->
|
808 |
<?php
|
admin/class-ctcc-metafield.php
ADDED
@@ -0,0 +1,189 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Cookie Consent metafield class
|
4 |
+
*/
|
5 |
+
|
6 |
+
// Exit if accessed directly
|
7 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
8 |
+
exit;
|
9 |
+
}
|
10 |
+
|
11 |
+
if ( ! class_exists ( 'CTCC_Metafield' ) ) {
|
12 |
+
|
13 |
+
class CTCC_Metafield {
|
14 |
+
|
15 |
+
public function __construct() {
|
16 |
+
//
|
17 |
+
}
|
18 |
+
|
19 |
+
/*
|
20 |
+
* Initialize the class and start calling our hooks and filters
|
21 |
+
* @since 2.0.0
|
22 |
+
*/
|
23 |
+
public function init() {
|
24 |
+
|
25 |
+
add_action( 'add_meta_boxes', array ( $this, 'add_meta_box' ) );
|
26 |
+
add_action( 'save_post', array ( $this, 'save_metabox_data' ) );
|
27 |
+
|
28 |
+
}
|
29 |
+
|
30 |
+
public function metaboxes() {
|
31 |
+
|
32 |
+
$metaboxes = array (
|
33 |
+
array (
|
34 |
+
'ID' => 'ctcc_gallery_metabox',
|
35 |
+
'title' => __( 'Cookie Consent', 'uk-cookie-consent' ),
|
36 |
+
'callback' => 'meta_box_callback',
|
37 |
+
'screens' => array( 'page', 'post' ),
|
38 |
+
'context' => 'side',
|
39 |
+
'priority' => 'default',
|
40 |
+
'fields' => array (
|
41 |
+
array (
|
42 |
+
'ID' => 'ctcc_exclude',
|
43 |
+
'name' => 'ctcc_exclude',
|
44 |
+
'title' => __( 'Exclude from cookie notice', 'uk-cookie-consent' ),
|
45 |
+
'type' => 'checkbox',
|
46 |
+
'class' => ''
|
47 |
+
),
|
48 |
+
),
|
49 |
+
),
|
50 |
+
);
|
51 |
+
|
52 |
+
return $metaboxes;
|
53 |
+
|
54 |
+
}
|
55 |
+
|
56 |
+
/*
|
57 |
+
* Register the metabox
|
58 |
+
* @since 1.0.0
|
59 |
+
*/
|
60 |
+
public function add_meta_box() {
|
61 |
+
|
62 |
+
$metaboxes = $this->metaboxes();
|
63 |
+
|
64 |
+
foreach ( $metaboxes as $metabox ) {
|
65 |
+
add_meta_box (
|
66 |
+
$metabox['ID'],
|
67 |
+
$metabox['title'],
|
68 |
+
array ( $this, 'meta_box_callback' ),
|
69 |
+
$metabox['screens'],
|
70 |
+
$metabox['context'],
|
71 |
+
$metabox['priority'],
|
72 |
+
$metabox['fields']
|
73 |
+
);
|
74 |
+
|
75 |
+
}
|
76 |
+
|
77 |
+
}
|
78 |
+
|
79 |
+
/*
|
80 |
+
* Metabox callbacks
|
81 |
+
* @since 1.0.0
|
82 |
+
*/
|
83 |
+
public function meta_box_callback ( $post, $fields ) {
|
84 |
+
|
85 |
+
wp_nonce_field ( 'save_metabox_data', 'ctcc_metabox_nonce' );
|
86 |
+
|
87 |
+
if ( $fields['args'] ) {
|
88 |
+
|
89 |
+
foreach ( $fields['args'] as $field ) {
|
90 |
+
|
91 |
+
switch ( $field['type'] ) {
|
92 |
+
|
93 |
+
case 'checkbox':
|
94 |
+
$this -> metabox_checkbox_output ( $post, $field );
|
95 |
+
break;
|
96 |
+
|
97 |
+
}
|
98 |
+
|
99 |
+
}
|
100 |
+
|
101 |
+
}
|
102 |
+
|
103 |
+
}
|
104 |
+
|
105 |
+
/*
|
106 |
+
* Metabox callback for checkbox
|
107 |
+
* @since 1.0.0
|
108 |
+
*/
|
109 |
+
public function metabox_checkbox_output( $post, $field ) {
|
110 |
+
|
111 |
+
$field_value = 0;
|
112 |
+
|
113 |
+
// First check if we're on the post-new screen
|
114 |
+
global $pagenow;
|
115 |
+
if ( in_array ( $pagenow, array( 'post-new.php' ) ) ) {
|
116 |
+
// This is a new post screen so we can apply the default value
|
117 |
+
$field_value = $field['default'];
|
118 |
+
} else {
|
119 |
+
$custom = get_post_custom ( $post->ID );
|
120 |
+
if ( isset ( $custom[$field['ID']][0] ) ) {
|
121 |
+
$field_value = $custom[$field['ID']][0];
|
122 |
+
}
|
123 |
+
}
|
124 |
+
?>
|
125 |
+
<div class="dm-work-metafield <?php echo $field['class']; ?>">
|
126 |
+
|
127 |
+
<input type="checkbox" id="<?php echo $field['name']; ?>" name="<?php echo $field['name']; ?>" value="1" <?php checked ( 1, $field_value ); ?>>
|
128 |
+
<label for="<?php echo $field['name']; ?>"><?php echo $field['title']; ?></label>
|
129 |
+
<?php if ( ! empty ( $field['label'] ) ) { ?>
|
130 |
+
<?php echo $field['label']; ?>
|
131 |
+
<?php } ?>
|
132 |
+
</div>
|
133 |
+
<?php
|
134 |
+
}
|
135 |
+
|
136 |
+
/*
|
137 |
+
* Save
|
138 |
+
* @since 1.0.0
|
139 |
+
*/
|
140 |
+
public function save_metabox_data( $post_id ) {
|
141 |
+
|
142 |
+
// Check the nonce is set
|
143 |
+
if ( ! isset ( $_POST['ctcc_metabox_nonce'] ) ) {
|
144 |
+
return;
|
145 |
+
}
|
146 |
+
|
147 |
+
// Verify the nonce
|
148 |
+
if ( ! wp_verify_nonce ( $_POST['ctcc_metabox_nonce'], 'save_metabox_data' ) ) {
|
149 |
+
return;
|
150 |
+
}
|
151 |
+
|
152 |
+
// If this is an autosave, our form has not been submitted, so we don't want to do anything.
|
153 |
+
if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {
|
154 |
+
return;
|
155 |
+
}
|
156 |
+
|
157 |
+
// Check the user's permissions.
|
158 |
+
if ( ! current_user_can( 'edit_post', $post_id ) ) {
|
159 |
+
return;
|
160 |
+
}
|
161 |
+
|
162 |
+
// Save all our metaboxes
|
163 |
+
$metaboxes = $this -> metaboxes();
|
164 |
+
foreach ( $metaboxes as $metabox ) {
|
165 |
+
if ( $metabox['fields'] ) {
|
166 |
+
foreach ( $metabox['fields'] as $field ) {
|
167 |
+
|
168 |
+
if ( $field['type'] != 'divider' ) {
|
169 |
+
|
170 |
+
if ( isset ( $_POST[$field['name']] ) ) {
|
171 |
+
if ( $field['type'] == 'wysiwyg' ) {
|
172 |
+
$data = $_POST[$field['name']];
|
173 |
+
} else {
|
174 |
+
$data = sanitize_text_field ( $_POST[$field['name']] );
|
175 |
+
}
|
176 |
+
update_post_meta ( $post_id, $field['ID'], $data );
|
177 |
+
} else {
|
178 |
+
delete_post_meta ( $post_id, $field['ID'] );
|
179 |
+
}
|
180 |
+
}
|
181 |
+
}
|
182 |
+
}
|
183 |
+
}
|
184 |
+
|
185 |
+
}
|
186 |
+
|
187 |
+
}
|
188 |
+
|
189 |
+
}
|
assets/css/style.css
CHANGED
@@ -17,6 +17,15 @@ html.has-cookie-bar.cookie-bar-top-bar {
|
|
17 |
-moz-transition: all 0.25s;
|
18 |
transition: all 0.25s;
|
19 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
#catapult-cookie-bar.rounded-corners {
|
21 |
border-radius: 3px;
|
22 |
}
|
@@ -64,6 +73,11 @@ button#catapultCookie {
|
|
64 |
-webkit-justify-content: space-between;
|
65 |
justify-content: space-between;
|
66 |
}
|
|
|
|
|
|
|
|
|
|
|
67 |
.ctcc-right-side {
|
68 |
-webkit-flex-shrink: 0;
|
69 |
flex-shrink: 0;
|
@@ -86,8 +100,6 @@ button#catapultCookie {
|
|
86 |
-webkit-transform: translateY(-50%);
|
87 |
transform: translateY(-50%);
|
88 |
}
|
89 |
-
|
90 |
-
|
91 |
.x_close {
|
92 |
-webkit-backface-visibility: hidden;
|
93 |
backface-visibility: hidden;
|
17 |
-moz-transition: all 0.25s;
|
18 |
transition: all 0.25s;
|
19 |
}
|
20 |
+
.ctcc-exclude-AF.geoip-continent-AF #catapult-cookie-bar,
|
21 |
+
.ctcc-exclude-AN.geoip-continent-AN #catapult-cookie-bar,
|
22 |
+
.ctcc-exclude-AS.geoip-continent-AS #catapult-cookie-bar,
|
23 |
+
.ctcc-exclude-EU.geoip-continent-EU #catapult-cookie-bar,
|
24 |
+
.ctcc-exclude-NA.geoip-continent-NA #catapult-cookie-bar,
|
25 |
+
.ctcc-exclude-OC.geoip-continent-OC #catapult-cookie-bar,
|
26 |
+
.ctcc-exclude-SA.geoip-continent-SA #catapult-cookie-bar {
|
27 |
+
display: none;
|
28 |
+
}
|
29 |
#catapult-cookie-bar.rounded-corners {
|
30 |
border-radius: 3px;
|
31 |
}
|
73 |
-webkit-justify-content: space-between;
|
74 |
justify-content: space-between;
|
75 |
}
|
76 |
+
@media screen and (max-width: 991px) {
|
77 |
+
.ctcc-left-side {
|
78 |
+
margin-right: 1em;
|
79 |
+
}
|
80 |
+
}
|
81 |
.ctcc-right-side {
|
82 |
-webkit-flex-shrink: 0;
|
83 |
flex-shrink: 0;
|
100 |
-webkit-transform: translateY(-50%);
|
101 |
transform: translateY(-50%);
|
102 |
}
|
|
|
|
|
103 |
.x_close {
|
104 |
-webkit-backface-visibility: hidden;
|
105 |
backface-visibility: hidden;
|
assets/images/Thumbs.db
DELETED
Binary file
|
assets/images/dbpro-ad-view.png
ADDED
Binary file
|
assets/images/hero-3d-banner.jpg
DELETED
Binary file
|
assets/images/mode-3d-banner-cc.jpg
DELETED
Binary file
|
assets/images/mode-3d-banner.jpg
DELETED
Binary file
|
assets/images/sellastic-ad1.jpg
ADDED
Binary file
|
assets/images/shs-3d-banner.png
DELETED
Binary file
|
assets/images/superhero-ad1.png
ADDED
Binary file
|
assets/images/themes-ad1.jpg
ADDED
Binary file
|
assets/images/themes-ad1.png
ADDED
Binary file
|
assets/js/uk-cookie-consent-js.js
CHANGED
@@ -23,6 +23,7 @@ function catapultAcceptCookies() {
|
|
23 |
catapultSetCookie('catAccCookies', ctcc_vars.version, ctcc_vars.expiry);
|
24 |
jQuery("html").removeClass('has-cookie-bar');
|
25 |
jQuery("html").css("margin-top","0");
|
|
|
26 |
}
|
27 |
// The function called by the timer
|
28 |
function ctccCloseNotification() {
|
23 |
catapultSetCookie('catAccCookies', ctcc_vars.version, ctcc_vars.expiry);
|
24 |
jQuery("html").removeClass('has-cookie-bar');
|
25 |
jQuery("html").css("margin-top","0");
|
26 |
+
jQuery("#catapult-cookie-bar").fadeOut();
|
27 |
}
|
28 |
// The function called by the timer
|
29 |
function ctccCloseNotification() {
|
languages/uk-cookie-consent-it_IT.mo
ADDED
Binary file
|
languages/uk-cookie-consent-it_IT.po
ADDED
@@ -0,0 +1,453 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Copyright (C) 2016 Cookie Consent
|
2 |
+
# This file is distributed under the same license as the Cookie Consent package.
|
3 |
+
msgid ""
|
4 |
+
msgstr ""
|
5 |
+
"Project-Id-Version: Cookie Consent 2.0.3\n"
|
6 |
+
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/uk-cookie-"
|
7 |
+
"consent\n"
|
8 |
+
"POT-Creation-Date: 2016-01-12 23:15:34+00:00\n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"PO-Revision-Date: 2016-07-27 17:07+0100\n"
|
13 |
+
"Last-Translator: Angelo Giammarresi <info@wocmultimedia.com>\n"
|
14 |
+
"Language-Team: Angelo Giammarresi <info@wocmultimedia.com>\n"
|
15 |
+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
16 |
+
"Language: it_IT\n"
|
17 |
+
"X-Generator: Poedit 1.5.7\n"
|
18 |
+
|
19 |
+
#. #-#-#-#-# uk-cookie-consent.pot (Cookie Consent 2.0.3) #-#-#-#-#
|
20 |
+
#. Plugin Name of the plugin/theme
|
21 |
+
#: admin/class-ctcc-admin.php:56 admin/class-ctcc-admin.php:630
|
22 |
+
#: public/customizer.php:17
|
23 |
+
msgid "Cookie Consent"
|
24 |
+
msgstr "Consenso Cookie "
|
25 |
+
|
26 |
+
#: admin/class-ctcc-admin.php:65
|
27 |
+
msgid "General settings"
|
28 |
+
msgstr "Impostazioni Generali"
|
29 |
+
|
30 |
+
#: admin/class-ctcc-admin.php:72
|
31 |
+
msgid "Close"
|
32 |
+
msgstr "Chiudi"
|
33 |
+
|
34 |
+
#: admin/class-ctcc-admin.php:80
|
35 |
+
msgid "First Page Only"
|
36 |
+
msgstr "Solo Prima Pagina"
|
37 |
+
|
38 |
+
#: admin/class-ctcc-admin.php:88
|
39 |
+
msgid "Notification Duration"
|
40 |
+
msgstr "Durata Avviso"
|
41 |
+
|
42 |
+
#: admin/class-ctcc-admin.php:96
|
43 |
+
msgid "Cookie Expiry"
|
44 |
+
msgstr "Scadenza Cookie"
|
45 |
+
|
46 |
+
#: admin/class-ctcc-admin.php:104
|
47 |
+
msgid "Cookie Version"
|
48 |
+
msgstr "Versione Cookie"
|
49 |
+
|
50 |
+
#: admin/class-ctcc-admin.php:126
|
51 |
+
msgid "Content settings"
|
52 |
+
msgstr "Impostazioni contenuti"
|
53 |
+
|
54 |
+
#: admin/class-ctcc-admin.php:133
|
55 |
+
msgid "Heading Text"
|
56 |
+
msgstr "Testo Intestazione"
|
57 |
+
|
58 |
+
#: admin/class-ctcc-admin.php:141
|
59 |
+
msgid "Notification Text"
|
60 |
+
msgstr "Testo Avviso"
|
61 |
+
|
62 |
+
#: admin/class-ctcc-admin.php:149
|
63 |
+
msgid "More Info Text"
|
64 |
+
msgstr "Testo Maggiori Informazioni"
|
65 |
+
|
66 |
+
#: admin/class-ctcc-admin.php:157
|
67 |
+
msgid "More Info Page"
|
68 |
+
msgstr "Pagina Maggiori Informazioni"
|
69 |
+
|
70 |
+
#: admin/class-ctcc-admin.php:165
|
71 |
+
msgid "More Info URL"
|
72 |
+
msgstr "URL di Approfondimento"
|
73 |
+
|
74 |
+
#: admin/class-ctcc-admin.php:173
|
75 |
+
msgid "More Info Target"
|
76 |
+
msgstr "Destinazione Pagina Informazioni"
|
77 |
+
|
78 |
+
#: admin/class-ctcc-admin.php:181
|
79 |
+
msgid "Accept Text"
|
80 |
+
msgstr "Testo Accettazione"
|
81 |
+
|
82 |
+
#: admin/class-ctcc-admin.php:203
|
83 |
+
msgid "Styles settings"
|
84 |
+
msgstr "Impostazioni Stili"
|
85 |
+
|
86 |
+
#: admin/class-ctcc-admin.php:210 public/customizer.php:34
|
87 |
+
msgid "Position"
|
88 |
+
msgstr "Posizione"
|
89 |
+
|
90 |
+
#: admin/class-ctcc-admin.php:218 public/customizer.php:58
|
91 |
+
msgid "Container Class"
|
92 |
+
msgstr "Classe Container"
|
93 |
+
|
94 |
+
#: admin/class-ctcc-admin.php:226
|
95 |
+
msgid "Include Stylesheet"
|
96 |
+
msgstr "Includere Foglio di Stile"
|
97 |
+
|
98 |
+
#: admin/class-ctcc-admin.php:234 public/customizer.php:90
|
99 |
+
msgid "Rounded Corners"
|
100 |
+
msgstr "Spigoli Arrotondati"
|
101 |
+
|
102 |
+
#: admin/class-ctcc-admin.php:242 public/customizer.php:106
|
103 |
+
msgid "Drop Shadow"
|
104 |
+
msgstr "Ombra Esterna"
|
105 |
+
|
106 |
+
#: admin/class-ctcc-admin.php:250 public/customizer.php:122
|
107 |
+
msgid "Display Button With Text"
|
108 |
+
msgstr "Visualizza pulsante con testo"
|
109 |
+
|
110 |
+
#: admin/class-ctcc-admin.php:258 public/customizer.php:138
|
111 |
+
msgid "Use X Close"
|
112 |
+
msgstr "Usa una X per chiudere"
|
113 |
+
|
114 |
+
#: admin/class-ctcc-admin.php:266 public/customizer.php:154
|
115 |
+
msgid "Text Color"
|
116 |
+
msgstr "Colore Testo"
|
117 |
+
|
118 |
+
#: admin/class-ctcc-admin.php:274 admin/class-ctcc-admin.php:306
|
119 |
+
#: public/customizer.php:170
|
120 |
+
msgid "Background Color"
|
121 |
+
msgstr "Colore Sfondo"
|
122 |
+
|
123 |
+
#: admin/class-ctcc-admin.php:282 public/customizer.php:186
|
124 |
+
msgid "Link Color"
|
125 |
+
msgstr "Colore Link"
|
126 |
+
|
127 |
+
#: admin/class-ctcc-admin.php:290 public/customizer.php:202
|
128 |
+
msgid "Button Color"
|
129 |
+
msgstr "Colore Testo Pulsante"
|
130 |
+
|
131 |
+
#: admin/class-ctcc-admin.php:298 public/customizer.php:218
|
132 |
+
msgid "Button Background"
|
133 |
+
msgstr "Colore Sfondo Pulsante"
|
134 |
+
|
135 |
+
#: admin/class-ctcc-admin.php:339 admin/class-ctcc-admin.php:349
|
136 |
+
msgid "Cookies"
|
137 |
+
msgstr "Cookies"
|
138 |
+
|
139 |
+
#: admin/class-ctcc-admin.php:350
|
140 |
+
msgid "This site uses cookies: "
|
141 |
+
msgstr "Questo sito utilizza i cookie:"
|
142 |
+
|
143 |
+
#: admin/class-ctcc-admin.php:351
|
144 |
+
msgid "Okay, thanks"
|
145 |
+
msgstr "Va bene, grazie"
|
146 |
+
|
147 |
+
#: admin/class-ctcc-admin.php:352
|
148 |
+
msgid "Find out more."
|
149 |
+
msgstr "Leggi di più."
|
150 |
+
|
151 |
+
#: admin/class-ctcc-admin.php:411
|
152 |
+
msgid "On Click"
|
153 |
+
msgstr "Quando Clicchi"
|
154 |
+
|
155 |
+
#: admin/class-ctcc-admin.php:412
|
156 |
+
msgid "Timed"
|
157 |
+
msgstr "Temporizzato"
|
158 |
+
|
159 |
+
#: admin/class-ctcc-admin.php:414
|
160 |
+
msgid "How you want the user to close the notification"
|
161 |
+
msgstr "Come desideri che l'utente chiuda la notifica"
|
162 |
+
|
163 |
+
#: admin/class-ctcc-admin.php:421
|
164 |
+
msgid ""
|
165 |
+
"Select this to show the notification only on the first page the user visits"
|
166 |
+
msgstr ""
|
167 |
+
"Seleziona questa casella se vuoi mostrare l'avviso solo nella prima pagina "
|
168 |
+
"che l'utente visita"
|
169 |
+
|
170 |
+
#: admin/class-ctcc-admin.php:428
|
171 |
+
msgid ""
|
172 |
+
"If you chose Timer as the close method, enter how many seconds the "
|
173 |
+
"notification should display for"
|
174 |
+
msgstr ""
|
175 |
+
"Se scegli Temporizzato come metodo di chiusura, devi inserire quanti secondi "
|
176 |
+
"desideri che l'avviso venga mostrato prima di chiudersi"
|
177 |
+
|
178 |
+
#: admin/class-ctcc-admin.php:435
|
179 |
+
msgid "The number of days that the cookie is set for"
|
180 |
+
msgstr "Il numero di giorni che il cookie viene tenuto in memoria"
|
181 |
+
|
182 |
+
#: admin/class-ctcc-admin.php:442
|
183 |
+
msgid ""
|
184 |
+
"A version number for the cookie - update this to invalidate the cookie and "
|
185 |
+
"force all users to view the notification again"
|
186 |
+
msgstr ""
|
187 |
+
"Contatore numerico del cookie - se il inserisci un valore maggiore di 1 si "
|
188 |
+
"annulla il cookie e si obbliga l'utente a rivedere nuovamente l'avviso per "
|
189 |
+
"il numero di volte che imposti in questa casella"
|
190 |
+
|
191 |
+
#: admin/class-ctcc-admin.php:453
|
192 |
+
msgid ""
|
193 |
+
"The heading text - only applies if you are not using a top or bottom bar"
|
194 |
+
msgstr ""
|
195 |
+
"Il testo dell'Intestazione - appare solo quando la posizione scelta "
|
196 |
+
"dell'avviso non è in Alto o in Basso"
|
197 |
+
|
198 |
+
#: admin/class-ctcc-admin.php:460
|
199 |
+
msgid "The default text to indicate that your site uses cookies"
|
200 |
+
msgstr ""
|
201 |
+
"Il testo predefinito per indicare che il tuo sito sta utilizzando i cookie"
|
202 |
+
|
203 |
+
#: admin/class-ctcc-admin.php:467
|
204 |
+
msgid "The default text to dismiss the notification"
|
205 |
+
msgstr "Il testo predefinito per chiudere l'avviso"
|
206 |
+
|
207 |
+
#: admin/class-ctcc-admin.php:474
|
208 |
+
msgid "The default text to use to link to a page providing further information"
|
209 |
+
msgstr ""
|
210 |
+
"Il testo predefinito da usare come link per la pagina di approfondimento "
|
211 |
+
"delle informazioni sui cookie"
|
212 |
+
|
213 |
+
#: admin/class-ctcc-admin.php:490
|
214 |
+
msgid "The page containing further information about your cookie policy"
|
215 |
+
msgstr ""
|
216 |
+
"La pagina contenente le informazioni di approfondimento sull'utilizzo dei "
|
217 |
+
"cookie"
|
218 |
+
|
219 |
+
#: admin/class-ctcc-admin.php:497
|
220 |
+
msgid ""
|
221 |
+
"You can add an absolute URL here to override the More Info Page setting "
|
222 |
+
"above. Use this to link to an external website for further information about "
|
223 |
+
"cookies."
|
224 |
+
msgstr ""
|
225 |
+
"Puoi inserire qui una URL assoluta e non tener conto delle impostazioni "
|
226 |
+
"soprastanti per la Pagina Maggiori Informazioni"
|
227 |
+
|
228 |
+
#: admin/class-ctcc-admin.php:504
|
229 |
+
msgid "New Tab"
|
230 |
+
msgstr "Nuova Scheda"
|
231 |
+
|
232 |
+
#: admin/class-ctcc-admin.php:505
|
233 |
+
msgid "Same Tab"
|
234 |
+
msgstr "Stessa Scheda"
|
235 |
+
|
236 |
+
#: admin/class-ctcc-admin.php:507
|
237 |
+
msgid "Open the More Information page in the same or new tab."
|
238 |
+
msgstr ""
|
239 |
+
"Apre la Pagina Maggiori Informazioni nella stessa scheda oppure in una nuova "
|
240 |
+
"scheda."
|
241 |
+
|
242 |
+
#: admin/class-ctcc-admin.php:518 public/customizer.php:36
|
243 |
+
msgid "Top Bar"
|
244 |
+
msgstr "Barra in Alto"
|
245 |
+
|
246 |
+
#: admin/class-ctcc-admin.php:519 public/customizer.php:37
|
247 |
+
msgid "Bottom Bar"
|
248 |
+
msgstr "Barra in Basso"
|
249 |
+
|
250 |
+
#: admin/class-ctcc-admin.php:520 public/customizer.php:38
|
251 |
+
msgid "Top Left Block"
|
252 |
+
msgstr "Blocco in Alto a Sinistra"
|
253 |
+
|
254 |
+
#: admin/class-ctcc-admin.php:521 public/customizer.php:39
|
255 |
+
msgid "Top Right Block"
|
256 |
+
msgstr "Blocco in Alto a Destra"
|
257 |
+
|
258 |
+
#: admin/class-ctcc-admin.php:522 public/customizer.php:40
|
259 |
+
msgid "Bottom Left Block"
|
260 |
+
msgstr "Blocco in Basso a Sinistra"
|
261 |
+
|
262 |
+
#: admin/class-ctcc-admin.php:523 public/customizer.php:41
|
263 |
+
msgid "Bottom Right Block"
|
264 |
+
msgstr "Blocco in Basso a Destra"
|
265 |
+
|
266 |
+
#: admin/class-ctcc-admin.php:525
|
267 |
+
msgid "Where the notification should appear"
|
268 |
+
msgstr "Dove vuoi che appaia l'avviso o notifica"
|
269 |
+
|
270 |
+
#: admin/class-ctcc-admin.php:532
|
271 |
+
msgid ""
|
272 |
+
"You can add an optional wrapper class, eg container, here to align the "
|
273 |
+
"notification text with the rest of your content"
|
274 |
+
msgstr ""
|
275 |
+
"Si può aggiungere qui opzionalmente una classe wrapper, es. container, per "
|
276 |
+
"allineare il testo della notifica con il resto del contenuto"
|
277 |
+
|
278 |
+
#: admin/class-ctcc-admin.php:539
|
279 |
+
msgid "Deselect this to dequeue the plugin stylesheet"
|
280 |
+
msgstr ""
|
281 |
+
"Deseleziona la casella per non aggiungere il foglio di stile del plugin"
|
282 |
+
|
283 |
+
#: admin/class-ctcc-admin.php:546
|
284 |
+
msgid "Round the corners on the block (doesn't apply to the top or bottom bar)"
|
285 |
+
msgstr ""
|
286 |
+
"Arrotonda gli angoli del blocco contenente l'avviso (non funziona con Barra "
|
287 |
+
"in Alto e Barra in Basso)"
|
288 |
+
|
289 |
+
#: admin/class-ctcc-admin.php:553
|
290 |
+
msgid "Add drop shadow to the block (doesn't apply to the top or bottom bar)"
|
291 |
+
msgstr ""
|
292 |
+
"Aggiunge un'ombra esterna al blocco contenente l'avviso (non funziona con "
|
293 |
+
"Barra in Alto e Barra in Basso)"
|
294 |
+
|
295 |
+
#: admin/class-ctcc-admin.php:560
|
296 |
+
msgid "Display the confirmation button with notification text"
|
297 |
+
msgstr "Visualizza il pulsante di accettazione con il testo di notifica"
|
298 |
+
|
299 |
+
#: admin/class-ctcc-admin.php:567
|
300 |
+
msgid "Remove confirmation button and use 'X' icon instead"
|
301 |
+
msgstr ""
|
302 |
+
"Rimuove il pulsante di accettazione e al suo posto utilizza l'icona di una "
|
303 |
+
"'X' per chiudere l'avviso"
|
304 |
+
|
305 |
+
#: admin/class-ctcc-admin.php:574
|
306 |
+
msgid "The text color on the notification"
|
307 |
+
msgstr "Il colore del testo della notifica"
|
308 |
+
|
309 |
+
#: admin/class-ctcc-admin.php:581
|
310 |
+
msgid "The background color for the notification"
|
311 |
+
msgstr "Il colore di sfondo della notifica"
|
312 |
+
|
313 |
+
#: admin/class-ctcc-admin.php:588
|
314 |
+
msgid "The link color on the notification"
|
315 |
+
msgstr "Il colore del link usato nella notifica"
|
316 |
+
|
317 |
+
#: admin/class-ctcc-admin.php:595
|
318 |
+
msgid "The text color on the notification button"
|
319 |
+
msgstr "Il colore del testo del pulsante della notifica"
|
320 |
+
|
321 |
+
#: admin/class-ctcc-admin.php:602
|
322 |
+
msgid "The background color on the notification button"
|
323 |
+
msgstr "Il colore dello sfondo del pulsante della notifica"
|
324 |
+
|
325 |
+
#: admin/class-ctcc-admin.php:607
|
326 |
+
msgid "<p>Basic settings</p>"
|
327 |
+
msgstr "<p>Impostazioni di base</p>"
|
328 |
+
|
329 |
+
#: admin/class-ctcc-admin.php:611
|
330 |
+
msgid "<p>Update the content displayed to the user</p>"
|
331 |
+
msgstr "<p>Aggiorna il contenuto mostrato all'utente</p>"
|
332 |
+
|
333 |
+
#: admin/class-ctcc-admin.php:615
|
334 |
+
msgid ""
|
335 |
+
"<p>Change the styles here if you like - but it's better in the Customizer</p>"
|
336 |
+
msgstr ""
|
337 |
+
"<p>Si può cambiare qui gli stili se si desiera - ma è meglio utilizzare "
|
338 |
+
"Personalizza (Customizer) di WP </p>"
|
339 |
+
|
340 |
+
#: admin/class-ctcc-admin.php:632
|
341 |
+
msgid "General"
|
342 |
+
msgstr "Generale"
|
343 |
+
|
344 |
+
#: admin/class-ctcc-admin.php:633
|
345 |
+
msgid "Content"
|
346 |
+
msgstr "Contenuto"
|
347 |
+
|
348 |
+
#: admin/class-ctcc-admin.php:634
|
349 |
+
msgid "Styles"
|
350 |
+
msgstr "Stili"
|
351 |
+
|
352 |
+
#: admin/class-ctcc-admin.php:656
|
353 |
+
msgid "Reset plugin defaults"
|
354 |
+
msgstr "Ripristina impostazioni predefinite del plugin"
|
355 |
+
|
356 |
+
#: public/customizer.php:43
|
357 |
+
msgid "Position and placement."
|
358 |
+
msgstr "Posizione e posizionamento."
|
359 |
+
|
360 |
+
#: public/customizer.php:59
|
361 |
+
msgid "Optional wrapper class."
|
362 |
+
msgstr "Classe wrapper opzionale."
|
363 |
+
|
364 |
+
#: public/customizer.php:74
|
365 |
+
msgid "Enqueue Styles"
|
366 |
+
msgstr "Stili di accodamento"
|
367 |
+
|
368 |
+
#: public/customizer.php:75
|
369 |
+
msgid "Deselect this to dequeue the plugin stylesheet."
|
370 |
+
msgstr ""
|
371 |
+
"Deselezionare per annullare l'accodamento del foglio di stile del plugin."
|
372 |
+
|
373 |
+
#: public/customizer.php:91
|
374 |
+
msgid "Round the corners on the block."
|
375 |
+
msgstr "Arrotonda gli angoli del blocco."
|
376 |
+
|
377 |
+
#: public/customizer.php:107
|
378 |
+
msgid "Add drop shadow to the block."
|
379 |
+
msgstr "Aggiunge un'ombra esterna al blocco."
|
380 |
+
|
381 |
+
#: public/customizer.php:123
|
382 |
+
msgid "Deselect to float button to right."
|
383 |
+
msgstr "Deselezionare per spostare il pulsante alla destra."
|
384 |
+
|
385 |
+
#: public/customizer.php:139
|
386 |
+
msgid "Replace confirmation button with 'X' icon."
|
387 |
+
msgstr "Rimpiazza il pulsante di accettazione con una 'X'."
|
388 |
+
|
389 |
+
#: public/customizer.php:155
|
390 |
+
msgid "Text color for your notification bar."
|
391 |
+
msgstr "Il colore del testo per la barra di notifica."
|
392 |
+
|
393 |
+
#: public/customizer.php:171
|
394 |
+
msgid "Background color for your notification bar."
|
395 |
+
msgstr "Il colore dello sfondo della barra di notifica."
|
396 |
+
|
397 |
+
#: public/customizer.php:187
|
398 |
+
msgid "Link color for your notification bar."
|
399 |
+
msgstr "Il colore del link per la barra di notifica."
|
400 |
+
|
401 |
+
#: public/customizer.php:203
|
402 |
+
msgid "Text color for your notification bar button."
|
403 |
+
msgstr "Il colore del testo per il pulsante nella barra di notifica"
|
404 |
+
|
405 |
+
#: public/customizer.php:219
|
406 |
+
msgid "Background color for your notification bar button."
|
407 |
+
msgstr "Il colore dello sfondo per il pulsante nella barra di notifica"
|
408 |
+
|
409 |
+
#: uk-cookie-consent.php:54
|
410 |
+
msgid "Cookie Policy"
|
411 |
+
msgstr "Cookie Policy"
|
412 |
+
|
413 |
+
#: uk-cookie-consent.php:55
|
414 |
+
msgid ""
|
415 |
+
"This site uses cookies - small text files that are placed on your machine to "
|
416 |
+
"help the site provide a better user experience. In general, cookies are used "
|
417 |
+
"to retain user preferences, store information for things like shopping "
|
418 |
+
"carts, and provide anonymised tracking data to third party applications like "
|
419 |
+
"Google Analytics. As a rule, cookies will make your browsing experience "
|
420 |
+
"better. However, you may prefer to disable cookies on this site and on "
|
421 |
+
"others. The most effective way to do this is to disable cookies in your "
|
422 |
+
"browser. We suggest consulting the Help section of your browser or taking a "
|
423 |
+
"look at <a href=\"http://www.aboutcookies.org\">the About Cookies website</"
|
424 |
+
"a> which offers guidance for all modern browsers"
|
425 |
+
msgstr ""
|
426 |
+
"Questo sito utilizza cookies - piccoli file di testo che vengono depositati "
|
427 |
+
"sul vostro computer per aiutare il sito a fornire una migliore esperienza "
|
428 |
+
"utente. In generale, i cookie vengono utilizzati per mantenere le preferenze "
|
429 |
+
"degli utenti, memorizzano le informazioni per cose come carrelli della "
|
430 |
+
"spesa, e fornire dati di monitoraggio anonimi per applicazioni di terze "
|
431 |
+
"parti come Google Analytics. Come regola generale, i cookie renderanno la "
|
432 |
+
"vostra esperienza di navigazione migliore. Tuttavia, si può scegliere di "
|
433 |
+
"disabilitare i cookie su questo sito e su altri. Il modo più efficace per "
|
434 |
+
"farlo è quello di disabilitare i cookie nel proprio browser. Si consiglia di "
|
435 |
+
"consultare la sezione Guida del browser o di dare un'occhiata a <a href="
|
436 |
+
"\"http://www.aboutcookies.org\"> About Cookies sito </a>, che offre una "
|
437 |
+
"guida per tutti i browser moderni"
|
438 |
+
|
439 |
+
#. Plugin URI of the plugin/theme
|
440 |
+
msgid "http://catapultthemes.com/cookie-consent/"
|
441 |
+
msgstr "http://catapultthemes.com/cookie-consent/"
|
442 |
+
|
443 |
+
#. Description of the plugin/theme
|
444 |
+
msgid "The only cookie consent plugin you'll ever need."
|
445 |
+
msgstr "Il solo plugin per il consenso dei cookie di cui avrai bisogno."
|
446 |
+
|
447 |
+
#. Author of the plugin/theme
|
448 |
+
msgid "Catapult_Themes"
|
449 |
+
msgstr "Catapult_Themes"
|
450 |
+
|
451 |
+
#. Author URI of the plugin/theme
|
452 |
+
msgid "http://catapultthemes.com/"
|
453 |
+
msgstr "http://catapultthemes.com/"
|
public/class-ctcc-public.php
CHANGED
@@ -12,41 +12,80 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
12 |
* Plugin public class
|
13 |
**/
|
14 |
if ( ! class_exists( 'CTCC_Public' ) ) { // Don't initialise if there's already a class activated
|
|
|
15 |
class CTCC_Public {
|
|
|
16 |
public function __construct() {
|
17 |
//
|
18 |
}
|
|
|
19 |
/*
|
20 |
* Initialize the class and start calling our hooks and filters
|
21 |
* @since 2.0.0
|
22 |
*/
|
23 |
public function init() {
|
|
|
24 |
add_action ( 'wp_enqueue_scripts', array ( $this, 'enqueue_scripts' ) );
|
25 |
add_action ( 'wp_head', array ( $this, 'add_css' ) );
|
26 |
add_action ( 'wp_footer', array ( $this, 'add_js' ), 1000 );
|
27 |
add_action ( 'wp_footer', array ( $this, 'add_notification_bar' ), 1000 );
|
28 |
}
|
29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
/*
|
31 |
* Enqueue styles and scripts
|
32 |
* @since 2.0.0
|
33 |
*/
|
34 |
public function enqueue_scripts() {
|
35 |
-
$
|
36 |
-
|
37 |
-
if
|
38 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
}
|
40 |
-
|
41 |
-
wp_localize_script (
|
42 |
-
'cookie-consent',
|
43 |
-
'ctcc_vars',
|
44 |
-
array (
|
45 |
-
'expiry' => $ctcc_options_settings['cookie_expiry'],
|
46 |
-
'method' => isset ( $ctcc_options_settings['first_page'] ),
|
47 |
-
'version' => $ctcc_options_settings['cookie_version'],
|
48 |
-
)
|
49 |
-
);
|
50 |
}
|
51 |
|
52 |
/*
|
@@ -54,91 +93,95 @@ if ( ! class_exists( 'CTCC_Public' ) ) { // Don't initialise if there's already
|
|
54 |
* @since 2.0.0
|
55 |
*/
|
56 |
public function add_css() {
|
57 |
-
$
|
58 |
-
|
59 |
-
$
|
60 |
-
|
61 |
-
|
62 |
-
width: 100%;';
|
63 |
-
// Figure out the bar position
|
64 |
-
if ( $ctcc_styles_settings['position'] == 'top-bar' ) {
|
65 |
-
$position_css = 'position: fixed;
|
66 |
-
left: 0;
|
67 |
-
top: 0;
|
68 |
-
width: 100%;';
|
69 |
-
} else if ( $ctcc_styles_settings['position'] == 'bottom-bar' ) {
|
70 |
-
$position_css = 'position: fixed;
|
71 |
-
left: 0;
|
72 |
-
bottom: 0;
|
73 |
-
width: 100%;';
|
74 |
-
} else if ( $ctcc_styles_settings['position'] == 'top-right-block' ) {
|
75 |
$position_css = 'position: fixed;
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
$
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
133 |
}
|
134 |
-
.has-cookie-bar #catapult-cookie-bar {
|
135 |
-
opacity: 1;
|
136 |
-
max-height: 999px;
|
137 |
-
min-height: 30px;
|
138 |
-
}';
|
139 |
-
$css .= '</style>';
|
140 |
-
echo $css;
|
141 |
-
// Add it to the header
|
142 |
}
|
143 |
|
144 |
/*
|
@@ -147,49 +190,67 @@ if ( ! class_exists( 'CTCC_Public' ) ) { // Don't initialise if there's already
|
|
147 |
*/
|
148 |
public function add_js() {
|
149 |
|
150 |
-
$
|
151 |
-
|
|
|
|
|
|
|
152 |
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
170 |
?>
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
});
|
178 |
<?php } ?>
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
ctccFirstPage();
|
188 |
-
<?php } ?>
|
189 |
-
});
|
190 |
-
</script>
|
191 |
|
192 |
-
|
193 |
|
194 |
/*
|
195 |
* Add the notification bar itself
|
@@ -197,118 +258,129 @@ if ( ! class_exists( 'CTCC_Public' ) ) { // Don't initialise if there's already
|
|
197 |
*/
|
198 |
public function add_notification_bar() {
|
199 |
|
200 |
-
$
|
201 |
-
|
202 |
-
|
|
|
|
|
|
|
|
|
203 |
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
|
|
|
|
|
|
|
|
215 |
}
|
216 |
-
if ( ! empty ( $ctcc_styles_settings['
|
217 |
-
$classes .= '
|
|
|
|
|
|
|
218 |
}
|
219 |
-
}
|
220 |
-
if ( ! empty ( $ctcc_styles_settings['x_close'] ) ) {
|
221 |
-
$classes .= ' use_x_close';
|
222 |
-
}
|
223 |
-
if ( empty ( $ctcc_styles_settings['display_accept_with_text'] ) ) {
|
224 |
-
$classes .= ' float-accept';
|
225 |
-
}
|
226 |
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
|
239 |
-
|
240 |
-
|
241 |
|
242 |
-
|
243 |
-
|
244 |
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
270 |
}
|
271 |
-
$more_info_text = wp_kses ( $ctcc_content_settings['more_info_text'], $allowed );
|
272 |
-
$more_info_text = apply_filters( 'ctcc_more_info_text', $more_info_text );
|
273 |
-
$more_text = sprintf (
|
274 |
-
'<a tabindex=0 target="%s" href="%s">%s</a>',
|
275 |
-
esc_attr ( $ctcc_content_settings['more_info_target'] ),
|
276 |
-
esc_url ( $link ),
|
277 |
-
$more_info_text
|
278 |
-
);
|
279 |
-
}
|
280 |
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
|
306 |
-
|
307 |
-
|
308 |
|
309 |
-
|
310 |
|
311 |
-
|
|
|
|
|
312 |
|
313 |
}
|
314 |
|
12 |
* Plugin public class
|
13 |
**/
|
14 |
if ( ! class_exists( 'CTCC_Public' ) ) { // Don't initialise if there's already a class activated
|
15 |
+
|
16 |
class CTCC_Public {
|
17 |
+
|
18 |
public function __construct() {
|
19 |
//
|
20 |
}
|
21 |
+
|
22 |
/*
|
23 |
* Initialize the class and start calling our hooks and filters
|
24 |
* @since 2.0.0
|
25 |
*/
|
26 |
public function init() {
|
27 |
+
add_filter( 'body_class', array ( $this, 'body_class' ) );
|
28 |
add_action ( 'wp_enqueue_scripts', array ( $this, 'enqueue_scripts' ) );
|
29 |
add_action ( 'wp_head', array ( $this, 'add_css' ) );
|
30 |
add_action ( 'wp_footer', array ( $this, 'add_js' ), 1000 );
|
31 |
add_action ( 'wp_footer', array ( $this, 'add_notification_bar' ), 1000 );
|
32 |
}
|
33 |
|
34 |
+
/*
|
35 |
+
* Initialize the class and start calling our hooks and filters
|
36 |
+
* @since 2.0.0
|
37 |
+
*/
|
38 |
+
public function body_class( $classes ) {
|
39 |
+
$options = get_option( 'ctcc_options_settings' );
|
40 |
+
if( isset( $options['exclude_zones'] ) && is_array( $options['exclude_zones'] ) ) {
|
41 |
+
foreach( $options['exclude_zones'] as $zone ) {
|
42 |
+
$classes[] = 'ctcc-exclude-' . $zone;
|
43 |
+
}
|
44 |
+
}
|
45 |
+
return $classes;
|
46 |
+
}
|
47 |
+
|
48 |
/*
|
49 |
* Enqueue styles and scripts
|
50 |
* @since 2.0.0
|
51 |
*/
|
52 |
public function enqueue_scripts() {
|
53 |
+
$exclude = $this->show_bar();
|
54 |
+
// Only do all this if post isn't excluded
|
55 |
+
if( ! empty( $exclude ) ) {
|
56 |
+
$ctcc_options_settings = get_option ( 'ctcc_options_settings' );
|
57 |
+
$options = get_option ( 'ctcc_styles_settings' );
|
58 |
+
if ( isset ( $options['enqueue_styles'] ) ) {
|
59 |
+
wp_enqueue_style ( 'cookie-consent-style', CTCC_PLUGIN_URL . 'assets/css/style.css', '2.3.0' );
|
60 |
+
}
|
61 |
+
wp_enqueue_script ( 'cookie-consent', CTCC_PLUGIN_URL . 'assets/js/uk-cookie-consent-js.js', array ( 'jquery' ), '2.3.0', true );
|
62 |
+
wp_localize_script (
|
63 |
+
'cookie-consent',
|
64 |
+
'ctcc_vars',
|
65 |
+
array (
|
66 |
+
'expiry' => $ctcc_options_settings['cookie_expiry'],
|
67 |
+
'method' => isset ( $ctcc_options_settings['first_page'] ),
|
68 |
+
'version' => $ctcc_options_settings['cookie_version'],
|
69 |
+
)
|
70 |
+
);
|
71 |
+
}
|
72 |
+
}
|
73 |
+
|
74 |
+
/*
|
75 |
+
* Check if post or page is excluded from displaying the bar
|
76 |
+
* @since 2.2.0
|
77 |
+
*/
|
78 |
+
public function show_bar() {
|
79 |
+
global $post;
|
80 |
+
$options = get_option( 'ctcc_options_settings' );
|
81 |
+
if( isset( $post->ID) ) {
|
82 |
+
$post_id = $post->ID;
|
83 |
+
$excluded = get_post_meta( $post_id, 'ctcc_exclude', true );
|
84 |
+
if( $excluded == 1 && ! empty( $options['enable_metafield'] ) ) {
|
85 |
+
return false;
|
86 |
+
}
|
87 |
}
|
88 |
+
return true;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
89 |
}
|
90 |
|
91 |
/*
|
93 |
* @since 2.0.0
|
94 |
*/
|
95 |
public function add_css() {
|
96 |
+
$exclude = $this->show_bar();
|
97 |
+
// Only do all this if post isn't excluded
|
98 |
+
if( ! empty( $exclude ) ) {
|
99 |
+
$options = get_option ( 'ctcc_options_settings' );
|
100 |
+
$ctcc_styles_settings = get_option ( 'ctcc_styles_settings' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
101 |
$position_css = 'position: fixed;
|
102 |
+
left: 0;
|
103 |
+
top: 0;
|
104 |
+
width: 100%;';
|
105 |
+
// Figure out the bar position
|
106 |
+
if ( $ctcc_styles_settings['position'] == 'top-bar' ) {
|
107 |
+
$position_css = 'position: fixed;
|
108 |
+
left: 0;
|
109 |
+
top: 0;
|
110 |
+
width: 100%;';
|
111 |
+
} else if ( $ctcc_styles_settings['position'] == 'bottom-bar' ) {
|
112 |
+
$position_css = 'position: fixed;
|
113 |
+
left: 0;
|
114 |
+
bottom: 0;
|
115 |
+
width: 100%;';
|
116 |
+
} else if ( $ctcc_styles_settings['position'] == 'top-right-block' ) {
|
117 |
+
$position_css = 'position: fixed;
|
118 |
+
right: 20px;
|
119 |
+
top: 6%;
|
120 |
+
width: 300px;';
|
121 |
+
} else if ( $ctcc_styles_settings['position'] == 'top-left-block' ) {
|
122 |
+
$position_css = 'position: fixed;
|
123 |
+
left: 20px;
|
124 |
+
top: 6%;
|
125 |
+
width: 300px;';
|
126 |
+
} else if ( $ctcc_styles_settings['position'] == 'bottom-left-block' ) {
|
127 |
+
$position_css = 'position: fixed;
|
128 |
+
left: 20px;
|
129 |
+
bottom: 6%;
|
130 |
+
width: 300px;';
|
131 |
+
} else if ( $ctcc_styles_settings['position'] == 'bottom-right-block' ) {
|
132 |
+
$position_css = 'position: fixed;
|
133 |
+
right: 20px;
|
134 |
+
bottom: 6%;
|
135 |
+
width: 300px;';
|
136 |
+
}
|
137 |
+
// Get our styles
|
138 |
+
$text_color = $ctcc_styles_settings['text_color'];
|
139 |
+
$position = 'top';
|
140 |
+
$bg_color = $ctcc_styles_settings['bg_color'];
|
141 |
+
$link_color = $ctcc_styles_settings['link_color'];
|
142 |
+
$button_bg = $ctcc_styles_settings['button_bg_color'];
|
143 |
+
$button_color = $ctcc_styles_settings['button_color'];
|
144 |
+
if ( ! empty ( $ctcc_styles_settings['flat_button'] ) ){
|
145 |
+
$button_style = 'border: 0; padding: 6px 9px; border-radius: 3px;';
|
146 |
+
} else {
|
147 |
+
$button_style = '';
|
148 |
+
}
|
149 |
+
// Build our CSS
|
150 |
+
$css = '<style id="ctcc-css" type="text/css" media="screen">';
|
151 |
+
$css .= '
|
152 |
+
#catapult-cookie-bar {
|
153 |
+
box-sizing: border-box;
|
154 |
+
max-height: 0;
|
155 |
+
opacity: 0;
|
156 |
+
z-index: 99999;
|
157 |
+
overflow: hidden;
|
158 |
+
color: ' . $text_color . ';
|
159 |
+
' . $position_css . '
|
160 |
+
background-color: ' . $bg_color . ';
|
161 |
+
}
|
162 |
+
#catapult-cookie-bar a {
|
163 |
+
color: ' . $link_color . ';
|
164 |
+
}
|
165 |
+
#catapult-cookie-bar .x_close span {
|
166 |
+
background-color: ' . $button_color . ';
|
167 |
+
}
|
168 |
+
button#catapultCookie {
|
169 |
+
background:' . $button_bg . ';
|
170 |
+
color: ' . $button_color . ';
|
171 |
+
' . $button_style . '
|
172 |
+
}
|
173 |
+
#catapult-cookie-bar h3 {
|
174 |
+
color: ' . $text_color . ';
|
175 |
+
}
|
176 |
+
.has-cookie-bar #catapult-cookie-bar {
|
177 |
+
opacity: 1;
|
178 |
+
max-height: 999px;
|
179 |
+
min-height: 30px;
|
180 |
+
}';
|
181 |
+
$css .= '</style>';
|
182 |
+
echo $css;
|
183 |
+
// Add it to the header
|
184 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
185 |
}
|
186 |
|
187 |
/*
|
190 |
*/
|
191 |
public function add_js() {
|
192 |
|
193 |
+
$exclude = $this->show_bar();
|
194 |
+
// Only do all this if post isn't excluded
|
195 |
+
if( ! empty( $exclude ) ) {
|
196 |
+
$options = get_option( 'ctcc_options_settings' );
|
197 |
+
$ctcc_styles_settings = get_option ( 'ctcc_styles_settings' );
|
198 |
|
199 |
+
if ( $ctcc_styles_settings['position'] == 'top-bar' || $ctcc_styles_settings['position'] == 'bottom-bar' ) {
|
200 |
+
$type = 'bar';
|
201 |
+
} else {
|
202 |
+
$type = 'block';
|
203 |
+
} ?>
|
204 |
|
205 |
+
<script type="text/javascript">
|
206 |
+
jQuery(document).ready(function($){
|
207 |
+
<?php if ( isset ( $_GET['cookie'] ) ) { ?>
|
208 |
+
catapultDeleteCookie('catAccCookies');
|
209 |
+
<?php } ?>
|
210 |
+
if(!catapultReadCookie("catAccCookies")){ // If the cookie has not been set then show the bar
|
211 |
+
$("html").addClass("has-cookie-bar");
|
212 |
+
$("html").addClass("cookie-bar-<?php echo $ctcc_styles_settings['position']; ?>");
|
213 |
+
$("html").addClass("cookie-bar-<?php echo $type; ?>");
|
214 |
+
<?php // Move the HTML down if the bar is at the top
|
215 |
+
if ( $ctcc_styles_settings['position'] == 'top-bar' ) {
|
216 |
+
?>
|
217 |
+
// Wait for the animation on the html to end before recalculating the required top margin
|
218 |
+
$("html").on('webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend', function(e) {
|
219 |
+
// code to execute after transition ends
|
220 |
+
var barHeight = $('#catapult-cookie-bar').outerHeight();
|
221 |
+
$("html").css("margin-top",barHeight);
|
222 |
+
$("body.admin-bar").css("margin-top",barHeight-32); // Push the body down if the admin bar is active
|
223 |
+
});
|
224 |
+
<?php } ?>
|
225 |
+
}
|
226 |
+
<?php if ( $options['closure'] == 'timed' ) {
|
227 |
+
// Add some script if it's on a timer
|
228 |
+
$duration = absint($options['duration']) * 1000; ?>
|
229 |
+
setTimeout(ctccCloseNotification, <?php echo $duration; ?>);
|
230 |
+
<?php } else if( $options['closure'] == 'scroll' ) {
|
231 |
+
if( isset( $options['scroll_height'] ) && intval( $options['scroll_height'] ) > 0 ) {
|
232 |
+
$height = intval( $options['scroll_height'] );
|
233 |
+
} else {
|
234 |
+
$height = 200;
|
235 |
+
}
|
236 |
?>
|
237 |
+
$(window).scroll(function(){
|
238 |
+
var scroll = $(window).scrollTop();
|
239 |
+
if ( scroll > <?php echo $height; ?> ) {
|
240 |
+
ctccCloseNotification();
|
241 |
+
}
|
242 |
+
});
|
|
|
243 |
<?php } ?>
|
244 |
+
<?php if ( ! empty ( $options['first_page'] ) ) {
|
245 |
+
// Add some script if the notification only displays on the first page ?>
|
246 |
+
ctccFirstPage();
|
247 |
+
<?php } ?>
|
248 |
+
});
|
249 |
+
</script>
|
250 |
+
|
251 |
+
<?php }
|
|
|
|
|
|
|
|
|
252 |
|
253 |
+
}
|
254 |
|
255 |
/*
|
256 |
* Add the notification bar itself
|
258 |
*/
|
259 |
public function add_notification_bar() {
|
260 |
|
261 |
+
$exclude = $this->show_bar();
|
262 |
+
// Only do all this if post isn't excluded
|
263 |
+
if( ! empty( $exclude ) ) {
|
264 |
+
|
265 |
+
$ctcc_options_settings = get_option ( 'ctcc_options_settings' );
|
266 |
+
$ctcc_content_settings = get_option ( 'ctcc_content_settings' );
|
267 |
+
$ctcc_styles_settings = get_option ( 'ctcc_styles_settings' );
|
268 |
|
269 |
+
// Check if it's a block or a bar
|
270 |
+
$is_block = true;
|
271 |
+
if ( $ctcc_styles_settings['position'] == 'top-bar' || $ctcc_styles_settings['position'] == 'bottom-bar' ) {
|
272 |
+
$is_block = false; // It's a bar
|
273 |
+
}
|
274 |
|
275 |
+
// Add some classes to the block
|
276 |
+
$classes = '';
|
277 |
+
if ( $is_block ) {
|
278 |
+
if ( ! empty ( $ctcc_styles_settings['rounded_corners'] ) ) {
|
279 |
+
$classes .= ' rounded-corners';
|
280 |
+
}
|
281 |
+
if ( ! empty ( $ctcc_styles_settings['drop_shadow'] ) ) {
|
282 |
+
$classes .= ' drop-shadow';
|
283 |
+
}
|
284 |
}
|
285 |
+
if ( ! empty ( $ctcc_styles_settings['x_close'] ) ) {
|
286 |
+
$classes .= ' use_x_close';
|
287 |
+
}
|
288 |
+
if ( empty ( $ctcc_styles_settings['display_accept_with_text'] ) ) {
|
289 |
+
$classes .= ' float-accept';
|
290 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
291 |
|
292 |
+
// Allowed tags
|
293 |
+
$allowed = array (
|
294 |
+
'a' => array (
|
295 |
+
'href' => array(),
|
296 |
+
'title' => array()
|
297 |
+
),
|
298 |
+
'br' => array(),
|
299 |
+
'em' => array(),
|
300 |
+
'strong' => array(),
|
301 |
+
'p' => array()
|
302 |
+
);
|
303 |
|
304 |
+
$content = '';
|
305 |
+
$close_content = '';
|
306 |
|
307 |
+
// Print the notification bar
|
308 |
+
$content = '<div id="catapult-cookie-bar" class="' . $classes . '">';
|
309 |
|
310 |
+
// Add a custom wrapper class if specified
|
311 |
+
if ( $ctcc_styles_settings['position'] == 'top-bar' || $ctcc_styles_settings['position'] == 'bottom-bar' ) {
|
312 |
+
$content .= '<div class="ctcc-inner ' . esc_attr ( str_replace ( '.', '', $ctcc_styles_settings['container_class'] ) ) . '">';
|
313 |
+
$close_content = '</div><!-- custom wrapper class -->';
|
314 |
+
}
|
315 |
|
316 |
+
// Add a title if it's a block
|
317 |
+
if ( $ctcc_styles_settings['position'] != 'top-bar' && $ctcc_styles_settings['position'] != 'bottom-bar' ) {
|
318 |
+
$heading_text = wp_kses ( $ctcc_content_settings['heading_text'], $allowed );
|
319 |
+
$heading_text = apply_filters( 'ctcc_heading_text', $heading_text );
|
320 |
+
$content .= sprintf ( '<h3>%s</h3>',
|
321 |
+
$heading_text
|
322 |
+
);
|
323 |
+
}
|
324 |
|
325 |
+
// Make the Read More link
|
326 |
+
$more_text = '';
|
327 |
+
if ( $ctcc_content_settings['more_info_text'] ) {
|
328 |
+
// Find what page we're linking to
|
329 |
+
if ( ! empty ( $ctcc_content_settings['more_info_url'] ) ) {
|
330 |
+
// Check the absolute URL first
|
331 |
+
$link = $ctcc_content_settings['more_info_url'];
|
332 |
+
} else {
|
333 |
+
// Make sure, we get the right page translation, using PolyLang, if pll_get_post function exists
|
334 |
+
$page_id = $ctcc_content_settings['more_info_page'];
|
335 |
+
if( function_exists( 'pll_get_post' ) ) {
|
336 |
+
$page_id = pll_get_post( $page_id );
|
337 |
+
}
|
338 |
+
// Use the internal page
|
339 |
+
$link = get_permalink( $page_id );
|
340 |
+
}
|
341 |
+
$more_info_text = wp_kses ( $ctcc_content_settings['more_info_text'], $allowed );
|
342 |
+
$more_info_text = apply_filters( 'ctcc_more_info_text', $more_info_text );
|
343 |
+
$more_text = sprintf (
|
344 |
+
'<a class="ctcc-more-info-link" tabindex=0 target="%s" href="%s">%s</a>',
|
345 |
+
esc_attr ( $ctcc_content_settings['more_info_target'] ),
|
346 |
+
esc_url ( $link ),
|
347 |
+
$more_info_text
|
348 |
+
);
|
349 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
350 |
|
351 |
+
$button_text = '';
|
352 |
+
if ( empty ( $ctcc_styles_settings['x_close'] ) ) {
|
353 |
+
$accept_text = wp_kses ( $ctcc_content_settings['accept_text'], $allowed );
|
354 |
+
$accept_text = apply_filters( 'ctcc_accept_text', $accept_text );
|
355 |
+
$button_text = sprintf (
|
356 |
+
'<button id="catapultCookie" tabindex=0 onclick="catapultAcceptCookies();">%s</button>',
|
357 |
+
$accept_text
|
358 |
+
);
|
359 |
+
}
|
360 |
|
361 |
+
// The main bar content
|
362 |
+
$notification_text = wp_kses_post ( do_shortcode( $ctcc_content_settings['notification_text'] ) );
|
363 |
+
$notification_text = apply_filters( 'ctcc_notification_text', $notification_text );
|
364 |
+
$content .= sprintf (
|
365 |
+
'<span class="ctcc-left-side">%s %s</span><span class="ctcc-right-side">%s</span>',
|
366 |
+
$notification_text,
|
367 |
+
$more_text,
|
368 |
+
$button_text
|
369 |
+
);
|
370 |
|
371 |
+
// X close button
|
372 |
+
if ( ! empty ( $ctcc_styles_settings['x_close'] ) ) {
|
373 |
+
$content .= '<div class="x_close"><span></span><span></span></div>';
|
374 |
+
}
|
375 |
|
376 |
+
// Close custom wrapper class if used
|
377 |
+
$content .= $close_content;
|
378 |
|
379 |
+
$content .= '</div><!-- #catapult-cookie-bar -->';
|
380 |
|
381 |
+
echo apply_filters ( 'catapult_cookie_content', $content, $ctcc_content_settings );
|
382 |
+
|
383 |
+
}
|
384 |
|
385 |
}
|
386 |
|
public/customizer.php
CHANGED
@@ -1,238 +1,238 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
* Customizer
|
4 |
-
*/
|
5 |
-
|
6 |
-
// Exit if accessed directly
|
7 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
8 |
-
exit;
|
9 |
-
}
|
10 |
-
|
11 |
-
function ctcc_customize_register( $wp_customize ) {
|
12 |
-
// Do stuff with $wp_customize, the WP_Customize_Manager object.
|
13 |
-
//$options = get_option( 'ctcc_styles_settings' );
|
14 |
-
//echo $options['text_color'];
|
15 |
-
|
16 |
-
$wp_customize -> add_section ( 'cctc', array (
|
17 |
-
'title' => __( 'Cookie Consent', 'uk-cookie-consent' ),
|
18 |
-
'priority' => 999
|
19 |
-
) );
|
20 |
-
|
21 |
-
$wp_customize -> add_setting( 'ctcc_styles_settings[position]', array(
|
22 |
-
'type' => 'option', // or 'option'
|
23 |
-
'capability' => 'edit_theme_options',
|
24 |
-
'theme_supports' => '', // Rarely needed.
|
25 |
-
'default' => '',
|
26 |
-
'transport' => 'refresh', // or postMessage
|
27 |
-
'sanitize_callback' => '',
|
28 |
-
'sanitize_js_callback' => '', // Basically to_json.
|
29 |
-
) );
|
30 |
-
$wp_customize -> add_control( 'ctcc_styles_settings[position]', array(
|
31 |
-
'type' => 'select',
|
32 |
-
'priority' => 1, // Within the section.
|
33 |
-
'section' => 'cctc', // Required, core or custom.
|
34 |
-
'label' => __( 'Position', 'uk-cookie-consent' ),
|
35 |
-
'choices' => array (
|
36 |
-
'top-bar' => __( 'Top Bar', 'uk-cookie-consent' ),
|
37 |
-
'bottom-bar' => __( 'Bottom Bar', 'uk-cookie-consent' ),
|
38 |
-
'top-left-block' => __( 'Top Left Block', 'uk-cookie-consent' ),
|
39 |
-
'top-right-block' => __( 'Top Right Block', 'uk-cookie-consent' ),
|
40 |
-
'bottom-left-block' => __( 'Bottom Left Block', 'uk-cookie-consent' ),
|
41 |
-
'bottom-right-block' => __( 'Bottom Right Block', 'uk-cookie-consent' ),
|
42 |
-
),
|
43 |
-
'description' => __( 'Position and placement.', 'uk-cookie-consent' )
|
44 |
-
) );
|
45 |
-
$wp_customize -> add_setting( 'ctcc_styles_settings[container_class]', array(
|
46 |
-
'type' => 'option', // or 'option'
|
47 |
-
'capability' => 'edit_theme_options',
|
48 |
-
'theme_supports' => '', // Rarely needed.
|
49 |
-
'default' => '',
|
50 |
-
'transport' => 'refresh', // or postMessage
|
51 |
-
'sanitize_callback' => '',
|
52 |
-
'sanitize_js_callback' => '', // Basically to_json.
|
53 |
-
) );
|
54 |
-
$wp_customize -> add_control( 'ctcc_styles_settings[container_class]', array(
|
55 |
-
'type' => 'text',
|
56 |
-
'priority' => 2, // Within the section.
|
57 |
-
'section' => 'cctc', // Required, core or custom.
|
58 |
-
'label' => __( 'Container Class', 'uk-cookie-consent' ),
|
59 |
-
'description' => __( 'Optional wrapper class.', 'uk-cookie-consent' )
|
60 |
-
) );
|
61 |
-
$wp_customize -> add_setting( 'ctcc_styles_settings[enqueue_styles]', array(
|
62 |
-
'type' => 'option', // or 'option'
|
63 |
-
'capability' => 'edit_theme_options',
|
64 |
-
'theme_supports' => '', // Rarely needed.
|
65 |
-
'default' => '',
|
66 |
-
'transport' => 'refresh', // or postMessage
|
67 |
-
'sanitize_callback' => '',
|
68 |
-
'sanitize_js_callback' => '', // Basically to_json.
|
69 |
-
) );
|
70 |
-
$wp_customize -> add_control( 'ctcc_styles_settings[enqueue_styles]', array(
|
71 |
-
'type' => 'checkbox',
|
72 |
-
'priority' => 4, // Within the section.
|
73 |
-
'section' => 'cctc', // Required, core or custom.
|
74 |
-
'label' => __( 'Enqueue Styles', 'uk-cookie-consent' ),
|
75 |
-
'description' => __( 'Deselect this to dequeue the plugin stylesheet.', 'uk-cookie-consent' )
|
76 |
-
) );
|
77 |
-
$wp_customize -> add_setting( 'ctcc_styles_settings[rounded_corners]', array(
|
78 |
-
'type' => 'option', // or 'option'
|
79 |
-
'capability' => 'edit_theme_options',
|
80 |
-
'theme_supports' => '', // Rarely needed.
|
81 |
-
'default' => '',
|
82 |
-
'transport' => 'refresh', // or postMessage
|
83 |
-
'sanitize_callback' => '',
|
84 |
-
'sanitize_js_callback' => '', // Basically to_json.
|
85 |
-
) );
|
86 |
-
$wp_customize -> add_control( 'ctcc_styles_settings[rounded_corners]', array(
|
87 |
-
'type' => 'checkbox',
|
88 |
-
'priority' => 6, // Within the section.
|
89 |
-
'section' => 'cctc', // Required, core or custom.
|
90 |
-
'label' => __( 'Rounded Corners', 'uk-cookie-consent' ),
|
91 |
-
'description' => __( 'Round the corners on the block.', 'uk-cookie-consent' )
|
92 |
-
) );
|
93 |
-
$wp_customize -> add_setting( 'ctcc_styles_settings[drop_shadow]', array(
|
94 |
-
'type' => 'option', // or 'option'
|
95 |
-
'capability' => 'edit_theme_options',
|
96 |
-
'theme_supports' => '', // Rarely needed.
|
97 |
-
'default' => '',
|
98 |
-
'transport' => 'refresh', // or postMessage
|
99 |
-
'sanitize_callback' => '',
|
100 |
-
'sanitize_js_callback' => '', // Basically to_json.
|
101 |
-
) );
|
102 |
-
$wp_customize -> add_control( 'ctcc_styles_settings[drop_shadow]', array(
|
103 |
-
'type' => 'checkbox',
|
104 |
-
'priority' => 8, // Within the section.
|
105 |
-
'section' => 'cctc', // Required, core or custom.
|
106 |
-
'label' => __( 'Drop Shadow', 'uk-cookie-consent' ),
|
107 |
-
'description' => __( 'Add drop shadow to the block.', 'uk-cookie-consent' )
|
108 |
-
) );
|
109 |
-
$wp_customize -> add_setting( 'ctcc_styles_settings[display_accept_with_text]', array(
|
110 |
-
'type' => 'option', // or 'option'
|
111 |
-
'capability' => 'edit_theme_options',
|
112 |
-
'theme_supports' => '', // Rarely needed.
|
113 |
-
'default' => '',
|
114 |
-
'transport' => 'refresh', // or postMessage
|
115 |
-
'sanitize_callback' => '',
|
116 |
-
'sanitize_js_callback' => '', // Basically to_json.
|
117 |
-
) );
|
118 |
-
$wp_customize -> add_control( 'ctcc_styles_settings[display_accept_with_text]', array(
|
119 |
-
'type' => 'checkbox',
|
120 |
-
'priority' => 9, // Within the section.
|
121 |
-
'section' => 'cctc', // Required, core or custom.
|
122 |
-
'label' => __( 'Display Button With Text', 'uk-cookie-consent' ),
|
123 |
-
'description' => __( 'Deselect to float button to right.', 'uk-cookie-consent' )
|
124 |
-
) );
|
125 |
-
$wp_customize -> add_setting( 'ctcc_styles_settings[x_close]', array(
|
126 |
-
'type' => 'option', // or 'option'
|
127 |
-
'capability' => 'edit_theme_options',
|
128 |
-
'theme_supports' => '', // Rarely needed.
|
129 |
-
'default' => '',
|
130 |
-
'transport' => 'refresh', // or postMessage
|
131 |
-
'sanitize_callback' => '',
|
132 |
-
'sanitize_js_callback' => '', // Basically to_json.
|
133 |
-
) );
|
134 |
-
$wp_customize -> add_control( 'ctcc_styles_settings[x_close]', array(
|
135 |
-
'type' => 'checkbox',
|
136 |
-
'priority' => 10, // Within the section.
|
137 |
-
'section' => 'cctc', // Required, core or custom.
|
138 |
-
'label' => __( 'Use X Close', 'uk-cookie-consent' ),
|
139 |
-
'description' => __( 'Replace confirmation button with \'X\' icon.', 'uk-cookie-consent' )
|
140 |
-
) );
|
141 |
-
$wp_customize -> add_setting( 'ctcc_styles_settings[text_color]', array(
|
142 |
-
'type' => 'option', // or 'option'
|
143 |
-
'capability' => 'edit_theme_options',
|
144 |
-
'theme_supports' => '', // Rarely needed.
|
145 |
-
'default' => '',
|
146 |
-
'transport' => 'refresh', // or postMessage
|
147 |
-
'sanitize_callback' => '',
|
148 |
-
'sanitize_js_callback' => '', // Basically to_json.
|
149 |
-
) );
|
150 |
-
$wp_customize -> add_control( 'ctcc_styles_settings[text_color]', array(
|
151 |
-
'type' => 'color',
|
152 |
-
'priority' => 15, // Within the section.
|
153 |
-
'section' => 'cctc', // Required, core or custom.
|
154 |
-
'label' => __( 'Text Color', 'uk-cookie-consent' ),
|
155 |
-
'description' => __( 'Text color for your notification bar.', 'uk-cookie-consent' )
|
156 |
-
) );
|
157 |
-
$wp_customize -> add_setting( 'ctcc_styles_settings[bg_color]', array(
|
158 |
-
'type' => 'option', // or 'option'
|
159 |
-
'capability' => 'edit_theme_options',
|
160 |
-
'theme_supports' => '', // Rarely needed.
|
161 |
-
'default' => '',
|
162 |
-
'transport' => 'refresh', // or postMessage
|
163 |
-
'sanitize_callback' => '',
|
164 |
-
'sanitize_js_callback' => '', // Basically to_json.
|
165 |
-
) );
|
166 |
-
$wp_customize -> add_control( 'ctcc_styles_settings[bg_color]', array(
|
167 |
-
'type' => 'color',
|
168 |
-
'priority' => 20, // Within the section.
|
169 |
-
'section' => 'cctc', // Required, core or custom.
|
170 |
-
'label' => __( 'Background Color', 'uk-cookie-consent' ),
|
171 |
-
'description' => __( 'Background color for your notification bar.', 'uk-cookie-consent' )
|
172 |
-
) );
|
173 |
-
$wp_customize -> add_setting( 'ctcc_styles_settings[link_color]', array(
|
174 |
-
'type' => 'option', // or 'option'
|
175 |
-
'capability' => 'edit_theme_options',
|
176 |
-
'theme_supports' => '', // Rarely needed.
|
177 |
-
'default' => '',
|
178 |
-
'transport' => 'refresh', // or postMessage
|
179 |
-
'sanitize_callback' => '',
|
180 |
-
'sanitize_js_callback' => '', // Basically to_json.
|
181 |
-
) );
|
182 |
-
$wp_customize -> add_control( 'ctcc_styles_settings[link_color]', array(
|
183 |
-
'type' => 'color',
|
184 |
-
'priority' => 30, // Within the section.
|
185 |
-
'section' => 'cctc', // Required, core or custom.
|
186 |
-
'label' => __( 'Link Color', 'uk-cookie-consent' ),
|
187 |
-
'description' => __( 'Link color for your notification bar.', 'uk-cookie-consent' )
|
188 |
-
) );
|
189 |
-
$wp_customize -> add_setting( 'ctcc_styles_settings[button_color]', array(
|
190 |
-
'type' => 'option', // or 'option'
|
191 |
-
'capability' => 'edit_theme_options',
|
192 |
-
'theme_supports' => '', // Rarely needed.
|
193 |
-
'default' => '',
|
194 |
-
'transport' => 'refresh', // or postMessage
|
195 |
-
'sanitize_callback' => '',
|
196 |
-
'sanitize_js_callback' => '', // Basically to_json.
|
197 |
-
) );
|
198 |
-
$wp_customize -> add_control( 'ctcc_styles_settings[button_color]', array(
|
199 |
-
'type' => 'color',
|
200 |
-
'priority' => 40, // Within the section.
|
201 |
-
'section' => 'cctc', // Required, core or custom.
|
202 |
-
'label' => __( 'Button Color', 'uk-cookie-consent' ),
|
203 |
-
'description' => __( 'Text color for your notification bar button.', 'uk-cookie-consent' )
|
204 |
-
) );
|
205 |
-
$wp_customize -> add_setting( 'ctcc_styles_settings[button_bg_color]', array(
|
206 |
-
'type' => 'option', // or 'option'
|
207 |
-
'capability' => 'edit_theme_options',
|
208 |
-
'theme_supports' => '', // Rarely needed.
|
209 |
-
'default' => '',
|
210 |
-
'transport' => 'refresh', // or postMessage
|
211 |
-
'sanitize_callback' => '',
|
212 |
-
'sanitize_js_callback' => '', // Basically to_json.
|
213 |
-
) );
|
214 |
-
$wp_customize -> add_control( 'ctcc_styles_settings[button_bg_color]', array(
|
215 |
-
'type' => 'color',
|
216 |
-
'priority' => 50, // Within the section.
|
217 |
-
'section' => 'cctc', // Required, core or custom.
|
218 |
-
'label' => __( 'Button Background', 'uk-cookie-consent' ),
|
219 |
-
'description' => __( 'Background color for your notification bar button.', 'uk-cookie-consent' )
|
220 |
-
) );
|
221 |
-
$wp_customize -> add_setting( 'ctcc_styles_settings[flat_button]', array(
|
222 |
-
'type' => 'option', // or 'option'
|
223 |
-
'capability' => 'edit_theme_options',
|
224 |
-
'theme_supports' => '', // Rarely needed.
|
225 |
-
'default' => '',
|
226 |
-
'transport' => 'refresh', // or postMessage
|
227 |
-
'sanitize_callback' => '',
|
228 |
-
'sanitize_js_callback' => '', // Basically to_json.
|
229 |
-
) );
|
230 |
-
$wp_customize -> add_control( 'ctcc_styles_settings[flat_button]', array(
|
231 |
-
'type' => 'checkbox',
|
232 |
-
'priority' => 60, // Within the section.
|
233 |
-
'section' => 'cctc', // Required, core or custom.
|
234 |
-
'label' => __( 'Flat Button', 'uk-cookie-consent' ),
|
235 |
-
'description' => __( 'Deselect to inherit button styles from the theme.', 'uk-cookie-consent' )
|
236 |
-
) );
|
237 |
-
}
|
238 |
add_action( 'customize_register', 'ctcc_customize_register' );
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Customizer
|
4 |
+
*/
|
5 |
+
|
6 |
+
// Exit if accessed directly
|
7 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
8 |
+
exit;
|
9 |
+
}
|
10 |
+
|
11 |
+
function ctcc_customize_register( $wp_customize ) {
|
12 |
+
// Do stuff with $wp_customize, the WP_Customize_Manager object.
|
13 |
+
//$options = get_option( 'ctcc_styles_settings' );
|
14 |
+
//echo $options['text_color'];
|
15 |
+
|
16 |
+
$wp_customize -> add_section ( 'cctc', array (
|
17 |
+
'title' => __( 'Cookie Consent', 'uk-cookie-consent' ),
|
18 |
+
'priority' => 999
|
19 |
+
) );
|
20 |
+
|
21 |
+
$wp_customize -> add_setting( 'ctcc_styles_settings[position]', array(
|
22 |
+
'type' => 'option', // or 'option'
|
23 |
+
'capability' => 'edit_theme_options',
|
24 |
+
'theme_supports' => '', // Rarely needed.
|
25 |
+
'default' => '',
|
26 |
+
'transport' => 'refresh', // or postMessage
|
27 |
+
'sanitize_callback' => '',
|
28 |
+
'sanitize_js_callback' => '', // Basically to_json.
|
29 |
+
) );
|
30 |
+
$wp_customize -> add_control( 'ctcc_styles_settings[position]', array(
|
31 |
+
'type' => 'select',
|
32 |
+
'priority' => 1, // Within the section.
|
33 |
+
'section' => 'cctc', // Required, core or custom.
|
34 |
+
'label' => __( 'Position', 'uk-cookie-consent' ),
|
35 |
+
'choices' => array (
|
36 |
+
'top-bar' => __( 'Top Bar', 'uk-cookie-consent' ),
|
37 |
+
'bottom-bar' => __( 'Bottom Bar', 'uk-cookie-consent' ),
|
38 |
+
'top-left-block' => __( 'Top Left Block', 'uk-cookie-consent' ),
|
39 |
+
'top-right-block' => __( 'Top Right Block', 'uk-cookie-consent' ),
|
40 |
+
'bottom-left-block' => __( 'Bottom Left Block', 'uk-cookie-consent' ),
|
41 |
+
'bottom-right-block' => __( 'Bottom Right Block', 'uk-cookie-consent' ),
|
42 |
+
),
|
43 |
+
'description' => __( 'Position and placement.', 'uk-cookie-consent' )
|
44 |
+
) );
|
45 |
+
$wp_customize -> add_setting( 'ctcc_styles_settings[container_class]', array(
|
46 |
+
'type' => 'option', // or 'option'
|
47 |
+
'capability' => 'edit_theme_options',
|
48 |
+
'theme_supports' => '', // Rarely needed.
|
49 |
+
'default' => '',
|
50 |
+
'transport' => 'refresh', // or postMessage
|
51 |
+
'sanitize_callback' => '',
|
52 |
+
'sanitize_js_callback' => '', // Basically to_json.
|
53 |
+
) );
|
54 |
+
$wp_customize -> add_control( 'ctcc_styles_settings[container_class]', array(
|
55 |
+
'type' => 'text',
|
56 |
+
'priority' => 2, // Within the section.
|
57 |
+
'section' => 'cctc', // Required, core or custom.
|
58 |
+
'label' => __( 'Container Class', 'uk-cookie-consent' ),
|
59 |
+
'description' => __( 'Optional wrapper class.', 'uk-cookie-consent' )
|
60 |
+
) );
|
61 |
+
$wp_customize -> add_setting( 'ctcc_styles_settings[enqueue_styles]', array(
|
62 |
+
'type' => 'option', // or 'option'
|
63 |
+
'capability' => 'edit_theme_options',
|
64 |
+
'theme_supports' => '', // Rarely needed.
|
65 |
+
'default' => '',
|
66 |
+
'transport' => 'refresh', // or postMessage
|
67 |
+
'sanitize_callback' => '',
|
68 |
+
'sanitize_js_callback' => '', // Basically to_json.
|
69 |
+
) );
|
70 |
+
$wp_customize -> add_control( 'ctcc_styles_settings[enqueue_styles]', array(
|
71 |
+
'type' => 'checkbox',
|
72 |
+
'priority' => 4, // Within the section.
|
73 |
+
'section' => 'cctc', // Required, core or custom.
|
74 |
+
'label' => __( 'Enqueue Styles', 'uk-cookie-consent' ),
|
75 |
+
'description' => __( 'Deselect this to dequeue the plugin stylesheet.', 'uk-cookie-consent' )
|
76 |
+
) );
|
77 |
+
$wp_customize -> add_setting( 'ctcc_styles_settings[rounded_corners]', array(
|
78 |
+
'type' => 'option', // or 'option'
|
79 |
+
'capability' => 'edit_theme_options',
|
80 |
+
'theme_supports' => '', // Rarely needed.
|
81 |
+
'default' => '',
|
82 |
+
'transport' => 'refresh', // or postMessage
|
83 |
+
'sanitize_callback' => '',
|
84 |
+
'sanitize_js_callback' => '', // Basically to_json.
|
85 |
+
) );
|
86 |
+
$wp_customize -> add_control( 'ctcc_styles_settings[rounded_corners]', array(
|
87 |
+
'type' => 'checkbox',
|
88 |
+
'priority' => 6, // Within the section.
|
89 |
+
'section' => 'cctc', // Required, core or custom.
|
90 |
+
'label' => __( 'Rounded Corners', 'uk-cookie-consent' ),
|
91 |
+
'description' => __( 'Round the corners on the block.', 'uk-cookie-consent' )
|
92 |
+
) );
|
93 |
+
$wp_customize -> add_setting( 'ctcc_styles_settings[drop_shadow]', array(
|
94 |
+
'type' => 'option', // or 'option'
|
95 |
+
'capability' => 'edit_theme_options',
|
96 |
+
'theme_supports' => '', // Rarely needed.
|
97 |
+
'default' => '',
|
98 |
+
'transport' => 'refresh', // or postMessage
|
99 |
+
'sanitize_callback' => '',
|
100 |
+
'sanitize_js_callback' => '', // Basically to_json.
|
101 |
+
) );
|
102 |
+
$wp_customize -> add_control( 'ctcc_styles_settings[drop_shadow]', array(
|
103 |
+
'type' => 'checkbox',
|
104 |
+
'priority' => 8, // Within the section.
|
105 |
+
'section' => 'cctc', // Required, core or custom.
|
106 |
+
'label' => __( 'Drop Shadow', 'uk-cookie-consent' ),
|
107 |
+
'description' => __( 'Add drop shadow to the block.', 'uk-cookie-consent' )
|
108 |
+
) );
|
109 |
+
$wp_customize -> add_setting( 'ctcc_styles_settings[display_accept_with_text]', array(
|
110 |
+
'type' => 'option', // or 'option'
|
111 |
+
'capability' => 'edit_theme_options',
|
112 |
+
'theme_supports' => '', // Rarely needed.
|
113 |
+
'default' => '',
|
114 |
+
'transport' => 'refresh', // or postMessage
|
115 |
+
'sanitize_callback' => '',
|
116 |
+
'sanitize_js_callback' => '', // Basically to_json.
|
117 |
+
) );
|
118 |
+
$wp_customize -> add_control( 'ctcc_styles_settings[display_accept_with_text]', array(
|
119 |
+
'type' => 'checkbox',
|
120 |
+
'priority' => 9, // Within the section.
|
121 |
+
'section' => 'cctc', // Required, core or custom.
|
122 |
+
'label' => __( 'Display Button With Text', 'uk-cookie-consent' ),
|
123 |
+
'description' => __( 'Deselect to float button to right.', 'uk-cookie-consent' )
|
124 |
+
) );
|
125 |
+
$wp_customize -> add_setting( 'ctcc_styles_settings[x_close]', array(
|
126 |
+
'type' => 'option', // or 'option'
|
127 |
+
'capability' => 'edit_theme_options',
|
128 |
+
'theme_supports' => '', // Rarely needed.
|
129 |
+
'default' => '',
|
130 |
+
'transport' => 'refresh', // or postMessage
|
131 |
+
'sanitize_callback' => '',
|
132 |
+
'sanitize_js_callback' => '', // Basically to_json.
|
133 |
+
) );
|
134 |
+
$wp_customize -> add_control( 'ctcc_styles_settings[x_close]', array(
|
135 |
+
'type' => 'checkbox',
|
136 |
+
'priority' => 10, // Within the section.
|
137 |
+
'section' => 'cctc', // Required, core or custom.
|
138 |
+
'label' => __( 'Use X Close', 'uk-cookie-consent' ),
|
139 |
+
'description' => __( 'Replace confirmation button with \'X\' icon.', 'uk-cookie-consent' )
|
140 |
+
) );
|
141 |
+
$wp_customize -> add_setting( 'ctcc_styles_settings[text_color]', array(
|
142 |
+
'type' => 'option', // or 'option'
|
143 |
+
'capability' => 'edit_theme_options',
|
144 |
+
'theme_supports' => '', // Rarely needed.
|
145 |
+
'default' => '',
|
146 |
+
'transport' => 'refresh', // or postMessage
|
147 |
+
'sanitize_callback' => '',
|
148 |
+
'sanitize_js_callback' => '', // Basically to_json.
|
149 |
+
) );
|
150 |
+
$wp_customize -> add_control( 'ctcc_styles_settings[text_color]', array(
|
151 |
+
'type' => 'color',
|
152 |
+
'priority' => 15, // Within the section.
|
153 |
+
'section' => 'cctc', // Required, core or custom.
|
154 |
+
'label' => __( 'Text Color', 'uk-cookie-consent' ),
|
155 |
+
'description' => __( 'Text color for your notification bar.', 'uk-cookie-consent' )
|
156 |
+
) );
|
157 |
+
$wp_customize -> add_setting( 'ctcc_styles_settings[bg_color]', array(
|
158 |
+
'type' => 'option', // or 'option'
|
159 |
+
'capability' => 'edit_theme_options',
|
160 |
+
'theme_supports' => '', // Rarely needed.
|
161 |
+
'default' => '',
|
162 |
+
'transport' => 'refresh', // or postMessage
|
163 |
+
'sanitize_callback' => '',
|
164 |
+
'sanitize_js_callback' => '', // Basically to_json.
|
165 |
+
) );
|
166 |
+
$wp_customize -> add_control( 'ctcc_styles_settings[bg_color]', array(
|
167 |
+
'type' => 'color',
|
168 |
+
'priority' => 20, // Within the section.
|
169 |
+
'section' => 'cctc', // Required, core or custom.
|
170 |
+
'label' => __( 'Background Color', 'uk-cookie-consent' ),
|
171 |
+
'description' => __( 'Background color for your notification bar.', 'uk-cookie-consent' )
|
172 |
+
) );
|
173 |
+
$wp_customize -> add_setting( 'ctcc_styles_settings[link_color]', array(
|
174 |
+
'type' => 'option', // or 'option'
|
175 |
+
'capability' => 'edit_theme_options',
|
176 |
+
'theme_supports' => '', // Rarely needed.
|
177 |
+
'default' => '',
|
178 |
+
'transport' => 'refresh', // or postMessage
|
179 |
+
'sanitize_callback' => '',
|
180 |
+
'sanitize_js_callback' => '', // Basically to_json.
|
181 |
+
) );
|
182 |
+
$wp_customize -> add_control( 'ctcc_styles_settings[link_color]', array(
|
183 |
+
'type' => 'color',
|
184 |
+
'priority' => 30, // Within the section.
|
185 |
+
'section' => 'cctc', // Required, core or custom.
|
186 |
+
'label' => __( 'Link Color', 'uk-cookie-consent' ),
|
187 |
+
'description' => __( 'Link color for your notification bar.', 'uk-cookie-consent' )
|
188 |
+
) );
|
189 |
+
$wp_customize -> add_setting( 'ctcc_styles_settings[button_color]', array(
|
190 |
+
'type' => 'option', // or 'option'
|
191 |
+
'capability' => 'edit_theme_options',
|
192 |
+
'theme_supports' => '', // Rarely needed.
|
193 |
+
'default' => '',
|
194 |
+
'transport' => 'refresh', // or postMessage
|
195 |
+
'sanitize_callback' => '',
|
196 |
+
'sanitize_js_callback' => '', // Basically to_json.
|
197 |
+
) );
|
198 |
+
$wp_customize -> add_control( 'ctcc_styles_settings[button_color]', array(
|
199 |
+
'type' => 'color',
|
200 |
+
'priority' => 40, // Within the section.
|
201 |
+
'section' => 'cctc', // Required, core or custom.
|
202 |
+
'label' => __( 'Button Color', 'uk-cookie-consent' ),
|
203 |
+
'description' => __( 'Text color for your notification bar button.', 'uk-cookie-consent' )
|
204 |
+
) );
|
205 |
+
$wp_customize -> add_setting( 'ctcc_styles_settings[button_bg_color]', array(
|
206 |
+
'type' => 'option', // or 'option'
|
207 |
+
'capability' => 'edit_theme_options',
|
208 |
+
'theme_supports' => '', // Rarely needed.
|
209 |
+
'default' => '',
|
210 |
+
'transport' => 'refresh', // or postMessage
|
211 |
+
'sanitize_callback' => '',
|
212 |
+
'sanitize_js_callback' => '', // Basically to_json.
|
213 |
+
) );
|
214 |
+
$wp_customize -> add_control( 'ctcc_styles_settings[button_bg_color]', array(
|
215 |
+
'type' => 'color',
|
216 |
+
'priority' => 50, // Within the section.
|
217 |
+
'section' => 'cctc', // Required, core or custom.
|
218 |
+
'label' => __( 'Button Background', 'uk-cookie-consent' ),
|
219 |
+
'description' => __( 'Background color for your notification bar button.', 'uk-cookie-consent' )
|
220 |
+
) );
|
221 |
+
$wp_customize -> add_setting( 'ctcc_styles_settings[flat_button]', array(
|
222 |
+
'type' => 'option', // or 'option'
|
223 |
+
'capability' => 'edit_theme_options',
|
224 |
+
'theme_supports' => '', // Rarely needed.
|
225 |
+
'default' => '',
|
226 |
+
'transport' => 'refresh', // or postMessage
|
227 |
+
'sanitize_callback' => '',
|
228 |
+
'sanitize_js_callback' => '', // Basically to_json.
|
229 |
+
) );
|
230 |
+
$wp_customize -> add_control( 'ctcc_styles_settings[flat_button]', array(
|
231 |
+
'type' => 'checkbox',
|
232 |
+
'priority' => 60, // Within the section.
|
233 |
+
'section' => 'cctc', // Required, core or custom.
|
234 |
+
'label' => __( 'Flat Button', 'uk-cookie-consent' ),
|
235 |
+
'description' => __( 'Deselect to inherit button styles from the theme.', 'uk-cookie-consent' )
|
236 |
+
) );
|
237 |
+
}
|
238 |
add_action( 'customize_register', 'ctcc_customize_register' );
|
readme.txt
CHANGED
@@ -1,29 +1,32 @@
|
|
1 |
=== Cookie Consent ===
|
2 |
Contributors: Catapult_Themes, husobj, jraczynski
|
3 |
-
Donate Link: https://paypal.
|
4 |
-
Tags: cookie law, cookies,
|
5 |
Requires at least: 4.3
|
6 |
-
Tested up to: 4.
|
7 |
-
Stable tag: 2.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
The only cookie consent plugin you'll ever need.
|
11 |
|
12 |
== Description ==
|
13 |
-
Cookie Consent
|
14 |
|
15 |
-
|
16 |
-
|
17 |
|
18 |
-
=
|
19 |
-
|
20 |
-
|
|
|
|
|
21 |
* Choice of dismissal element - either button or 'x' close
|
22 |
* Option to show the notification on the first page only - subsequent pages visited by the user will not display the message
|
|
|
23 |
* Choice of position - either top or bottom bar, or floating in one of the corners of the screen
|
24 |
-
*
|
25 |
-
*
|
26 |
-
*
|
27 |
* Inherits your theme styles where possible
|
28 |
* The option to use an absolute or external URL to link to for further information
|
29 |
* Set the cookie duration
|
@@ -32,10 +35,10 @@ We've extended the options with the plugin and in version 2.0, we've added many
|
|
32 |
= Translations =
|
33 |
|
34 |
* English
|
35 |
-
* Polish
|
36 |
* Russian
|
37 |
-
* Slovakian
|
38 |
-
* Italian
|
39 |
|
40 |
= EU Directive =
|
41 |
We think this is the simplest but most effective method of dealing with the legislation.
|
@@ -58,16 +61,73 @@ Yep. Take a look at [the demo](http://cookieconsent.catapultthemes.com/). Reset
|
|
58 |
You have to make up your own mind about that or consult a legal expert.
|
59 |
= Where can I find out more about the UK laws regarding cookies? =
|
60 |
You will find more details of the regulations on the [Information Commissioner's Office site](http://www.ico.gov.uk/for_organisations/privacy_and_electronic_communications/the_guide/cookies.aspx).
|
|
|
61 |
== Screenshots ==
|
62 |
1. Notification bar along the top of the screen
|
63 |
2. Detail of notification bar on the bottom of the screen
|
64 |
3. Notification box in corner
|
65 |
4. Customization panel
|
66 |
5. Example settings page
|
|
|
67 |
== Changelog ==
|
68 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
= 2.1.2 =
|
70 |
-
*
|
71 |
|
72 |
= 2.1.1 =
|
73 |
* Fixed: missing images in admin
|
1 |
=== Cookie Consent ===
|
2 |
Contributors: Catapult_Themes, husobj, jraczynski
|
3 |
+
Donate Link: https://www.paypal.me/catapultthemes
|
4 |
+
Tags: cookie law, cookies, eu cookie law, eu privacy directive, cookie compliance, cookie law, cookie notice, cookie notification, wpml, geo ip
|
5 |
Requires at least: 4.3
|
6 |
+
Tested up to: 4.8
|
7 |
+
Stable tag: 2.3.3
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
The only cookie consent plugin you'll ever need.
|
11 |
|
12 |
== Description ==
|
13 |
+
Cookie Consent is one of the simplest and most popular cookie notification plugins out there. It's been actively developed and supported since 2012 and has over 100 5 star reviews.
|
14 |
|
15 |
+
> <strong>New in 2.3.0:</strong><br>Geo IP support - choose which continents to display notifications (requires GeoIP Detect plugin to be installed)<br>
|
16 |
+
> <strong>New in 2.2.0:</strong><br>Easily select pages or posts where the cookie notification doesn't display. You now have complete control over which pages display a notification and which don't.<br>Close on scroll - optionally choose scrolling as closure method.
|
17 |
|
18 |
+
= Simple set up =
|
19 |
+
One of the most popular aspects of the plugin is its simplicity of use - simply install and activate the plugin to automatically add the cookie consent notification bar. There is no need to configure it. On activation, the plugin creates and populates a page on your site with information about your cookie policy and automatically links to the page from the notification bar. So if you're using the default settings, it's a matter of seconds to get up and running.
|
20 |
+
|
21 |
+
= Features =
|
22 |
+
* Choice of dismissal method - on click, on scroll, or timed
|
23 |
* Choice of dismissal element - either button or 'x' close
|
24 |
* Option to show the notification on the first page only - subsequent pages visited by the user will not display the message
|
25 |
+
* Option to exclude selected pages and posts from displaying the notification
|
26 |
* Choice of position - either top or bottom bar, or floating in one of the corners of the screen
|
27 |
+
* Translation support
|
28 |
+
* Responsive
|
29 |
+
* Customization options - including the ability to update styles from within the customizer
|
30 |
* Inherits your theme styles where possible
|
31 |
* The option to use an absolute or external URL to link to for further information
|
32 |
* Set the cookie duration
|
35 |
= Translations =
|
36 |
|
37 |
* English
|
38 |
+
* Polish (jraczynski)
|
39 |
* Russian
|
40 |
+
* Slovakian (lacike)
|
41 |
+
* Italian (wocmultimedia)
|
42 |
|
43 |
= EU Directive =
|
44 |
We think this is the simplest but most effective method of dealing with the legislation.
|
61 |
You have to make up your own mind about that or consult a legal expert.
|
62 |
= Where can I find out more about the UK laws regarding cookies? =
|
63 |
You will find more details of the regulations on the [Information Commissioner's Office site](http://www.ico.gov.uk/for_organisations/privacy_and_electronic_communications/the_guide/cookies.aspx).
|
64 |
+
|
65 |
== Screenshots ==
|
66 |
1. Notification bar along the top of the screen
|
67 |
2. Detail of notification bar on the bottom of the screen
|
68 |
3. Notification box in corner
|
69 |
4. Customization panel
|
70 |
5. Example settings page
|
71 |
+
|
72 |
== Changelog ==
|
73 |
|
74 |
+
= 2.3.3 =
|
75 |
+
* Added: Polylang support for more_info setting
|
76 |
+
* Added: setting to opt out of tracking
|
77 |
+
* Updated: tracking class
|
78 |
+
|
79 |
+
= 2.3.2 =
|
80 |
+
* Updated: incorrect text domains
|
81 |
+
* Updated: tracking class to 1.0.1
|
82 |
+
* Updated: removed unnecessary keys from wpml-config.xml
|
83 |
+
|
84 |
+
= 2.3.1 =
|
85 |
+
* Added: link to create privacy policy
|
86 |
+
* Added: tracking
|
87 |
+
|
88 |
+
= 2.3.0 =
|
89 |
+
* Added: GeoIP support (suggested by jeffrobbins)
|
90 |
+
|
91 |
+
= 2.2.5 =
|
92 |
+
* Fixed: dismissed notification bar obscuring content
|
93 |
+
|
94 |
+
= 2.2.4 =
|
95 |
+
* Fixed: correct escaping for more info URL
|
96 |
+
|
97 |
+
= 2.2.3 =
|
98 |
+
* Updated: stable tag
|
99 |
+
|
100 |
+
= 2.2.2 =
|
101 |
+
* Fixed: text domain in class-ctcc-metafield (spotted by mmmisiek)
|
102 |
+
|
103 |
+
= 2.2.1 =
|
104 |
+
* Updated: better escaping (suggested by djpaul)
|
105 |
+
|
106 |
+
= 2.2.0 =
|
107 |
+
* Added: optionally exclude pages and posts from displaying the cookie notification (suggested by jeffrobbins)
|
108 |
+
* Added: close notification on scroll option (suggested by jeffrobbins)
|
109 |
+
* Added: class name for more info link
|
110 |
+
* Fixed: x-close responsive margin
|
111 |
+
* Updated: allow shortcodes in notification text
|
112 |
+
* Updated: better settings sanitization
|
113 |
+
|
114 |
+
= 2.1.7 =
|
115 |
+
* Updated: admin styles
|
116 |
+
|
117 |
+
= 2.1.6 =
|
118 |
+
* Updated: wpml-config.xml file (thanks to vukvukovich)
|
119 |
+
|
120 |
+
= 2.1.5 =
|
121 |
+
* Fixed: added missing Italian translation files
|
122 |
+
|
123 |
+
= 2.1.4 =
|
124 |
+
* Fixed: replaced wpml-config.xml file
|
125 |
+
|
126 |
+
= 2.1.3 =
|
127 |
+
* Updated: tags
|
128 |
+
|
129 |
= 2.1.2 =
|
130 |
+
* Updated: translation list
|
131 |
|
132 |
= 2.1.1 =
|
133 |
* Fixed: missing images in admin
|
tracking/class-plugin-usage-tracker.php
ADDED
@@ -0,0 +1,842 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* This is the class that sends all the data back to the home site
|
4 |
+
* It also handles opting in and deactivation
|
5 |
+
* @version 1.1.1
|
6 |
+
*/
|
7 |
+
|
8 |
+
// Exit if accessed directly
|
9 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
+
exit;
|
11 |
+
}
|
12 |
+
|
13 |
+
if( ! class_exists( 'Plugin_Usage_Tracker') ) {
|
14 |
+
|
15 |
+
class Plugin_Usage_Tracker {
|
16 |
+
|
17 |
+
private $wisdom_version = '1.1.1';
|
18 |
+
private $home_url = '';
|
19 |
+
private $plugin_file = '';
|
20 |
+
private $plugin_name = '';
|
21 |
+
private $options = array();
|
22 |
+
private $require_optin = true;
|
23 |
+
private $include_goodbye_form = true;
|
24 |
+
private $marketing = false;
|
25 |
+
private $collect_email = false;
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Class constructor
|
29 |
+
*
|
30 |
+
* @param $_home_url The URL to the site we're sending data to
|
31 |
+
* @param $_plugin_file The file path for this plugin
|
32 |
+
* @param $_options Plugin options to track
|
33 |
+
* @param $_require_optin Whether user opt-in is required (always required on WordPress.org)
|
34 |
+
* @param $_include_goodbye_form Whether to include a form when the user deactivates
|
35 |
+
* @param $_marketing Marketing method:
|
36 |
+
* 0: Don't collect email addresses
|
37 |
+
* 1: Request permission same time as tracking opt-in
|
38 |
+
* 2: Request permission after opt-in
|
39 |
+
*/
|
40 |
+
public function __construct(
|
41 |
+
$_plugin_file,
|
42 |
+
$_home_url,
|
43 |
+
$_options,
|
44 |
+
$_require_optin=true,
|
45 |
+
$_include_goodbye_form=true,
|
46 |
+
$_marketing=false ) {
|
47 |
+
|
48 |
+
$this->plugin_file = $_plugin_file;
|
49 |
+
$this->home_url = trailingslashit( $_home_url );
|
50 |
+
$this->plugin_name = basename( $this->plugin_file, '.php' );
|
51 |
+
$this->options = $_options;
|
52 |
+
$this->require_optin = $_require_optin;
|
53 |
+
$this->include_goodbye_form = $_include_goodbye_form;
|
54 |
+
$this->marketing = $_marketing;
|
55 |
+
|
56 |
+
// Schedule some tracking when activated
|
57 |
+
register_activation_hook( $this->plugin_file, array( $this, 'schedule_tracking' ) );
|
58 |
+
// Deactivation hook
|
59 |
+
register_deactivation_hook( $this->plugin_file, array( $this, 'deactivate_this_plugin' ) );
|
60 |
+
|
61 |
+
// Get it going
|
62 |
+
$this->init();
|
63 |
+
|
64 |
+
}
|
65 |
+
|
66 |
+
public function init() {
|
67 |
+
// Check marketing
|
68 |
+
if( $this->marketing == 3 ) {
|
69 |
+
$this->set_can_collect_email( true, $this->plugin_name );
|
70 |
+
}
|
71 |
+
|
72 |
+
// Check whether opt-in is required
|
73 |
+
// If not, then tracking is allowed
|
74 |
+
if( ! $this->require_optin ) {
|
75 |
+
$this->set_is_tracking_allowed( true );
|
76 |
+
$this->update_block_notice();
|
77 |
+
$this->do_tracking();
|
78 |
+
}
|
79 |
+
|
80 |
+
// Hook our do_tracking function to the daily action
|
81 |
+
// add_filter( 'cron_schedules', array( $this, 'add_weekly_cron_schedule' ) );
|
82 |
+
add_action( 'put_do_weekly_action', array( $this, 'do_tracking' ) );
|
83 |
+
|
84 |
+
// Use this action for local testing
|
85 |
+
// add_action( 'admin_init', array( $this, 'do_tracking' ) );
|
86 |
+
|
87 |
+
// Display the admin notice on activation
|
88 |
+
add_action( 'admin_notices', array( $this, 'optin_notice' ) );
|
89 |
+
add_action( 'admin_notices', array( $this, 'marketing_notice' ) );
|
90 |
+
|
91 |
+
// Deactivation
|
92 |
+
add_filter( 'plugin_action_links_' . plugin_basename( $this->plugin_file ), array( $this, 'filter_action_links' ) );
|
93 |
+
add_action( 'admin_footer-plugins.php', array( $this, 'goodbye_ajax' ) );
|
94 |
+
add_action( 'wp_ajax_goodbye_form', array( $this, 'goodbye_form_callback' ) );
|
95 |
+
|
96 |
+
}
|
97 |
+
|
98 |
+
/**
|
99 |
+
* Add weekly option to the cron schedule
|
100 |
+
*
|
101 |
+
* @since 1.1.2
|
102 |
+
*/
|
103 |
+
public function add_weekly_cron_schedule( $schedules ) {
|
104 |
+
$schedules['weekly'] = array(
|
105 |
+
'interval' => 604800,
|
106 |
+
'display' => __( 'Once weekly', 'put-usage-tracker' )
|
107 |
+
);
|
108 |
+
return $schedules;
|
109 |
+
}
|
110 |
+
|
111 |
+
/**
|
112 |
+
* When the plugin is activated
|
113 |
+
* Create scheduled event
|
114 |
+
* And check if tracking is enabled - perhaps the plugin has been reactivated
|
115 |
+
*
|
116 |
+
* @since 1.0.0
|
117 |
+
*/
|
118 |
+
public function schedule_tracking() {
|
119 |
+
// For historical reasons, this is called 'weekly' but is in fact daily
|
120 |
+
if ( ! wp_next_scheduled( 'put_do_weekly_action' ) ) {
|
121 |
+
wp_schedule_event( time(), 'daily', 'put_do_weekly_action' );
|
122 |
+
}
|
123 |
+
// Run tracking here in case plugin has been reactivated
|
124 |
+
$this->do_tracking();
|
125 |
+
}
|
126 |
+
|
127 |
+
/**
|
128 |
+
* This is our function to get everything going
|
129 |
+
* Check that user has opted in
|
130 |
+
* Collect data
|
131 |
+
* Then send it back
|
132 |
+
*
|
133 |
+
* @since 1.0.0
|
134 |
+
*/
|
135 |
+
public function do_tracking() {
|
136 |
+
// If the home site hasn't been defined, we just drop out. Nothing much we can do.
|
137 |
+
if ( ! $this->home_url ) {
|
138 |
+
return;
|
139 |
+
}
|
140 |
+
|
141 |
+
// Check to see if the user has opted in to tracking
|
142 |
+
$allow_tracking = $this->get_is_tracking_allowed();
|
143 |
+
if( ! $allow_tracking ) {
|
144 |
+
return;
|
145 |
+
}
|
146 |
+
|
147 |
+
// Check to see if it's time to track
|
148 |
+
$track_time = $this->get_is_time_to_track();
|
149 |
+
if( ! $track_time ) {
|
150 |
+
return;
|
151 |
+
}
|
152 |
+
|
153 |
+
// Get our data
|
154 |
+
$body = $this->get_data();
|
155 |
+
|
156 |
+
// Send the data
|
157 |
+
$this->send_data( $body );
|
158 |
+
|
159 |
+
}
|
160 |
+
|
161 |
+
/**
|
162 |
+
* Send the data to the home site
|
163 |
+
*
|
164 |
+
* @since 1.0.0
|
165 |
+
*/
|
166 |
+
public function send_data( $body ) {
|
167 |
+
|
168 |
+
$request = wp_remote_post(
|
169 |
+
esc_url( $this->home_url . '?usage_tracker=hello' ),
|
170 |
+
array(
|
171 |
+
'method' => 'POST',
|
172 |
+
'timeout' => 20,
|
173 |
+
'redirection' => 5,
|
174 |
+
'httpversion' => '1.1',
|
175 |
+
'blocking' => true,
|
176 |
+
'body' => $body,
|
177 |
+
'user-agent' => 'PUT/1.0.0; ' . get_bloginfo( 'url' )
|
178 |
+
)
|
179 |
+
);
|
180 |
+
|
181 |
+
$this->set_track_time();
|
182 |
+
|
183 |
+
if( is_wp_error( $request ) ) {
|
184 |
+
return $request;
|
185 |
+
}
|
186 |
+
|
187 |
+
}
|
188 |
+
|
189 |
+
/**
|
190 |
+
* Here we collect most of the data
|
191 |
+
*
|
192 |
+
* @since 1.0.0
|
193 |
+
*/
|
194 |
+
public function get_data() {
|
195 |
+
|
196 |
+
// Use this to pass error messages back if necessary
|
197 |
+
$body['message'] = '';
|
198 |
+
|
199 |
+
// Use this array to send data back
|
200 |
+
$body = array(
|
201 |
+
'plugin_slug' => sanitize_text_field( $this->plugin_name ),
|
202 |
+
'url' => get_bloginfo( 'url' ),
|
203 |
+
'site_name' => get_bloginfo( 'name' ),
|
204 |
+
'site_version' => get_bloginfo( 'version' ),
|
205 |
+
'site_language' => get_bloginfo( 'language' ),
|
206 |
+
'charset' => get_bloginfo( 'charset' ),
|
207 |
+
'wisdom_version' => $this->wisdom_version,
|
208 |
+
'php_version' => phpversion(),
|
209 |
+
'multisite' => is_multisite(),
|
210 |
+
'file_location' => __FILE__
|
211 |
+
);
|
212 |
+
|
213 |
+
// Collect the email if the correct option has been set
|
214 |
+
if( $this->get_can_collect_email() ) {
|
215 |
+
$body['email'] = get_bloginfo( 'admin_email' );
|
216 |
+
}
|
217 |
+
$body['marketing_method'] = $this->marketing;
|
218 |
+
|
219 |
+
$body['server'] = isset( $_SERVER['SERVER_SOFTWARE'] ) ? $_SERVER['SERVER_SOFTWARE'] : '';
|
220 |
+
|
221 |
+
// Retrieve current plugin information
|
222 |
+
if( ! function_exists( 'get_plugins' ) ) {
|
223 |
+
include ABSPATH . '/wp-admin/includes/plugin.php';
|
224 |
+
}
|
225 |
+
|
226 |
+
$plugins = array_keys( get_plugins() );
|
227 |
+
$active_plugins = get_option( 'active_plugins', array() );
|
228 |
+
|
229 |
+
foreach ( $plugins as $key => $plugin ) {
|
230 |
+
if ( in_array( $plugin, $active_plugins ) ) {
|
231 |
+
// Remove active plugins from list so we can show active and inactive separately
|
232 |
+
unset( $plugins[$key] );
|
233 |
+
}
|
234 |
+
}
|
235 |
+
|
236 |
+
$body['active_plugins'] = $active_plugins;
|
237 |
+
$body['inactive_plugins'] = $plugins;
|
238 |
+
|
239 |
+
// Check text direction
|
240 |
+
$body['text_direction'] = 'LTR';
|
241 |
+
if( function_exists( 'is_rtl' ) ) {
|
242 |
+
if( is_rtl() ) {
|
243 |
+
$body['text_direction'] = 'RTL';
|
244 |
+
}
|
245 |
+
} else {
|
246 |
+
$body['text_direction'] = 'not set';
|
247 |
+
}
|
248 |
+
|
249 |
+
/**
|
250 |
+
* Get our plugin data
|
251 |
+
* Currently we grab plugin name and version
|
252 |
+
* Or, return a message if the plugin data is not available
|
253 |
+
* @since 1.0.0
|
254 |
+
*/
|
255 |
+
$plugin = $this->plugin_data();
|
256 |
+
if( empty( $plugin ) ) {
|
257 |
+
// We can't find the plugin data
|
258 |
+
// Send a message back to our home site
|
259 |
+
$body['message'] .= __( 'We can\'t detect any plugin information. This is most probably because you have not included the code in the plugin main file.', 'plugin-usage-tracker' );
|
260 |
+
$body['status'] = 'Data not found'; // Never translated
|
261 |
+
} else {
|
262 |
+
if( isset( $plugin['Name'] ) ) {
|
263 |
+
$body['plugin'] = sanitize_text_field( $plugin['Name'] );
|
264 |
+
}
|
265 |
+
if( isset( $plugin['Version'] ) ) {
|
266 |
+
$body['version'] = sanitize_text_field( $plugin['Version'] );
|
267 |
+
}
|
268 |
+
$body['status'] = 'Active'; // Never translated
|
269 |
+
}
|
270 |
+
|
271 |
+
/**
|
272 |
+
* Get our plugin options
|
273 |
+
* @since 1.0.0
|
274 |
+
*/
|
275 |
+
$options = $this->options;
|
276 |
+
$plugin_options = array();
|
277 |
+
if( ! empty( $options ) && is_array( $options ) ) {
|
278 |
+
foreach( $options as $option ) {
|
279 |
+
$fields = get_option( $option );
|
280 |
+
// Check for permission to send this option
|
281 |
+
if( isset( $fields['wisdom_registered_setting'] ) ) {
|
282 |
+
foreach( $fields as $key=>$value ) {
|
283 |
+
$plugin_options[$key] = $value;
|
284 |
+
}
|
285 |
+
}
|
286 |
+
}
|
287 |
+
}
|
288 |
+
$body['plugin_options'] = $this->options; // Returns array
|
289 |
+
$body['plugin_options_fields'] = $plugin_options; // Returns object
|
290 |
+
|
291 |
+
/**
|
292 |
+
* Get our theme data
|
293 |
+
* Currently we grab theme name and version
|
294 |
+
* @since 1.0.0
|
295 |
+
*/
|
296 |
+
$theme = wp_get_theme();
|
297 |
+
if( $theme->Name ) {
|
298 |
+
$body['theme'] = sanitize_text_field( $theme->Name );
|
299 |
+
}
|
300 |
+
if( $theme->Version ) {
|
301 |
+
$body['theme_version'] = sanitize_text_field( $theme->Version );
|
302 |
+
}
|
303 |
+
|
304 |
+
// Return the data
|
305 |
+
return $body;
|
306 |
+
|
307 |
+
}
|
308 |
+
|
309 |
+
/**
|
310 |
+
* Return plugin data
|
311 |
+
* @since 1.0.0
|
312 |
+
*/
|
313 |
+
public function plugin_data() {
|
314 |
+
// Being cautious here
|
315 |
+
if( ! function_exists( 'get_plugin_data' ) ) {
|
316 |
+
include ABSPATH . '/wp-admin/includes/plugin.php';
|
317 |
+
}
|
318 |
+
// Retrieve current plugin information
|
319 |
+
$plugin = get_plugin_data( $this->plugin_file );
|
320 |
+
return $plugin;
|
321 |
+
}
|
322 |
+
|
323 |
+
/**
|
324 |
+
* Deactivating plugin
|
325 |
+
* @since 1.0.0
|
326 |
+
*/
|
327 |
+
public function deactivate_this_plugin() {
|
328 |
+
// Check to see if the user has opted in to tracking
|
329 |
+
$allow_tracking = $this->get_is_tracking_allowed();
|
330 |
+
if( ! $allow_tracking ) {
|
331 |
+
return;
|
332 |
+
}
|
333 |
+
$body = $this->get_data();
|
334 |
+
$body['status'] = 'Deactivated'; // Never translated
|
335 |
+
$body['deactivated_date'] = time();
|
336 |
+
|
337 |
+
// Add deactivation form data
|
338 |
+
if( false !== get_option( 'wisdom_deactivation_reason_' . $this->plugin_name ) ) {
|
339 |
+
$body['deactivation_reason'] = get_option( 'wisdom_deactivation_reason_' . $this->plugin_name );
|
340 |
+
}
|
341 |
+
if( false !== get_option( 'wisdom_deactivation_details_' . $this->plugin_name ) ) {
|
342 |
+
$body['deactivation_details'] = get_option( 'wisdom_deactivation_details_' . $this->plugin_name );
|
343 |
+
}
|
344 |
+
|
345 |
+
$this->send_data( $body );
|
346 |
+
// Clear scheduled update
|
347 |
+
wp_clear_scheduled_hook( 'put_do_weekly_action' );
|
348 |
+
}
|
349 |
+
|
350 |
+
/**
|
351 |
+
* Is tracking allowed?
|
352 |
+
* @since 1.0.0
|
353 |
+
*/
|
354 |
+
public function get_is_tracking_allowed() {
|
355 |
+
// First, check if the user has changed their mind and opted out of tracking
|
356 |
+
if( $this->has_user_opted_out() ) {
|
357 |
+
$this->set_is_tracking_allowed( false, $this->plugin_name );
|
358 |
+
return false;
|
359 |
+
}
|
360 |
+
// The wisdom_allow_tracking option is an array of plugins that are being tracked
|
361 |
+
$allow_tracking = get_option( 'wisdom_allow_tracking' );
|
362 |
+
// If this plugin is in the array, then tracking is allowed
|
363 |
+
if( isset( $allow_tracking[$this->plugin_name] ) ) {
|
364 |
+
return true;
|
365 |
+
}
|
366 |
+
return false;
|
367 |
+
}
|
368 |
+
|
369 |
+
/**
|
370 |
+
* Set if tracking is allowed
|
371 |
+
* Option is an array of all plugins with tracking permitted
|
372 |
+
* More than one plugin may be using the tracker
|
373 |
+
* @since 1.0.0
|
374 |
+
* @param $is_allowed Boolean true if tracking is allowed, false if not
|
375 |
+
*/
|
376 |
+
public function set_is_tracking_allowed( $is_allowed, $plugin=null ) {
|
377 |
+
if( empty( $plugin ) ) {
|
378 |
+
$plugin = $this->plugin_name;
|
379 |
+
}
|
380 |
+
// The wisdom_allow_tracking option is an array of plugins that are being tracked
|
381 |
+
$allow_tracking = get_option( 'wisdom_allow_tracking' );
|
382 |
+
|
383 |
+
// If the user has decided to opt out
|
384 |
+
if( $this->has_user_opted_out() ) {
|
385 |
+
if( isset( $allow_tracking[$plugin] ) ) {
|
386 |
+
unset( $allow_tracking[$plugin] );
|
387 |
+
}
|
388 |
+
} else if( $is_allowed || ! $this->require_optin ) {
|
389 |
+
// If the user has agreed to allow tracking or if opt-in is not required
|
390 |
+
if( empty( $allow_tracking ) || ! is_array( $allow_tracking ) ) {
|
391 |
+
// If nothing exists in the option yet, start a new array with the plugin name
|
392 |
+
$allow_tracking = array( $plugin => $plugin );
|
393 |
+
} else {
|
394 |
+
// Else add the plugin name to the array
|
395 |
+
$allow_tracking[$plugin] = $plugin;
|
396 |
+
}
|
397 |
+
} else {
|
398 |
+
if( isset( $allow_tracking[$plugin] ) ) {
|
399 |
+
unset( $allow_tracking[$plugin] );
|
400 |
+
}
|
401 |
+
}
|
402 |
+
update_option( 'wisdom_allow_tracking', $allow_tracking );
|
403 |
+
}
|
404 |
+
|
405 |
+
/**
|
406 |
+
* Has the user opted out of allowing tracking?
|
407 |
+
* @since 1.1.0
|
408 |
+
* @return Boolean
|
409 |
+
*/
|
410 |
+
public function has_user_opted_out() {
|
411 |
+
// Iterate through the options that are being tracked looking for wisdom_opt_out setting
|
412 |
+
if( ! empty( $this->options ) ) {
|
413 |
+
foreach( $this->options as $option_name ) {
|
414 |
+
// Check each option
|
415 |
+
$options = get_option( $option_name );
|
416 |
+
// If we find the setting, return true
|
417 |
+
if( ! empty( $options['wisdom_opt_out'] ) ) {
|
418 |
+
return true;
|
419 |
+
}
|
420 |
+
}
|
421 |
+
}
|
422 |
+
return false;
|
423 |
+
}
|
424 |
+
|
425 |
+
/**
|
426 |
+
* Check if it's time to track
|
427 |
+
* @since 1.1.1
|
428 |
+
*/
|
429 |
+
public function get_is_time_to_track() {
|
430 |
+
// Let's see if we're due to track this plugin yet
|
431 |
+
$track_times = get_option( 'wisdom_last_track_time', array() );
|
432 |
+
if( ! isset( $track_times[$this->plugin_name] ) ) {
|
433 |
+
// If we haven't set a time for this plugin yet, then we must track it
|
434 |
+
return true;
|
435 |
+
} else {
|
436 |
+
// If the time is set, let's see if it's more than a day ago
|
437 |
+
if( $track_times[$this->plugin_name] < strtotime( '-1 day' ) ) {
|
438 |
+
return true;
|
439 |
+
}
|
440 |
+
}
|
441 |
+
return false;
|
442 |
+
}
|
443 |
+
|
444 |
+
/**
|
445 |
+
* Record the time we send tracking data
|
446 |
+
* @since 1.1.1
|
447 |
+
*/
|
448 |
+
public function set_track_time() {
|
449 |
+
// We've tracked, so record the time
|
450 |
+
$track_times = get_option( 'wisdom_last_track_time', array() );
|
451 |
+
// Set different times according to plugin, in case we are tracking multiple plugins
|
452 |
+
$track_times[$this->plugin_name] = time();
|
453 |
+
update_option( 'wisdom_last_track_time', $track_times );
|
454 |
+
}
|
455 |
+
|
456 |
+
/**
|
457 |
+
* Set if we should block the opt-in notice for this plugin
|
458 |
+
* Option is an array of all plugins that have received a response from the user
|
459 |
+
* @since 1.0.0
|
460 |
+
*/
|
461 |
+
public function update_block_notice( $plugin=null ) {
|
462 |
+
if( empty( $plugin ) ) {
|
463 |
+
$plugin = $this->plugin_name;
|
464 |
+
}
|
465 |
+
$block_notice = get_option( 'wisdom_block_notice' );
|
466 |
+
if( empty( $block_notice ) || ! is_array( $block_notice ) ) {
|
467 |
+
// If nothing exists in the option yet, start a new array with the plugin name
|
468 |
+
$block_notice = array( $plugin => $plugin );
|
469 |
+
} else {
|
470 |
+
// Else add the plugin name to the array
|
471 |
+
$block_notice[$plugin] = $plugin;
|
472 |
+
}
|
473 |
+
update_option( 'wisdom_block_notice', $block_notice );
|
474 |
+
}
|
475 |
+
|
476 |
+
/**
|
477 |
+
* Can we collect the email address?
|
478 |
+
* @since 1.0.0
|
479 |
+
*/
|
480 |
+
public function get_can_collect_email() {
|
481 |
+
// The wisdom_collect_email option is an array of plugins that are being tracked
|
482 |
+
$collect_email = get_option( 'wisdom_collect_email' );
|
483 |
+
// If this plugin is in the array, then we can collect the email address
|
484 |
+
if( isset( $collect_email[$this->plugin_name] ) ) {
|
485 |
+
return true;
|
486 |
+
}
|
487 |
+
return false;
|
488 |
+
}
|
489 |
+
|
490 |
+
/**
|
491 |
+
* Set if user has allowed us to collect their email address
|
492 |
+
* Option is an array of all plugins with email collection permitted
|
493 |
+
* More than one plugin may be using the tracker
|
494 |
+
* @since 1.0.0
|
495 |
+
* @param $can_collect Boolean true if collection is allowed, false if not
|
496 |
+
*/
|
497 |
+
public function set_can_collect_email( $can_collect, $plugin=null ) {
|
498 |
+
if( empty( $plugin ) ) {
|
499 |
+
$plugin = $this->plugin_name;
|
500 |
+
}
|
501 |
+
// The wisdom_collect_email option is an array of plugins that are being tracked
|
502 |
+
$collect_email = get_option( 'wisdom_collect_email' );
|
503 |
+
// If the user has agreed to allow tracking or if opt-in is not required
|
504 |
+
if( $can_collect ) {
|
505 |
+
if( empty( $collect_email ) || ! is_array( $collect_email ) ) {
|
506 |
+
// If nothing exists in the option yet, start a new array with the plugin name
|
507 |
+
$collect_email = array( $plugin => $plugin );
|
508 |
+
} else {
|
509 |
+
// Else add the plugin name to the array
|
510 |
+
$collect_email[$plugin] = $plugin;
|
511 |
+
}
|
512 |
+
} else {
|
513 |
+
if( isset( $collect_email[$plugin] ) ) {
|
514 |
+
unset( $collect_email[$plugin] );
|
515 |
+
}
|
516 |
+
}
|
517 |
+
update_option( 'wisdom_collect_email', $collect_email );
|
518 |
+
}
|
519 |
+
|
520 |
+
/**
|
521 |
+
* Display the admin notice to users to allow them to opt in
|
522 |
+
*
|
523 |
+
* @since 1.0.0
|
524 |
+
*/
|
525 |
+
public function optin_notice() {
|
526 |
+
// Check for plugin args
|
527 |
+
if( isset( $_GET['plugin'] ) && isset( $_GET['plugin_action'] ) ) {
|
528 |
+
$plugin = sanitize_text_field( $_GET['plugin'] );
|
529 |
+
$action = sanitize_text_field( $_GET['plugin_action'] );
|
530 |
+
if( $action == 'yes' ) {
|
531 |
+
$this->set_is_tracking_allowed( true, $plugin );
|
532 |
+
$this->do_tracking(); // Run this straightaway
|
533 |
+
} else {
|
534 |
+
$this->set_is_tracking_allowed( false, $plugin );
|
535 |
+
}
|
536 |
+
$this->update_block_notice( $plugin );
|
537 |
+
}
|
538 |
+
|
539 |
+
// Check whether to block the notice, e.g. because we're in a local environment
|
540 |
+
// wisdom_block_notice works the same as wisdom_allow_tracking, an array of plugin names
|
541 |
+
$block_notice = get_option( 'wisdom_block_notice' );
|
542 |
+
if( isset( $block_notice[$this->plugin_name] ) ) {
|
543 |
+
return;
|
544 |
+
}
|
545 |
+
|
546 |
+
if ( ! current_user_can( 'manage_options' ) ) {
|
547 |
+
return;
|
548 |
+
}
|
549 |
+
|
550 |
+
// @credit EDD
|
551 |
+
// Don't bother asking user to opt in if they're in local dev
|
552 |
+
if ( stristr( network_site_url( '/' ), 'dev' ) !== false || stristr( network_site_url( '/' ), 'localhost' ) !== false || stristr( network_site_url( '/' ), ':8888' ) !== false ) {
|
553 |
+
$this->update_block_notice();
|
554 |
+
} else {
|
555 |
+
|
556 |
+
// Display the notice requesting permission to track
|
557 |
+
// Retrieve current plugin information
|
558 |
+
$plugin = $this->plugin_data();
|
559 |
+
$plugin_name = $plugin['Name'];
|
560 |
+
|
561 |
+
// Args to add to query if user opts in to tracking
|
562 |
+
$yes_args = array(
|
563 |
+
'plugin' => $this->plugin_name,
|
564 |
+
'plugin_action' => 'yes'
|
565 |
+
);
|
566 |
+
|
567 |
+
// Decide how to request permission to collect email addresses
|
568 |
+
if( $this->marketing == 1 ) {
|
569 |
+
// Option 1 combines permissions to track and collect email
|
570 |
+
$yes_args['marketing_optin'] = 'yes';
|
571 |
+
} else if( $this->marketing == 2 ) {
|
572 |
+
// Option 2 enables a second notice that fires after the user opts in to tracking
|
573 |
+
$yes_args['marketing'] = 'yes';
|
574 |
+
}
|
575 |
+
$url_yes = add_query_arg( $yes_args );
|
576 |
+
$url_no = add_query_arg( array(
|
577 |
+
'plugin' => $this->plugin_name,
|
578 |
+
'plugin_action' => 'no'
|
579 |
+
) );
|
580 |
+
|
581 |
+
// Decide on notice text
|
582 |
+
if( $this->marketing != 1 ) {
|
583 |
+
// Standard notice text
|
584 |
+
$notice_text = __( 'Thank you for installing our plugin. We would like to track its usage on your site. We don\'t record any sensitive data, only information regarding the WordPress environment and plugin settings, which we will use to help us make improvements to the plugin. Tracking is completely optional.', 'plugin-usage-tracker' );
|
585 |
+
} else {
|
586 |
+
// If we have option 1 for marketing, we include reference to sending product information here
|
587 |
+
$notice_text = __( 'Thank you for installing our plugin. We\'d like your permission to track its usage on your site and subscribe you to our newsletter. We won\'t record any sensitive data, only information regarding the WordPress environment and plugin settings, which we will use to help us make improvements to the plugin. Tracking is completely optional.', 'plugin-usage-tracker' );
|
588 |
+
}
|
589 |
+
// And we allow you to filter the text anyway
|
590 |
+
$notice_text = apply_filters( 'wisdom_notice_text_' . esc_attr( $this->plugin_name ), $notice_text ); ?>
|
591 |
+
|
592 |
+
<div class="notice notice-info updated put-dismiss-notice">
|
593 |
+
<p><?php echo '<strong>' . esc_html( $plugin_name ) . '</strong>'; ?></p>
|
594 |
+
<p><?php echo esc_html( $notice_text ); ?></p>
|
595 |
+
<p>
|
596 |
+
<a href="<?php echo esc_url( $url_yes ); ?>" class="button-secondary"><?php _e( 'Allow', 'plugin-usage-tracker' ); ?></a>
|
597 |
+
<a href="<?php echo esc_url( $url_no ); ?>" class="button-secondary"><?php _e( 'Do Not Allow', 'plugin-usage-tracker' ); ?></a>
|
598 |
+
</p>
|
599 |
+
</div>
|
600 |
+
<?php
|
601 |
+
}
|
602 |
+
|
603 |
+
}
|
604 |
+
|
605 |
+
/**
|
606 |
+
* Display the marketing notice to users if enabled
|
607 |
+
* Only displays after the user has opted in to tracking
|
608 |
+
*
|
609 |
+
* @since 1.0.0
|
610 |
+
*/
|
611 |
+
public function marketing_notice() {
|
612 |
+
// Check if user has opted in to marketing
|
613 |
+
if( isset( $_GET['marketing_optin'] ) ) {
|
614 |
+
// Set marketing optin
|
615 |
+
$this->set_can_collect_email( sanitize_text_field( $_GET['marketing_optin'] ), $this->plugin_name );
|
616 |
+
// Do tracking
|
617 |
+
$this->do_tracking();
|
618 |
+
} else if( isset( $_GET['marketing'] ) && $_GET['marketing']=='yes' ) {
|
619 |
+
// Display the notice requesting permission to collect email address
|
620 |
+
// Retrieve current plugin information
|
621 |
+
$plugin = $this->plugin_data();
|
622 |
+
$plugin_name = $plugin['Name'];
|
623 |
+
|
624 |
+
$url_yes = add_query_arg( array(
|
625 |
+
'plugin' => $this->plugin_name,
|
626 |
+
'marketing_optin' => 'yes'
|
627 |
+
) );
|
628 |
+
$url_no = add_query_arg( array(
|
629 |
+
'plugin' => $this->plugin_name,
|
630 |
+
'marketing_optin' => 'no'
|
631 |
+
) );
|
632 |
+
|
633 |
+
$marketing_text = __( 'Thank you for opting in to tracking. Would you like to receive occasional news about this plugin, including details of new features and special offers?', 'plugin-usage-tracker' );
|
634 |
+
$marketing_text = apply_filters( 'wisdom_marketing_text_' . esc_attr( $this->plugin_name ), $marketing_text ); ?>
|
635 |
+
|
636 |
+
<div class="notice notice-info updated put-dismiss-notice">
|
637 |
+
<p><?php echo '<strong>' . esc_html( $plugin_name ) . '</strong>'; ?></p>
|
638 |
+
<p><?php echo esc_html( $marketing_text ); ?></p>
|
639 |
+
<p>
|
640 |
+
<a href="<?php echo esc_url( $url_yes ); ?>" data-putnotice="yes" class="button-secondary"><?php _e( 'Yes Please', 'plugin-usage-tracker' ); ?></a>
|
641 |
+
<a href="<?php echo esc_url( $url_no ); ?>" data-putnotice="no" class="button-secondary"><?php _e( 'No Thank You', 'plugin-usage-tracker' ); ?></a>
|
642 |
+
</p>
|
643 |
+
</div>
|
644 |
+
<?php }
|
645 |
+
}
|
646 |
+
|
647 |
+
/**
|
648 |
+
* Filter the deactivation link to allow us to present a form when the user deactivates the plugin
|
649 |
+
* @since 1.0.0
|
650 |
+
*/
|
651 |
+
public function filter_action_links( $links ) {
|
652 |
+
// Check to see if the user has opted in to tracking
|
653 |
+
if( ! $this->get_is_tracking_allowed() ) {
|
654 |
+
return $links;
|
655 |
+
}
|
656 |
+
if( isset( $links['deactivate'] ) && $this->include_goodbye_form ) {
|
657 |
+
$deactivation_link = $links['deactivate'];
|
658 |
+
// Insert an onClick action to allow form before deactivating
|
659 |
+
$deactivation_link = str_replace( '<a ', '<div class="put-goodbye-form-wrapper"><span class="put-goodbye-form" id="put-goodbye-form-' . esc_attr( $this->plugin_name ) . '"></span></div><a onclick="javascript:event.preventDefault();" id="put-goodbye-link-' . esc_attr( $this->plugin_name ) . '" ', $deactivation_link );
|
660 |
+
$links['deactivate'] = $deactivation_link;
|
661 |
+
}
|
662 |
+
return $links;
|
663 |
+
}
|
664 |
+
|
665 |
+
/*
|
666 |
+
* Form text strings
|
667 |
+
* These are non-filterable and used as fallback in case filtered strings aren't set correctly
|
668 |
+
* @since 1.0.0
|
669 |
+
*/
|
670 |
+
public function form_default_text() {
|
671 |
+
$form = array();
|
672 |
+
$form['heading'] = __( 'Sorry to see you go', 'plugin-usage-tracker' );
|
673 |
+
$form['body'] = __( 'Before you deactivate the plugin, would you quickly give us your reason for doing so?', 'plugin-usage-tracker' );
|
674 |
+
$form['options'] = array(
|
675 |
+
__( 'Set up is too difficult', 'plugin-usage-tracker' ),
|
676 |
+
__( 'Lack of documentation', 'plugin-usage-tracker' ),
|
677 |
+
__( 'Not the features I wanted', 'plugin-usage-tracker' ),
|
678 |
+
__( 'Found a better plugin', 'plugin-usage-tracker' ),
|
679 |
+
__( 'Installed by mistake', 'plugin-usage-tracker' ),
|
680 |
+
__( 'Only required temporarily', 'plugin-usage-tracker' ),
|
681 |
+
__( 'Didn\'t work', 'plugin-usage-tracker' )
|
682 |
+
);
|
683 |
+
$form['details'] = __( 'Details (optional)', 'plugin-usage-tracker' );
|
684 |
+
return $form;
|
685 |
+
}
|
686 |
+
|
687 |
+
/**
|
688 |
+
* Form text strings
|
689 |
+
* These can be filtered
|
690 |
+
* The filter hook must be unique to the plugin
|
691 |
+
* @since 1.0.0
|
692 |
+
*/
|
693 |
+
public function form_filterable_text() {
|
694 |
+
$form = $this->form_default_text();
|
695 |
+
return apply_filters( 'wisdom_form_text_' . esc_attr( $this->plugin_name ), $form );
|
696 |
+
}
|
697 |
+
|
698 |
+
/**
|
699 |
+
* Form text strings
|
700 |
+
* These can be filtered
|
701 |
+
* @since 1.0.0
|
702 |
+
*/
|
703 |
+
public function goodbye_ajax() {
|
704 |
+
// Get our strings for the form
|
705 |
+
$form = $this->form_filterable_text();
|
706 |
+
if( ! isset( $form['heading'] ) || ! isset( $form['body'] ) || ! isset( $form['options'] ) || ! is_array( $form['options'] ) || ! isset( $form['details'] ) ) {
|
707 |
+
// If the form hasn't been filtered correctly, we revert to the default form
|
708 |
+
$form = $this->form_default_text();
|
709 |
+
}
|
710 |
+
// Build the HTML to go in the form
|
711 |
+
$html = '<div class="put-goodbye-form-head"><strong>' . esc_html( $form['heading'] ) . '</strong></div>';
|
712 |
+
$html .= '<div class="put-goodbye-form-body"><p>' . esc_html( $form['body'] ) . '</p>';
|
713 |
+
if( is_array( $form['options'] ) ) {
|
714 |
+
$html .= '<div class="put-goodbye-options"><p>';
|
715 |
+
foreach( $form['options'] as $option ) {
|
716 |
+
$html .= '<input type="checkbox" name="put-goodbye-options[]" id="' . str_replace( " ", "", esc_attr( $option ) ) . '" value="' . esc_attr( $option ) . '"> <label for="' . str_replace( " ", "", esc_attr( $option ) ) . '">' . esc_attr( $option ) . '</label><br>';
|
717 |
+
}
|
718 |
+
$html .= '</p><label for="put-goodbye-reasons">' . esc_html( $form['details'] ) .'</label><textarea name="put-goodbye-reasons" id="put-goodbye-reasons" rows="2" style="width:100%"></textarea>';
|
719 |
+
$html .= '</div><!-- .put-goodbye-options -->';
|
720 |
+
}
|
721 |
+
$html .= '</div><!-- .put-goodbye-form-body -->';
|
722 |
+
$html .= '<p class="deactivating-spinner"><span class="spinner"></span> ' . __( 'Submitting form', 'plugin-usage-tracker' ) . '</p>';
|
723 |
+
?>
|
724 |
+
<div class="put-goodbye-form-bg"></div>
|
725 |
+
<style type="text/css">
|
726 |
+
.put-form-active .put-goodbye-form-bg {
|
727 |
+
background: rgba( 0, 0, 0, .5 );
|
728 |
+
position: fixed;
|
729 |
+
top: 0;
|
730 |
+
left: 0;
|
731 |
+
width: 100%;
|
732 |
+
height: 100%;
|
733 |
+
}
|
734 |
+
.put-goodbye-form-wrapper {
|
735 |
+
position: relative;
|
736 |
+
z-index: 999;
|
737 |
+
display: none;
|
738 |
+
}
|
739 |
+
.put-form-active .put-goodbye-form-wrapper {
|
740 |
+
display: block;
|
741 |
+
}
|
742 |
+
.put-goodbye-form {
|
743 |
+
display: none;
|
744 |
+
}
|
745 |
+
.put-form-active .put-goodbye-form {
|
746 |
+
position: absolute;
|
747 |
+
bottom: 30px;
|
748 |
+
left: 0;
|
749 |
+
max-width: 400px;
|
750 |
+
background: #fff;
|
751 |
+
white-space: normal;
|
752 |
+
}
|
753 |
+
.put-goodbye-form-head {
|
754 |
+
background: #0073aa;
|
755 |
+
color: #fff;
|
756 |
+
padding: 8px 18px;
|
757 |
+
}
|
758 |
+
.put-goodbye-form-body {
|
759 |
+
padding: 8px 18px;
|
760 |
+
color: #444;
|
761 |
+
}
|
762 |
+
.deactivating-spinner {
|
763 |
+
display: none;
|
764 |
+
}
|
765 |
+
.deactivating-spinner .spinner {
|
766 |
+
float: none;
|
767 |
+
margin: 4px 4px 0 18px;
|
768 |
+
vertical-align: bottom;
|
769 |
+
visibility: visible;
|
770 |
+
}
|
771 |
+
.put-goodbye-form-footer {
|
772 |
+
padding: 8px 18px;
|
773 |
+
}
|
774 |
+
</style>
|
775 |
+
<script>
|
776 |
+
jQuery(document).ready(function($){
|
777 |
+
$("#put-goodbye-link-<?php echo esc_attr( $this->plugin_name ); ?>").on("click",function(){
|
778 |
+
// We'll send the user to this deactivation link when they've completed or dismissed the form
|
779 |
+
var url = document.getElementById("put-goodbye-link-<?php echo esc_attr( $this->plugin_name ); ?>");
|
780 |
+
$('body').toggleClass('put-form-active');
|
781 |
+
$("#put-goodbye-form-<?php echo esc_attr( $this->plugin_name ); ?>").fadeIn();
|
782 |
+
$("#put-goodbye-form-<?php echo esc_attr( $this->plugin_name ); ?>").html( '<?php echo $html; ?>' + '<div class="put-goodbye-form-footer"><p><a id="put-submit-form" class="button primary" href="#"><?php _e( 'Submit and Deactivate', 'plugin-usage-tracker' ); ?></a> <a class="secondary button" href="'+url+'"><?php _e( 'Just Deactivate', 'plugin-usage-tracker' ); ?></a></p></div>');
|
783 |
+
$('#put-submit-form').on('click', function(e){
|
784 |
+
// As soon as we click, the body of the form should disappear
|
785 |
+
$("#put-goodbye-form-<?php echo esc_attr( $this->plugin_name ); ?> .put-goodbye-form-body").fadeOut();
|
786 |
+
$("#put-goodbye-form-<?php echo esc_attr( $this->plugin_name ); ?> .put-goodbye-form-footer").fadeOut();
|
787 |
+
// Fade in spinner
|
788 |
+
$("#put-goodbye-form-<?php echo esc_attr( $this->plugin_name ); ?> .deactivating-spinner").fadeIn();
|
789 |
+
e.preventDefault();
|
790 |
+
var values = new Array();
|
791 |
+
$.each($("input[name='put-goodbye-options[]']:checked"), function(){
|
792 |
+
values.push($(this).val());
|
793 |
+
});
|
794 |
+
var details = $('#put-goodbye-reasons').val();
|
795 |
+
var data = {
|
796 |
+
'action': 'goodbye_form',
|
797 |
+
'values': values,
|
798 |
+
'details': details,
|
799 |
+
'security': "<?php echo wp_create_nonce ( 'wisdom_goodbye_form' ); ?>",
|
800 |
+
'dataType': "json"
|
801 |
+
}
|
802 |
+
$.post(
|
803 |
+
ajaxurl,
|
804 |
+
data,
|
805 |
+
function(response){
|
806 |
+
// Redirect to original deactivation URL
|
807 |
+
window.location.href = url;
|
808 |
+
}
|
809 |
+
);
|
810 |
+
});
|
811 |
+
// If we click outside the form, the form will close
|
812 |
+
$('.put-goodbye-form-bg').on('click',function(){
|
813 |
+
$("#put-goodbye-form-<?php echo esc_attr( $this->plugin_name ); ?>").fadeOut();
|
814 |
+
$('body').removeClass('put-form-active');
|
815 |
+
});
|
816 |
+
});
|
817 |
+
});
|
818 |
+
</script>
|
819 |
+
<?php }
|
820 |
+
|
821 |
+
/**
|
822 |
+
* AJAX callback when the form is submitted
|
823 |
+
* @since 1.0.0
|
824 |
+
*/
|
825 |
+
public function goodbye_form_callback() {
|
826 |
+
check_ajax_referer( 'wisdom_goodbye_form', 'security' );
|
827 |
+
if( isset( $_POST['values'] ) ) {
|
828 |
+
$values = json_encode( wp_unslash( $_POST['values'] ) );
|
829 |
+
update_option( 'wisdom_deactivation_reason_' . $this->plugin_name, $values );
|
830 |
+
}
|
831 |
+
if( isset( $_POST['details'] ) ) {
|
832 |
+
$details = sanitize_text_field( $_POST['details'] );
|
833 |
+
update_option( 'wisdom_deactivation_details_' . $this->plugin_name, $details );
|
834 |
+
}
|
835 |
+
$this->do_tracking(); // Run this straightaway
|
836 |
+
echo 'success';
|
837 |
+
wp_die();
|
838 |
+
}
|
839 |
+
|
840 |
+
}
|
841 |
+
|
842 |
+
}
|
trunk/admin/class-ctcc-admin.php
ADDED
@@ -0,0 +1,816 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Cookie Consent admin class
|
4 |
+
*/
|
5 |
+
|
6 |
+
// Exit if accessed directly
|
7 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
8 |
+
exit;
|
9 |
+
}
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Plugin admin class
|
13 |
+
**/
|
14 |
+
if ( ! class_exists ( 'CTCC_Admin' ) ) {
|
15 |
+
|
16 |
+
class CTCC_Admin {
|
17 |
+
|
18 |
+
public function __construct() {
|
19 |
+
//
|
20 |
+
}
|
21 |
+
|
22 |
+
/*
|
23 |
+
* Initialize the class and start calling our hooks and filters
|
24 |
+
* @since 2.0.0
|
25 |
+
*/
|
26 |
+
public function init() {
|
27 |
+
|
28 |
+
add_action ( 'admin_menu', array ( $this, 'add_admin_menu' ) );
|
29 |
+
add_action ( 'admin_init', array ( $this, 'register_options_init' ) );
|
30 |
+
add_action ( 'admin_init', array ( $this, 'register_content_init' ) );
|
31 |
+
add_action ( 'admin_init', array ( $this, 'register_styles_init' ) );
|
32 |
+
add_action ( 'admin_enqueue_scripts', array ( $this, 'enqueue_scripts' ) );
|
33 |
+
add_action ( 'admin_footer', array ( $this, 'add_js' ) );
|
34 |
+
|
35 |
+
add_action( 'admin_init', array( $this, 'save_registered_setting' ) );
|
36 |
+
|
37 |
+
}
|
38 |
+
|
39 |
+
/**
|
40 |
+
* We save this artificially to let the tracker know that we're allowed to export this option's data
|
41 |
+
*/
|
42 |
+
public function save_registered_setting() {
|
43 |
+
$options = get_option( 'ctcc_options_settings' );
|
44 |
+
$options['wisdom_registered_setting'] = 1;
|
45 |
+
update_option( 'ctcc_options_settings', $options );
|
46 |
+
}
|
47 |
+
|
48 |
+
public function enqueue_scripts() {
|
49 |
+
wp_enqueue_style ( 'wp-color-picker' );
|
50 |
+
wp_enqueue_script ( 'wp-color-picker', false, array ( 'jquery' ) );
|
51 |
+
wp_enqueue_style ( 'ctcc-admin-style', CTCC_PLUGIN_URL . 'assets/css/admin-style.css' );
|
52 |
+
}
|
53 |
+
|
54 |
+
public function add_js() {
|
55 |
+
$screen = get_current_screen();
|
56 |
+
if ( $screen -> id == 'settings_page_ctcc' ) {
|
57 |
+
?>
|
58 |
+
<script>
|
59 |
+
jQuery(document).ready(function($){
|
60 |
+
$('.cctc-color-field').wpColorPicker();
|
61 |
+
});
|
62 |
+
</script>
|
63 |
+
<?php }
|
64 |
+
}
|
65 |
+
|
66 |
+
// Add the menu item
|
67 |
+
public function add_admin_menu( ) {
|
68 |
+
add_options_page ( __('Cookie Consent', 'uk-cookie-consent'), __('Cookie Consent', 'uk-cookie-consent'), 'manage_options', 'ctcc', array ( $this, 'options_page' ) );
|
69 |
+
}
|
70 |
+
|
71 |
+
public function register_options_init( ) {
|
72 |
+
|
73 |
+
register_setting ( 'ctcc_options', 'ctcc_options_settings' );
|
74 |
+
|
75 |
+
add_settings_section (
|
76 |
+
'ctcc_options_section',
|
77 |
+
__( 'General settings', 'uk-cookie-consent' ),
|
78 |
+
array ( $this, 'settings_section_callback' ),
|
79 |
+
'ctcc_options'
|
80 |
+
);
|
81 |
+
|
82 |
+
add_settings_field (
|
83 |
+
'closure',
|
84 |
+
__( 'Close', 'uk-cookie-consent' ),
|
85 |
+
array ( $this, 'closure_render' ),
|
86 |
+
'ctcc_options',
|
87 |
+
'ctcc_options_section'
|
88 |
+
);
|
89 |
+
|
90 |
+
add_settings_field (
|
91 |
+
'first_page',
|
92 |
+
__( 'First Page Only', 'uk-cookie-consent' ),
|
93 |
+
array ( $this, 'first_page_render' ),
|
94 |
+
'ctcc_options',
|
95 |
+
'ctcc_options_section'
|
96 |
+
);
|
97 |
+
|
98 |
+
add_settings_field (
|
99 |
+
'enable_metafield',
|
100 |
+
__( 'Selectively Exclude Pages', 'uk-cookie-consent' ),
|
101 |
+
array ( $this, 'enable_metafield_render' ),
|
102 |
+
'ctcc_options',
|
103 |
+
'ctcc_options_section'
|
104 |
+
);
|
105 |
+
|
106 |
+
add_settings_field (
|
107 |
+
'exclude_zones',
|
108 |
+
__( 'Exclude Zones', 'uk-cookie-consent' ),
|
109 |
+
array ( $this, 'exclude_zones_render' ),
|
110 |
+
'ctcc_options',
|
111 |
+
'ctcc_options_section'
|
112 |
+
);
|
113 |
+
|
114 |
+
add_settings_field (
|
115 |
+
'duration',
|
116 |
+
__( 'Notification Duration', 'uk-cookie-consent' ),
|
117 |
+
array ( $this, 'duration_render' ),
|
118 |
+
'ctcc_options',
|
119 |
+
'ctcc_options_section'
|
120 |
+
);
|
121 |
+
|
122 |
+
add_settings_field (
|
123 |
+
'scroll_height',
|
124 |
+
__( 'Scroll Height', 'uk-cookie-consent' ),
|
125 |
+
array ( $this, 'scroll_height_render' ),
|
126 |
+
'ctcc_options',
|
127 |
+
'ctcc_options_section'
|
128 |
+
);
|
129 |
+
|
130 |
+
add_settings_field (
|
131 |
+
'cookie_expiry',
|
132 |
+
__( 'Cookie Expiry', 'uk-cookie-consent' ),
|
133 |
+
array ( $this, 'cookie_expiry_render' ),
|
134 |
+
'ctcc_options',
|
135 |
+
'ctcc_options_section'
|
136 |
+
);
|
137 |
+
|
138 |
+
add_settings_field (
|
139 |
+
'cookie_version',
|
140 |
+
__( 'Cookie Version', 'uk-cookie-consent' ),
|
141 |
+
array ( $this, 'cookie_version_render' ),
|
142 |
+
'ctcc_options',
|
143 |
+
'ctcc_options_section'
|
144 |
+
);
|
145 |
+
|
146 |
+
add_settings_field (
|
147 |
+
'wisdom_opt_out',
|
148 |
+
__( 'Opt out of tracking', 'uk-cookie-consent' ),
|
149 |
+
array ( $this, 'opt_out_render' ),
|
150 |
+
'ctcc_options',
|
151 |
+
'ctcc_options_section'
|
152 |
+
);
|
153 |
+
|
154 |
+
// Set default options
|
155 |
+
$options = get_option ( 'ctcc_options_settings' );
|
156 |
+
if ( false === $options ) {
|
157 |
+
// Get defaults
|
158 |
+
$defaults = $this -> get_default_options_settings();
|
159 |
+
update_option ( 'ctcc_options_settings', $defaults );
|
160 |
+
}
|
161 |
+
|
162 |
+
}
|
163 |
+
|
164 |
+
public function sanitize_content( $input ){
|
165 |
+
$output = array();
|
166 |
+
foreach( $input as $key=>$value ) {
|
167 |
+
if( isset($input[$key] ) ) {
|
168 |
+
if( $key == 'notification_text' ) {
|
169 |
+
$output[$key] = esc_attr( $input[$key] );
|
170 |
+
} else if( $key == 'more_info_url' ) {
|
171 |
+
$output[$key] = esc_url( $input[$key] );
|
172 |
+
} else {
|
173 |
+
$output[$key] = sanitize_text_field( $input[$key] );
|
174 |
+
}
|
175 |
+
}
|
176 |
+
}
|
177 |
+
return $output;
|
178 |
+
}
|
179 |
+
|
180 |
+
public function register_content_init() {
|
181 |
+
|
182 |
+
register_setting ( 'ctcc_content', 'ctcc_content_settings', array( $this, 'sanitize_content') );
|
183 |
+
|
184 |
+
add_settings_section (
|
185 |
+
'ctcc_content_section',
|
186 |
+
__( 'Content settings', 'uk-cookie-consent' ),
|
187 |
+
array ( $this, 'content_settings_section_callback' ),
|
188 |
+
'ctcc_content'
|
189 |
+
);
|
190 |
+
|
191 |
+
add_settings_field (
|
192 |
+
'heading_text',
|
193 |
+
__( 'Heading Text', 'uk-cookie-consent' ),
|
194 |
+
array ( $this, 'heading_text_render' ),
|
195 |
+
'ctcc_content',
|
196 |
+
'ctcc_content_section'
|
197 |
+
);
|
198 |
+
|
199 |
+
add_settings_field (
|
200 |
+
'notification_text',
|
201 |
+
__( 'Notification Text', 'uk-cookie-consent' ),
|
202 |
+
array ( $this, 'notification_text_render' ),
|
203 |
+
'ctcc_content',
|
204 |
+
'ctcc_content_section'
|
205 |
+
);
|
206 |
+
|
207 |
+
add_settings_field (
|
208 |
+
'more_info_text',
|
209 |
+
__( 'More Info Text', 'uk-cookie-consent' ),
|
210 |
+
array ( $this, 'more_info_text_render' ),
|
211 |
+
'ctcc_content',
|
212 |
+
'ctcc_content_section'
|
213 |
+
);
|
214 |
+
|
215 |
+
add_settings_field (
|
216 |
+
'more_info_page',
|
217 |
+
__( 'More Info Page', 'uk-cookie-consent' ),
|
218 |
+
array ( $this, 'more_info_page_render' ),
|
219 |
+
'ctcc_content',
|
220 |
+
'ctcc_content_section'
|
221 |
+
);
|
222 |
+
|
223 |
+
add_settings_field (
|
224 |
+
'more_info_url',
|
225 |
+
__( 'More Info URL', 'uk-cookie-consent' ),
|
226 |
+
array ( $this, 'more_info_url_render' ),
|
227 |
+
'ctcc_content',
|
228 |
+
'ctcc_content_section'
|
229 |
+
);
|
230 |
+
|
231 |
+
add_settings_field (
|
232 |
+
'more_info_target',
|
233 |
+
__( 'More Info Target', 'uk-cookie-consent' ),
|
234 |
+
array ( $this, 'more_info_target_render' ),
|
235 |
+
'ctcc_content',
|
236 |
+
'ctcc_content_section'
|
237 |
+
);
|
238 |
+
|
239 |
+
add_settings_field (
|
240 |
+
'accept_text',
|
241 |
+
__( 'Accept Text', 'uk-cookie-consent' ),
|
242 |
+
array ( $this, 'accept_text_render' ),
|
243 |
+
'ctcc_content',
|
244 |
+
'ctcc_content_section'
|
245 |
+
);
|
246 |
+
|
247 |
+
// Set default options
|
248 |
+
$options = get_option ( 'ctcc_content_settings' );
|
249 |
+
if ( false === $options ) {
|
250 |
+
// Get defaults
|
251 |
+
$defaults = $this -> get_default_content_settings();
|
252 |
+
update_option ( 'ctcc_content_settings', $defaults );
|
253 |
+
}
|
254 |
+
|
255 |
+
}
|
256 |
+
|
257 |
+
public function register_styles_init( ) {
|
258 |
+
|
259 |
+
register_setting ( 'ctcc_styles', 'ctcc_styles_settings' );
|
260 |
+
|
261 |
+
add_settings_section (
|
262 |
+
'ctcc_styles_section',
|
263 |
+
__( 'Styles settings', 'uk-cookie-consent' ),
|
264 |
+
array ( $this, 'styles_settings_section_callback' ),
|
265 |
+
'ctcc_styles'
|
266 |
+
);
|
267 |
+
|
268 |
+
add_settings_field (
|
269 |
+
'position',
|
270 |
+
__( 'Position', 'uk-cookie-consent' ),
|
271 |
+
array ( $this, 'position_render' ),
|
272 |
+
'ctcc_styles',
|
273 |
+
'ctcc_styles_section'
|
274 |
+
);
|
275 |
+
|
276 |
+
add_settings_field (
|
277 |
+
'container_class',
|
278 |
+
__( 'Container Class', 'uk-cookie-consent' ),
|
279 |
+
array ( $this, 'container_class_render' ),
|
280 |
+
'ctcc_styles',
|
281 |
+
'ctcc_styles_section'
|
282 |
+
);
|
283 |
+
|
284 |
+
add_settings_field (
|
285 |
+
'enqueue_styles',
|
286 |
+
__( 'Include Stylesheet', 'uk-cookie-consent' ),
|
287 |
+
array ( $this, 'enqueue_styles_render' ),
|
288 |
+
'ctcc_styles',
|
289 |
+
'ctcc_styles_section'
|
290 |
+
);
|
291 |
+
|
292 |
+
add_settings_field (
|
293 |
+
'rounded_corners',
|
294 |
+
__( 'Rounded Corners', 'uk-cookie-consent' ),
|
295 |
+
array ( $this, 'rounded_corners_render' ),
|
296 |
+
'ctcc_styles',
|
297 |
+
'ctcc_styles_section'
|
298 |
+
);
|
299 |
+
|
300 |
+
add_settings_field (
|
301 |
+
'drop_shadow',
|
302 |
+
__( 'Drop Shadow', 'uk-cookie-consent' ),
|
303 |
+
array ( $this, 'drop_shadow_render' ),
|
304 |
+
'ctcc_styles',
|
305 |
+
'ctcc_styles_section'
|
306 |
+
);
|
307 |
+
|
308 |
+
add_settings_field (
|
309 |
+
'display_accept_with_text',
|
310 |
+
__( 'Display Button With Text', 'uk-cookie-consent' ),
|
311 |
+
array ( $this, 'display_accept_with_text_render' ),
|
312 |
+
'ctcc_styles',
|
313 |
+
'ctcc_styles_section'
|
314 |
+
);
|
315 |
+
|
316 |
+
add_settings_field (
|
317 |
+
'x_close',
|
318 |
+
__( 'Use X Close', 'uk-cookie-consent' ),
|
319 |
+
array ( $this, 'x_close_render' ),
|
320 |
+
'ctcc_styles',
|
321 |
+
'ctcc_styles_section'
|
322 |
+
);
|
323 |
+
|
324 |
+
add_settings_field (
|
325 |
+
'text_color',
|
326 |
+
__( 'Text Color', 'uk-cookie-consent' ),
|
327 |
+
array ( $this, 'text_color_render' ),
|
328 |
+
'ctcc_styles',
|
329 |
+
'ctcc_styles_section'
|
330 |
+
);
|
331 |
+
|
332 |
+
add_settings_field (
|
333 |
+
'bg_color',
|
334 |
+
__( 'Background Color', 'uk-cookie-consent' ),
|
335 |
+
array ( $this, 'bg_color_render' ),
|
336 |
+
'ctcc_styles',
|
337 |
+
'ctcc_styles_section'
|
338 |
+
);
|
339 |
+
|
340 |
+
add_settings_field (
|
341 |
+
'link_color',
|
342 |
+
__( 'Link Color', 'uk-cookie-consent' ),
|
343 |
+
array ( $this, 'link_color_render' ),
|
344 |
+
'ctcc_styles',
|
345 |
+
'ctcc_styles_section'
|
346 |
+
);
|
347 |
+
|
348 |
+
add_settings_field (
|
349 |
+
'button_color',
|
350 |
+
__( 'Button Color', 'uk-cookie-consent' ),
|
351 |
+
array ( $this, 'button_color_render' ),
|
352 |
+
'ctcc_styles',
|
353 |
+
'ctcc_styles_section'
|
354 |
+
);
|
355 |
+
|
356 |
+
add_settings_field (
|
357 |
+
'button_bg_color',
|
358 |
+
__( 'Button Background', 'uk-cookie-consent' ),
|
359 |
+
array ( $this, 'button_bg_color_render' ),
|
360 |
+
'ctcc_styles',
|
361 |
+
'ctcc_styles_section'
|
362 |
+
);
|
363 |
+
|
364 |
+
add_settings_field (
|
365 |
+
'bg_color',
|
366 |
+
__( 'Background Color', 'uk-cookie-consent' ),
|
367 |
+
array ( $this, 'bg_color_render' ),
|
368 |
+
'ctcc_styles',
|
369 |
+
'ctcc_styles_section'
|
370 |
+
);
|
371 |
+
|
372 |
+
add_settings_field (
|
373 |
+
'flat_button',
|
374 |
+
__( 'Flat Button', 'uk-cookie-consent' ),
|
375 |
+
array ( $this, 'flat_button_render' ),
|
376 |
+
'ctcc_styles',
|
377 |
+
'ctcc_styles_section'
|
378 |
+
);
|
379 |
+
|
380 |
+
// Set default options
|
381 |
+
$options = get_option ( 'ctcc_styles_settings' );
|
382 |
+
if ( false === $options ) {
|
383 |
+
// Get defaults
|
384 |
+
$defaults = $this -> get_default_styles_settings();
|
385 |
+
update_option ( 'ctcc_styles_settings', $defaults );
|
386 |
+
}
|
387 |
+
|
388 |
+
}
|
389 |
+
|
390 |
+
public function get_default_options_settings() {
|
391 |
+
$defaults = array (
|
392 |
+
'closure' => 'click',
|
393 |
+
'scroll_height' => 200,
|
394 |
+
'first_page' => 0,
|
395 |
+
'enable_metafield' => 0,
|
396 |
+
'zones_only' => '',
|
397 |
+
'duration' => 60,
|
398 |
+
'cookie_expiry' => 30,
|
399 |
+
'cookie_version' => 1
|
400 |
+
);
|
401 |
+
return $defaults;
|
402 |
+
}
|
403 |
+
|
404 |
+
public function get_default_content_settings() {
|
405 |
+
|
406 |
+
$previous_settings = get_option ( 'catapult_cookie_options' );
|
407 |
+
// Check for settings from previous version
|
408 |
+
if ( ! empty ( $previous_settings ) ) {
|
409 |
+
$defaults = array (
|
410 |
+
'heading_text' => __( 'Cookies', 'uk-cookie-consent' ),
|
411 |
+
'notification_text' => $previous_settings['catapult_cookie_text_settings'],
|
412 |
+
'accept_text' => $previous_settings['catapult_cookie_accept_settings'],
|
413 |
+
'more_info_text' => $previous_settings['catapult_cookie_more_settings'],
|
414 |
+
'more_info_page' => '',
|
415 |
+
'more_info_url' => site_url ( $previous_settings['catapult_cookie_link_settings'] ),
|
416 |
+
'more_info_target' => '_blank',
|
417 |
+
);
|
418 |
+
} else {
|
419 |
+
$defaults = array (
|
420 |
+
'heading_text' => __( 'Cookies', 'uk-cookie-consent' ),
|
421 |
+
'notification_text' => __( 'This site uses cookies: ', 'uk-cookie-consent' ),
|
422 |
+
'accept_text' => __( 'Okay, thanks', 'uk-cookie-consent' ),
|
423 |
+
'more_info_text' => __( 'Find out more.', 'uk-cookie-consent' ),
|
424 |
+
'more_info_page' => get_option( 'ctcc_more_info_page', '' ),
|
425 |
+
'more_info_url' => '',
|
426 |
+
'more_info_target' => '_blank',
|
427 |
+
);
|
428 |
+
}
|
429 |
+
return $defaults;
|
430 |
+
|
431 |
+
}
|
432 |
+
|
433 |
+
public function get_default_styles_settings() {
|
434 |
+
$previous_settings = get_option ( 'catapult_cookie_options' );
|
435 |
+
$defaults = array (
|
436 |
+
'position' => 'top-bar',
|
437 |
+
'container_class' => '',
|
438 |
+
'enqueue_styles' => 1,
|
439 |
+
'rounded_corners' => 1,
|
440 |
+
'drop_shadow' => 1,
|
441 |
+
'display_accept_with_text' => 1,
|
442 |
+
'x_close' => 0,
|
443 |
+
'text_color' => '#ddd',
|
444 |
+
'bg_color' => '#464646',
|
445 |
+
'link_color' => '#fff',
|
446 |
+
'button_color' => '',
|
447 |
+
'button_bg_color' => '',
|
448 |
+
'flat_button' => 1,
|
449 |
+
);
|
450 |
+
// Check for settings from previous version
|
451 |
+
|
452 |
+
if ( ! empty ( $previous_settings['catapult_cookie_bar_position_settings'] ) ) {
|
453 |
+
$defaults['position'] = $previous_settings['catapult_cookie_bar_position_settings'] . '-bar';
|
454 |
+
}
|
455 |
+
|
456 |
+
if ( ! empty ( $previous_settings['catapult_cookie_text_colour_settings'] ) ) {
|
457 |
+
$defaults['text_color'] = $previous_settings['catapult_cookie_text_colour_settings'];
|
458 |
+
}
|
459 |
+
|
460 |
+
if ( ! empty ( $previous_settings['catapult_cookie_bg_colour_settings'] ) ) {
|
461 |
+
$defaults['bg_color'] = $previous_settings['catapult_cookie_bg_colour_settings'];
|
462 |
+
}
|
463 |
+
|
464 |
+
if ( ! empty ( $previous_settings['catapult_cookie_link_colour_settings'] ) ) {
|
465 |
+
$defaults['link_color'] = $previous_settings['catapult_cookie_link_colour_settings'];
|
466 |
+
}
|
467 |
+
|
468 |
+
if ( ! empty ( $previous_settings['catapult_cookie_link_colour_settings'] ) ) {
|
469 |
+
$defaults['link_color'] = $previous_settings['catapult_cookie_link_colour_settings'];
|
470 |
+
}
|
471 |
+
|
472 |
+
if ( ! empty ( $previous_settings['catapult_cookie_button_colour_settings'] ) ) {
|
473 |
+
$defaults['button_bg_color'] = $previous_settings['catapult_cookie_button_colour_settings'];
|
474 |
+
}
|
475 |
+
|
476 |
+
return $defaults;
|
477 |
+
|
478 |
+
}
|
479 |
+
|
480 |
+
public function closure_render() {
|
481 |
+
$options = get_option( 'ctcc_options_settings' ); ?>
|
482 |
+
<select name='ctcc_options_settings[closure]'>
|
483 |
+
<option value='click' <?php selected( $options['closure'], 'click' ); ?>><?php _e( 'On Click', 'uk-cookie-consent' ); ?></option>
|
484 |
+
<option value='scroll' <?php selected( $options['closure'], 'scroll' ); ?>><?php _e( 'On Scroll', 'uk-cookie-consent' ); ?></option>
|
485 |
+
<option value='timed' <?php selected( $options['closure'], 'timed' ); ?>><?php _e( 'Timed', 'uk-cookie-consent' ); ?></option>
|
486 |
+
|
487 |
+
</select>
|
488 |
+
<p class="description"><?php _e( 'How you want the user to close the notification', 'uk-cookie-consent' ); ?></p>
|
489 |
+
<?php
|
490 |
+
}
|
491 |
+
|
492 |
+
public function first_page_render() {
|
493 |
+
$options = get_option( 'ctcc_options_settings' ); ?>
|
494 |
+
<input type='checkbox' name='ctcc_options_settings[first_page]' <?php checked ( ! empty ( $options['first_page'] ), 1 ); ?> value='1'>
|
495 |
+
<p class="description"><?php _e( 'Select this to show the notification only on the first page the user visits', 'uk-cookie-consent' ); ?></p>
|
496 |
+
<?php
|
497 |
+
}
|
498 |
+
|
499 |
+
public function exclude_zones_render() {
|
500 |
+
$options = get_option( 'ctcc_options_settings' );
|
501 |
+
$zones = array();
|
502 |
+
if( isset( $options['exclude_zones'] ) ) {
|
503 |
+
$zones = $options['exclude_zones'];
|
504 |
+
} ?>
|
505 |
+
<select multiple name='ctcc_options_settings[exclude_zones][]'>
|
506 |
+
<option value='AF' <?php selected( in_array( 'AF', $zones ) ); ?>><?php _e( 'Africa', 'uk-cookie-consent' ); ?></option>
|
507 |
+
<option value='AN' <?php selected( in_array( 'AN', $zones ) ); ?>><?php _e( 'Antarctica', 'uk-cookie-consent' ); ?></option>
|
508 |
+
<option value='AS' <?php selected( in_array( 'AS', $zones ) ); ?>><?php _e( 'Asia', 'uk-cookie-consent' ); ?></option>
|
509 |
+
<option value='EU' <?php selected( in_array( 'EU', $zones ) ); ?>><?php _e( 'Europe', 'uk-cookie-consent' ); ?></option>
|
510 |
+
<option value='NA' <?php selected( in_array( 'NA', $zones ) ); ?>><?php _e( 'North America', 'uk-cookie-consent' ); ?></option>
|
511 |
+
<option value='OC' <?php selected( in_array( 'OC', $zones ) ); ?>><?php _e( 'Oceania', 'uk-cookie-consent' ); ?></option>
|
512 |
+
<option value='SA' <?php selected( in_array( 'SA', $zones ) ); ?>><?php _e( 'South America', 'uk-cookie-consent' ); ?></option>
|
513 |
+
</select>
|
514 |
+
<p class="description"><?php _e( 'If you have the <a href="https://wordpress.org/plugins/geoip-detect/" target="_blank">GeoIP Detect</a> plugin activated, you can specify which areas of the world to exclude from displaying the notification.', 'uk-cookie-consent' ); ?></p>
|
515 |
+
<?php
|
516 |
+
}
|
517 |
+
|
518 |
+
public function scroll_height_render() {
|
519 |
+
$options = get_option( 'ctcc_options_settings' ); ?>
|
520 |
+
<input type="number" min="1" name="ctcc_options_settings[scroll_height]" value="<?php echo esc_attr( $options['scroll_height'] ); ?>">
|
521 |
+
<p class="description"><?php _e( 'If you chose Scroll as the close method, enter the distance in pixels the user should scroll before the notification closes', 'uk-cookie-consent' ); ?></p>
|
522 |
+
<?php
|
523 |
+
}
|
524 |
+
|
525 |
+
public function duration_render() {
|
526 |
+
$options = get_option( 'ctcc_options_settings' ); ?>
|
527 |
+
<input type="number" min="1" name="ctcc_options_settings[duration]" value="<?php echo esc_attr( $options['duration'] ); ?>">
|
528 |
+
<p class="description"><?php _e( 'If you chose Timer as the close method, enter how many seconds the notification should display for', 'uk-cookie-consent' ); ?></p>
|
529 |
+
<?php
|
530 |
+
}
|
531 |
+
|
532 |
+
public function cookie_expiry_render() {
|
533 |
+
$options = get_option( 'ctcc_options_settings' ); ?>
|
534 |
+
<input type="number" min="1" name="ctcc_options_settings[cookie_expiry]" value="<?php echo esc_attr( $options['cookie_expiry'] ); ?>">
|
535 |
+
<p class="description"><?php _e( 'The number of days that the cookie is set for', 'uk-cookie-consent' ); ?></p>
|
536 |
+
<?php
|
537 |
+
}
|
538 |
+
|
539 |
+
public function cookie_version_render() {
|
540 |
+
$options = get_option( 'ctcc_options_settings' ); ?>
|
541 |
+
<input type="text" name="ctcc_options_settings[cookie_version]" value="<?php echo esc_attr( $options['cookie_version'] ); ?>">
|
542 |
+
<p class="description"><?php _e( 'A version number for the cookie - update this to invalidate the cookie and force all users to view the notification again', 'uk-cookie-consent' ); ?></p>
|
543 |
+
<?php
|
544 |
+
}
|
545 |
+
|
546 |
+
public function opt_out_render() {
|
547 |
+
$options = get_option( 'ctcc_options_settings' ); ?>
|
548 |
+
<input type='checkbox' name='ctcc_options_settings[wisdom_opt_out]' <?php checked ( ! empty ( $options['wisdom_opt_out'] ), 1 ); ?> value='1'>
|
549 |
+
<p class="description"><?php _e( 'If you previously opted into allowing this plugin to track non-sensitive data, you can opt out here', 'uk-cookie-consent' ); ?></p>
|
550 |
+
<?php
|
551 |
+
}
|
552 |
+
|
553 |
+
/*
|
554 |
+
* Content renders
|
555 |
+
*/
|
556 |
+
|
557 |
+
public function heading_text_render() {
|
558 |
+
$ctcc_content_settings = get_option( 'ctcc_content_settings' ); ?>
|
559 |
+
<input type="text" name="ctcc_content_settings[heading_text]" value="<?php echo esc_attr( $ctcc_content_settings['heading_text'] ); ?>">
|
560 |
+
<p class="description"><?php _e( 'The heading text - only applies if you are not using a top or bottom bar', 'uk-cookie-consent' ); ?></p>
|
561 |
+
<?php
|
562 |
+
}
|
563 |
+
|
564 |
+
public function notification_text_render() {
|
565 |
+
$ctcc_content_settings = get_option( 'ctcc_content_settings' ); ?>
|
566 |
+
<input class="widefat" type="text" name="ctcc_content_settings[notification_text]" value="<?php echo esc_attr( $ctcc_content_settings['notification_text'] ); ?>">
|
567 |
+
<p class="description"><?php _e( 'The default text to indicate that your site uses cookies', 'uk-cookie-consent' ); ?></p>
|
568 |
+
<?php
|
569 |
+
}
|
570 |
+
|
571 |
+
public function accept_text_render() {
|
572 |
+
$ctcc_content_settings = get_option( 'ctcc_content_settings' ); ?>
|
573 |
+
<input type="text" name="ctcc_content_settings[accept_text]" value="<?php echo esc_attr( $ctcc_content_settings['accept_text'] ); ?>">
|
574 |
+
<p class="description"><?php _e( 'The default text to dismiss the notification', 'uk-cookie-consent' ); ?></p>
|
575 |
+
<?php
|
576 |
+
}
|
577 |
+
|
578 |
+
public function more_info_text_render() {
|
579 |
+
$ctcc_content_settings = get_option( 'ctcc_content_settings' ); ?>
|
580 |
+
<input type="text" name="ctcc_content_settings[more_info_text]" value="<?php echo esc_attr( $ctcc_content_settings['more_info_text'] ); ?>">
|
581 |
+
<p class="description"><?php _e( 'The default text to use to link to a page providing further information', 'uk-cookie-consent' ); ?></p>
|
582 |
+
<?php
|
583 |
+
}
|
584 |
+
|
585 |
+
public function more_info_page_render() {
|
586 |
+
$ctcc_content_settings = get_option( 'ctcc_content_settings' );
|
587 |
+
// Get all pages
|
588 |
+
$pages = get_pages();
|
589 |
+
?>
|
590 |
+
<?php if ( $pages ) { ?>
|
591 |
+
<select name='ctcc_content_settings[more_info_page]'>
|
592 |
+
<option></option>
|
593 |
+
<?php foreach ( $pages as $page ) { ?>
|
594 |
+
<option value='<?php echo $page -> ID; ?>' <?php selected( $ctcc_content_settings['more_info_page'], $page -> ID ); ?>><?php echo $page -> post_title; ?></option>
|
595 |
+
<?php } ?>
|
596 |
+
</select>
|
597 |
+
<p class="description"><?php _e( 'The page containing further information about your cookie policy', 'uk-cookie-consent' ); ?></p>
|
598 |
+
<?php }
|
599 |
+
}
|
600 |
+
|
601 |
+
public function more_info_url_render() {
|
602 |
+
$ctcc_content_settings = get_option( 'ctcc_content_settings' ); ?>
|
603 |
+
<input type="url" name="ctcc_content_settings[more_info_url]" value="<?php echo esc_url( $ctcc_content_settings['more_info_url'] ); ?>">
|
604 |
+
<p class="description"><?php _e( 'You can add an absolute URL here to override the More Info Page setting above. Use this to link to an external website for further information about cookies.', 'uk-cookie-consent' ); ?></p>
|
605 |
+
<?php
|
606 |
+
}
|
607 |
+
|
608 |
+
public function more_info_target_render() {
|
609 |
+
$ctcc_content_settings = get_option( 'ctcc_content_settings' ); ?>
|
610 |
+
<select name='ctcc_content_settings[more_info_target]'>
|
611 |
+
<option value='_blank' <?php selected( $ctcc_content_settings['more_info_target'], '_blank' ); ?>><?php _e( 'New Tab', 'uk-cookie-consent' ); ?></option>
|
612 |
+
<option value='_self' <?php selected( $ctcc_content_settings['more_info_target'], '_self' ); ?>><?php _e( 'Same Tab', 'uk-cookie-consent' ); ?></option>
|
613 |
+
</select>
|
614 |
+
<p class="description"><?php _e( 'Open the More Information page in the same or new tab.', 'uk-cookie-consent' ); ?></p>
|
615 |
+
<?php
|
616 |
+
}
|
617 |
+
|
618 |
+
/*
|
619 |
+
* Styles functions
|
620 |
+
*/
|
621 |
+
|
622 |
+
public function position_render() {
|
623 |
+
$options = get_option( 'ctcc_styles_settings' ); ?>
|
624 |
+
<select name='ctcc_styles_settings[position]'>
|
625 |
+
<option value='top-bar' <?php selected( $options['position'], 'top-bar' ); ?>><?php _e( 'Top Bar', 'uk-cookie-consent' ); ?></option>
|
626 |
+
<option value='bottom-bar' <?php selected( $options['position'], 'bottom-bar' ); ?>><?php _e( 'Bottom Bar', 'uk-cookie-consent' ); ?></option>
|
627 |
+
<option value='top-left-block' <?php selected( $options['position'], 'top-left-block' ); ?>><?php _e( 'Top Left Block', 'uk-cookie-consent' ); ?></option>
|
628 |
+
<option value='top-right-block' <?php selected( $options['position'], 'top-right-block' ); ?>><?php _e( 'Top Right Block', 'uk-cookie-consent' ); ?></option>
|
629 |
+
<option value='bottom-left-block' <?php selected( $options['position'], 'bottom-left-block' ); ?>><?php _e( 'Bottom Left Block', 'uk-cookie-consent' ); ?></option>
|
630 |
+
<option value='bottom-right-block' <?php selected( $options['position'], 'bottom-right-block' ); ?>><?php _e( 'Bottom Right Block', 'uk-cookie-consent' ); ?></option>
|
631 |
+
</select>
|
632 |
+
<p class="description"><?php _e( 'Where the notification should appear', 'uk-cookie-consent' ); ?></p>
|
633 |
+
<?php
|
634 |
+
}
|
635 |
+
|
636 |
+
public function container_class_render() {
|
637 |
+
$options = get_option( 'ctcc_styles_settings' ); ?>
|
638 |
+
<input type="text" name="ctcc_styles_settings[container_class]" value="<?php echo esc_attr( $options['container_class'] ); ?>">
|
639 |
+
<p class="description"><?php _e( 'You can add an optional wrapper class, eg container, here to align the notification text with the rest of your content', 'uk-cookie-consent' ); ?></p>
|
640 |
+
<?php
|
641 |
+
}
|
642 |
+
|
643 |
+
public function enqueue_styles_render() {
|
644 |
+
$options = get_option( 'ctcc_styles_settings' ); ?>
|
645 |
+
<input type='checkbox' name='ctcc_styles_settings[enqueue_styles]' <?php checked ( ! empty ( $options['enqueue_styles'] ), 1 ); ?> value='1'>
|
646 |
+
<p class="description"><?php _e( 'Deselect this to dequeue the plugin stylesheet', 'uk-cookie-consent' ); ?></p>
|
647 |
+
<?php
|
648 |
+
}
|
649 |
+
|
650 |
+
public function rounded_corners_render() {
|
651 |
+
$options = get_option( 'ctcc_styles_settings' ); ?>
|
652 |
+
<input type='checkbox' name='ctcc_styles_settings[rounded_corners]' <?php checked ( ! empty ( $options['rounded_corners'] ), 1 ); ?> value='1'>
|
653 |
+
<p class="description"><?php _e( 'Round the corners on the block (doesn\'t apply to the top or bottom bar)', 'uk-cookie-consent' ); ?></p>
|
654 |
+
<?php
|
655 |
+
}
|
656 |
+
|
657 |
+
public function drop_shadow_render() {
|
658 |
+
$options = get_option( 'ctcc_styles_settings' ); ?>
|
659 |
+
<input type='checkbox' name='ctcc_styles_settings[drop_shadow]' <?php checked ( ! empty ( $options['drop_shadow'] ), 1 ); ?> value='1'>
|
660 |
+
<p class="description"><?php _e( 'Add drop shadow to the block (doesn\'t apply to the top or bottom bar)', 'uk-cookie-consent' ); ?></p>
|
661 |
+
<?php
|
662 |
+
}
|
663 |
+
|
664 |
+
public function display_accept_with_text_render() {
|
665 |
+
$options = get_option( 'ctcc_styles_settings' ); ?>
|
666 |
+
<input type='checkbox' name='ctcc_styles_settings[display_accept_with_text]' <?php checked ( ! empty ( $options['display_accept_with_text'] ), 1 ); ?> value='1'>
|
667 |
+
<p class="description"><?php _e( 'Display the confirmation button with notification text', 'uk-cookie-consent' ); ?></p>
|
668 |
+
<?php
|
669 |
+
}
|
670 |
+
|
671 |
+
public function x_close_render() {
|
672 |
+
$options = get_option( 'ctcc_styles_settings' ); ?>
|
673 |
+
<input type='checkbox' name='ctcc_styles_settings[x_close]' <?php checked ( ! empty ( $options['x_close'] ), 1 ); ?> value='1'>
|
674 |
+
<p class="description"><?php _e( 'Remove confirmation button and use \'X\' icon instead', 'uk-cookie-consent' ); ?></p>
|
675 |
+
<?php
|
676 |
+
}
|
677 |
+
|
678 |
+
public function text_color_render() {
|
679 |
+
$options = get_option( 'ctcc_styles_settings' ); ?>
|
680 |
+
<input type="text" class="cctc-color-field" name="ctcc_styles_settings[text_color]" value="<?php echo esc_attr( $options['text_color'] ); ?>">
|
681 |
+
<p class="description"><?php _e( 'The text color on the notification', 'uk-cookie-consent' ); ?></p>
|
682 |
+
<?php
|
683 |
+
}
|
684 |
+
|
685 |
+
public function bg_color_render() {
|
686 |
+
$options = get_option( 'ctcc_styles_settings' ); ?>
|
687 |
+
<input type="text" class="cctc-color-field" name="ctcc_styles_settings[bg_color]" value="<?php echo esc_attr( $options['bg_color'] ); ?>">
|
688 |
+
<p class="description"><?php _e( 'The background color for the notification', 'uk-cookie-consent' ); ?></p>
|
689 |
+
<?php
|
690 |
+
}
|
691 |
+
|
692 |
+
public function link_color_render() {
|
693 |
+
$options = get_option( 'ctcc_styles_settings' ); ?>
|
694 |
+
<input type="text" class="cctc-color-field" name="ctcc_styles_settings[link_color]" value="<?php echo esc_attr( $options['link_color'] ); ?>">
|
695 |
+
<p class="description"><?php _e( 'The link color on the notification', 'uk-cookie-consent' ); ?></p>
|
696 |
+
<?php
|
697 |
+
}
|
698 |
+
|
699 |
+
public function button_color_render() {
|
700 |
+
$options = get_option( 'ctcc_styles_settings' ); ?>
|
701 |
+
<input type="text" class="cctc-color-field" name="ctcc_styles_settings[button_color]" value="<?php echo esc_attr( $options['button_color'] ); ?>">
|
702 |
+
<p class="description"><?php _e( 'The text color on the notification button', 'uk-cookie-consent' ); ?></p>
|
703 |
+
<?php
|
704 |
+
}
|
705 |
+
|
706 |
+
public function button_bg_color_render() {
|
707 |
+
$options = get_option( 'ctcc_styles_settings' ); ?>
|
708 |
+
<input type="text" class="cctc-color-field" name="ctcc_styles_settings[button_bg_color]" value="<?php echo esc_attr( $options['button_bg_color'] ); ?>">
|
709 |
+
<p class="description"><?php _e( 'The background color on the notification button', 'uk-cookie-consent' ); ?></p>
|
710 |
+
<?php
|
711 |
+
}
|
712 |
+
|
713 |
+
public function flat_button_render() {
|
714 |
+
$options = get_option( 'ctcc_styles_settings' ); ?>
|
715 |
+
<input type='checkbox' name='ctcc_styles_settings[flat_button]' <?php checked ( ! empty ( $options['flat_button'] ), 1 ); ?> value='1'>
|
716 |
+
<p class="description"><?php _e( 'Remove the border from the button', 'uk-cookie-consent' ); ?></p>
|
717 |
+
<?php
|
718 |
+
}
|
719 |
+
|
720 |
+
public function enable_metafield_render() {
|
721 |
+
$options = get_option( 'ctcc_options_settings' ); ?>
|
722 |
+
<input type='checkbox' name='ctcc_options_settings[enable_metafield]' <?php checked ( ! empty ( $options['enable_metafield'] ), 1 ); ?> value='1'>
|
723 |
+
<p class="description"><?php _e( 'Select this to enable a metafield on pages and posts. Checking the metafield on a page or post will exclude that page from displaying the notification.', 'uk-cookie-consent' ); ?></p>
|
724 |
+
<?php
|
725 |
+
}
|
726 |
+
|
727 |
+
public function settings_section_callback() {
|
728 |
+
echo '<p>' . __( 'Basic settings', 'uk-cookie-consent' ) . '</p>';
|
729 |
+
echo '<p><a href="http://iubenda.refr.cc/JKNZ55D" target="_blank">' . __( 'Create your own privacy policy here') . '</a></p>';
|
730 |
+
}
|
731 |
+
|
732 |
+
public function content_settings_section_callback() {
|
733 |
+
echo '<p>' .__( 'Update the content displayed to the user', 'uk-cookie-consent' ) . '</p>';
|
734 |
+
echo '<p><a href="http://iubenda.refr.cc/JKNZ55D" target="_blank">' . __( 'Create your own privacy policy here') . '</a></p>';
|
735 |
+
}
|
736 |
+
|
737 |
+
public function styles_settings_section_callback() {
|
738 |
+
echo '<p>' .__( 'Change the styles here if you like - but it\'s better in the Customizer', 'uk-cookie-consent' ) . '</p>';
|
739 |
+
echo '<p><a href="http://iubenda.refr.cc/JKNZ55D" target="_blank">' . __( 'Create your own privacy policy here') . '</a></p>';
|
740 |
+
}
|
741 |
+
|
742 |
+
public function pages_settings_section_callback() {
|
743 |
+
echo '<p>' . __( 'Use this section to set exclusion rules for pages and posts.', 'uk-cookie-consent' ) . '</p>';
|
744 |
+
echo '<p><a href="http://iubenda.refr.cc/JKNZ55D" target="_blank">' . __( 'Create your own privacy policy here') . '</a></p>';
|
745 |
+
}
|
746 |
+
|
747 |
+
public function options_page() {
|
748 |
+
$reset = isset ( $_GET['reset'] ) ? $_GET['reset'] : '';
|
749 |
+
if ( isset ( $_POST['reset'] ) ) {
|
750 |
+
|
751 |
+
$defaults = $this -> get_default_styles_settings();
|
752 |
+
update_option ( 'ctcc_styles_settings', $defaults );
|
753 |
+
|
754 |
+
$defaults = $this -> get_default_content_settings();
|
755 |
+
update_option ( 'ctcc_content_settings', $defaults );
|
756 |
+
|
757 |
+
}
|
758 |
+
$current = isset ( $_GET['tab'] ) ? $_GET['tab'] : 'options';
|
759 |
+
$title = __( 'Cookie Consent', 'uk-cookie-consent' );
|
760 |
+
$tabs = array (
|
761 |
+
'options' => __( 'General', 'uk-cookie-consent' ),
|
762 |
+
'content' => __( 'Content', 'uk-cookie-consent' ),
|
763 |
+
'styles' => __( 'Styles', 'uk-cookie-consent' )
|
764 |
+
);?>
|
765 |
+
|
766 |
+
<div class="wrap">
|
767 |
+
<h1><?php echo $title; ?></h1>
|
768 |
+
<div class="ctdb-outer-wrap">
|
769 |
+
<div class="ctdb-inner-wrap">
|
770 |
+
<h2 class="nav-tab-wrapper">
|
771 |
+
<?php foreach( $tabs as $tab => $name ) {
|
772 |
+
$class = ( $tab == $current ) ? ' nav-tab-active' : '';
|
773 |
+
echo "<a class='nav-tab$class' href='?page=ctcc&tab=$tab'>$name</a>";
|
774 |
+
} ?>
|
775 |
+
</h2>
|
776 |
+
<form action='options.php' method='post'>
|
777 |
+
<?php
|
778 |
+
settings_fields( 'ctcc_' . strtolower ( $current ) );
|
779 |
+
do_settings_sections( 'ctcc_' . strtolower ( $current ) );
|
780 |
+
submit_button();
|
781 |
+
?>
|
782 |
+
</form>
|
783 |
+
<form method="post" action="">
|
784 |
+
<p class="submit">
|
785 |
+
<input name="reset" class="button button-secondary" type="submit" value="<?php _e( 'Reset plugin defaults', 'uk-cookie-consent' ); ?>" >
|
786 |
+
<input type="hidden" name="action" value="reset" />
|
787 |
+
</p>
|
788 |
+
</form>
|
789 |
+
</div><!-- .ctdb-inner-wrap -->
|
790 |
+
|
791 |
+
<div class="ctdb-banners">
|
792 |
+
<div class="ctdb-banner hide-dbpro">
|
793 |
+
<a href="http://discussionboard.pro/?utm_source=plugin_ad&utm_medium=wp_plugin&utm_content=cookieconsent&utm_campaign=dbpro"><img src="<?php echo CTCC_PLUGIN_URL . 'assets/images/dbpro-ad-view.png'; ?>" alt="" ></a>
|
794 |
+
</div>
|
795 |
+
<div class="ctdb-banner">
|
796 |
+
<a href="http://superheroslider.catapultthemes.com/?utm_source=plugin_ad&utm_medium=wp_plugin&utm_content=cookieconsent&utm_campaign=superhero"><img src="<?php echo CTCC_PLUGIN_URL . 'assets/images/superhero-ad1.png'; ?>" alt="" ></a>
|
797 |
+
</div>
|
798 |
+
<div class="ctdb-banner">
|
799 |
+
<a href="https://sellastic.com/?ref=1&utm_source=plugin_ad&utm_medium=wp_plugin&utm_content=cookieconsent&utm_campaign=sellastic"><img src="<?php echo CTCC_PLUGIN_URL . 'assets/images/sellastic-ad1.jpg'; ?>" alt="" ></a>
|
800 |
+
</div>
|
801 |
+
<div class="ctdb-banner">
|
802 |
+
<a href="http://mode.catapultthemes.com/?utm_source=plugin_ad&utm_medium=wp_plugin&utm_content=cookieconsent&utm_campaign=themes"><img src="<?php echo CTCC_PLUGIN_URL . 'assets/images/themes-ad1.png'; ?>" alt="" ></a>
|
803 |
+
</div>
|
804 |
+
</div>
|
805 |
+
|
806 |
+
</div><!-- .ctdb-outer-wrap -->
|
807 |
+
</div><!-- .wrap -->
|
808 |
+
<?php
|
809 |
+
}
|
810 |
+
|
811 |
+
|
812 |
+
}
|
813 |
+
|
814 |
+
}
|
815 |
+
|
816 |
+
|
trunk/admin/class-ctcc-metafield.php
ADDED
@@ -0,0 +1,189 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Cookie Consent metafield class
|
4 |
+
*/
|
5 |
+
|
6 |
+
// Exit if accessed directly
|
7 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
8 |
+
exit;
|
9 |
+
}
|
10 |
+
|
11 |
+
if ( ! class_exists ( 'CTCC_Metafield' ) ) {
|
12 |
+
|
13 |
+
class CTCC_Metafield {
|
14 |
+
|
15 |
+
public function __construct() {
|
16 |
+
//
|
17 |
+
}
|
18 |
+
|
19 |
+
/*
|
20 |
+
* Initialize the class and start calling our hooks and filters
|
21 |
+
* @since 2.0.0
|
22 |
+
*/
|
23 |
+
public function init() {
|
24 |
+
|
25 |
+
add_action( 'add_meta_boxes', array ( $this, 'add_meta_box' ) );
|
26 |
+
add_action( 'save_post', array ( $this, 'save_metabox_data' ) );
|
27 |
+
|
28 |
+
}
|
29 |
+
|
30 |
+
public function metaboxes() {
|
31 |
+
|
32 |
+
$metaboxes = array (
|
33 |
+
array (
|
34 |
+
'ID' => 'ctcc_gallery_metabox',
|
35 |
+
'title' => __( 'Cookie Consent', 'uk-cookie-consent' ),
|
36 |
+
'callback' => 'meta_box_callback',
|
37 |
+
'screens' => array( 'page', 'post' ),
|
38 |
+
'context' => 'side',
|
39 |
+
'priority' => 'default',
|
40 |
+
'fields' => array (
|
41 |
+
array (
|
42 |
+
'ID' => 'ctcc_exclude',
|
43 |
+
'name' => 'ctcc_exclude',
|
44 |
+
'title' => __( 'Exclude from cookie notice', 'uk-cookie-consent' ),
|
45 |
+
'type' => 'checkbox',
|
46 |
+
'class' => ''
|
47 |
+
),
|
48 |
+
),
|
49 |
+
),
|
50 |
+
);
|
51 |
+
|
52 |
+
return $metaboxes;
|
53 |
+
|
54 |
+
}
|
55 |
+
|
56 |
+
/*
|
57 |
+
* Register the metabox
|
58 |
+
* @since 1.0.0
|
59 |
+
*/
|
60 |
+
public function add_meta_box() {
|
61 |
+
|
62 |
+
$metaboxes = $this->metaboxes();
|
63 |
+
|
64 |
+
foreach ( $metaboxes as $metabox ) {
|
65 |
+
add_meta_box (
|
66 |
+
$metabox['ID'],
|
67 |
+
$metabox['title'],
|
68 |
+
array ( $this, 'meta_box_callback' ),
|
69 |
+
$metabox['screens'],
|
70 |
+
$metabox['context'],
|
71 |
+
$metabox['priority'],
|
72 |
+
$metabox['fields']
|
73 |
+
);
|
74 |
+
|
75 |
+
}
|
76 |
+
|
77 |
+
}
|
78 |
+
|
79 |
+
/*
|
80 |
+
* Metabox callbacks
|
81 |
+
* @since 1.0.0
|
82 |
+
*/
|
83 |
+
public function meta_box_callback ( $post, $fields ) {
|
84 |
+
|
85 |
+
wp_nonce_field ( 'save_metabox_data', 'ctcc_metabox_nonce' );
|
86 |
+
|
87 |
+
if ( $fields['args'] ) {
|
88 |
+
|
89 |
+
foreach ( $fields['args'] as $field ) {
|
90 |
+
|
91 |
+
switch ( $field['type'] ) {
|
92 |
+
|
93 |
+
case 'checkbox':
|
94 |
+
$this -> metabox_checkbox_output ( $post, $field );
|
95 |
+
break;
|
96 |
+
|
97 |
+
}
|
98 |
+
|
99 |
+
}
|
100 |
+
|
101 |
+
}
|
102 |
+
|
103 |
+
}
|
104 |
+
|
105 |
+
/*
|
106 |
+
* Metabox callback for checkbox
|
107 |
+
* @since 1.0.0
|
108 |
+
*/
|
109 |
+
public function metabox_checkbox_output( $post, $field ) {
|
110 |
+
|
111 |
+
$field_value = 0;
|
112 |
+
|
113 |
+
// First check if we're on the post-new screen
|
114 |
+
global $pagenow;
|
115 |
+
if ( in_array ( $pagenow, array( 'post-new.php' ) ) ) {
|
116 |
+
// This is a new post screen so we can apply the default value
|
117 |
+
$field_value = $field['default'];
|
118 |
+
} else {
|
119 |
+
$custom = get_post_custom ( $post->ID );
|
120 |
+
if ( isset ( $custom[$field['ID']][0] ) ) {
|
121 |
+
$field_value = $custom[$field['ID']][0];
|
122 |
+
}
|
123 |
+
}
|
124 |
+
?>
|
125 |
+
<div class="dm-work-metafield <?php echo $field['class']; ?>">
|
126 |
+
|
127 |
+
<input type="checkbox" id="<?php echo $field['name']; ?>" name="<?php echo $field['name']; ?>" value="1" <?php checked ( 1, $field_value ); ?>>
|
128 |
+
<label for="<?php echo $field['name']; ?>"><?php echo $field['title']; ?></label>
|
129 |
+
<?php if ( ! empty ( $field['label'] ) ) { ?>
|
130 |
+
<?php echo $field['label']; ?>
|
131 |
+
<?php } ?>
|
132 |
+
</div>
|
133 |
+
<?php
|
134 |
+
}
|
135 |
+
|
136 |
+
/*
|
137 |
+
* Save
|
138 |
+
* @since 1.0.0
|
139 |
+
*/
|
140 |
+
public function save_metabox_data( $post_id ) {
|
141 |
+
|
142 |
+
// Check the nonce is set
|
143 |
+
if ( ! isset ( $_POST['ctcc_metabox_nonce'] ) ) {
|
144 |
+
return;
|
145 |
+
}
|
146 |
+
|
147 |
+
// Verify the nonce
|
148 |
+
if ( ! wp_verify_nonce ( $_POST['ctcc_metabox_nonce'], 'save_metabox_data' ) ) {
|
149 |
+
return;
|
150 |
+
}
|
151 |
+
|
152 |
+
// If this is an autosave, our form has not been submitted, so we don't want to do anything.
|
153 |
+
if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {
|
154 |
+
return;
|
155 |
+
}
|
156 |
+
|
157 |
+
// Check the user's permissions.
|
158 |
+
if ( ! current_user_can( 'edit_post', $post_id ) ) {
|
159 |
+
return;
|
160 |
+
}
|
161 |
+
|
162 |
+
// Save all our metaboxes
|
163 |
+
$metaboxes = $this -> metaboxes();
|
164 |
+
foreach ( $metaboxes as $metabox ) {
|
165 |
+
if ( $metabox['fields'] ) {
|
166 |
+
foreach ( $metabox['fields'] as $field ) {
|
167 |
+
|
168 |
+
if ( $field['type'] != 'divider' ) {
|
169 |
+
|
170 |
+
if ( isset ( $_POST[$field['name']] ) ) {
|
171 |
+
if ( $field['type'] == 'wysiwyg' ) {
|
172 |
+
$data = $_POST[$field['name']];
|
173 |
+
} else {
|
174 |
+
$data = sanitize_text_field ( $_POST[$field['name']] );
|
175 |
+
}
|
176 |
+
update_post_meta ( $post_id, $field['ID'], $data );
|
177 |
+
} else {
|
178 |
+
delete_post_meta ( $post_id, $field['ID'] );
|
179 |
+
}
|
180 |
+
}
|
181 |
+
}
|
182 |
+
}
|
183 |
+
}
|
184 |
+
|
185 |
+
}
|
186 |
+
|
187 |
+
}
|
188 |
+
|
189 |
+
}
|
trunk/admin/index.php
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<?php // Silence is golden
|
trunk/assets/css/admin-style.css
ADDED
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.ctdb-outer-wrap {
|
2 |
+
margin-right: 300px;
|
3 |
+
padding: 0;
|
4 |
+
}
|
5 |
+
.ctdb-inner-wrap {
|
6 |
+
position: relative;
|
7 |
+
width: 100%;
|
8 |
+
min-width: 463px;
|
9 |
+
float: left;
|
10 |
+
}
|
11 |
+
.ctdb-banners {
|
12 |
+
float: right;
|
13 |
+
margin-right: -300px;
|
14 |
+
width: 280px;
|
15 |
+
}
|
16 |
+
.ctdb-banners img {
|
17 |
+
max-width: 100%;
|
18 |
+
}
|
19 |
+
.ctdb-banner {
|
20 |
+
margin-bottom: 1.5em;
|
21 |
+
}
|
22 |
+
@media only screen and (max-width: 850px) {
|
23 |
+
.ctdb-outer-wrap {
|
24 |
+
margin-right: 0;
|
25 |
+
}
|
26 |
+
.ctdb-inner-wrap {
|
27 |
+
position: relative;
|
28 |
+
width: 100%;
|
29 |
+
min-width: 0;
|
30 |
+
float: none;
|
31 |
+
}
|
32 |
+
.ctdb-banners {
|
33 |
+
float: none;
|
34 |
+
margin-right: 0;
|
35 |
+
width: 100%;
|
36 |
+
}
|
37 |
+
.ctdb-banner {
|
38 |
+
float: left;
|
39 |
+
margin-right: 20px;
|
40 |
+
}
|
41 |
+
}
|
trunk/assets/css/index.php
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<?php // Silence is golden
|
trunk/assets/css/style.css
ADDED
@@ -0,0 +1,169 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
html.has-cookie-bar.cookie-bar-top-bar {
|
2 |
+
margin-top: 30px;
|
3 |
+
-webkit-transition: all 0.25s;
|
4 |
+
-moz-transition: all 0.25s;
|
5 |
+
transition: all 0.25s;
|
6 |
+
}
|
7 |
+
#catapult-cookie-bar {
|
8 |
+
box-sizing: border-box;
|
9 |
+
max-height: 0;
|
10 |
+
opacity: 0;
|
11 |
+
direction: ltr;
|
12 |
+
padding: 0 20px;
|
13 |
+
z-index: 99999;
|
14 |
+
overflow: hidden;
|
15 |
+
text-align:left;
|
16 |
+
-webkit-transition: all 0.25s;
|
17 |
+
-moz-transition: all 0.25s;
|
18 |
+
transition: all 0.25s;
|
19 |
+
}
|
20 |
+
.ctcc-exclude-AF.geoip-continent-AF #catapult-cookie-bar,
|
21 |
+
.ctcc-exclude-AN.geoip-continent-AN #catapult-cookie-bar,
|
22 |
+
.ctcc-exclude-AS.geoip-continent-AS #catapult-cookie-bar,
|
23 |
+
.ctcc-exclude-EU.geoip-continent-EU #catapult-cookie-bar,
|
24 |
+
.ctcc-exclude-NA.geoip-continent-NA #catapult-cookie-bar,
|
25 |
+
.ctcc-exclude-OC.geoip-continent-OC #catapult-cookie-bar,
|
26 |
+
.ctcc-exclude-SA.geoip-continent-SA #catapult-cookie-bar {
|
27 |
+
display: none;
|
28 |
+
}
|
29 |
+
#catapult-cookie-bar.rounded-corners {
|
30 |
+
border-radius: 3px;
|
31 |
+
}
|
32 |
+
#catapult-cookie-bar.drop-shadow {
|
33 |
+
-webkit-box-shadow: 0px 3px 9px 0px rgba(0,0,0,0.4);
|
34 |
+
-moz-box-shadow: 0px 3px 9px 0px rgba(0,0,0,0.4);
|
35 |
+
box-shadow: 0px 3px 9px 0px rgba(0,0,0,0.4);
|
36 |
+
}
|
37 |
+
.cookie-bar-block #catapult-cookie-bar {
|
38 |
+
max-height: 999px;
|
39 |
+
-webkit-transition: opacity 0.25s;
|
40 |
+
-moz-transition: opacity 0.25s;
|
41 |
+
transition: opacity 0.25s;
|
42 |
+
}
|
43 |
+
.has-cookie-bar #catapult-cookie-bar {
|
44 |
+
opacity: 1;
|
45 |
+
max-height: 999px;
|
46 |
+
min-height: 30px;
|
47 |
+
padding: 15px 20px 15px;
|
48 |
+
}
|
49 |
+
.cookie-bar-block #catapult-cookie-bar span {
|
50 |
+
display: block;
|
51 |
+
margin: 1em 0;
|
52 |
+
}
|
53 |
+
.cookie-bar-bar #catapult-cookie-bar.float-accept span.ctcc-right-side {
|
54 |
+
float: right;
|
55 |
+
}
|
56 |
+
button#catapultCookie {
|
57 |
+
cursor: pointer;
|
58 |
+
margin:0 20px 0 0;
|
59 |
+
}
|
60 |
+
.cookie-bar-bar button#catapultCookie {
|
61 |
+
margin:0 0 0 20px;
|
62 |
+
}
|
63 |
+
.cookie-bar-bar .ctcc-inner {
|
64 |
+
display: -webkit-flex;
|
65 |
+
display: flex;
|
66 |
+
-webkit-align-items: center;
|
67 |
+
align-items: center;
|
68 |
+
-webkit-justify-content: center;
|
69 |
+
justify-content: center;
|
70 |
+
position: relative;
|
71 |
+
}
|
72 |
+
.cookie-bar-bar .float-accept .ctcc-inner {
|
73 |
+
-webkit-justify-content: space-between;
|
74 |
+
justify-content: space-between;
|
75 |
+
}
|
76 |
+
@media screen and (max-width: 991px) {
|
77 |
+
.ctcc-left-side {
|
78 |
+
margin-right: 1em;
|
79 |
+
}
|
80 |
+
}
|
81 |
+
.ctcc-right-side {
|
82 |
+
-webkit-flex-shrink: 0;
|
83 |
+
flex-shrink: 0;
|
84 |
+
}
|
85 |
+
.cookie-bar-block #catapult-cookie-bar h3 {
|
86 |
+
margin: 0.5em 0 0;
|
87 |
+
}
|
88 |
+
.use_x_close .x_close {
|
89 |
+
position: absolute;
|
90 |
+
top: 10px;
|
91 |
+
right: 10px;
|
92 |
+
cursor: pointer;
|
93 |
+
font-family: sans-serif;
|
94 |
+
-webkit-transition-duration:0.5s;
|
95 |
+
transition-duration:0.5s;
|
96 |
+
}
|
97 |
+
.cookie-bar-bar .use_x_close .x_close {
|
98 |
+
right: 0;
|
99 |
+
top: 50%;
|
100 |
+
-webkit-transform: translateY(-50%);
|
101 |
+
transform: translateY(-50%);
|
102 |
+
}
|
103 |
+
.x_close {
|
104 |
+
-webkit-backface-visibility: hidden;
|
105 |
+
backface-visibility: hidden;
|
106 |
+
-webkit-transform: translate3d(0px,0px,0px);
|
107 |
+
width: 14px;
|
108 |
+
height: 30px;
|
109 |
+
position: relative;
|
110 |
+
margin: 0 auto;
|
111 |
+
-webkit-transform: rotate(0deg);
|
112 |
+
-moz-transform: rotate(0deg);
|
113 |
+
-o-transform: rotate(0deg);
|
114 |
+
transform: rotate(0deg);
|
115 |
+
-webkit-transition: .5s ease-in-out;
|
116 |
+
-moz-transition: .5s ease-in-out;
|
117 |
+
-o-transition: .5s ease-in-out;
|
118 |
+
transition: .5s ease-in-out;
|
119 |
+
cursor: pointer;
|
120 |
+
}
|
121 |
+
.x_close span {
|
122 |
+
display: block;
|
123 |
+
position: absolute;
|
124 |
+
height: 3px;
|
125 |
+
width: 14px;
|
126 |
+
background: #111;
|
127 |
+
border-radius: 6px;
|
128 |
+
opacity: 1;
|
129 |
+
left: 0;
|
130 |
+
-webkit-transform: rotate(0deg);
|
131 |
+
-moz-transform: rotate(0deg);
|
132 |
+
-o-transform: rotate(0deg);
|
133 |
+
transform: rotate(0deg);
|
134 |
+
-webkit-transition: .25s ease-in-out;
|
135 |
+
-moz-transition: .25s ease-in-out;
|
136 |
+
-o-transition: .25s ease-in-out;
|
137 |
+
transition: .25s ease-in-out;
|
138 |
+
transition-delay: .14s;
|
139 |
+
-webkit-transition-delay: .14s;
|
140 |
+
-moz-transition-delay: .14s;
|
141 |
+
}
|
142 |
+
.x_close span:nth-child(1),
|
143 |
+
.x_close span:nth-child(2) {
|
144 |
+
top: 14px;
|
145 |
+
}
|
146 |
+
.x_close span:nth-child(1) {
|
147 |
+
-webkit-transform: rotate(45deg);
|
148 |
+
-moz-transform: rotate(45deg);
|
149 |
+
-o-transform: rotate(45deg);
|
150 |
+
transform: rotate(45deg);
|
151 |
+
}
|
152 |
+
.x_close span:nth-child(2) {
|
153 |
+
-webkit-transform: rotate(-45deg);
|
154 |
+
-moz-transform: rotate(-45deg);
|
155 |
+
-o-transform: rotate(-45deg);
|
156 |
+
transform: rotate(-45deg);
|
157 |
+
}
|
158 |
+
.x_close:hover span:nth-child(1) {
|
159 |
+
-webkit-transform: rotate(0);
|
160 |
+
-moz-transform: rotate(0);
|
161 |
+
-o-transform: rotate(0);
|
162 |
+
transform: rotate(0);
|
163 |
+
}
|
164 |
+
.x_close:hover span:nth-child(2) {
|
165 |
+
-webkit-transform: rotate(0);
|
166 |
+
-moz-transform: rotate(0);
|
167 |
+
-o-transform: rotate(0);
|
168 |
+
transform: rotate(0);
|
169 |
+
}
|
trunk/assets/images/dbpro-ad-view.png
ADDED
Binary file
|
trunk/assets/images/index.php
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<?php // Silence is golden
|
trunk/assets/images/sellastic-ad1.jpg
ADDED
Binary file
|
trunk/assets/images/superhero-ad1.png
ADDED
Binary file
|
trunk/assets/images/themes-ad1.jpg
ADDED
Binary file
|
trunk/assets/images/themes-ad1.png
ADDED
Binary file
|
trunk/assets/index.php
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<?php // Silence is golden
|
trunk/assets/js/index.php
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<?php // Silence is golden
|
trunk/assets/js/uk-cookie-consent-js.js
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
//All the cookie setting stuff
|
2 |
+
function catapultSetCookie(cookieName, cookieValue, nDays) {
|
3 |
+
var today = new Date();
|
4 |
+
var expire = new Date();
|
5 |
+
if (nDays==null || nDays==0) nDays=1;
|
6 |
+
expire.setTime(today.getTime() + 3600000*24*nDays);
|
7 |
+
document.cookie = cookieName+"="+escape(cookieValue)+ ";expires="+expire.toGMTString()+"; path=/";
|
8 |
+
}
|
9 |
+
function catapultReadCookie(cookieName) {
|
10 |
+
var theCookie=" "+document.cookie;
|
11 |
+
var ind=theCookie.indexOf(" "+cookieName+"=");
|
12 |
+
if (ind==-1) ind=theCookie.indexOf(";"+cookieName+"=");
|
13 |
+
if (ind==-1 || cookieName=="") return "";
|
14 |
+
var ind1=theCookie.indexOf(";",ind+1);
|
15 |
+
if (ind1==-1) ind1=theCookie.length;
|
16 |
+
// Returns true if the versions match
|
17 |
+
return ctcc_vars.version == unescape(theCookie.substring(ind+cookieName.length+2,ind1));
|
18 |
+
}
|
19 |
+
function catapultDeleteCookie(cookieName) {
|
20 |
+
document.cookie = cookieName + '=;expires=Thu, 01 Jan 1970 00:00:01 GMT;path=/';
|
21 |
+
}
|
22 |
+
function catapultAcceptCookies() {
|
23 |
+
catapultSetCookie('catAccCookies', ctcc_vars.version, ctcc_vars.expiry);
|
24 |
+
jQuery("html").removeClass('has-cookie-bar');
|
25 |
+
jQuery("html").css("margin-top","0");
|
26 |
+
jQuery("#catapult-cookie-bar").fadeOut();
|
27 |
+
}
|
28 |
+
// The function called by the timer
|
29 |
+
function ctccCloseNotification() {
|
30 |
+
catapultAcceptCookies();
|
31 |
+
}
|
32 |
+
// The function called if first page only is specified
|
33 |
+
function ctccFirstPage() {
|
34 |
+
if ( ctcc_vars.method ) {
|
35 |
+
catapultSetCookie('catAccCookies', ctcc_vars.version, ctcc_vars.expiry);
|
36 |
+
}
|
37 |
+
}
|
38 |
+
jQuery(document).ready(function($){
|
39 |
+
$('.x_close').on('click', function(){
|
40 |
+
catapultAcceptCookies();
|
41 |
+
});
|
42 |
+
});
|
trunk/index.php
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<?php // Silence is golden
|
trunk/languages/index.php
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<?php // Silence is golden
|
trunk/languages/uk-cookie-consent-en_GB.mo
ADDED
Binary file
|
trunk/languages/uk-cookie-consent-en_GB.po
ADDED
@@ -0,0 +1,410 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: Cookie Consent 2.0.0\n"
|
4 |
+
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/uk-cookie-"
|
5 |
+
"consent\n"
|
6 |
+
"POT-Creation-Date: 2016-01-13 00:18+0100\n"
|
7 |
+
"PO-Revision-Date: 2016-01-13 00:18+0100\n"
|
8 |
+
"Last-Translator: Jędrzej Raczyński <jedrzejraczynski@gmail.com>\n"
|
9 |
+
"Language-Team: Catapult_Themes <info@catapultthemes.com>\n"
|
10 |
+
"Language: en\n"
|
11 |
+
"MIME-Version: 1.0\n"
|
12 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
13 |
+
"Content-Transfer-Encoding: 8bit\n"
|
14 |
+
"X-Generator: Poedit 1.8.6\n"
|
15 |
+
"X-Poedit-KeywordsList: gettext;gettext_noop;_e;_n;__\n"
|
16 |
+
"X-Poedit-Basepath: ..\n"
|
17 |
+
"X-Poedit-SearchPath-0: .\n"
|
18 |
+
|
19 |
+
#. Plugin Name of the plugin/theme
|
20 |
+
#: admin/class-ctcc-admin.php:56 admin/class-ctcc-admin.php:630
|
21 |
+
#: public/customizer.php:17
|
22 |
+
msgid "Cookie Consent"
|
23 |
+
msgstr ""
|
24 |
+
|
25 |
+
#: admin/class-ctcc-admin.php:65
|
26 |
+
msgid "General settings"
|
27 |
+
msgstr ""
|
28 |
+
|
29 |
+
#: admin/class-ctcc-admin.php:72
|
30 |
+
msgid "Close"
|
31 |
+
msgstr ""
|
32 |
+
|
33 |
+
#: admin/class-ctcc-admin.php:80
|
34 |
+
msgid "First Page Only"
|
35 |
+
msgstr ""
|
36 |
+
|
37 |
+
#: admin/class-ctcc-admin.php:88
|
38 |
+
msgid "Notification Duration"
|
39 |
+
msgstr ""
|
40 |
+
|
41 |
+
#: admin/class-ctcc-admin.php:96
|
42 |
+
msgid "Cookie Expiry"
|
43 |
+
msgstr ""
|
44 |
+
|
45 |
+
#: admin/class-ctcc-admin.php:104
|
46 |
+
msgid "Cookie Version"
|
47 |
+
msgstr ""
|
48 |
+
|
49 |
+
#: admin/class-ctcc-admin.php:126
|
50 |
+
msgid "Content settings"
|
51 |
+
msgstr ""
|
52 |
+
|
53 |
+
#: admin/class-ctcc-admin.php:133
|
54 |
+
msgid "Heading Text"
|
55 |
+
msgstr ""
|
56 |
+
|
57 |
+
#: admin/class-ctcc-admin.php:141
|
58 |
+
msgid "Notification Text"
|
59 |
+
msgstr ""
|
60 |
+
|
61 |
+
#: admin/class-ctcc-admin.php:149
|
62 |
+
msgid "More Info Text"
|
63 |
+
msgstr ""
|
64 |
+
|
65 |
+
#: admin/class-ctcc-admin.php:157
|
66 |
+
msgid "More Info Page"
|
67 |
+
msgstr ""
|
68 |
+
|
69 |
+
#: admin/class-ctcc-admin.php:165
|
70 |
+
msgid "More Info URL"
|
71 |
+
msgstr ""
|
72 |
+
|
73 |
+
#: admin/class-ctcc-admin.php:173
|
74 |
+
msgid "More Info Target"
|
75 |
+
msgstr ""
|
76 |
+
|
77 |
+
#: admin/class-ctcc-admin.php:181
|
78 |
+
msgid "Accept Text"
|
79 |
+
msgstr ""
|
80 |
+
|
81 |
+
#: admin/class-ctcc-admin.php:203
|
82 |
+
msgid "Styles settings"
|
83 |
+
msgstr ""
|
84 |
+
|
85 |
+
#: admin/class-ctcc-admin.php:210 public/customizer.php:34
|
86 |
+
msgid "Position"
|
87 |
+
msgstr ""
|
88 |
+
|
89 |
+
#: admin/class-ctcc-admin.php:218 public/customizer.php:58
|
90 |
+
msgid "Container Class"
|
91 |
+
msgstr ""
|
92 |
+
|
93 |
+
#: admin/class-ctcc-admin.php:226
|
94 |
+
msgid "Include Stylesheet"
|
95 |
+
msgstr ""
|
96 |
+
|
97 |
+
#: admin/class-ctcc-admin.php:234 public/customizer.php:90
|
98 |
+
msgid "Rounded Corners"
|
99 |
+
msgstr ""
|
100 |
+
|
101 |
+
#: admin/class-ctcc-admin.php:242 public/customizer.php:106
|
102 |
+
msgid "Drop Shadow"
|
103 |
+
msgstr ""
|
104 |
+
|
105 |
+
#: admin/class-ctcc-admin.php:250 public/customizer.php:122
|
106 |
+
msgid "Display Button With Text"
|
107 |
+
msgstr ""
|
108 |
+
|
109 |
+
#: admin/class-ctcc-admin.php:258 public/customizer.php:138
|
110 |
+
msgid "Use X Close"
|
111 |
+
msgstr ""
|
112 |
+
|
113 |
+
#: admin/class-ctcc-admin.php:266 public/customizer.php:154
|
114 |
+
msgid "Text Color"
|
115 |
+
msgstr ""
|
116 |
+
|
117 |
+
#: admin/class-ctcc-admin.php:274 admin/class-ctcc-admin.php:306
|
118 |
+
#: public/customizer.php:170
|
119 |
+
msgid "Background Color"
|
120 |
+
msgstr ""
|
121 |
+
|
122 |
+
#: admin/class-ctcc-admin.php:282 public/customizer.php:186
|
123 |
+
msgid "Link Color"
|
124 |
+
msgstr ""
|
125 |
+
|
126 |
+
#: admin/class-ctcc-admin.php:290 public/customizer.php:202
|
127 |
+
msgid "Button Color"
|
128 |
+
msgstr ""
|
129 |
+
|
130 |
+
#: admin/class-ctcc-admin.php:298 public/customizer.php:218
|
131 |
+
msgid "Button Background"
|
132 |
+
msgstr ""
|
133 |
+
|
134 |
+
#: admin/class-ctcc-admin.php:339 admin/class-ctcc-admin.php:349
|
135 |
+
msgid "Cookies"
|
136 |
+
msgstr ""
|
137 |
+
|
138 |
+
#: admin/class-ctcc-admin.php:350
|
139 |
+
msgid "This site uses cookies: "
|
140 |
+
msgstr ""
|
141 |
+
|
142 |
+
#: admin/class-ctcc-admin.php:351
|
143 |
+
msgid "Okay, thanks"
|
144 |
+
msgstr ""
|
145 |
+
|
146 |
+
#: admin/class-ctcc-admin.php:352
|
147 |
+
msgid "Find out more."
|
148 |
+
msgstr ""
|
149 |
+
|
150 |
+
#: admin/class-ctcc-admin.php:411
|
151 |
+
msgid "On Click"
|
152 |
+
msgstr ""
|
153 |
+
|
154 |
+
#: admin/class-ctcc-admin.php:412
|
155 |
+
msgid "Timed"
|
156 |
+
msgstr ""
|
157 |
+
|
158 |
+
#: admin/class-ctcc-admin.php:414
|
159 |
+
msgid "How you want the user to close the notification"
|
160 |
+
msgstr ""
|
161 |
+
|
162 |
+
#: admin/class-ctcc-admin.php:421
|
163 |
+
msgid ""
|
164 |
+
"Select this to show the notification only on the first page the user visits"
|
165 |
+
msgstr ""
|
166 |
+
|
167 |
+
#: admin/class-ctcc-admin.php:428
|
168 |
+
msgid ""
|
169 |
+
"If you chose Timer as the close method, enter how many seconds the "
|
170 |
+
"notification should display for"
|
171 |
+
msgstr ""
|
172 |
+
|
173 |
+
#: admin/class-ctcc-admin.php:435
|
174 |
+
msgid "The number of days that the cookie is set for"
|
175 |
+
msgstr ""
|
176 |
+
|
177 |
+
#: admin/class-ctcc-admin.php:442
|
178 |
+
msgid ""
|
179 |
+
"A version number for the cookie - update this to invalidate the cookie and "
|
180 |
+
"force all users to view the notification again"
|
181 |
+
msgstr ""
|
182 |
+
|
183 |
+
#: admin/class-ctcc-admin.php:453
|
184 |
+
msgid ""
|
185 |
+
"The heading text - only applies if you are not using a top or bottom bar"
|
186 |
+
msgstr ""
|
187 |
+
|
188 |
+
#: admin/class-ctcc-admin.php:460
|
189 |
+
msgid "The default text to indicate that your site uses cookies"
|
190 |
+
msgstr ""
|
191 |
+
|
192 |
+
#: admin/class-ctcc-admin.php:467
|
193 |
+
msgid "The default text to dismiss the notification"
|
194 |
+
msgstr ""
|
195 |
+
|
196 |
+
#: admin/class-ctcc-admin.php:474
|
197 |
+
msgid "The default text to use to link to a page providing further information"
|
198 |
+
msgstr ""
|
199 |
+
|
200 |
+
#: admin/class-ctcc-admin.php:490
|
201 |
+
msgid "The page containing further information about your cookie policy"
|
202 |
+
msgstr ""
|
203 |
+
|
204 |
+
#: admin/class-ctcc-admin.php:497
|
205 |
+
msgid ""
|
206 |
+
"You can add an absolute URL here to override the More Info Page setting "
|
207 |
+
"above. Use this to link to an external website for further information about "
|
208 |
+
"cookies."
|
209 |
+
msgstr ""
|
210 |
+
|
211 |
+
#: admin/class-ctcc-admin.php:504
|
212 |
+
msgid "New Tab"
|
213 |
+
msgstr ""
|
214 |
+
|
215 |
+
#: admin/class-ctcc-admin.php:505
|
216 |
+
msgid "Same Tab"
|
217 |
+
msgstr ""
|
218 |
+
|
219 |
+
#: admin/class-ctcc-admin.php:507
|
220 |
+
msgid "Open the More Information page in the same or new tab."
|
221 |
+
msgstr ""
|
222 |
+
|
223 |
+
#: admin/class-ctcc-admin.php:518 public/customizer.php:36
|
224 |
+
msgid "Top Bar"
|
225 |
+
msgstr ""
|
226 |
+
|
227 |
+
#: admin/class-ctcc-admin.php:519 public/customizer.php:37
|
228 |
+
msgid "Bottom Bar"
|
229 |
+
msgstr ""
|
230 |
+
|
231 |
+
#: admin/class-ctcc-admin.php:520 public/customizer.php:38
|
232 |
+
msgid "Top Left Block"
|
233 |
+
msgstr ""
|
234 |
+
|
235 |
+
#: admin/class-ctcc-admin.php:521 public/customizer.php:39
|
236 |
+
msgid "Top Right Block"
|
237 |
+
msgstr ""
|
238 |
+
|
239 |
+
#: admin/class-ctcc-admin.php:522 public/customizer.php:40
|
240 |
+
msgid "Bottom Left Block"
|
241 |
+
msgstr ""
|
242 |
+
|
243 |
+
#: admin/class-ctcc-admin.php:523 public/customizer.php:41
|
244 |
+
msgid "Bottom Right Block"
|
245 |
+
msgstr ""
|
246 |
+
|
247 |
+
#: admin/class-ctcc-admin.php:525
|
248 |
+
msgid "Where the notification should appear"
|
249 |
+
msgstr ""
|
250 |
+
|
251 |
+
#: admin/class-ctcc-admin.php:532
|
252 |
+
msgid ""
|
253 |
+
"You can add an optional wrapper class, eg container, here to align the "
|
254 |
+
"notification text with the rest of your content"
|
255 |
+
msgstr ""
|
256 |
+
|
257 |
+
#: admin/class-ctcc-admin.php:539
|
258 |
+
msgid "Deselect this to dequeue the plugin stylesheet"
|
259 |
+
msgstr ""
|
260 |
+
|
261 |
+
#: admin/class-ctcc-admin.php:546
|
262 |
+
msgid "Round the corners on the block (doesn't apply to the top or bottom bar)"
|
263 |
+
msgstr ""
|
264 |
+
|
265 |
+
#: admin/class-ctcc-admin.php:553
|
266 |
+
msgid "Add drop shadow to the block (doesn't apply to the top or bottom bar)"
|
267 |
+
msgstr ""
|
268 |
+
|
269 |
+
#: admin/class-ctcc-admin.php:560
|
270 |
+
msgid "Display the confirmation button with notification text"
|
271 |
+
msgstr ""
|
272 |
+
|
273 |
+
#: admin/class-ctcc-admin.php:567
|
274 |
+
msgid "Remove confirmation button and use 'X' icon instead"
|
275 |
+
msgstr ""
|
276 |
+
|
277 |
+
#: admin/class-ctcc-admin.php:574
|
278 |
+
msgid "The text color on the notification"
|
279 |
+
msgstr ""
|
280 |
+
|
281 |
+
#: admin/class-ctcc-admin.php:581
|
282 |
+
msgid "The background color for the notification"
|
283 |
+
msgstr ""
|
284 |
+
|
285 |
+
#: admin/class-ctcc-admin.php:588
|
286 |
+
msgid "The link color on the notification"
|
287 |
+
msgstr ""
|
288 |
+
|
289 |
+
#: admin/class-ctcc-admin.php:595
|
290 |
+
msgid "The text color on the notification button"
|
291 |
+
msgstr ""
|
292 |
+
|
293 |
+
#: admin/class-ctcc-admin.php:602
|
294 |
+
msgid "The background color on the notification button"
|
295 |
+
msgstr ""
|
296 |
+
|
297 |
+
#: admin/class-ctcc-admin.php:607
|
298 |
+
msgid "<p>Basic settings</p>"
|
299 |
+
msgstr ""
|
300 |
+
|
301 |
+
#: admin/class-ctcc-admin.php:611
|
302 |
+
msgid "<p>Update the content displayed to the user</p>"
|
303 |
+
msgstr ""
|
304 |
+
|
305 |
+
#: admin/class-ctcc-admin.php:615
|
306 |
+
msgid ""
|
307 |
+
"<p>Change the styles here if you like - but it's better in the Customizer</p>"
|
308 |
+
msgstr ""
|
309 |
+
|
310 |
+
#: admin/class-ctcc-admin.php:632
|
311 |
+
msgid "General"
|
312 |
+
msgstr ""
|
313 |
+
|
314 |
+
#: admin/class-ctcc-admin.php:633
|
315 |
+
msgid "Content"
|
316 |
+
msgstr ""
|
317 |
+
|
318 |
+
#: admin/class-ctcc-admin.php:634
|
319 |
+
msgid "Styles"
|
320 |
+
msgstr ""
|
321 |
+
|
322 |
+
#: admin/class-ctcc-admin.php:656
|
323 |
+
msgid "Reset plugin defaults"
|
324 |
+
msgstr ""
|
325 |
+
|
326 |
+
#: public/customizer.php:43
|
327 |
+
msgid "Position and placement."
|
328 |
+
msgstr ""
|
329 |
+
|
330 |
+
#: public/customizer.php:59
|
331 |
+
msgid "Optional wrapper class."
|
332 |
+
msgstr ""
|
333 |
+
|
334 |
+
#: public/customizer.php:74
|
335 |
+
msgid "Enqueue Styles"
|
336 |
+
msgstr ""
|
337 |
+
|
338 |
+
#: public/customizer.php:75
|
339 |
+
msgid "Deselect this to dequeue the plugin stylesheet."
|
340 |
+
msgstr ""
|
341 |
+
|
342 |
+
#: public/customizer.php:91
|
343 |
+
msgid "Round the corners on the block."
|
344 |
+
msgstr ""
|
345 |
+
|
346 |
+
#: public/customizer.php:107
|
347 |
+
msgid "Add drop shadow to the block."
|
348 |
+
msgstr ""
|
349 |
+
|
350 |
+
#: public/customizer.php:123
|
351 |
+
msgid "Deselect to float button to right."
|
352 |
+
msgstr ""
|
353 |
+
|
354 |
+
#: public/customizer.php:139
|
355 |
+
msgid "Replace confirmation button with 'X' icon."
|
356 |
+
msgstr ""
|
357 |
+
|
358 |
+
#: public/customizer.php:155
|
359 |
+
msgid "Text color for your notification bar."
|
360 |
+
msgstr ""
|
361 |
+
|
362 |
+
#: public/customizer.php:171
|
363 |
+
msgid "Background color for your notification bar."
|
364 |
+
msgstr ""
|
365 |
+
|
366 |
+
#: public/customizer.php:187
|
367 |
+
msgid "Link color for your notification bar."
|
368 |
+
msgstr ""
|
369 |
+
|
370 |
+
#: public/customizer.php:203
|
371 |
+
msgid "Text color for your notification bar button."
|
372 |
+
msgstr ""
|
373 |
+
|
374 |
+
#: public/customizer.php:219
|
375 |
+
msgid "Background color for your notification bar button."
|
376 |
+
msgstr ""
|
377 |
+
|
378 |
+
#: uk-cookie-consent.php:54
|
379 |
+
msgid "Cookie Policy"
|
380 |
+
msgstr ""
|
381 |
+
|
382 |
+
#: uk-cookie-consent.php:55
|
383 |
+
msgid ""
|
384 |
+
"This site uses cookies - small text files that are placed on your machine to "
|
385 |
+
"help the site provide a better user experience. In general, cookies are used "
|
386 |
+
"to retain user preferences, store information for things like shopping "
|
387 |
+
"carts, and provide anonymised tracking data to third party applications like "
|
388 |
+
"Google Analytics. As a rule, cookies will make your browsing experience "
|
389 |
+
"better. However, you may prefer to disable cookies on this site and on "
|
390 |
+
"others. The most effective way to do this is to disable cookies in your "
|
391 |
+
"browser. We suggest consulting the Help section of your browser or taking a "
|
392 |
+
"look at <a href=\"http://www.aboutcookies.org\">the About Cookies website</"
|
393 |
+
"a> which offers guidance for all modern browsers"
|
394 |
+
msgstr ""
|
395 |
+
|
396 |
+
#. Plugin URI of the plugin/theme
|
397 |
+
msgid "http://catapultthemes.com/cookie-consent/"
|
398 |
+
msgstr ""
|
399 |
+
|
400 |
+
#. Description of the plugin/theme
|
401 |
+
msgid "The only cookie consent plugin you'll ever need."
|
402 |
+
msgstr ""
|
403 |
+
|
404 |
+
#. Author of the plugin/theme
|
405 |
+
msgid "Catapult_Themes"
|
406 |
+
msgstr ""
|
407 |
+
|
408 |
+
#. Author URI of the plugin/theme
|
409 |
+
msgid "http://catapultthemes.com/"
|
410 |
+
msgstr ""
|
trunk/languages/uk-cookie-consent-it_IT.mo
ADDED
Binary file
|
trunk/languages/uk-cookie-consent-it_IT.po
ADDED
@@ -0,0 +1,453 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Copyright (C) 2016 Cookie Consent
|
2 |
+
# This file is distributed under the same license as the Cookie Consent package.
|
3 |
+
msgid ""
|
4 |
+
msgstr ""
|
5 |
+
"Project-Id-Version: Cookie Consent 2.0.3\n"
|
6 |
+
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/uk-cookie-"
|
7 |
+
"consent\n"
|
8 |
+
"POT-Creation-Date: 2016-01-12 23:15:34+00:00\n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"PO-Revision-Date: 2016-07-27 17:07+0100\n"
|
13 |
+
"Last-Translator: Angelo Giammarresi <info@wocmultimedia.com>\n"
|
14 |
+
"Language-Team: Angelo Giammarresi <info@wocmultimedia.com>\n"
|
15 |
+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
16 |
+
"Language: it_IT\n"
|
17 |
+
"X-Generator: Poedit 1.5.7\n"
|
18 |
+
|
19 |
+
#. #-#-#-#-# uk-cookie-consent.pot (Cookie Consent 2.0.3) #-#-#-#-#
|
20 |
+
#. Plugin Name of the plugin/theme
|
21 |
+
#: admin/class-ctcc-admin.php:56 admin/class-ctcc-admin.php:630
|
22 |
+
#: public/customizer.php:17
|
23 |
+
msgid "Cookie Consent"
|
24 |
+
msgstr "Consenso Cookie "
|
25 |
+
|
26 |
+
#: admin/class-ctcc-admin.php:65
|
27 |
+
msgid "General settings"
|
28 |
+
msgstr "Impostazioni Generali"
|
29 |
+
|
30 |
+
#: admin/class-ctcc-admin.php:72
|
31 |
+
msgid "Close"
|
32 |
+
msgstr "Chiudi"
|
33 |
+
|
34 |
+
#: admin/class-ctcc-admin.php:80
|
35 |
+
msgid "First Page Only"
|
36 |
+
msgstr "Solo Prima Pagina"
|
37 |
+
|
38 |
+
#: admin/class-ctcc-admin.php:88
|
39 |
+
msgid "Notification Duration"
|
40 |
+
msgstr "Durata Avviso"
|
41 |
+
|
42 |
+
#: admin/class-ctcc-admin.php:96
|
43 |
+
msgid "Cookie Expiry"
|
44 |
+
msgstr "Scadenza Cookie"
|
45 |
+
|
46 |
+
#: admin/class-ctcc-admin.php:104
|
47 |
+
msgid "Cookie Version"
|
48 |
+
msgstr "Versione Cookie"
|
49 |
+
|
50 |
+
#: admin/class-ctcc-admin.php:126
|
51 |
+
msgid "Content settings"
|
52 |
+
msgstr "Impostazioni contenuti"
|
53 |
+
|
54 |
+
#: admin/class-ctcc-admin.php:133
|
55 |
+
msgid "Heading Text"
|
56 |
+
msgstr "Testo Intestazione"
|
57 |
+
|
58 |
+
#: admin/class-ctcc-admin.php:141
|
59 |
+
msgid "Notification Text"
|
60 |
+
msgstr "Testo Avviso"
|
61 |
+
|
62 |
+
#: admin/class-ctcc-admin.php:149
|
63 |
+
msgid "More Info Text"
|
64 |
+
msgstr "Testo Maggiori Informazioni"
|
65 |
+
|
66 |
+
#: admin/class-ctcc-admin.php:157
|
67 |
+
msgid "More Info Page"
|
68 |
+
msgstr "Pagina Maggiori Informazioni"
|
69 |
+
|
70 |
+
#: admin/class-ctcc-admin.php:165
|
71 |
+
msgid "More Info URL"
|
72 |
+
msgstr "URL di Approfondimento"
|
73 |
+
|
74 |
+
#: admin/class-ctcc-admin.php:173
|
75 |
+
msgid "More Info Target"
|
76 |
+
msgstr "Destinazione Pagina Informazioni"
|
77 |
+
|
78 |
+
#: admin/class-ctcc-admin.php:181
|
79 |
+
msgid "Accept Text"
|
80 |
+
msgstr "Testo Accettazione"
|
81 |
+
|
82 |
+
#: admin/class-ctcc-admin.php:203
|
83 |
+
msgid "Styles settings"
|
84 |
+
msgstr "Impostazioni Stili"
|
85 |
+
|
86 |
+
#: admin/class-ctcc-admin.php:210 public/customizer.php:34
|
87 |
+
msgid "Position"
|
88 |
+
msgstr "Posizione"
|
89 |
+
|
90 |
+
#: admin/class-ctcc-admin.php:218 public/customizer.php:58
|
91 |
+
msgid "Container Class"
|
92 |
+
msgstr "Classe Container"
|
93 |
+
|
94 |
+
#: admin/class-ctcc-admin.php:226
|
95 |
+
msgid "Include Stylesheet"
|
96 |
+
msgstr "Includere Foglio di Stile"
|
97 |
+
|
98 |
+
#: admin/class-ctcc-admin.php:234 public/customizer.php:90
|
99 |
+
msgid "Rounded Corners"
|
100 |
+
msgstr "Spigoli Arrotondati"
|
101 |
+
|
102 |
+
#: admin/class-ctcc-admin.php:242 public/customizer.php:106
|
103 |
+
msgid "Drop Shadow"
|
104 |
+
msgstr "Ombra Esterna"
|
105 |
+
|
106 |
+
#: admin/class-ctcc-admin.php:250 public/customizer.php:122
|
107 |
+
msgid "Display Button With Text"
|
108 |
+
msgstr "Visualizza pulsante con testo"
|
109 |
+
|
110 |
+
#: admin/class-ctcc-admin.php:258 public/customizer.php:138
|
111 |
+
msgid "Use X Close"
|
112 |
+
msgstr "Usa una X per chiudere"
|
113 |
+
|
114 |
+
#: admin/class-ctcc-admin.php:266 public/customizer.php:154
|
115 |
+
msgid "Text Color"
|
116 |
+
msgstr "Colore Testo"
|
117 |
+
|
118 |
+
#: admin/class-ctcc-admin.php:274 admin/class-ctcc-admin.php:306
|
119 |
+
#: public/customizer.php:170
|
120 |
+
msgid "Background Color"
|
121 |
+
msgstr "Colore Sfondo"
|
122 |
+
|
123 |
+
#: admin/class-ctcc-admin.php:282 public/customizer.php:186
|
124 |
+
msgid "Link Color"
|
125 |
+
msgstr "Colore Link"
|
126 |
+
|
127 |
+
#: admin/class-ctcc-admin.php:290 public/customizer.php:202
|
128 |
+
msgid "Button Color"
|
129 |
+
msgstr "Colore Testo Pulsante"
|
130 |
+
|
131 |
+
#: admin/class-ctcc-admin.php:298 public/customizer.php:218
|
132 |
+
msgid "Button Background"
|
133 |
+
msgstr "Colore Sfondo Pulsante"
|
134 |
+
|
135 |
+
#: admin/class-ctcc-admin.php:339 admin/class-ctcc-admin.php:349
|
136 |
+
msgid "Cookies"
|
137 |
+
msgstr "Cookies"
|
138 |
+
|
139 |
+
#: admin/class-ctcc-admin.php:350
|
140 |
+
msgid "This site uses cookies: "
|
141 |
+
msgstr "Questo sito utilizza i cookie:"
|
142 |
+
|
143 |
+
#: admin/class-ctcc-admin.php:351
|
144 |
+
msgid "Okay, thanks"
|
145 |
+
msgstr "Va bene, grazie"
|
146 |
+
|
147 |
+
#: admin/class-ctcc-admin.php:352
|
148 |
+
msgid "Find out more."
|
149 |
+
msgstr "Leggi di più."
|
150 |
+
|
151 |
+
#: admin/class-ctcc-admin.php:411
|
152 |
+
msgid "On Click"
|
153 |
+
msgstr "Quando Clicchi"
|
154 |
+
|
155 |
+
#: admin/class-ctcc-admin.php:412
|
156 |
+
msgid "Timed"
|
157 |
+
msgstr "Temporizzato"
|
158 |
+
|
159 |
+
#: admin/class-ctcc-admin.php:414
|
160 |
+
msgid "How you want the user to close the notification"
|
161 |
+
msgstr "Come desideri che l'utente chiuda la notifica"
|
162 |
+
|
163 |
+
#: admin/class-ctcc-admin.php:421
|
164 |
+
msgid ""
|
165 |
+
"Select this to show the notification only on the first page the user visits"
|
166 |
+
msgstr ""
|
167 |
+
"Seleziona questa casella se vuoi mostrare l'avviso solo nella prima pagina "
|
168 |
+
"che l'utente visita"
|
169 |
+
|
170 |
+
#: admin/class-ctcc-admin.php:428
|
171 |
+
msgid ""
|
172 |
+
"If you chose Timer as the close method, enter how many seconds the "
|
173 |
+
"notification should display for"
|
174 |
+
msgstr ""
|
175 |
+
"Se scegli Temporizzato come metodo di chiusura, devi inserire quanti secondi "
|
176 |
+
"desideri che l'avviso venga mostrato prima di chiudersi"
|
177 |
+
|
178 |
+
#: admin/class-ctcc-admin.php:435
|
179 |
+
msgid "The number of days that the cookie is set for"
|
180 |
+
msgstr "Il numero di giorni che il cookie viene tenuto in memoria"
|
181 |
+
|
182 |
+
#: admin/class-ctcc-admin.php:442
|
183 |
+
msgid ""
|
184 |
+
"A version number for the cookie - update this to invalidate the cookie and "
|
185 |
+
"force all users to view the notification again"
|
186 |
+
msgstr ""
|
187 |
+
"Contatore numerico del cookie - se il inserisci un valore maggiore di 1 si "
|
188 |
+
"annulla il cookie e si obbliga l'utente a rivedere nuovamente l'avviso per "
|
189 |
+
"il numero di volte che imposti in questa casella"
|
190 |
+
|
191 |
+
#: admin/class-ctcc-admin.php:453
|
192 |
+
msgid ""
|
193 |
+
"The heading text - only applies if you are not using a top or bottom bar"
|
194 |
+
msgstr ""
|
195 |
+
"Il testo dell'Intestazione - appare solo quando la posizione scelta "
|
196 |
+
"dell'avviso non è in Alto o in Basso"
|
197 |
+
|
198 |
+
#: admin/class-ctcc-admin.php:460
|
199 |
+
msgid "The default text to indicate that your site uses cookies"
|
200 |
+
msgstr ""
|
201 |
+
"Il testo predefinito per indicare che il tuo sito sta utilizzando i cookie"
|
202 |
+
|
203 |
+
#: admin/class-ctcc-admin.php:467
|
204 |
+
msgid "The default text to dismiss the notification"
|
205 |
+
msgstr "Il testo predefinito per chiudere l'avviso"
|
206 |
+
|
207 |
+
#: admin/class-ctcc-admin.php:474
|
208 |
+
msgid "The default text to use to link to a page providing further information"
|
209 |
+
msgstr ""
|
210 |
+
"Il testo predefinito da usare come link per la pagina di approfondimento "
|
211 |
+
"delle informazioni sui cookie"
|
212 |
+
|
213 |
+
#: admin/class-ctcc-admin.php:490
|
214 |
+
msgid "The page containing further information about your cookie policy"
|
215 |
+
msgstr ""
|
216 |
+
"La pagina contenente le informazioni di approfondimento sull'utilizzo dei "
|
217 |
+
"cookie"
|
218 |
+
|
219 |
+
#: admin/class-ctcc-admin.php:497
|
220 |
+
msgid ""
|
221 |
+
"You can add an absolute URL here to override the More Info Page setting "
|
222 |
+
"above. Use this to link to an external website for further information about "
|
223 |
+
"cookies."
|
224 |
+
msgstr ""
|
225 |
+
"Puoi inserire qui una URL assoluta e non tener conto delle impostazioni "
|
226 |
+
"soprastanti per la Pagina Maggiori Informazioni"
|
227 |
+
|
228 |
+
#: admin/class-ctcc-admin.php:504
|
229 |
+
msgid "New Tab"
|
230 |
+
msgstr "Nuova Scheda"
|
231 |
+
|
232 |
+
#: admin/class-ctcc-admin.php:505
|
233 |
+
msgid "Same Tab"
|
234 |
+
msgstr "Stessa Scheda"
|
235 |
+
|
236 |
+
#: admin/class-ctcc-admin.php:507
|
237 |
+
msgid "Open the More Information page in the same or new tab."
|
238 |
+
msgstr ""
|
239 |
+
"Apre la Pagina Maggiori Informazioni nella stessa scheda oppure in una nuova "
|
240 |
+
"scheda."
|
241 |
+
|
242 |
+
#: admin/class-ctcc-admin.php:518 public/customizer.php:36
|
243 |
+
msgid "Top Bar"
|
244 |
+
msgstr "Barra in Alto"
|
245 |
+
|
246 |
+
#: admin/class-ctcc-admin.php:519 public/customizer.php:37
|
247 |
+
msgid "Bottom Bar"
|
248 |
+
msgstr "Barra in Basso"
|
249 |
+
|
250 |
+
#: admin/class-ctcc-admin.php:520 public/customizer.php:38
|
251 |
+
msgid "Top Left Block"
|
252 |
+
msgstr "Blocco in Alto a Sinistra"
|
253 |
+
|
254 |
+
#: admin/class-ctcc-admin.php:521 public/customizer.php:39
|
255 |
+
msgid "Top Right Block"
|
256 |
+
msgstr "Blocco in Alto a Destra"
|
257 |
+
|
258 |
+
#: admin/class-ctcc-admin.php:522 public/customizer.php:40
|
259 |
+
msgid "Bottom Left Block"
|
260 |
+
msgstr "Blocco in Basso a Sinistra"
|
261 |
+
|
262 |
+
#: admin/class-ctcc-admin.php:523 public/customizer.php:41
|
263 |
+
msgid "Bottom Right Block"
|
264 |
+
msgstr "Blocco in Basso a Destra"
|
265 |
+
|
266 |
+
#: admin/class-ctcc-admin.php:525
|
267 |
+
msgid "Where the notification should appear"
|
268 |
+
msgstr "Dove vuoi che appaia l'avviso o notifica"
|
269 |
+
|
270 |
+
#: admin/class-ctcc-admin.php:532
|
271 |
+
msgid ""
|
272 |
+
"You can add an optional wrapper class, eg container, here to align the "
|
273 |
+
"notification text with the rest of your content"
|
274 |
+
msgstr ""
|
275 |
+
"Si può aggiungere qui opzionalmente una classe wrapper, es. container, per "
|
276 |
+
"allineare il testo della notifica con il resto del contenuto"
|
277 |
+
|
278 |
+
#: admin/class-ctcc-admin.php:539
|
279 |
+
msgid "Deselect this to dequeue the plugin stylesheet"
|
280 |
+
msgstr ""
|
281 |
+
"Deseleziona la casella per non aggiungere il foglio di stile del plugin"
|
282 |
+
|
283 |
+
#: admin/class-ctcc-admin.php:546
|
284 |
+
msgid "Round the corners on the block (doesn't apply to the top or bottom bar)"
|
285 |
+
msgstr ""
|
286 |
+
"Arrotonda gli angoli del blocco contenente l'avviso (non funziona con Barra "
|
287 |
+
"in Alto e Barra in Basso)"
|
288 |
+
|
289 |
+
#: admin/class-ctcc-admin.php:553
|
290 |
+
msgid "Add drop shadow to the block (doesn't apply to the top or bottom bar)"
|
291 |
+
msgstr ""
|
292 |
+
"Aggiunge un'ombra esterna al blocco contenente l'avviso (non funziona con "
|
293 |
+
"Barra in Alto e Barra in Basso)"
|
294 |
+
|
295 |
+
#: admin/class-ctcc-admin.php:560
|
296 |
+
msgid "Display the confirmation button with notification text"
|
297 |
+
msgstr "Visualizza il pulsante di accettazione con il testo di notifica"
|
298 |
+
|
299 |
+
#: admin/class-ctcc-admin.php:567
|
300 |
+
msgid "Remove confirmation button and use 'X' icon instead"
|
301 |
+
msgstr ""
|
302 |
+
"Rimuove il pulsante di accettazione e al suo posto utilizza l'icona di una "
|
303 |
+
"'X' per chiudere l'avviso"
|
304 |
+
|
305 |
+
#: admin/class-ctcc-admin.php:574
|
306 |
+
msgid "The text color on the notification"
|
307 |
+
msgstr "Il colore del testo della notifica"
|
308 |
+
|
309 |
+
#: admin/class-ctcc-admin.php:581
|
310 |
+
msgid "The background color for the notification"
|
311 |
+
msgstr "Il colore di sfondo della notifica"
|
312 |
+
|
313 |
+
#: admin/class-ctcc-admin.php:588
|
314 |
+
msgid "The link color on the notification"
|
315 |
+
msgstr "Il colore del link usato nella notifica"
|
316 |
+
|
317 |
+
#: admin/class-ctcc-admin.php:595
|
318 |
+
msgid "The text color on the notification button"
|
319 |
+
msgstr "Il colore del testo del pulsante della notifica"
|
320 |
+
|
321 |
+
#: admin/class-ctcc-admin.php:602
|
322 |
+
msgid "The background color on the notification button"
|
323 |
+
msgstr "Il colore dello sfondo del pulsante della notifica"
|
324 |
+
|
325 |
+
#: admin/class-ctcc-admin.php:607
|
326 |
+
msgid "<p>Basic settings</p>"
|
327 |
+
msgstr "<p>Impostazioni di base</p>"
|
328 |
+
|
329 |
+
#: admin/class-ctcc-admin.php:611
|
330 |
+
msgid "<p>Update the content displayed to the user</p>"
|
331 |
+
msgstr "<p>Aggiorna il contenuto mostrato all'utente</p>"
|
332 |
+
|
333 |
+
#: admin/class-ctcc-admin.php:615
|
334 |
+
msgid ""
|
335 |
+
"<p>Change the styles here if you like - but it's better in the Customizer</p>"
|
336 |
+
msgstr ""
|
337 |
+
"<p>Si può cambiare qui gli stili se si desiera - ma è meglio utilizzare "
|
338 |
+
"Personalizza (Customizer) di WP </p>"
|
339 |
+
|
340 |
+
#: admin/class-ctcc-admin.php:632
|
341 |
+
msgid "General"
|
342 |
+
msgstr "Generale"
|
343 |
+
|
344 |
+
#: admin/class-ctcc-admin.php:633
|
345 |
+
msgid "Content"
|
346 |
+
msgstr "Contenuto"
|
347 |
+
|
348 |
+
#: admin/class-ctcc-admin.php:634
|
349 |
+
msgid "Styles"
|
350 |
+
msgstr "Stili"
|
351 |
+
|
352 |
+
#: admin/class-ctcc-admin.php:656
|
353 |
+
msgid "Reset plugin defaults"
|
354 |
+
msgstr "Ripristina impostazioni predefinite del plugin"
|
355 |
+
|
356 |
+
#: public/customizer.php:43
|
357 |
+
msgid "Position and placement."
|
358 |
+
msgstr "Posizione e posizionamento."
|
359 |
+
|
360 |
+
#: public/customizer.php:59
|
361 |
+
msgid "Optional wrapper class."
|
362 |
+
msgstr "Classe wrapper opzionale."
|
363 |
+
|
364 |
+
#: public/customizer.php:74
|
365 |
+
msgid "Enqueue Styles"
|
366 |
+
msgstr "Stili di accodamento"
|
367 |
+
|
368 |
+
#: public/customizer.php:75
|
369 |
+
msgid "Deselect this to dequeue the plugin stylesheet."
|
370 |
+
msgstr ""
|
371 |
+
"Deselezionare per annullare l'accodamento del foglio di stile del plugin."
|
372 |
+
|
373 |
+
#: public/customizer.php:91
|
374 |
+
msgid "Round the corners on the block."
|
375 |
+
msgstr "Arrotonda gli angoli del blocco."
|
376 |
+
|
377 |
+
#: public/customizer.php:107
|
378 |
+
msgid "Add drop shadow to the block."
|
379 |
+
msgstr "Aggiunge un'ombra esterna al blocco."
|
380 |
+
|
381 |
+
#: public/customizer.php:123
|
382 |
+
msgid "Deselect to float button to right."
|
383 |
+
msgstr "Deselezionare per spostare il pulsante alla destra."
|
384 |
+
|
385 |
+
#: public/customizer.php:139
|
386 |
+
msgid "Replace confirmation button with 'X' icon."
|
387 |
+
msgstr "Rimpiazza il pulsante di accettazione con una 'X'."
|
388 |
+
|
389 |
+
#: public/customizer.php:155
|
390 |
+
msgid "Text color for your notification bar."
|
391 |
+
msgstr "Il colore del testo per la barra di notifica."
|
392 |
+
|
393 |
+
#: public/customizer.php:171
|
394 |
+
msgid "Background color for your notification bar."
|
395 |
+
msgstr "Il colore dello sfondo della barra di notifica."
|
396 |
+
|
397 |
+
#: public/customizer.php:187
|
398 |
+
msgid "Link color for your notification bar."
|
399 |
+
msgstr "Il colore del link per la barra di notifica."
|
400 |
+
|
401 |
+
#: public/customizer.php:203
|
402 |
+
msgid "Text color for your notification bar button."
|
403 |
+
msgstr "Il colore del testo per il pulsante nella barra di notifica"
|
404 |
+
|
405 |
+
#: public/customizer.php:219
|
406 |
+
msgid "Background color for your notification bar button."
|
407 |
+
msgstr "Il colore dello sfondo per il pulsante nella barra di notifica"
|
408 |
+
|
409 |
+
#: uk-cookie-consent.php:54
|
410 |
+
msgid "Cookie Policy"
|
411 |
+
msgstr "Cookie Policy"
|
412 |
+
|
413 |
+
#: uk-cookie-consent.php:55
|
414 |
+
msgid ""
|
415 |
+
"This site uses cookies - small text files that are placed on your machine to "
|
416 |
+
"help the site provide a better user experience. In general, cookies are used "
|
417 |
+
"to retain user preferences, store information for things like shopping "
|
418 |
+
"carts, and provide anonymised tracking data to third party applications like "
|
419 |
+
"Google Analytics. As a rule, cookies will make your browsing experience "
|
420 |
+
"better. However, you may prefer to disable cookies on this site and on "
|
421 |
+
"others. The most effective way to do this is to disable cookies in your "
|
422 |
+
"browser. We suggest consulting the Help section of your browser or taking a "
|
423 |
+
"look at <a href=\"http://www.aboutcookies.org\">the About Cookies website</"
|
424 |
+
"a> which offers guidance for all modern browsers"
|
425 |
+
msgstr ""
|
426 |
+
"Questo sito utilizza cookies - piccoli file di testo che vengono depositati "
|
427 |
+
"sul vostro computer per aiutare il sito a fornire una migliore esperienza "
|
428 |
+
"utente. In generale, i cookie vengono utilizzati per mantenere le preferenze "
|
429 |
+
"degli utenti, memorizzano le informazioni per cose come carrelli della "
|
430 |
+
"spesa, e fornire dati di monitoraggio anonimi per applicazioni di terze "
|
431 |
+
"parti come Google Analytics. Come regola generale, i cookie renderanno la "
|
432 |
+
"vostra esperienza di navigazione migliore. Tuttavia, si può scegliere di "
|
433 |
+
"disabilitare i cookie su questo sito e su altri. Il modo più efficace per "
|
434 |
+
"farlo è quello di disabilitare i cookie nel proprio browser. Si consiglia di "
|
435 |
+
"consultare la sezione Guida del browser o di dare un'occhiata a <a href="
|
436 |
+
"\"http://www.aboutcookies.org\"> About Cookies sito </a>, che offre una "
|
437 |
+
"guida per tutti i browser moderni"
|
438 |
+
|
439 |
+
#. Plugin URI of the plugin/theme
|
440 |
+
msgid "http://catapultthemes.com/cookie-consent/"
|
441 |
+
msgstr "http://catapultthemes.com/cookie-consent/"
|
442 |
+
|
443 |
+
#. Description of the plugin/theme
|
444 |
+
msgid "The only cookie consent plugin you'll ever need."
|
445 |
+
msgstr "Il solo plugin per il consenso dei cookie di cui avrai bisogno."
|
446 |
+
|
447 |
+
#. Author of the plugin/theme
|
448 |
+
msgid "Catapult_Themes"
|
449 |
+
msgstr "Catapult_Themes"
|
450 |
+
|
451 |
+
#. Author URI of the plugin/theme
|
452 |
+
msgid "http://catapultthemes.com/"
|
453 |
+
msgstr "http://catapultthemes.com/"
|
trunk/languages/uk-cookie-consent-pl_PL.mo
ADDED
Binary file
|
trunk/languages/uk-cookie-consent-pl_PL.po
ADDED
@@ -0,0 +1,672 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Translation of Development (trunk) in Polish
|
2 |
+
# This file is distributed under the same license as the Development (trunk) package.
|
3 |
+
msgid ""
|
4 |
+
msgstr ""
|
5 |
+
"Project-Id-Version: UK Cookie Consent v1.8.2\n"
|
6 |
+
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/uk-cookie-"
|
7 |
+
"consent\n"
|
8 |
+
"POT-Creation-Date: 2016-01-13 00:16+0100\n"
|
9 |
+
"PO-Revision-Date: 2016-01-13 00:17+0100\n"
|
10 |
+
"Last-Translator: Jędrzej Raczyński <jedrzejraczynski@gmail.com>\n"
|
11 |
+
"Language-Team: Patu design <biuro@patudesign.pl>\n"
|
12 |
+
"Language: pl\n"
|
13 |
+
"MIME-Version: 1.0\n"
|
14 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
15 |
+
"Content-Transfer-Encoding: 8bit\n"
|
16 |
+
"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
|
17 |
+
"|| n%100>=20) ? 1 : 2);\n"
|
18 |
+
"X-Generator: Poedit 1.8.6\n"
|
19 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
20 |
+
|
21 |
+
#. Plugin Name of the plugin/theme
|
22 |
+
#: admin/class-ctcc-admin.php:56 admin/class-ctcc-admin.php:630
|
23 |
+
#: public/customizer.php:17
|
24 |
+
msgid "Cookie Consent"
|
25 |
+
msgstr "Zgoda na Cookies"
|
26 |
+
|
27 |
+
#: admin/class-ctcc-admin.php:65
|
28 |
+
msgid "General settings"
|
29 |
+
msgstr "Ustawienia"
|
30 |
+
|
31 |
+
#: admin/class-ctcc-admin.php:72
|
32 |
+
msgid "Close"
|
33 |
+
msgstr "Zamknij"
|
34 |
+
|
35 |
+
#: admin/class-ctcc-admin.php:80
|
36 |
+
msgid "First Page Only"
|
37 |
+
msgstr "Tylko na pierwszej stronie"
|
38 |
+
|
39 |
+
#: admin/class-ctcc-admin.php:88
|
40 |
+
msgid "Notification Duration"
|
41 |
+
msgstr "Czas trwania powiadomienia"
|
42 |
+
|
43 |
+
#: admin/class-ctcc-admin.php:96
|
44 |
+
msgid "Cookie Expiry"
|
45 |
+
msgstr "Czas do wygaśnięcia akceptacji"
|
46 |
+
|
47 |
+
#: admin/class-ctcc-admin.php:104
|
48 |
+
msgid "Cookie Version"
|
49 |
+
msgstr "Wersja ciasteczka"
|
50 |
+
|
51 |
+
#: admin/class-ctcc-admin.php:126
|
52 |
+
msgid "Content settings"
|
53 |
+
msgstr "Ustawienia treści"
|
54 |
+
|
55 |
+
#: admin/class-ctcc-admin.php:133
|
56 |
+
msgid "Heading Text"
|
57 |
+
msgstr "Tekst nagłówka"
|
58 |
+
|
59 |
+
#: admin/class-ctcc-admin.php:141
|
60 |
+
msgid "Notification Text"
|
61 |
+
msgstr "Tekst powiadomienia"
|
62 |
+
|
63 |
+
#: admin/class-ctcc-admin.php:149
|
64 |
+
msgid "More Info Text"
|
65 |
+
msgstr "Tekst odnośnika więcej informacji"
|
66 |
+
|
67 |
+
#: admin/class-ctcc-admin.php:157
|
68 |
+
msgid "More Info Page"
|
69 |
+
msgstr "Strona więcej informacji"
|
70 |
+
|
71 |
+
#: admin/class-ctcc-admin.php:165
|
72 |
+
msgid "More Info URL"
|
73 |
+
msgstr "URL strony Więcej informacji"
|
74 |
+
|
75 |
+
#: admin/class-ctcc-admin.php:173
|
76 |
+
msgid "More Info Target"
|
77 |
+
msgstr "Cel odnośnika Więcej informacji"
|
78 |
+
|
79 |
+
#: admin/class-ctcc-admin.php:181
|
80 |
+
msgid "Accept Text"
|
81 |
+
msgstr "Tekst przyciska akceptacji"
|
82 |
+
|
83 |
+
#: admin/class-ctcc-admin.php:203
|
84 |
+
msgid "Styles settings"
|
85 |
+
msgstr "Ustawienia stylów"
|
86 |
+
|
87 |
+
#: admin/class-ctcc-admin.php:210 public/customizer.php:34
|
88 |
+
msgid "Position"
|
89 |
+
msgstr "Pozycja"
|
90 |
+
|
91 |
+
#: admin/class-ctcc-admin.php:218 public/customizer.php:58
|
92 |
+
msgid "Container Class"
|
93 |
+
msgstr "Klasa pojemnika"
|
94 |
+
|
95 |
+
#: admin/class-ctcc-admin.php:226
|
96 |
+
msgid "Include Stylesheet"
|
97 |
+
msgstr "Dołączaj style"
|
98 |
+
|
99 |
+
#: admin/class-ctcc-admin.php:234 public/customizer.php:90
|
100 |
+
msgid "Rounded Corners"
|
101 |
+
msgstr "Zaokrąglone rogi"
|
102 |
+
|
103 |
+
#: admin/class-ctcc-admin.php:242 public/customizer.php:106
|
104 |
+
msgid "Drop Shadow"
|
105 |
+
msgstr "Cień"
|
106 |
+
|
107 |
+
#: admin/class-ctcc-admin.php:250 public/customizer.php:122
|
108 |
+
msgid "Display Button With Text"
|
109 |
+
msgstr "Pokazuj przycisk z tekstem"
|
110 |
+
|
111 |
+
#: admin/class-ctcc-admin.php:258 public/customizer.php:138
|
112 |
+
msgid "Use X Close"
|
113 |
+
msgstr "Używaj zamknięcia X"
|
114 |
+
|
115 |
+
#: admin/class-ctcc-admin.php:266 public/customizer.php:154
|
116 |
+
msgid "Text Color"
|
117 |
+
msgstr "Kolor tekstu"
|
118 |
+
|
119 |
+
#: admin/class-ctcc-admin.php:274 admin/class-ctcc-admin.php:306
|
120 |
+
#: public/customizer.php:170
|
121 |
+
msgid "Background Color"
|
122 |
+
msgstr "Kolor tła"
|
123 |
+
|
124 |
+
#: admin/class-ctcc-admin.php:282 public/customizer.php:186
|
125 |
+
msgid "Link Color"
|
126 |
+
msgstr "Kolor odnośnika"
|
127 |
+
|
128 |
+
#: admin/class-ctcc-admin.php:290 public/customizer.php:202
|
129 |
+
msgid "Button Color"
|
130 |
+
msgstr "Kolor tekstu przycisku"
|
131 |
+
|
132 |
+
#: admin/class-ctcc-admin.php:298 public/customizer.php:218
|
133 |
+
msgid "Button Background"
|
134 |
+
msgstr "Tło przycisku"
|
135 |
+
|
136 |
+
#: admin/class-ctcc-admin.php:339 admin/class-ctcc-admin.php:349
|
137 |
+
msgid "Cookies"
|
138 |
+
msgstr "pliki Cookies"
|
139 |
+
|
140 |
+
#: admin/class-ctcc-admin.php:350
|
141 |
+
msgid "This site uses cookies: "
|
142 |
+
msgstr ""
|
143 |
+
"Serwis wykorzystuje pliki cookies. Korzystając ze strony wyrażasz zgodę na "
|
144 |
+
"wykorzystywanie plików cookies."
|
145 |
+
|
146 |
+
#: admin/class-ctcc-admin.php:351
|
147 |
+
msgid "Okay, thanks"
|
148 |
+
msgstr "Ok, rozumiem"
|
149 |
+
|
150 |
+
#: admin/class-ctcc-admin.php:352
|
151 |
+
msgid "Find out more."
|
152 |
+
msgstr "dowiedz się więcej."
|
153 |
+
|
154 |
+
#: admin/class-ctcc-admin.php:411
|
155 |
+
msgid "On Click"
|
156 |
+
msgstr "Po kliknięciu"
|
157 |
+
|
158 |
+
#: admin/class-ctcc-admin.php:412
|
159 |
+
msgid "Timed"
|
160 |
+
msgstr "Po czasie"
|
161 |
+
|
162 |
+
#: admin/class-ctcc-admin.php:414
|
163 |
+
msgid "How you want the user to close the notification"
|
164 |
+
msgstr "Jak chcesz, by użytkownik zamykał powiadomienie"
|
165 |
+
|
166 |
+
#: admin/class-ctcc-admin.php:421
|
167 |
+
msgid ""
|
168 |
+
"Select this to show the notification only on the first page the user visits"
|
169 |
+
msgstr ""
|
170 |
+
"Zaznacz tę opcję, by pokazywać powiadomienie tylko na pierwszej stronie, "
|
171 |
+
"jaką odwiedzi użytkownik"
|
172 |
+
|
173 |
+
#: admin/class-ctcc-admin.php:428
|
174 |
+
msgid ""
|
175 |
+
"If you chose Timer as the close method, enter how many seconds the "
|
176 |
+
"notification should display for"
|
177 |
+
msgstr ""
|
178 |
+
"Wprowadź ile sekund powiadomienia ma być wyświetlane jeśli wybierzesz opcję "
|
179 |
+
"'Po czasie' jako metodę zamknięcia"
|
180 |
+
|
181 |
+
#: admin/class-ctcc-admin.php:435
|
182 |
+
msgid "The number of days that the cookie is set for"
|
183 |
+
msgstr "Na ile dni zgoda na pliki Cookies jest akceptowana"
|
184 |
+
|
185 |
+
#: admin/class-ctcc-admin.php:442
|
186 |
+
msgid ""
|
187 |
+
"A version number for the cookie - update this to invalidate the cookie and "
|
188 |
+
"force all users to view the notification again"
|
189 |
+
msgstr ""
|
190 |
+
"Numer wersji ciasteczka - zaktualizuj to pole, by unieważnić wszystkie "
|
191 |
+
"dotychczasowe akceptacje i wymusić ponowne prezentowanie powiadomienia dla "
|
192 |
+
"użytkowników, którzy już raz je akceptowali"
|
193 |
+
|
194 |
+
#: admin/class-ctcc-admin.php:453
|
195 |
+
msgid ""
|
196 |
+
"The heading text - only applies if you are not using a top or bottom bar"
|
197 |
+
msgstr ""
|
198 |
+
"Tekst nagłówka - dotyczy jedynie, jeśli używać opcji prezentacji "
|
199 |
+
"powiadomienia w rogu"
|
200 |
+
|
201 |
+
#: admin/class-ctcc-admin.php:460
|
202 |
+
msgid "The default text to indicate that your site uses cookies"
|
203 |
+
msgstr "Domyślny tekst powiadamiający o używaniu plików Cookies na tej stronie"
|
204 |
+
|
205 |
+
#: admin/class-ctcc-admin.php:467
|
206 |
+
msgid "The default text to dismiss the notification"
|
207 |
+
msgstr "Domyślny tekst aby wyrazić zgodę na pliki Cookies"
|
208 |
+
|
209 |
+
#: admin/class-ctcc-admin.php:474
|
210 |
+
msgid "The default text to use to link to a page providing further information"
|
211 |
+
msgstr "Domyślny tekst odnośnika do strony dostarczającej więcej informacji"
|
212 |
+
|
213 |
+
#: admin/class-ctcc-admin.php:490
|
214 |
+
msgid "The page containing further information about your cookie policy"
|
215 |
+
msgstr ""
|
216 |
+
"Strona zawierająca więcej informacji odnośnie twojej polityki plików Cookies."
|
217 |
+
|
218 |
+
#: admin/class-ctcc-admin.php:497
|
219 |
+
msgid ""
|
220 |
+
"You can add an absolute URL here to override the More Info Page setting "
|
221 |
+
"above. Use this to link to an external website for further information about "
|
222 |
+
"cookies."
|
223 |
+
msgstr ""
|
224 |
+
"Możesz tutaj wprowadzić URL aby nadpisać ustawienie powyżej. Używaj tego "
|
225 |
+
"pola by odnośnik wskazywał strony zewnętrzne zawierające więcej informacji o "
|
226 |
+
"plikach Cookies."
|
227 |
+
|
228 |
+
#: admin/class-ctcc-admin.php:504
|
229 |
+
msgid "New Tab"
|
230 |
+
msgstr "Nowa zakładka"
|
231 |
+
|
232 |
+
#: admin/class-ctcc-admin.php:505
|
233 |
+
msgid "Same Tab"
|
234 |
+
msgstr "Ta sama zakładka"
|
235 |
+
|
236 |
+
#: admin/class-ctcc-admin.php:507
|
237 |
+
msgid "Open the More Information page in the same or new tab."
|
238 |
+
msgstr "Otwórz stronę Więcej informacji w tej samej lub nowej zakładce."
|
239 |
+
|
240 |
+
#: admin/class-ctcc-admin.php:518 public/customizer.php:36
|
241 |
+
msgid "Top Bar"
|
242 |
+
msgstr "Pasek na górze"
|
243 |
+
|
244 |
+
#: admin/class-ctcc-admin.php:519 public/customizer.php:37
|
245 |
+
msgid "Bottom Bar"
|
246 |
+
msgstr "Pasek na dole"
|
247 |
+
|
248 |
+
#: admin/class-ctcc-admin.php:520 public/customizer.php:38
|
249 |
+
msgid "Top Left Block"
|
250 |
+
msgstr "Lewy górny róg"
|
251 |
+
|
252 |
+
#: admin/class-ctcc-admin.php:521 public/customizer.php:39
|
253 |
+
msgid "Top Right Block"
|
254 |
+
msgstr "Prawy górny róg"
|
255 |
+
|
256 |
+
#: admin/class-ctcc-admin.php:522 public/customizer.php:40
|
257 |
+
msgid "Bottom Left Block"
|
258 |
+
msgstr "Lewy dolny róg"
|
259 |
+
|
260 |
+
#: admin/class-ctcc-admin.php:523 public/customizer.php:41
|
261 |
+
msgid "Bottom Right Block"
|
262 |
+
msgstr "Prawy dolny róg"
|
263 |
+
|
264 |
+
#: admin/class-ctcc-admin.php:525
|
265 |
+
msgid "Where the notification should appear"
|
266 |
+
msgstr "Gdzie powiadomienie powinno się pojawić"
|
267 |
+
|
268 |
+
#: admin/class-ctcc-admin.php:532
|
269 |
+
msgid ""
|
270 |
+
"You can add an optional wrapper class, eg container, here to align the "
|
271 |
+
"notification text with the rest of your content"
|
272 |
+
msgstr ""
|
273 |
+
"Możesz dodać opcjonalną klasę obwaluty - np. kontener - aby uspójnić pole "
|
274 |
+
"powiadomień z resztą zawartości Twojej strony"
|
275 |
+
|
276 |
+
#: admin/class-ctcc-admin.php:539
|
277 |
+
msgid "Deselect this to dequeue the plugin stylesheet"
|
278 |
+
msgstr ""
|
279 |
+
"Odznacz to pole aby wyłączyć style wtyczki. Pamiętaj, by dodać style do "
|
280 |
+
"Twojego szablonu."
|
281 |
+
|
282 |
+
#: admin/class-ctcc-admin.php:546
|
283 |
+
msgid "Round the corners on the block (doesn't apply to the top or bottom bar)"
|
284 |
+
msgstr ""
|
285 |
+
"Zaokrągl rogi bloku (nieaplikowalne jeśli używasz opcji paska na górze bądź "
|
286 |
+
"na dole strony)"
|
287 |
+
|
288 |
+
#: admin/class-ctcc-admin.php:553
|
289 |
+
msgid "Add drop shadow to the block (doesn't apply to the top or bottom bar)"
|
290 |
+
msgstr ""
|
291 |
+
"Dodaj cień do bloku (nieaplikowalne jeśli używasz opcji paska na górze bądź "
|
292 |
+
"na dole strony)"
|
293 |
+
|
294 |
+
#: admin/class-ctcc-admin.php:560
|
295 |
+
msgid "Display the confirmation button with notification text"
|
296 |
+
msgstr "pokazuj przycisk akceptacji razem z tekstem"
|
297 |
+
|
298 |
+
#: admin/class-ctcc-admin.php:567
|
299 |
+
msgid "Remove confirmation button and use 'X' icon instead"
|
300 |
+
msgstr "Usuń przycisk akceptacji i wyświetlaj zamiast niego ikonę 'X'"
|
301 |
+
|
302 |
+
#: admin/class-ctcc-admin.php:574
|
303 |
+
msgid "The text color on the notification"
|
304 |
+
msgstr "Kolor tekstu na powiadomieniu"
|
305 |
+
|
306 |
+
#: admin/class-ctcc-admin.php:581
|
307 |
+
msgid "The background color for the notification"
|
308 |
+
msgstr "Kolor tła powiadomienia"
|
309 |
+
|
310 |
+
#: admin/class-ctcc-admin.php:588
|
311 |
+
msgid "The link color on the notification"
|
312 |
+
msgstr "Kolor odnośnika na powiadomieniu"
|
313 |
+
|
314 |
+
#: admin/class-ctcc-admin.php:595
|
315 |
+
msgid "The text color on the notification button"
|
316 |
+
msgstr "Kolor tekstu na przycisku na powiadomieniu"
|
317 |
+
|
318 |
+
#: admin/class-ctcc-admin.php:602
|
319 |
+
msgid "The background color on the notification button"
|
320 |
+
msgstr "Kolor tła przycisku na pasku powiadomienia"
|
321 |
+
|
322 |
+
#: admin/class-ctcc-admin.php:607
|
323 |
+
msgid "<p>Basic settings</p>"
|
324 |
+
msgstr "<p>Ustawienia podstawowe</p>"
|
325 |
+
|
326 |
+
#: admin/class-ctcc-admin.php:611
|
327 |
+
msgid "<p>Update the content displayed to the user</p>"
|
328 |
+
msgstr "<p>Możesz tutaj zaktualizować treści prezentowane dla użytkownika</p>"
|
329 |
+
|
330 |
+
#: admin/class-ctcc-admin.php:615
|
331 |
+
msgid ""
|
332 |
+
"<p>Change the styles here if you like - but it's better in the Customizer</p>"
|
333 |
+
msgstr ""
|
334 |
+
"<p>Zmieniaj style tutaj wedle Twojej woli - te same ustawienia są dostępne "
|
335 |
+
"także w Personalizacji wyglądu</p>"
|
336 |
+
|
337 |
+
#: admin/class-ctcc-admin.php:632
|
338 |
+
msgid "General"
|
339 |
+
msgstr "Ogólne"
|
340 |
+
|
341 |
+
#: admin/class-ctcc-admin.php:633
|
342 |
+
msgid "Content"
|
343 |
+
msgstr "Treść"
|
344 |
+
|
345 |
+
#: admin/class-ctcc-admin.php:634
|
346 |
+
msgid "Styles"
|
347 |
+
msgstr "Stylizacja"
|
348 |
+
|
349 |
+
#: admin/class-ctcc-admin.php:656
|
350 |
+
msgid "Reset plugin defaults"
|
351 |
+
msgstr "Resetuj ustawienia wtyczki"
|
352 |
+
|
353 |
+
#: public/customizer.php:43
|
354 |
+
msgid "Position and placement."
|
355 |
+
msgstr "Pozycja i położenie."
|
356 |
+
|
357 |
+
#: public/customizer.php:59
|
358 |
+
msgid "Optional wrapper class."
|
359 |
+
msgstr "Opcjonalna klasa obwoluty."
|
360 |
+
|
361 |
+
#: public/customizer.php:74
|
362 |
+
msgid "Enqueue Styles"
|
363 |
+
msgstr "Użyj styli predefiniowanych"
|
364 |
+
|
365 |
+
#: public/customizer.php:75
|
366 |
+
msgid "Deselect this to dequeue the plugin stylesheet."
|
367 |
+
msgstr "Odznacz to pole by wyłączyć style dołączone do tej wtyczki."
|
368 |
+
|
369 |
+
#: public/customizer.php:91
|
370 |
+
msgid "Round the corners on the block."
|
371 |
+
msgstr "Zaokrągl rogi na bloku."
|
372 |
+
|
373 |
+
#: public/customizer.php:107
|
374 |
+
msgid "Add drop shadow to the block."
|
375 |
+
msgstr ""
|
376 |
+
"Dodaj cień pod blokiem (niedostępne, gdy powiadomienie wyświetlaje jest jako "
|
377 |
+
"pasek)."
|
378 |
+
|
379 |
+
#: public/customizer.php:123
|
380 |
+
msgid "Deselect to float button to right."
|
381 |
+
msgstr "Odznacz, by przycisk był równany do prawej."
|
382 |
+
|
383 |
+
#: public/customizer.php:139
|
384 |
+
msgid "Replace confirmation button with 'X' icon."
|
385 |
+
msgstr "Zamień przycisk akceptacji na ikonę 'X'."
|
386 |
+
|
387 |
+
#: public/customizer.php:155
|
388 |
+
msgid "Text color for your notification bar."
|
389 |
+
msgstr "Kolor tekstu na pasku powiadomienia."
|
390 |
+
|
391 |
+
#: public/customizer.php:171
|
392 |
+
msgid "Background color for your notification bar."
|
393 |
+
msgstr "Kolor tła paska powiadomienia."
|
394 |
+
|
395 |
+
#: public/customizer.php:187
|
396 |
+
msgid "Link color for your notification bar."
|
397 |
+
msgstr "Kolor odnośnika na pasku powiadomienia."
|
398 |
+
|
399 |
+
#: public/customizer.php:203
|
400 |
+
msgid "Text color for your notification bar button."
|
401 |
+
msgstr "Kolor tekstu na przycisku na pasku powiadomienia."
|
402 |
+
|
403 |
+
#: public/customizer.php:219
|
404 |
+
msgid "Background color for your notification bar button."
|
405 |
+
msgstr "Kolor tła przycisku na pasku powiadomienia."
|
406 |
+
|
407 |
+
#: uk-cookie-consent.php:54
|
408 |
+
msgid "Cookie Policy"
|
409 |
+
msgstr "Polityka Cookies"
|
410 |
+
|
411 |
+
#: uk-cookie-consent.php:55
|
412 |
+
msgid ""
|
413 |
+
"This site uses cookies - small text files that are placed on your machine to "
|
414 |
+
"help the site provide a better user experience. In general, cookies are used "
|
415 |
+
"to retain user preferences, store information for things like shopping "
|
416 |
+
"carts, and provide anonymised tracking data to third party applications like "
|
417 |
+
"Google Analytics. As a rule, cookies will make your browsing experience "
|
418 |
+
"better. However, you may prefer to disable cookies on this site and on "
|
419 |
+
"others. The most effective way to do this is to disable cookies in your "
|
420 |
+
"browser. We suggest consulting the Help section of your browser or taking a "
|
421 |
+
"look at <a href=\"http://www.aboutcookies.org\">the About Cookies website</"
|
422 |
+
"a> which offers guidance for all modern browsers"
|
423 |
+
msgstr ""
|
424 |
+
"<p>Polityka cookies sporządzona została zgodnie z obowiązkami wynikającymi z "
|
425 |
+
"nowelizacji Prawa Telekomunikacyjnego, które weszły w życie 22 marca 2013 "
|
426 |
+
"roku. Obowiązki te podobnie są realizowane w całej Europie wskutek "
|
427 |
+
"implementowania dyrektywy europejskiej.</p>\n"
|
428 |
+
"<p>Niniejsza polityka cookies dotyczy usług oferowanych w ramach tej strony "
|
429 |
+
"(Serwis).<br>\n"
|
430 |
+
"Serwis nie zbiera w sposób automatyczny żadnych informacji, z wyjątkiem "
|
431 |
+
"informacji zawartych w plikach cookies.</p>\n"
|
432 |
+
"<p>Pliki cookies (tzw. ciasteczka) stanowią dane informatyczne, w "
|
433 |
+
"szczególności pliki tekstowe, które przechowywane są w urządzeniu końcowym "
|
434 |
+
"Użytkownika Serwisu i przeznaczone są do korzystania ze stron internetowych "
|
435 |
+
"Serwisu. Cookies zazwyczaj zawierają nazwę strony internetowej, z której "
|
436 |
+
"pochodzą, czas przechowywania ich na urządzeniu końcowym oraz unikalny "
|
437 |
+
"numer.\n"
|
438 |
+
"Podmiotem zamieszczającym na urządzeniu końcowym Użytkownika Serwisu pliki "
|
439 |
+
"cookies oraz uzyskującym do nich dostęp jest operator tej strony.</p>\n"
|
440 |
+
"<p>Pliki cookies wykorzystywane są w celu:\n"
|
441 |
+
"<ul><li>dostosowania zawartości stron internetowych do preferencji "
|
442 |
+
"Użytkownika oraz optymalizacji korzystania ze stron internetowych; w "
|
443 |
+
"szczególności pliki te pozwalają rozpoznać urządzenie Użytkownika Serwisu i "
|
444 |
+
"odpowiednio wyświetlić stronę internetową, dostosowaną do jego "
|
445 |
+
"indywidualnych potrzeb;</li>\n"
|
446 |
+
"<li>tworzenia statystyk, które pomagają zrozumieć, w jaki sposób Użytkownicy "
|
447 |
+
"Serwisu korzystają ze stron internetowych, co umożliwia ulepszanie ich "
|
448 |
+
"struktury i zawartości;</li>\n"
|
449 |
+
"</ul></p>\n"
|
450 |
+
"<p>W ramach Serwisu stosowane są dwa zasadnicze typy plików cookies: sesyjne "
|
451 |
+
"(session cookies) oraz stałe (persistent cookies). Cookies sesyjne są "
|
452 |
+
"plikami tymczasowymi, które przechowywane są w urządzeniu końcowym "
|
453 |
+
"Użytkownika do czasu wylogowania, opuszczenia strony internetowej lub "
|
454 |
+
"wyłączenia oprogramowania (przeglądarki internetowej). Stałe pliki cookies "
|
455 |
+
"przechowywane są w urządzeniu końcowym Użytkownika przez czas określony w "
|
456 |
+
"parametrach plików cookies lub do czasu ich usunięcia przez Użytkownika.</"
|
457 |
+
"p>\n"
|
458 |
+
"<p>W ramach Serwisu stosowane są następujące rodzaje plików cookies:\n"
|
459 |
+
"<ul>\n"
|
460 |
+
"<li>niezbędne pliki cookies, umożliwiające korzystanie z usług dostępnych w "
|
461 |
+
"ramach Serwisu, np. uwierzytelniające pliki cookies wykorzystywane do usług "
|
462 |
+
"wymagających uwierzytelniania w ramach Serwisu;</li>\n"
|
463 |
+
"<li>pliki cookies służące do zapewnienia bezpieczeństwa, np. wykorzystywane "
|
464 |
+
"do wykrywania nadużyć w zakresie uwierzytelniania w ramach Serwisu;</li>\n"
|
465 |
+
"<li>wydajnościowe pliki cookies, umożliwiające zbieranie informacji o "
|
466 |
+
"sposobie korzystania ze stron internetowych Serwisu;</li>\n"
|
467 |
+
"<li>funkcjonalne pliki cookies, umożliwiające zapamiętanie wybranych przez "
|
468 |
+
"Użytkownika ustawień i personalizację interfejsu Użytkownika, np. w zakresie "
|
469 |
+
"wybranego języka lub regionu, z którego pochodzi Użytkownik, rozmiaru "
|
470 |
+
"czcionki, wyglądu strony internetowej itp.;</li>\n"
|
471 |
+
"<li>reklamowe pliki cookies, umożliwiające dostarczanie Użytkownikom treści "
|
472 |
+
"reklamowych bardziej dostosowanych do ich zainteresowań.\n"
|
473 |
+
"</li>\n"
|
474 |
+
"</ul></p>\n"
|
475 |
+
"<p>W wielu przypadkach oprogramowanie służące do przeglądania stron "
|
476 |
+
"internetowych (przeglądarka internetowa) domyślnie dopuszcza przechowywanie "
|
477 |
+
"plików cookies w urządzeniu końcowym Użytkownika. Użytkownicy Serwisu mogą "
|
478 |
+
"dokonać w każdym czasie zmiany ustawień dotyczących plików cookies. "
|
479 |
+
"Ustawienia te mogą zostać zmienione w szczególności w taki sposób, aby "
|
480 |
+
"blokować automatyczną obsługę plików cookies w ustawieniach przeglądarki "
|
481 |
+
"internetowej bądź informować o ich każdorazowym zamieszczeniu w urządzeniu "
|
482 |
+
"Użytkownika Serwisu. Szczegółowe informacje o możliwości i sposobach obsługi "
|
483 |
+
"plików cookies dostępne są w ustawieniach oprogramowania (przeglądarki "
|
484 |
+
"internetowej).</p>\n"
|
485 |
+
"<p>Operator Serwisu informuje, że ograniczenia stosowania plików cookies "
|
486 |
+
"mogą wpłynąć na niektóre funkcjonalności dostępne na stronach internetowych "
|
487 |
+
"Serwisu.</p>\n"
|
488 |
+
"<p>Pliki cookies zamieszczane w urządzeniu końcowym Użytkownika Serwisu i "
|
489 |
+
"wykorzystywane mogą być również przez współpracujących z operatorem Serwisu "
|
490 |
+
"reklamodawców oraz partnerów.</p>\n"
|
491 |
+
"<p>Więcej informacji na temat plików cookies dostępnych jest pod adresem <a "
|
492 |
+
"href=\"http://www.wszystkoociasteczkach.pl\">www.wszystkoociasteczkach.pl</"
|
493 |
+
"a> lub w sekcji Pomoc w menu przeglądarki internetowej.</p>"
|
494 |
+
|
495 |
+
#. Plugin URI of the plugin/theme
|
496 |
+
msgid "http://catapultthemes.com/cookie-consent/"
|
497 |
+
msgstr "http://catapultthemes.com/cookie-consent/"
|
498 |
+
|
499 |
+
#. Description of the plugin/theme
|
500 |
+
msgid "The only cookie consent plugin you'll ever need."
|
501 |
+
msgstr ""
|
502 |
+
"Jedyna wtyczka zgody na pliki Cookies jaką kiedykolwiek będziesz potrzebować."
|
503 |
+
|
504 |
+
#. Author of the plugin/theme
|
505 |
+
msgid "Catapult_Themes"
|
506 |
+
msgstr "Catapult_Themes"
|
507 |
+
|
508 |
+
#. Author URI of the plugin/theme
|
509 |
+
msgid "http://catapultthemes.com/"
|
510 |
+
msgstr "http://catapultthemes.com/"
|
511 |
+
|
512 |
+
#~ msgid "No problem"
|
513 |
+
#~ msgstr "Akceptuję"
|
514 |
+
|
515 |
+
#~ msgid "Read more."
|
516 |
+
#~ msgstr "Czytaj całość"
|
517 |
+
|
518 |
+
#~ msgid "UK Cookie Consent"
|
519 |
+
#~ msgstr "Zgoda na Cookies PL"
|
520 |
+
|
521 |
+
#~ msgid "Click to toggle"
|
522 |
+
#~ msgstr "Kliknij aby przełączyć"
|
523 |
+
|
524 |
+
#~ msgid "Did this plugin help you?"
|
525 |
+
#~ msgstr "Czy ta wtyczka pomogła?"
|
526 |
+
|
527 |
+
#~ msgid ""
|
528 |
+
#~ "If this plugin helped you out in your project, please show your support:"
|
529 |
+
#~ msgstr "Jeśli ta wtyczka pomogła Ci w projekcie, okaż swoje poparcie:"
|
530 |
+
|
531 |
+
#~ msgid "Rate it"
|
532 |
+
#~ msgstr "Oceń"
|
533 |
+
|
534 |
+
#~ msgid "Tweet it"
|
535 |
+
#~ msgstr "Tweetnij"
|
536 |
+
|
537 |
+
#~ msgid "Other plugins you might like"
|
538 |
+
#~ msgstr "Inne nasze wtyczki"
|
539 |
+
|
540 |
+
#~ msgid "If you liked this plugin, you may care to try the following:"
|
541 |
+
#~ msgstr "Jeśli polubiłeś tą wtyczkę, może też spodobają ci się:"
|
542 |
+
|
543 |
+
#~ msgid "Slide out tab"
|
544 |
+
#~ msgstr "Wysuwana zakładka"
|
545 |
+
|
546 |
+
#~ msgid "Display a sliding tab for marketing, promotional or other content."
|
547 |
+
#~ msgstr ""
|
548 |
+
#~ "Wyświetla wysuwaną zakładkę dla treści marketingowych, promocyjnych lub "
|
549 |
+
#~ "innych."
|
550 |
+
|
551 |
+
#~ msgid ""
|
552 |
+
#~ "http://www.ico.gov.uk/for_organisations/"
|
553 |
+
#~ "privacy_and_electronic_communications/the_guide/cookies.aspx"
|
554 |
+
#~ msgstr ""
|
555 |
+
#~ "http://www.ico.gov.uk/for_organisations/"
|
556 |
+
#~ "privacy_and_electronic_communications/the_guide/cookies.aspx"
|
557 |
+
|
558 |
+
#~ msgid "Information Commissioner's Office Guidance on Cookies"
|
559 |
+
#~ msgstr ""
|
560 |
+
#~ "Wytyczne kancelarii brytyjskiego komisarza ds. Informacji odnośnie plików "
|
561 |
+
#~ "Cookies"
|
562 |
+
|
563 |
+
#~ msgid "http://www.aboutcookies.org/default.aspx"
|
564 |
+
#~ msgstr "http://wszystkoociasteczkach.pl/"
|
565 |
+
|
566 |
+
#~ msgid "AboutCookies.org"
|
567 |
+
#~ msgstr "WszystkoOCiasteczkach.pl"
|
568 |
+
|
569 |
+
#~ msgid "Our interpretation of the guidance"
|
570 |
+
#~ msgstr "Nasza interpretacja wskazówek (po angielsku)"
|
571 |
+
|
572 |
+
#~ msgid "Support"
|
573 |
+
#~ msgstr "Wsparcie"
|
574 |
+
|
575 |
+
#~ msgid "Latest from the support forum"
|
576 |
+
#~ msgstr "Najnowsze z naszego forum wsparcia"
|
577 |
+
|
578 |
+
#~ msgid "Check out the forum"
|
579 |
+
#~ msgstr "Zajrzyj na nasze forum"
|
580 |
+
|
581 |
+
#~ msgid "cookie-policy"
|
582 |
+
#~ msgstr "polityka-cookies"
|
583 |
+
|
584 |
+
#~ msgid ""
|
585 |
+
#~ "Your Cookies Policy page is <a href=\"%s\">here</a>. You may wish to "
|
586 |
+
#~ "create a menu item or other link on your site to this page."
|
587 |
+
#~ msgstr ""
|
588 |
+
#~ "Twoja strona z polityką Cookies jest <a href=\"%s\">tutaj</a>. Możesz jej "
|
589 |
+
#~ "używać w menu lub jako odnośnik na swojej stronie."
|
590 |
+
|
591 |
+
#~ msgid "Info page permalink"
|
592 |
+
#~ msgstr "Bezpośredni odnośnik do strony z informacjami"
|
593 |
+
|
594 |
+
#~ msgid "Bar colour"
|
595 |
+
#~ msgstr "Kolor paska"
|
596 |
+
|
597 |
+
#~ msgid ""
|
598 |
+
#~ "You can just use these settings as they are or update the text as you "
|
599 |
+
#~ "wish. We recommend keeping it brief."
|
600 |
+
#~ msgstr ""
|
601 |
+
#~ "Możesz użyć ponizszych ustawień takimi jakimi są lub zaktualizować ich "
|
602 |
+
#~ "tekst jeśli wolisz."
|
603 |
+
|
604 |
+
#~ msgid ""
|
605 |
+
#~ "The plug-in automatically creates a page called \"Cookie Policy\" and "
|
606 |
+
#~ "sets the default More Info link to yoursitename.com/cookie-policy."
|
607 |
+
#~ msgstr ""
|
608 |
+
#~ "Ta wtyczka automatycznie tworzy stronę nazwaną \"Polityka Cookies\" i "
|
609 |
+
#~ "ustawia ją jako domyślną dla pola Więcej informacji"
|
610 |
+
|
611 |
+
#~ msgid ""
|
612 |
+
#~ "If you find the page hasn't been created, hit the Save Changes button on "
|
613 |
+
#~ "this page."
|
614 |
+
#~ msgstr ""
|
615 |
+
#~ "Jeśli uważasz, że strona nie została utworzona, wciśnij przycisk Zapisz "
|
616 |
+
#~ "zmiany na tej stronie."
|
617 |
+
|
618 |
+
#~ msgid ""
|
619 |
+
#~ "If you would like to change the permalink, just update the Info page "
|
620 |
+
#~ "permalink setting, e.g. enter \"?page_id=4\" if you are using the default "
|
621 |
+
#~ "permalink settings (and 4 is the id of your new Cookie Policy page)."
|
622 |
+
#~ msgstr ""
|
623 |
+
#~ "Jeśli chcesz zmienić bezpośredni odnośnik wystarczy, że zaktualizujesz "
|
624 |
+
#~ "ustawienie bezpośredniego odnośnika do strony z informacjami, np. "
|
625 |
+
#~ "wprowadź adres \"?page_id=4\" jeśli używasz domyślnych ustawień "
|
626 |
+
#~ "bezpośrednich odnośników oraz strona z Polityką Cookie ma ID 4."
|
627 |
+
|
628 |
+
#~ msgid ""
|
629 |
+
#~ "For any support queries, please post on the <a href=\"%s\">WordPress "
|
630 |
+
#~ "forum</a>."
|
631 |
+
#~ msgstr ""
|
632 |
+
#~ "W razie potrzeby wsparcia prosimy o umieszczanie postów na <a href=\"%s"
|
633 |
+
#~ "\">forum WordPress</a>."
|
634 |
+
|
635 |
+
#~ msgid ""
|
636 |
+
#~ "And if this plug-in has been helpful to you, then <a href=\"%s\">please "
|
637 |
+
#~ "rate it</a>."
|
638 |
+
#~ msgstr ""
|
639 |
+
#~ "Jeśli ta wtyczka jest dla Ciebie pomocna, <a href=\"%s\">prosimy o jej "
|
640 |
+
#~ "ocenę</a>."
|
641 |
+
|
642 |
+
#~ msgid "Top"
|
643 |
+
#~ msgstr "Na górze"
|
644 |
+
|
645 |
+
#~ msgid "http://catapultdesign.co.uk/plugin/uk-cookie-consent/"
|
646 |
+
#~ msgstr "http://catapultdesign.co.uk/plugin/uk-cookie-consent/"
|
647 |
+
|
648 |
+
#~ msgid ""
|
649 |
+
#~ "Simple plug-in to help compliance with the UK interpretation of the EU "
|
650 |
+
#~ "regulations regarding usage of website cookies. A user to your site is "
|
651 |
+
#~ "presented with a clear yet unobtrusive notification that the site is "
|
652 |
+
#~ "using cookies and may then acknowledge and dismiss the notification or "
|
653 |
+
#~ "click to find out more. The plug-in does not disable cookies on your site "
|
654 |
+
#~ "or prevent the user from continuing to browse the site - it comes with "
|
655 |
+
#~ "standard wording on what cookies are and advice on how to disable them in "
|
656 |
+
#~ "the browser. The plug-in follows the notion of \"implied consent\" as "
|
657 |
+
#~ "described by the UK's Information Commissioner and makes the assumption "
|
658 |
+
#~ "that most users who choose not to accept cookies will do so for all "
|
659 |
+
#~ "websites."
|
660 |
+
#~ msgstr ""
|
661 |
+
#~ "Prosta wtyczka wprowadzająca zgodność z polskimi przepisami wykładni UE "
|
662 |
+
#~ "dotyczących wykorzystania stron internetowych plików cookie. "
|
663 |
+
#~ "Użytkownikowi przedstawiana jest jasne i przejrzyste powiadomienie, że "
|
664 |
+
#~ "witryna używa plików cookie. Powiadomienie posiada funkcjonalność "
|
665 |
+
#~ "potwierdzenia oraz link do strony, aby dowiedzieć się więcej. Ta wtyczka "
|
666 |
+
#~ "nie wyłącza użytkowania plików cookie na twojej witrynie oraz nie "
|
667 |
+
#~ "powstrzymuje użytkownika przed kontynuowaniem przeglądania strony - "
|
668 |
+
#~ "ogranicza się do standardowych formuł, co to są pliki cookies i radzi, "
|
669 |
+
#~ "jak je wyłączyć w przeglądarce. Wtyczka przyjmuje pojęcie \"domniemanej "
|
670 |
+
#~ "zgody\" na wykorzystanie plików cookie - zakłada, że większość "
|
671 |
+
#~ "użytkowników, którzy nie zdecydują się na akceptowanie plików cookie "
|
672 |
+
#~ "będzie je blokować dla wszystkich stron."
|
trunk/languages/uk-cookie-consent-ru_RU.mo
ADDED
Binary file
|
trunk/languages/uk-cookie-consent-ru_RU.po
ADDED
@@ -0,0 +1,439 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Copyright (C) 2016 Cookie Consent
|
2 |
+
# This file is distributed under the same license as the Cookie Consent package.
|
3 |
+
msgid ""
|
4 |
+
msgstr ""
|
5 |
+
"Project-Id-Version: Cookie Consent 2.0.3\n"
|
6 |
+
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/uk-cookie-"
|
7 |
+
"consent\n"
|
8 |
+
"POT-Creation-Date: 2016-01-14 14:28+0300\n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"PO-Revision-Date: 2016-01-14 22:15+0300\n"
|
13 |
+
"Language-Team: \n"
|
14 |
+
"X-Generator: Poedit 1.8.6\n"
|
15 |
+
"Last-Translator: \n"
|
16 |
+
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
|
17 |
+
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
|
18 |
+
"Language: ru_RU\n"
|
19 |
+
|
20 |
+
#. Plugin Name of the plugin/theme
|
21 |
+
#: admin/class-ctcc-admin.php:56 admin/class-ctcc-admin.php:630
|
22 |
+
#: public/customizer.php:17
|
23 |
+
msgid "Cookie Consent"
|
24 |
+
msgstr "Разрешить Cookie"
|
25 |
+
|
26 |
+
#: admin/class-ctcc-admin.php:65
|
27 |
+
msgid "General settings"
|
28 |
+
msgstr "Общие настройки"
|
29 |
+
|
30 |
+
#: admin/class-ctcc-admin.php:72
|
31 |
+
msgid "Close"
|
32 |
+
msgstr "Закрыть"
|
33 |
+
|
34 |
+
#: admin/class-ctcc-admin.php:80
|
35 |
+
msgid "First Page Only"
|
36 |
+
msgstr "Только первую страницу"
|
37 |
+
|
38 |
+
#: admin/class-ctcc-admin.php:88
|
39 |
+
msgid "Notification Duration"
|
40 |
+
msgstr "Длительность уведомления"
|
41 |
+
|
42 |
+
#: admin/class-ctcc-admin.php:96
|
43 |
+
msgid "Cookie Expiry"
|
44 |
+
msgstr "Cookie истек"
|
45 |
+
|
46 |
+
#: admin/class-ctcc-admin.php:104
|
47 |
+
msgid "Cookie Version"
|
48 |
+
msgstr "Версия Cookie"
|
49 |
+
|
50 |
+
#: admin/class-ctcc-admin.php:126
|
51 |
+
msgid "Content settings"
|
52 |
+
msgstr "Настройки контента"
|
53 |
+
|
54 |
+
#: admin/class-ctcc-admin.php:133
|
55 |
+
msgid "Heading Text"
|
56 |
+
msgstr "Заголовок Текста"
|
57 |
+
|
58 |
+
#: admin/class-ctcc-admin.php:141
|
59 |
+
msgid "Notification Text"
|
60 |
+
msgstr "Текст Уведомления"
|
61 |
+
|
62 |
+
#: admin/class-ctcc-admin.php:149
|
63 |
+
msgid "More Info Text"
|
64 |
+
msgstr "Подробнее Текст"
|
65 |
+
|
66 |
+
#: admin/class-ctcc-admin.php:157
|
67 |
+
msgid "More Info Page"
|
68 |
+
msgstr "Подробнее Страница"
|
69 |
+
|
70 |
+
#: admin/class-ctcc-admin.php:165
|
71 |
+
msgid "More Info URL"
|
72 |
+
msgstr "Подробнее URL-адрес"
|
73 |
+
|
74 |
+
#: admin/class-ctcc-admin.php:173
|
75 |
+
msgid "More Info Target"
|
76 |
+
msgstr "Подробнее Target"
|
77 |
+
|
78 |
+
#: admin/class-ctcc-admin.php:181
|
79 |
+
msgid "Accept Text"
|
80 |
+
msgstr "Принять текст"
|
81 |
+
|
82 |
+
#: admin/class-ctcc-admin.php:203
|
83 |
+
msgid "Styles settings"
|
84 |
+
msgstr "Стили настройки"
|
85 |
+
|
86 |
+
#: admin/class-ctcc-admin.php:210 public/customizer.php:34
|
87 |
+
msgid "Position"
|
88 |
+
msgstr "Позиция"
|
89 |
+
|
90 |
+
#: admin/class-ctcc-admin.php:218 public/customizer.php:58
|
91 |
+
msgid "Container Class"
|
92 |
+
msgstr "Контейнер класса"
|
93 |
+
|
94 |
+
#: admin/class-ctcc-admin.php:226
|
95 |
+
msgid "Include Stylesheet"
|
96 |
+
msgstr "Включить Таблицу Стилей"
|
97 |
+
|
98 |
+
#: admin/class-ctcc-admin.php:234 public/customizer.php:90
|
99 |
+
msgid "Rounded Corners"
|
100 |
+
msgstr "Закругленные углы"
|
101 |
+
|
102 |
+
#: admin/class-ctcc-admin.php:242 public/customizer.php:106
|
103 |
+
msgid "Drop Shadow"
|
104 |
+
msgstr "Тень"
|
105 |
+
|
106 |
+
#: admin/class-ctcc-admin.php:250 public/customizer.php:122
|
107 |
+
msgid "Display Button With Text"
|
108 |
+
msgstr "Отображения кнопки с текстом"
|
109 |
+
|
110 |
+
#: admin/class-ctcc-admin.php:258 public/customizer.php:138
|
111 |
+
msgid "Use X Close"
|
112 |
+
msgstr "Используйте X Закрыть"
|
113 |
+
|
114 |
+
#: admin/class-ctcc-admin.php:266 public/customizer.php:154
|
115 |
+
msgid "Text Color"
|
116 |
+
msgstr "Цвет Текста"
|
117 |
+
|
118 |
+
#: admin/class-ctcc-admin.php:274 admin/class-ctcc-admin.php:306
|
119 |
+
#: public/customizer.php:170
|
120 |
+
msgid "Background Color"
|
121 |
+
msgstr "Цвет Фона"
|
122 |
+
|
123 |
+
#: admin/class-ctcc-admin.php:282 public/customizer.php:186
|
124 |
+
msgid "Link Color"
|
125 |
+
msgstr "Цвет Ссылок"
|
126 |
+
|
127 |
+
#: admin/class-ctcc-admin.php:290 public/customizer.php:202
|
128 |
+
msgid "Button Color"
|
129 |
+
msgstr "Цвет Кнопки"
|
130 |
+
|
131 |
+
#: admin/class-ctcc-admin.php:298 public/customizer.php:218
|
132 |
+
msgid "Button Background"
|
133 |
+
msgstr "Фон Кнопки"
|
134 |
+
|
135 |
+
#: admin/class-ctcc-admin.php:339 admin/class-ctcc-admin.php:349
|
136 |
+
msgid "Cookies"
|
137 |
+
msgstr "Cookies"
|
138 |
+
|
139 |
+
#: admin/class-ctcc-admin.php:350
|
140 |
+
msgid "This site uses cookies: "
|
141 |
+
msgstr "Этот сайт использует куки:"
|
142 |
+
|
143 |
+
#: admin/class-ctcc-admin.php:351
|
144 |
+
msgid "Okay, thanks"
|
145 |
+
msgstr "Хорошо, спасибо"
|
146 |
+
|
147 |
+
#: admin/class-ctcc-admin.php:352
|
148 |
+
msgid "Find out more."
|
149 |
+
msgstr "Узнать больше."
|
150 |
+
|
151 |
+
#: admin/class-ctcc-admin.php:411
|
152 |
+
msgid "On Click"
|
153 |
+
msgstr "При нажатии"
|
154 |
+
|
155 |
+
#: admin/class-ctcc-admin.php:412
|
156 |
+
msgid "Timed"
|
157 |
+
msgstr "Временный"
|
158 |
+
|
159 |
+
#: admin/class-ctcc-admin.php:414
|
160 |
+
msgid "How you want the user to close the notification"
|
161 |
+
msgstr "Как вы хотите, чтобы пользователь мог закрыть уведомление"
|
162 |
+
|
163 |
+
#: admin/class-ctcc-admin.php:421
|
164 |
+
msgid ""
|
165 |
+
"Select this to show the notification only on the first page the user visits"
|
166 |
+
msgstr ""
|
167 |
+
"Выберите это, чтобы показать уведомление только на первой странице "
|
168 |
+
"пользовательских посещений"
|
169 |
+
|
170 |
+
#: admin/class-ctcc-admin.php:428
|
171 |
+
msgid ""
|
172 |
+
"If you chose Timer as the close method, enter how many seconds the "
|
173 |
+
"notification should display for"
|
174 |
+
msgstr ""
|
175 |
+
"Если вы выбираете Таймер, как метод закрыть, введите в течение сколько "
|
176 |
+
"секунд уведомление должно отображаться"
|
177 |
+
|
178 |
+
#: admin/class-ctcc-admin.php:435
|
179 |
+
msgid "The number of days that the cookie is set for"
|
180 |
+
msgstr "Число дней, для которых установлен cookie"
|
181 |
+
|
182 |
+
#: admin/class-ctcc-admin.php:442
|
183 |
+
msgid ""
|
184 |
+
"A version number for the cookie - update this to invalidate the cookie and "
|
185 |
+
"force all users to view the notification again"
|
186 |
+
msgstr ""
|
187 |
+
"Номер версии для cookie - обновляет это, чтобы лишить законной силы cookie и "
|
188 |
+
"вынудить всех пользователей просмотреть уведомление снова"
|
189 |
+
|
190 |
+
#: admin/class-ctcc-admin.php:453
|
191 |
+
msgid ""
|
192 |
+
"The heading text - only applies if you are not using a top or bottom bar"
|
193 |
+
msgstr ""
|
194 |
+
"Заголовок текста - применяется только если Вы не используете верхний или "
|
195 |
+
"нижний бар"
|
196 |
+
|
197 |
+
#: admin/class-ctcc-admin.php:460
|
198 |
+
msgid "The default text to indicate that your site uses cookies"
|
199 |
+
msgstr "Текст по умолчанию, чтобы указать, что ваш сайт использует cookies"
|
200 |
+
|
201 |
+
#: admin/class-ctcc-admin.php:467
|
202 |
+
msgid "The default text to dismiss the notification"
|
203 |
+
msgstr "Текст по умолчанию, чтобы закрыть уведомление"
|
204 |
+
|
205 |
+
#: admin/class-ctcc-admin.php:474
|
206 |
+
msgid "The default text to use to link to a page providing further information"
|
207 |
+
msgstr ""
|
208 |
+
"Текст по умолчанию, чтобы использовать ссылку на страницу с изложением "
|
209 |
+
"дополнительной информации"
|
210 |
+
|
211 |
+
#: admin/class-ctcc-admin.php:490
|
212 |
+
msgid "The page containing further information about your cookie policy"
|
213 |
+
msgstr "Страница, содержащая дополнительную информацию о Вашей политике cookie"
|
214 |
+
|
215 |
+
#: admin/class-ctcc-admin.php:497
|
216 |
+
msgid ""
|
217 |
+
"You can add an absolute URL here to override the More Info Page setting "
|
218 |
+
"above. Use this to link to an external website for further information about "
|
219 |
+
"cookies."
|
220 |
+
msgstr ""
|
221 |
+
"Вы можете добавить абсолютный URL-адрес здесь, чтобы переопределить "
|
222 |
+
"Подробнее страница настройки выше. Используйте это, чтобы создать ссылку на "
|
223 |
+
"внешний веб-сайт для получения дополнительной информации о файлах cookie."
|
224 |
+
|
225 |
+
#: admin/class-ctcc-admin.php:504
|
226 |
+
msgid "New Tab"
|
227 |
+
msgstr "Новая Вкладка"
|
228 |
+
|
229 |
+
#: admin/class-ctcc-admin.php:505
|
230 |
+
msgid "Same Tab"
|
231 |
+
msgstr "Та же вкладка"
|
232 |
+
|
233 |
+
#: admin/class-ctcc-admin.php:507
|
234 |
+
msgid "Open the More Information page in the same or new tab."
|
235 |
+
msgstr "Откройте на странице \"Подробнее\" в той же или новой вкладке."
|
236 |
+
|
237 |
+
#: admin/class-ctcc-admin.php:518 public/customizer.php:36
|
238 |
+
msgid "Top Bar"
|
239 |
+
msgstr "Главная панель"
|
240 |
+
|
241 |
+
#: admin/class-ctcc-admin.php:519 public/customizer.php:37
|
242 |
+
msgid "Bottom Bar"
|
243 |
+
msgstr "Нижняя панель"
|
244 |
+
|
245 |
+
#: admin/class-ctcc-admin.php:520 public/customizer.php:38
|
246 |
+
msgid "Top Left Block"
|
247 |
+
msgstr "Верхний левый блок"
|
248 |
+
|
249 |
+
#: admin/class-ctcc-admin.php:521 public/customizer.php:39
|
250 |
+
msgid "Top Right Block"
|
251 |
+
msgstr "Верхний правый блок"
|
252 |
+
|
253 |
+
#: admin/class-ctcc-admin.php:522 public/customizer.php:40
|
254 |
+
msgid "Bottom Left Block"
|
255 |
+
msgstr "Нижний левый блок"
|
256 |
+
|
257 |
+
#: admin/class-ctcc-admin.php:523 public/customizer.php:41
|
258 |
+
msgid "Bottom Right Block"
|
259 |
+
msgstr "Нижний правый блок"
|
260 |
+
|
261 |
+
#: admin/class-ctcc-admin.php:525
|
262 |
+
msgid "Where the notification should appear"
|
263 |
+
msgstr "Где уведомление должно появиться"
|
264 |
+
|
265 |
+
#: admin/class-ctcc-admin.php:532
|
266 |
+
msgid ""
|
267 |
+
"You can add an optional wrapper class, eg container, here to align the "
|
268 |
+
"notification text with the rest of your content"
|
269 |
+
msgstr ""
|
270 |
+
"Вы можете добавить дополнительный класс обертки, например контейнер здесь, "
|
271 |
+
"чтобы выровнять текст уведомления с остальной частью Вашего содержания"
|
272 |
+
|
273 |
+
#: admin/class-ctcc-admin.php:539
|
274 |
+
msgid "Deselect this to dequeue the plugin stylesheet"
|
275 |
+
msgstr "Отключите этот плагин для извлечения стилей"
|
276 |
+
|
277 |
+
#: admin/class-ctcc-admin.php:546
|
278 |
+
msgid "Round the corners on the block (doesn't apply to the top or bottom bar)"
|
279 |
+
msgstr ""
|
280 |
+
"Закруглить углы на блоке (не применяется для верхней или нижней панели)"
|
281 |
+
|
282 |
+
#: admin/class-ctcc-admin.php:553
|
283 |
+
msgid "Add drop shadow to the block (doesn't apply to the top or bottom bar)"
|
284 |
+
msgstr "Добавление тени к блоку (не применяется для верхней или нижней панели)"
|
285 |
+
|
286 |
+
#: admin/class-ctcc-admin.php:560
|
287 |
+
msgid "Display the confirmation button with notification text"
|
288 |
+
msgstr "Выведите на экран кнопку подтверждения с текстом уведомления"
|
289 |
+
|
290 |
+
#: admin/class-ctcc-admin.php:567
|
291 |
+
msgid "Remove confirmation button and use 'X' icon instead"
|
292 |
+
msgstr "Удалите кнопку подтверждения и используйте значок 'X' вместо этого"
|
293 |
+
|
294 |
+
#: admin/class-ctcc-admin.php:574
|
295 |
+
msgid "The text color on the notification"
|
296 |
+
msgstr "Цвет текста на уведомлении"
|
297 |
+
|
298 |
+
#: admin/class-ctcc-admin.php:581
|
299 |
+
msgid "The background color for the notification"
|
300 |
+
msgstr "Цвет фона для уведомления"
|
301 |
+
|
302 |
+
#: admin/class-ctcc-admin.php:588
|
303 |
+
msgid "The link color on the notification"
|
304 |
+
msgstr "Цвет ссылки на уведомлении"
|
305 |
+
|
306 |
+
#: admin/class-ctcc-admin.php:595
|
307 |
+
msgid "The text color on the notification button"
|
308 |
+
msgstr "Цвет текста на кнопке уведомления"
|
309 |
+
|
310 |
+
#: admin/class-ctcc-admin.php:602
|
311 |
+
msgid "The background color on the notification button"
|
312 |
+
msgstr "Цвет фона на кнопке уведомления"
|
313 |
+
|
314 |
+
#: admin/class-ctcc-admin.php:607
|
315 |
+
msgid "<p>Basic settings</p>"
|
316 |
+
msgstr "<p>Основные параметры настройки</p>"
|
317 |
+
|
318 |
+
#: admin/class-ctcc-admin.php:611
|
319 |
+
msgid "<p>Update the content displayed to the user</p>"
|
320 |
+
msgstr "<p>Обновите содержание, выведенное на экран пользователю</p>"
|
321 |
+
|
322 |
+
#: admin/class-ctcc-admin.php:615
|
323 |
+
msgid ""
|
324 |
+
"<p>Change the styles here if you like - but it's better in the Customizer</p>"
|
325 |
+
msgstr ""
|
326 |
+
"<p>Измените стили здесь, если Вам нравится - но это лучше в Настройщике</p>"
|
327 |
+
|
328 |
+
#: admin/class-ctcc-admin.php:632
|
329 |
+
msgid "General"
|
330 |
+
msgstr "Общие"
|
331 |
+
|
332 |
+
#: admin/class-ctcc-admin.php:633
|
333 |
+
msgid "Content"
|
334 |
+
msgstr "Содержание"
|
335 |
+
|
336 |
+
#: admin/class-ctcc-admin.php:634
|
337 |
+
msgid "Styles"
|
338 |
+
msgstr "Стили"
|
339 |
+
|
340 |
+
#: admin/class-ctcc-admin.php:656
|
341 |
+
msgid "Reset plugin defaults"
|
342 |
+
msgstr "Сброс плагина по умолчанию"
|
343 |
+
|
344 |
+
#: public/customizer.php:43
|
345 |
+
msgid "Position and placement."
|
346 |
+
msgstr "Позиция и размещение."
|
347 |
+
|
348 |
+
#: public/customizer.php:59
|
349 |
+
msgid "Optional wrapper class."
|
350 |
+
msgstr "Дополнительный класс обертки."
|
351 |
+
|
352 |
+
#: public/customizer.php:74
|
353 |
+
msgid "Enqueue Styles"
|
354 |
+
msgstr "Добавляет Стили"
|
355 |
+
|
356 |
+
#: public/customizer.php:75
|
357 |
+
msgid "Deselect this to dequeue the plugin stylesheet."
|
358 |
+
msgstr "Отключите этот плагин для извлечения стилей."
|
359 |
+
|
360 |
+
#: public/customizer.php:91
|
361 |
+
msgid "Round the corners on the block."
|
362 |
+
msgstr "Закруглить углы на блоке."
|
363 |
+
|
364 |
+
#: public/customizer.php:107
|
365 |
+
msgid "Add drop shadow to the block."
|
366 |
+
msgstr "Добавление тени к блоку."
|
367 |
+
|
368 |
+
#: public/customizer.php:123
|
369 |
+
msgid "Deselect to float button to right."
|
370 |
+
msgstr "Снимите флажок, чтобы поплавок кнопка направо."
|
371 |
+
|
372 |
+
#: public/customizer.php:139
|
373 |
+
msgid "Replace confirmation button with 'X' icon."
|
374 |
+
msgstr "Заменить кнопку подтверждения со значком 'X'."
|
375 |
+
|
376 |
+
#: public/customizer.php:155
|
377 |
+
msgid "Text color for your notification bar."
|
378 |
+
msgstr "Цвет текста для панели уведомлений."
|
379 |
+
|
380 |
+
#: public/customizer.php:171
|
381 |
+
msgid "Background color for your notification bar."
|
382 |
+
msgstr "Цвет фона для Вашей панели уведомления."
|
383 |
+
|
384 |
+
#: public/customizer.php:187
|
385 |
+
msgid "Link color for your notification bar."
|
386 |
+
msgstr "Цвет ссылки для Вашей панели уведомления."
|
387 |
+
|
388 |
+
#: public/customizer.php:203
|
389 |
+
msgid "Text color for your notification bar button."
|
390 |
+
msgstr "Цвет текста для Вашей кнопки панели уведомления."
|
391 |
+
|
392 |
+
#: public/customizer.php:219
|
393 |
+
msgid "Background color for your notification bar button."
|
394 |
+
msgstr "Цвет фона для Вашей кнопки панели уведомления."
|
395 |
+
|
396 |
+
#: uk-cookie-consent.php:54
|
397 |
+
msgid "Cookie Policy"
|
398 |
+
msgstr "Политика cookie"
|
399 |
+
|
400 |
+
#: uk-cookie-consent.php:55
|
401 |
+
msgid ""
|
402 |
+
"This site uses cookies - small text files that are placed on your machine to "
|
403 |
+
"help the site provide a better user experience. In general, cookies are used "
|
404 |
+
"to retain user preferences, store information for things like shopping "
|
405 |
+
"carts, and provide anonymised tracking data to third party applications like "
|
406 |
+
"Google Analytics. As a rule, cookies will make your browsing experience "
|
407 |
+
"better. However, you may prefer to disable cookies on this site and on "
|
408 |
+
"others. The most effective way to do this is to disable cookies in your "
|
409 |
+
"browser. We suggest consulting the Help section of your browser or taking a "
|
410 |
+
"look at <a href=\"http://www.aboutcookies.org\">the About Cookies website</"
|
411 |
+
"a> which offers guidance for all modern browsers"
|
412 |
+
msgstr ""
|
413 |
+
"Этот сайт использует cookie - небольшие текстовые файлы, которые помещены в "
|
414 |
+
"Вашу машину, чтобы помочь сайту обеспечивать лучший пользовательский опыт. В "
|
415 |
+
"целом cookie используются, чтобы сохранить пользовательские настройки, "
|
416 |
+
"хранить информацию для вещей как магазинные тележки и обеспечить "
|
417 |
+
"анонимизированные данные отслеживания для сторонних приложений как Google "
|
418 |
+
"Analytics. Как правило cookie заставят Ваш просмотр испытать лучше. Однако "
|
419 |
+
"Вы можете предпочесть отключать cookie на этом сайте и на других. Самый "
|
420 |
+
"эффективный способ сделать это должно отключить cookie в Вашем браузере. Мы "
|
421 |
+
"предлагаем консультироваться с разделом Help Вашего браузера или смотреть на "
|
422 |
+
"<a href=\"http://www.aboutcookies.org\"> О веб-сайте Cookie , который "
|
423 |
+
"предлагает руководство для всех современных браузеров</href>"
|
424 |
+
|
425 |
+
#. Plugin URI of the plugin/theme
|
426 |
+
msgid "http://catapultthemes.com/cookie-consent/"
|
427 |
+
msgstr "http://catapultthemes.com/cookie-consent/"
|
428 |
+
|
429 |
+
#. Description of the plugin/theme
|
430 |
+
msgid "The only cookie consent plugin you'll ever need."
|
431 |
+
msgstr "Единственный cookie плагин, в котором Вы будете когда-либо нуждаться."
|
432 |
+
|
433 |
+
#. Author of the plugin/theme
|
434 |
+
msgid "Catapult_Themes"
|
435 |
+
msgstr "Catapult_Themes"
|
436 |
+
|
437 |
+
#. Author URI of the plugin/theme
|
438 |
+
msgid "http://catapultthemes.com/"
|
439 |
+
msgstr "http://catapultthemes.com/"
|
trunk/languages/uk-cookie-consent-sk_SK.mo
ADDED
Binary file
|
trunk/languages/uk-cookie-consent-sk_SK.po
ADDED
@@ -0,0 +1,436 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Copyright (C) 2016 Cookie Consent
|
2 |
+
# This file is distributed under the same license as the Cookie Consent package.
|
3 |
+
msgid ""
|
4 |
+
msgstr ""
|
5 |
+
"Project-Id-Version: Cookie Consent 2.0.3\n"
|
6 |
+
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/uk-cookie-"
|
7 |
+
"consent\n"
|
8 |
+
"POT-Creation-Date: 2016-01-27 12:42+0100\n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"PO-Revision-Date: 2016-01-27 14:13+0100\n"
|
13 |
+
"Language-Team: \n"
|
14 |
+
"X-Generator: Poedit 1.8.6\n"
|
15 |
+
"Last-Translator: \n"
|
16 |
+
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
|
17 |
+
"Language: sk_SK\n"
|
18 |
+
|
19 |
+
#. Plugin Name of the plugin/theme
|
20 |
+
#: admin/class-ctcc-admin.php:56 admin/class-ctcc-admin.php:630
|
21 |
+
#: public/customizer.php:17
|
22 |
+
msgid "Cookie Consent"
|
23 |
+
msgstr "Cookie Consent"
|
24 |
+
|
25 |
+
#: admin/class-ctcc-admin.php:65
|
26 |
+
msgid "General settings"
|
27 |
+
msgstr "Hlavné nastavenia"
|
28 |
+
|
29 |
+
#: admin/class-ctcc-admin.php:72
|
30 |
+
msgid "Close"
|
31 |
+
msgstr "Zatvoriť"
|
32 |
+
|
33 |
+
#: admin/class-ctcc-admin.php:80
|
34 |
+
msgid "First Page Only"
|
35 |
+
msgstr "Iba na prvej strane"
|
36 |
+
|
37 |
+
#: admin/class-ctcc-admin.php:88
|
38 |
+
msgid "Notification Duration"
|
39 |
+
msgstr "Dĺžka zobrazenia"
|
40 |
+
|
41 |
+
#: admin/class-ctcc-admin.php:96
|
42 |
+
msgid "Cookie Expiry"
|
43 |
+
msgstr "Čas vypršania Cookie "
|
44 |
+
|
45 |
+
#: admin/class-ctcc-admin.php:104
|
46 |
+
msgid "Cookie Version"
|
47 |
+
msgstr "Verzia Cookie"
|
48 |
+
|
49 |
+
#: admin/class-ctcc-admin.php:126
|
50 |
+
msgid "Content settings"
|
51 |
+
msgstr "Nastavenia obsahu"
|
52 |
+
|
53 |
+
#: admin/class-ctcc-admin.php:133
|
54 |
+
msgid "Heading Text"
|
55 |
+
msgstr "Text hlavičky"
|
56 |
+
|
57 |
+
#: admin/class-ctcc-admin.php:141
|
58 |
+
msgid "Notification Text"
|
59 |
+
msgstr "Text oznámenia"
|
60 |
+
|
61 |
+
#: admin/class-ctcc-admin.php:149
|
62 |
+
msgid "More Info Text"
|
63 |
+
msgstr "Text \"Viac informácií\""
|
64 |
+
|
65 |
+
#: admin/class-ctcc-admin.php:157
|
66 |
+
msgid "More Info Page"
|
67 |
+
msgstr "Stránka s viac informáciami"
|
68 |
+
|
69 |
+
#: admin/class-ctcc-admin.php:165
|
70 |
+
msgid "More Info URL"
|
71 |
+
msgstr "URL s viac informáciami"
|
72 |
+
|
73 |
+
#: admin/class-ctcc-admin.php:173
|
74 |
+
msgid "More Info Target"
|
75 |
+
msgstr "Cieľ pre viac informácií"
|
76 |
+
|
77 |
+
#: admin/class-ctcc-admin.php:181
|
78 |
+
msgid "Accept Text"
|
79 |
+
msgstr "Text \"Akceptovať\""
|
80 |
+
|
81 |
+
#: admin/class-ctcc-admin.php:203
|
82 |
+
msgid "Styles settings"
|
83 |
+
msgstr "Nastavenia štýlov"
|
84 |
+
|
85 |
+
#: admin/class-ctcc-admin.php:210 public/customizer.php:34
|
86 |
+
msgid "Position"
|
87 |
+
msgstr "Umiestnenie"
|
88 |
+
|
89 |
+
#: admin/class-ctcc-admin.php:218 public/customizer.php:58
|
90 |
+
msgid "Container Class"
|
91 |
+
msgstr "Container Class"
|
92 |
+
|
93 |
+
#: admin/class-ctcc-admin.php:226
|
94 |
+
msgid "Include Stylesheet"
|
95 |
+
msgstr "Použiť CSS štýl"
|
96 |
+
|
97 |
+
#: admin/class-ctcc-admin.php:234 public/customizer.php:90
|
98 |
+
msgid "Rounded Corners"
|
99 |
+
msgstr "Okrúhle rohy"
|
100 |
+
|
101 |
+
#: admin/class-ctcc-admin.php:242 public/customizer.php:106
|
102 |
+
msgid "Drop Shadow"
|
103 |
+
msgstr "Vytvoriť tieň"
|
104 |
+
|
105 |
+
#: admin/class-ctcc-admin.php:250 public/customizer.php:122
|
106 |
+
msgid "Display Button With Text"
|
107 |
+
msgstr "Zobraziť tlačítko s textom"
|
108 |
+
|
109 |
+
#: admin/class-ctcc-admin.php:258 public/customizer.php:138
|
110 |
+
msgid "Use X Close"
|
111 |
+
msgstr "Použiť zatvorenie pomocou \"X\""
|
112 |
+
|
113 |
+
#: admin/class-ctcc-admin.php:266 public/customizer.php:154
|
114 |
+
msgid "Text Color"
|
115 |
+
msgstr "Farba textu"
|
116 |
+
|
117 |
+
#: admin/class-ctcc-admin.php:274 admin/class-ctcc-admin.php:306
|
118 |
+
#: public/customizer.php:170
|
119 |
+
msgid "Background Color"
|
120 |
+
msgstr "Farba pozadia"
|
121 |
+
|
122 |
+
#: admin/class-ctcc-admin.php:282 public/customizer.php:186
|
123 |
+
msgid "Link Color"
|
124 |
+
msgstr "Farba odkazu"
|
125 |
+
|
126 |
+
#: admin/class-ctcc-admin.php:290 public/customizer.php:202
|
127 |
+
msgid "Button Color"
|
128 |
+
msgstr "Farba tlačítka"
|
129 |
+
|
130 |
+
#: admin/class-ctcc-admin.php:298 public/customizer.php:218
|
131 |
+
msgid "Button Background"
|
132 |
+
msgstr "Pozadie tlačítka"
|
133 |
+
|
134 |
+
#: admin/class-ctcc-admin.php:339 admin/class-ctcc-admin.php:349
|
135 |
+
msgid "Cookies"
|
136 |
+
msgstr "Cookies"
|
137 |
+
|
138 |
+
#: admin/class-ctcc-admin.php:350
|
139 |
+
msgid "This site uses cookies: "
|
140 |
+
msgstr "Táto stránka používa cookies:"
|
141 |
+
|
142 |
+
#: admin/class-ctcc-admin.php:351
|
143 |
+
msgid "Okay, thanks"
|
144 |
+
msgstr "Dobre"
|
145 |
+
|
146 |
+
#: admin/class-ctcc-admin.php:352
|
147 |
+
msgid "Find out more."
|
148 |
+
msgstr "Zistiť viac."
|
149 |
+
|
150 |
+
#: admin/class-ctcc-admin.php:411
|
151 |
+
msgid "On Click"
|
152 |
+
msgstr "Po kliknutí"
|
153 |
+
|
154 |
+
#: admin/class-ctcc-admin.php:412
|
155 |
+
msgid "Timed"
|
156 |
+
msgstr "Po čase"
|
157 |
+
|
158 |
+
#: admin/class-ctcc-admin.php:414
|
159 |
+
msgid "How you want the user to close the notification"
|
160 |
+
msgstr "Ako si želáte, aby používateľ zatvoril notifikáciu o cookies"
|
161 |
+
|
162 |
+
#: admin/class-ctcc-admin.php:421
|
163 |
+
msgid ""
|
164 |
+
"Select this to show the notification only on the first page the user visits"
|
165 |
+
msgstr ""
|
166 |
+
"Zvoľte túto možnosť, aby sa notifikácia zobrazovala iba na prvej stránke, "
|
167 |
+
"ktorú návštevník otvorí"
|
168 |
+
|
169 |
+
#: admin/class-ctcc-admin.php:428
|
170 |
+
msgid ""
|
171 |
+
"If you chose Timer as the close method, enter how many seconds the "
|
172 |
+
"notification should display for"
|
173 |
+
msgstr ""
|
174 |
+
"Ak ste zvolili \"Po čase\" ako metódu zatvorenia notifikácie, sem vložte čas "
|
175 |
+
"v sekundách po koľkých má byť notifikácia zatvorená"
|
176 |
+
|
177 |
+
#: admin/class-ctcc-admin.php:435
|
178 |
+
msgid "The number of days that the cookie is set for"
|
179 |
+
msgstr "Počet dní, kým cookie vyprší"
|
180 |
+
|
181 |
+
#: admin/class-ctcc-admin.php:442
|
182 |
+
msgid ""
|
183 |
+
"A version number for the cookie - update this to invalidate the cookie and "
|
184 |
+
"force all users to view the notification again"
|
185 |
+
msgstr ""
|
186 |
+
"Verzia cookie - zmeňte toto číslo, aby sa znova všetkým používateľom "
|
187 |
+
"zobrazila notifikácia"
|
188 |
+
|
189 |
+
#: admin/class-ctcc-admin.php:453
|
190 |
+
msgid ""
|
191 |
+
"The heading text - only applies if you are not using a top or bottom bar"
|
192 |
+
msgstr ""
|
193 |
+
"Text hlavičky - týka sa iba prípadov, keď nie je použítý horný alebo spodný "
|
194 |
+
"riadok na zobrazenie notifikácie"
|
195 |
+
|
196 |
+
#: admin/class-ctcc-admin.php:460
|
197 |
+
msgid "The default text to indicate that your site uses cookies"
|
198 |
+
msgstr "PRedvolený text na informovanie, že stránka používa cookies"
|
199 |
+
|
200 |
+
#: admin/class-ctcc-admin.php:467
|
201 |
+
msgid "The default text to dismiss the notification"
|
202 |
+
msgstr "Predvolený text na zatvorenie notifikácie"
|
203 |
+
|
204 |
+
#: admin/class-ctcc-admin.php:474
|
205 |
+
msgid "The default text to use to link to a page providing further information"
|
206 |
+
msgstr "Predvolený text na odkaz na stránku s viac informáciami"
|
207 |
+
|
208 |
+
#: admin/class-ctcc-admin.php:490
|
209 |
+
msgid "The page containing further information about your cookie policy"
|
210 |
+
msgstr "Stránka obsahujúca viac informácií o pravidlácha použitia cookies"
|
211 |
+
|
212 |
+
#: admin/class-ctcc-admin.php:497
|
213 |
+
msgid ""
|
214 |
+
"You can add an absolute URL here to override the More Info Page setting "
|
215 |
+
"above. Use this to link to an external website for further information about "
|
216 |
+
"cookies."
|
217 |
+
msgstr ""
|
218 |
+
"Tu môžete vložiť absolútnu URL na prepísanie stránky s viac informáciami "
|
219 |
+
"uvedenej vyššie. Používajte v prípade, že chcete návšetevníkov odkáazať na "
|
220 |
+
"externú stránku"
|
221 |
+
|
222 |
+
#: admin/class-ctcc-admin.php:504
|
223 |
+
msgid "New Tab"
|
224 |
+
msgstr "Nová záložka"
|
225 |
+
|
226 |
+
#: admin/class-ctcc-admin.php:505
|
227 |
+
msgid "Same Tab"
|
228 |
+
msgstr "Tá istá záložka"
|
229 |
+
|
230 |
+
#: admin/class-ctcc-admin.php:507
|
231 |
+
msgid "Open the More Information page in the same or new tab."
|
232 |
+
msgstr "Otvoriť viac informácií v novej alebo tej istej záložke"
|
233 |
+
|
234 |
+
#: admin/class-ctcc-admin.php:518 public/customizer.php:36
|
235 |
+
msgid "Top Bar"
|
236 |
+
msgstr "Horný panel"
|
237 |
+
|
238 |
+
#: admin/class-ctcc-admin.php:519 public/customizer.php:37
|
239 |
+
msgid "Bottom Bar"
|
240 |
+
msgstr "Dolný panel"
|
241 |
+
|
242 |
+
#: admin/class-ctcc-admin.php:520 public/customizer.php:38
|
243 |
+
msgid "Top Left Block"
|
244 |
+
msgstr "Ľavý horný blok"
|
245 |
+
|
246 |
+
#: admin/class-ctcc-admin.php:521 public/customizer.php:39
|
247 |
+
msgid "Top Right Block"
|
248 |
+
msgstr "Pravý horný blok"
|
249 |
+
|
250 |
+
#: admin/class-ctcc-admin.php:522 public/customizer.php:40
|
251 |
+
msgid "Bottom Left Block"
|
252 |
+
msgstr "Ľavý spodný blok"
|
253 |
+
|
254 |
+
#: admin/class-ctcc-admin.php:523 public/customizer.php:41
|
255 |
+
msgid "Bottom Right Block"
|
256 |
+
msgstr "Pravý spodný blok"
|
257 |
+
|
258 |
+
#: admin/class-ctcc-admin.php:525
|
259 |
+
msgid "Where the notification should appear"
|
260 |
+
msgstr "Kde má byť notifikácia zobrazená"
|
261 |
+
|
262 |
+
#: admin/class-ctcc-admin.php:532
|
263 |
+
msgid ""
|
264 |
+
"You can add an optional wrapper class, eg container, here to align the "
|
265 |
+
"notification text with the rest of your content"
|
266 |
+
msgstr ""
|
267 |
+
"Tu môžete vložiť triedu, napr. container, aby bola notifikácia správne "
|
268 |
+
"zarovnaná so zvyškom obsahu"
|
269 |
+
|
270 |
+
#: admin/class-ctcc-admin.php:539
|
271 |
+
msgid "Deselect this to dequeue the plugin stylesheet"
|
272 |
+
msgstr "Odškrtnite toto políčko, aby bol zrušený štýl z modulu"
|
273 |
+
|
274 |
+
#: admin/class-ctcc-admin.php:546
|
275 |
+
msgid "Round the corners on the block (doesn't apply to the top or bottom bar)"
|
276 |
+
msgstr "Zaobliť rohy bloku (netýka sa horného a spodného riadku)"
|
277 |
+
|
278 |
+
#: admin/class-ctcc-admin.php:553
|
279 |
+
msgid "Add drop shadow to the block (doesn't apply to the top or bottom bar)"
|
280 |
+
msgstr "Pridať tieň pod blok (netýka sa horného a spodného riadku)"
|
281 |
+
|
282 |
+
#: admin/class-ctcc-admin.php:560
|
283 |
+
msgid "Display the confirmation button with notification text"
|
284 |
+
msgstr "Zobraziť tlačítko na zatvorenie s textom"
|
285 |
+
|
286 |
+
#: admin/class-ctcc-admin.php:567
|
287 |
+
msgid "Remove confirmation button and use 'X' icon instead"
|
288 |
+
msgstr "Zrušiť tlačítko na potvrdenie a zatvárať pomocou \"X\""
|
289 |
+
|
290 |
+
#: admin/class-ctcc-admin.php:574
|
291 |
+
msgid "The text color on the notification"
|
292 |
+
msgstr "Farba textu notifikácie"
|
293 |
+
|
294 |
+
#: admin/class-ctcc-admin.php:581
|
295 |
+
msgid "The background color for the notification"
|
296 |
+
msgstr "Farba pozadia notifikácie"
|
297 |
+
|
298 |
+
#: admin/class-ctcc-admin.php:588
|
299 |
+
msgid "The link color on the notification"
|
300 |
+
msgstr "Farba odkazu notifikácie"
|
301 |
+
|
302 |
+
#: admin/class-ctcc-admin.php:595
|
303 |
+
msgid "The text color on the notification button"
|
304 |
+
msgstr "Farba textu tlačítka"
|
305 |
+
|
306 |
+
#: admin/class-ctcc-admin.php:602
|
307 |
+
msgid "The background color on the notification button"
|
308 |
+
msgstr "Farba pozadia tlačítka"
|
309 |
+
|
310 |
+
#: admin/class-ctcc-admin.php:607
|
311 |
+
msgid "<p>Basic settings</p>"
|
312 |
+
msgstr "<p>Základné nastavenia</p>"
|
313 |
+
|
314 |
+
#: admin/class-ctcc-admin.php:611
|
315 |
+
msgid "<p>Update the content displayed to the user</p>"
|
316 |
+
msgstr "<p>Upraviť obsah zobrazený používateľovi</p>"
|
317 |
+
|
318 |
+
#: admin/class-ctcc-admin.php:615
|
319 |
+
msgid ""
|
320 |
+
"<p>Change the styles here if you like - but it's better in the Customizer</p>"
|
321 |
+
msgstr ""
|
322 |
+
"<p>Tu môžete zmeniť stýly ak chcete, ale je lepšie zvoliť Editor štýlov</p>"
|
323 |
+
|
324 |
+
#: admin/class-ctcc-admin.php:632
|
325 |
+
msgid "General"
|
326 |
+
msgstr "Hlavné"
|
327 |
+
|
328 |
+
#: admin/class-ctcc-admin.php:633
|
329 |
+
msgid "Content"
|
330 |
+
msgstr "Obsah"
|
331 |
+
|
332 |
+
#: admin/class-ctcc-admin.php:634
|
333 |
+
msgid "Styles"
|
334 |
+
msgstr "Štýly"
|
335 |
+
|
336 |
+
#: admin/class-ctcc-admin.php:656
|
337 |
+
msgid "Reset plugin defaults"
|
338 |
+
msgstr "Resetovať na predvolené nastavenia"
|
339 |
+
|
340 |
+
#: public/customizer.php:43
|
341 |
+
msgid "Position and placement."
|
342 |
+
msgstr "Umiestnenie."
|
343 |
+
|
344 |
+
#: public/customizer.php:59
|
345 |
+
msgid "Optional wrapper class."
|
346 |
+
msgstr "Voliteľná wrapper class."
|
347 |
+
|
348 |
+
#: public/customizer.php:74
|
349 |
+
msgid "Enqueue Styles"
|
350 |
+
msgstr "Pripojiť štýly"
|
351 |
+
|
352 |
+
#: public/customizer.php:75
|
353 |
+
msgid "Deselect this to dequeue the plugin stylesheet."
|
354 |
+
msgstr "Odznačte toto políčko pre vyradenie predvolených štýlov modulu"
|
355 |
+
|
356 |
+
#: public/customizer.php:91
|
357 |
+
msgid "Round the corners on the block."
|
358 |
+
msgstr "Oválne rohy bloku"
|
359 |
+
|
360 |
+
#: public/customizer.php:107
|
361 |
+
msgid "Add drop shadow to the block."
|
362 |
+
msgstr "Pridať tieň bloku"
|
363 |
+
|
364 |
+
#: public/customizer.php:123
|
365 |
+
msgid "Deselect to float button to right."
|
366 |
+
msgstr "Odškrtnite pre zarovnanie tlačítka doprava"
|
367 |
+
|
368 |
+
#: public/customizer.php:139
|
369 |
+
msgid "Replace confirmation button with 'X' icon."
|
370 |
+
msgstr "Zameniť tlačítko za \"X\""
|
371 |
+
|
372 |
+
#: public/customizer.php:155
|
373 |
+
msgid "Text color for your notification bar."
|
374 |
+
msgstr "Farba textu notifikačného panelu"
|
375 |
+
|
376 |
+
#: public/customizer.php:171
|
377 |
+
msgid "Background color for your notification bar."
|
378 |
+
msgstr "Farba pozadia notifikačného panelu"
|
379 |
+
|
380 |
+
#: public/customizer.php:187
|
381 |
+
msgid "Link color for your notification bar."
|
382 |
+
msgstr "Farba odkazu notifikačného panelu"
|
383 |
+
|
384 |
+
#: public/customizer.php:203
|
385 |
+
msgid "Text color for your notification bar button."
|
386 |
+
msgstr "Farba textu tlačítka"
|
387 |
+
|
388 |
+
#: public/customizer.php:219
|
389 |
+
msgid "Background color for your notification bar button."
|
390 |
+
msgstr "Farba pozadia tlačítka"
|
391 |
+
|
392 |
+
#: uk-cookie-consent.php:54
|
393 |
+
msgid "Cookie Policy"
|
394 |
+
msgstr "Pravidlá použitia Cookies"
|
395 |
+
|
396 |
+
#: uk-cookie-consent.php:55
|
397 |
+
msgid ""
|
398 |
+
"This site uses cookies - small text files that are placed on your machine to "
|
399 |
+
"help the site provide a better user experience. In general, cookies are used "
|
400 |
+
"to retain user preferences, store information for things like shopping "
|
401 |
+
"carts, and provide anonymised tracking data to third party applications like "
|
402 |
+
"Google Analytics. As a rule, cookies will make your browsing experience "
|
403 |
+
"better. However, you may prefer to disable cookies on this site and on "
|
404 |
+
"others. The most effective way to do this is to disable cookies in your "
|
405 |
+
"browser. We suggest consulting the Help section of your browser or taking a "
|
406 |
+
"look at <a href=\"http://www.aboutcookies.org\">the About Cookies website</"
|
407 |
+
"a> which offers guidance for all modern browsers"
|
408 |
+
msgstr ""
|
409 |
+
"Táto stránka používa cookies - malé textové súbory, ktoré sú uložené na "
|
410 |
+
"Vašom počítači, aby pomohli stránke zlepšiť užívateľský komfort. Cookies sú "
|
411 |
+
"všeobecne používané na uloženie nastavení používateľa a informácií ako napr. "
|
412 |
+
"obsah nákupného vozíka alebo anonymné zbieranie informácií pre tretie strany "
|
413 |
+
"ako Google Analytics. Je pravidlom, že cookies zlepšia komfort prezerania "
|
414 |
+
"stránok. Napriek tomu ale môžete uprednostniť zakázanie cookies na tejto "
|
415 |
+
"alebo iných stránkach. Najjednoduchšia možnosť je zakázať cookies vo Vašom "
|
416 |
+
"prehliadači. Odporúčame postupovať pomocou Nápovedy Vašeho webového "
|
417 |
+
"prehliadača, prípadne <a href=\"http://www.aboutcookies.org\">stránky "
|
418 |
+
"venovanej cookies</a>, ktorá obsahuje návody pre všetky moderné prehliadače."
|
419 |
+
|
420 |
+
#. Plugin URI of the plugin/theme
|
421 |
+
msgid "http://catapultthemes.com/cookie-consent/"
|
422 |
+
msgstr "http://catapultthemes.com/cookie-consent/"
|
423 |
+
|
424 |
+
#. Description of the plugin/theme
|
425 |
+
msgid "The only cookie consent plugin you'll ever need."
|
426 |
+
msgstr ""
|
427 |
+
"Jediný plugin na informovanie o použití cookies, ktorý kedy budete "
|
428 |
+
"potrebovať."
|
429 |
+
|
430 |
+
#. Author of the plugin/theme
|
431 |
+
msgid "Catapult_Themes"
|
432 |
+
msgstr "Catapult_Themes"
|
433 |
+
|
434 |
+
#. Author URI of the plugin/theme
|
435 |
+
msgid "http://catapultthemes.com/"
|
436 |
+
msgstr "http://catapultthemes.com/"
|
trunk/languages/uk-cookie-consent.pot
ADDED
@@ -0,0 +1,408 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Copyright (C) 2016 Cookie Consent
|
2 |
+
# This file is distributed under the same license as the Cookie Consent package.
|
3 |
+
msgid ""
|
4 |
+
msgstr ""
|
5 |
+
"Project-Id-Version: Cookie Consent 2.0.3\n"
|
6 |
+
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/uk-cookie-"
|
7 |
+
"consent\n"
|
8 |
+
"POT-Creation-Date: 2016-01-12 23:15:34+00:00\n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"PO-Revision-Date: 2016-MO-DA HO:MI+ZONE\n"
|
13 |
+
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
14 |
+
"Language-Team: LANGUAGE <LL@li.org>\n"
|
15 |
+
|
16 |
+
#. #-#-#-#-# uk-cookie-consent.pot (Cookie Consent 2.0.3) #-#-#-#-#
|
17 |
+
#. Plugin Name of the plugin/theme
|
18 |
+
#: admin/class-ctcc-admin.php:56 admin/class-ctcc-admin.php:630
|
19 |
+
#: public/customizer.php:17
|
20 |
+
msgid "Cookie Consent"
|
21 |
+
msgstr ""
|
22 |
+
|
23 |
+
#: admin/class-ctcc-admin.php:65
|
24 |
+
msgid "General settings"
|
25 |
+
msgstr ""
|
26 |
+
|
27 |
+
#: admin/class-ctcc-admin.php:72
|
28 |
+
msgid "Close"
|
29 |
+
msgstr ""
|
30 |
+
|
31 |
+
#: admin/class-ctcc-admin.php:80
|
32 |
+
msgid "First Page Only"
|
33 |
+
msgstr ""
|
34 |
+
|
35 |
+
#: admin/class-ctcc-admin.php:88
|
36 |
+
msgid "Notification Duration"
|
37 |
+
msgstr ""
|
38 |
+
|
39 |
+
#: admin/class-ctcc-admin.php:96
|
40 |
+
msgid "Cookie Expiry"
|
41 |
+
msgstr ""
|
42 |
+
|
43 |
+
#: admin/class-ctcc-admin.php:104
|
44 |
+
msgid "Cookie Version"
|
45 |
+
msgstr ""
|
46 |
+
|
47 |
+
#: admin/class-ctcc-admin.php:126
|
48 |
+
msgid "Content settings"
|
49 |
+
msgstr ""
|
50 |
+
|
51 |
+
#: admin/class-ctcc-admin.php:133
|
52 |
+
msgid "Heading Text"
|
53 |
+
msgstr ""
|
54 |
+
|
55 |
+
#: admin/class-ctcc-admin.php:141
|
56 |
+
msgid "Notification Text"
|
57 |
+
msgstr ""
|
58 |
+
|
59 |
+
#: admin/class-ctcc-admin.php:149
|
60 |
+
msgid "More Info Text"
|
61 |
+
msgstr ""
|
62 |
+
|
63 |
+
#: admin/class-ctcc-admin.php:157
|
64 |
+
msgid "More Info Page"
|
65 |
+
msgstr ""
|
66 |
+
|
67 |
+
#: admin/class-ctcc-admin.php:165
|
68 |
+
msgid "More Info URL"
|
69 |
+
msgstr ""
|
70 |
+
|
71 |
+
#: admin/class-ctcc-admin.php:173
|
72 |
+
msgid "More Info Target"
|
73 |
+
msgstr ""
|
74 |
+
|
75 |
+
#: admin/class-ctcc-admin.php:181
|
76 |
+
msgid "Accept Text"
|
77 |
+
msgstr ""
|
78 |
+
|
79 |
+
#: admin/class-ctcc-admin.php:203
|
80 |
+
msgid "Styles settings"
|
81 |
+
msgstr ""
|
82 |
+
|
83 |
+
#: admin/class-ctcc-admin.php:210 public/customizer.php:34
|
84 |
+
msgid "Position"
|
85 |
+
msgstr ""
|
86 |
+
|
87 |
+
#: admin/class-ctcc-admin.php:218 public/customizer.php:58
|
88 |
+
msgid "Container Class"
|
89 |
+
msgstr ""
|
90 |
+
|
91 |
+
#: admin/class-ctcc-admin.php:226
|
92 |
+
msgid "Include Stylesheet"
|
93 |
+
msgstr ""
|
94 |
+
|
95 |
+
#: admin/class-ctcc-admin.php:234 public/customizer.php:90
|
96 |
+
msgid "Rounded Corners"
|
97 |
+
msgstr ""
|
98 |
+
|
99 |
+
#: admin/class-ctcc-admin.php:242 public/customizer.php:106
|
100 |
+
msgid "Drop Shadow"
|
101 |
+
msgstr ""
|
102 |
+
|
103 |
+
#: admin/class-ctcc-admin.php:250 public/customizer.php:122
|
104 |
+
msgid "Display Button With Text"
|
105 |
+
msgstr ""
|
106 |
+
|
107 |
+
#: admin/class-ctcc-admin.php:258 public/customizer.php:138
|
108 |
+
msgid "Use X Close"
|
109 |
+
msgstr ""
|
110 |
+
|
111 |
+
#: admin/class-ctcc-admin.php:266 public/customizer.php:154
|
112 |
+
msgid "Text Color"
|
113 |
+
msgstr ""
|
114 |
+
|
115 |
+
#: admin/class-ctcc-admin.php:274 admin/class-ctcc-admin.php:306
|
116 |
+
#: public/customizer.php:170
|
117 |
+
msgid "Background Color"
|
118 |
+
msgstr ""
|
119 |
+
|
120 |
+
#: admin/class-ctcc-admin.php:282 public/customizer.php:186
|
121 |
+
msgid "Link Color"
|
122 |
+
msgstr ""
|
123 |
+
|
124 |
+
#: admin/class-ctcc-admin.php:290 public/customizer.php:202
|
125 |
+
msgid "Button Color"
|
126 |
+
msgstr ""
|
127 |
+
|
128 |
+
#: admin/class-ctcc-admin.php:298 public/customizer.php:218
|
129 |
+
msgid "Button Background"
|
130 |
+
msgstr ""
|
131 |
+
|
132 |
+
#: admin/class-ctcc-admin.php:339 admin/class-ctcc-admin.php:349
|
133 |
+
msgid "Cookies"
|
134 |
+
msgstr ""
|
135 |
+
|
136 |
+
#: admin/class-ctcc-admin.php:350
|
137 |
+
msgid "This site uses cookies: "
|
138 |
+
msgstr ""
|
139 |
+
|
140 |
+
#: admin/class-ctcc-admin.php:351
|
141 |
+
msgid "Okay, thanks"
|
142 |
+
msgstr ""
|
143 |
+
|
144 |
+
#: admin/class-ctcc-admin.php:352
|
145 |
+
msgid "Find out more."
|
146 |
+
msgstr ""
|
147 |
+
|
148 |
+
#: admin/class-ctcc-admin.php:411
|
149 |
+
msgid "On Click"
|
150 |
+
msgstr ""
|
151 |
+
|
152 |
+
#: admin/class-ctcc-admin.php:412
|
153 |
+
msgid "Timed"
|
154 |
+
msgstr ""
|
155 |
+
|
156 |
+
#: admin/class-ctcc-admin.php:414
|
157 |
+
msgid "How you want the user to close the notification"
|
158 |
+
msgstr ""
|
159 |
+
|
160 |
+
#: admin/class-ctcc-admin.php:421
|
161 |
+
msgid ""
|
162 |
+
"Select this to show the notification only on the first page the user visits"
|
163 |
+
msgstr ""
|
164 |
+
|
165 |
+
#: admin/class-ctcc-admin.php:428
|
166 |
+
msgid ""
|
167 |
+
"If you chose Timer as the close method, enter how many seconds the "
|
168 |
+
"notification should display for"
|
169 |
+
msgstr ""
|
170 |
+
|
171 |
+
#: admin/class-ctcc-admin.php:435
|
172 |
+
msgid "The number of days that the cookie is set for"
|
173 |
+
msgstr ""
|
174 |
+
|
175 |
+
#: admin/class-ctcc-admin.php:442
|
176 |
+
msgid ""
|
177 |
+
"A version number for the cookie - update this to invalidate the cookie and "
|
178 |
+
"force all users to view the notification again"
|
179 |
+
msgstr ""
|
180 |
+
|
181 |
+
#: admin/class-ctcc-admin.php:453
|
182 |
+
msgid ""
|
183 |
+
"The heading text - only applies if you are not using a top or bottom bar"
|
184 |
+
msgstr ""
|
185 |
+
|
186 |
+
#: admin/class-ctcc-admin.php:460
|
187 |
+
msgid "The default text to indicate that your site uses cookies"
|
188 |
+
msgstr ""
|
189 |
+
|
190 |
+
#: admin/class-ctcc-admin.php:467
|
191 |
+
msgid "The default text to dismiss the notification"
|
192 |
+
msgstr ""
|
193 |
+
|
194 |
+
#: admin/class-ctcc-admin.php:474
|
195 |
+
msgid "The default text to use to link to a page providing further information"
|
196 |
+
msgstr ""
|
197 |
+
|
198 |
+
#: admin/class-ctcc-admin.php:490
|
199 |
+
msgid "The page containing further information about your cookie policy"
|
200 |
+
msgstr ""
|
201 |
+
|
202 |
+
#: admin/class-ctcc-admin.php:497
|
203 |
+
msgid ""
|
204 |
+
"You can add an absolute URL here to override the More Info Page setting "
|
205 |
+
"above. Use this to link to an external website for further information about "
|
206 |
+
"cookies."
|
207 |
+
msgstr ""
|
208 |
+
|
209 |
+
#: admin/class-ctcc-admin.php:504
|
210 |
+
msgid "New Tab"
|
211 |
+
msgstr ""
|
212 |
+
|
213 |
+
#: admin/class-ctcc-admin.php:505
|
214 |
+
msgid "Same Tab"
|
215 |
+
msgstr ""
|
216 |
+
|
217 |
+
#: admin/class-ctcc-admin.php:507
|
218 |
+
msgid "Open the More Information page in the same or new tab."
|
219 |
+
msgstr ""
|
220 |
+
|
221 |
+
#: admin/class-ctcc-admin.php:518 public/customizer.php:36
|
222 |
+
msgid "Top Bar"
|
223 |
+
msgstr ""
|
224 |
+
|
225 |
+
#: admin/class-ctcc-admin.php:519 public/customizer.php:37
|
226 |
+
msgid "Bottom Bar"
|
227 |
+
msgstr ""
|
228 |
+
|
229 |
+
#: admin/class-ctcc-admin.php:520 public/customizer.php:38
|
230 |
+
msgid "Top Left Block"
|
231 |
+
msgstr ""
|
232 |
+
|
233 |
+
#: admin/class-ctcc-admin.php:521 public/customizer.php:39
|
234 |
+
msgid "Top Right Block"
|
235 |
+
msgstr ""
|
236 |
+
|
237 |
+
#: admin/class-ctcc-admin.php:522 public/customizer.php:40
|
238 |
+
msgid "Bottom Left Block"
|
239 |
+
msgstr ""
|
240 |
+
|
241 |
+
#: admin/class-ctcc-admin.php:523 public/customizer.php:41
|
242 |
+
msgid "Bottom Right Block"
|
243 |
+
msgstr ""
|
244 |
+
|
245 |
+
#: admin/class-ctcc-admin.php:525
|
246 |
+
msgid "Where the notification should appear"
|
247 |
+
msgstr ""
|
248 |
+
|
249 |
+
#: admin/class-ctcc-admin.php:532
|
250 |
+
msgid ""
|
251 |
+
"You can add an optional wrapper class, eg container, here to align the "
|
252 |
+
"notification text with the rest of your content"
|
253 |
+
msgstr ""
|
254 |
+
|
255 |
+
#: admin/class-ctcc-admin.php:539
|
256 |
+
msgid "Deselect this to dequeue the plugin stylesheet"
|
257 |
+
msgstr ""
|
258 |
+
|
259 |
+
#: admin/class-ctcc-admin.php:546
|
260 |
+
msgid "Round the corners on the block (doesn't apply to the top or bottom bar)"
|
261 |
+
msgstr ""
|
262 |
+
|
263 |
+
#: admin/class-ctcc-admin.php:553
|
264 |
+
msgid "Add drop shadow to the block (doesn't apply to the top or bottom bar)"
|
265 |
+
msgstr ""
|
266 |
+
|
267 |
+
#: admin/class-ctcc-admin.php:560
|
268 |
+
msgid "Display the confirmation button with notification text"
|
269 |
+
msgstr ""
|
270 |
+
|
271 |
+
#: admin/class-ctcc-admin.php:567
|
272 |
+
msgid "Remove confirmation button and use 'X' icon instead"
|
273 |
+
msgstr ""
|
274 |
+
|
275 |
+
#: admin/class-ctcc-admin.php:574
|
276 |
+
msgid "The text color on the notification"
|
277 |
+
msgstr ""
|
278 |
+
|
279 |
+
#: admin/class-ctcc-admin.php:581
|
280 |
+
msgid "The background color for the notification"
|
281 |
+
msgstr ""
|
282 |
+
|
283 |
+
#: admin/class-ctcc-admin.php:588
|
284 |
+
msgid "The link color on the notification"
|
285 |
+
msgstr ""
|
286 |
+
|
287 |
+
#: admin/class-ctcc-admin.php:595
|
288 |
+
msgid "The text color on the notification button"
|
289 |
+
msgstr ""
|
290 |
+
|
291 |
+
#: admin/class-ctcc-admin.php:602
|
292 |
+
msgid "The background color on the notification button"
|
293 |
+
msgstr ""
|
294 |
+
|
295 |
+
#: admin/class-ctcc-admin.php:607
|
296 |
+
msgid "<p>Basic settings</p>"
|
297 |
+
msgstr ""
|
298 |
+
|
299 |
+
#: admin/class-ctcc-admin.php:611
|
300 |
+
msgid "<p>Update the content displayed to the user</p>"
|
301 |
+
msgstr ""
|
302 |
+
|
303 |
+
#: admin/class-ctcc-admin.php:615
|
304 |
+
msgid ""
|
305 |
+
"<p>Change the styles here if you like - but it's better in the Customizer</p>"
|
306 |
+
msgstr ""
|
307 |
+
|
308 |
+
#: admin/class-ctcc-admin.php:632
|
309 |
+
msgid "General"
|
310 |
+
msgstr ""
|
311 |
+
|
312 |
+
#: admin/class-ctcc-admin.php:633
|
313 |
+
msgid "Content"
|
314 |
+
msgstr ""
|
315 |
+
|
316 |
+
#: admin/class-ctcc-admin.php:634
|
317 |
+
msgid "Styles"
|
318 |
+
msgstr ""
|
319 |
+
|
320 |
+
#: admin/class-ctcc-admin.php:656
|
321 |
+
msgid "Reset plugin defaults"
|
322 |
+
msgstr ""
|
323 |
+
|
324 |
+
#: public/customizer.php:43
|
325 |
+
msgid "Position and placement."
|
326 |
+
msgstr ""
|
327 |
+
|
328 |
+
#: public/customizer.php:59
|
329 |
+
msgid "Optional wrapper class."
|
330 |
+
msgstr ""
|
331 |
+
|
332 |
+
#: public/customizer.php:74
|
333 |
+
msgid "Enqueue Styles"
|
334 |
+
msgstr ""
|
335 |
+
|
336 |
+
#: public/customizer.php:75
|
337 |
+
msgid "Deselect this to dequeue the plugin stylesheet."
|
338 |
+
msgstr ""
|
339 |
+
|
340 |
+
#: public/customizer.php:91
|
341 |
+
msgid "Round the corners on the block."
|
342 |
+
msgstr ""
|
343 |
+
|
344 |
+
#: public/customizer.php:107
|
345 |
+
msgid "Add drop shadow to the block."
|
346 |
+
msgstr ""
|
347 |
+
|
348 |
+
#: public/customizer.php:123
|
349 |
+
msgid "Deselect to float button to right."
|
350 |
+
msgstr ""
|
351 |
+
|
352 |
+
#: public/customizer.php:139
|
353 |
+
msgid "Replace confirmation button with 'X' icon."
|
354 |
+
msgstr ""
|
355 |
+
|
356 |
+
#: public/customizer.php:155
|
357 |
+
msgid "Text color for your notification bar."
|
358 |
+
msgstr ""
|
359 |
+
|
360 |
+
#: public/customizer.php:171
|
361 |
+
msgid "Background color for your notification bar."
|
362 |
+
msgstr ""
|
363 |
+
|
364 |
+
#: public/customizer.php:187
|
365 |
+
msgid "Link color for your notification bar."
|
366 |
+
msgstr ""
|
367 |
+
|
368 |
+
#: public/customizer.php:203
|
369 |
+
msgid "Text color for your notification bar button."
|
370 |
+
msgstr ""
|
371 |
+
|
372 |
+
#: public/customizer.php:219
|
373 |
+
msgid "Background color for your notification bar button."
|
374 |
+
msgstr ""
|
375 |
+
|
376 |
+
#: uk-cookie-consent.php:54
|
377 |
+
msgid "Cookie Policy"
|
378 |
+
msgstr ""
|
379 |
+
|
380 |
+
#: uk-cookie-consent.php:55
|
381 |
+
msgid ""
|
382 |
+
"This site uses cookies - small text files that are placed on your machine to "
|
383 |
+
"help the site provide a better user experience. In general, cookies are used "
|
384 |
+
"to retain user preferences, store information for things like shopping "
|
385 |
+
"carts, and provide anonymised tracking data to third party applications like "
|
386 |
+
"Google Analytics. As a rule, cookies will make your browsing experience "
|
387 |
+
"better. However, you may prefer to disable cookies on this site and on "
|
388 |
+
"others. The most effective way to do this is to disable cookies in your "
|
389 |
+
"browser. We suggest consulting the Help section of your browser or taking a "
|
390 |
+
"look at <a href=\"http://www.aboutcookies.org\">the About Cookies website</"
|
391 |
+
"a> which offers guidance for all modern browsers"
|
392 |
+
msgstr ""
|
393 |
+
|
394 |
+
#. Plugin URI of the plugin/theme
|
395 |
+
msgid "http://catapultthemes.com/cookie-consent/"
|
396 |
+
msgstr ""
|
397 |
+
|
398 |
+
#. Description of the plugin/theme
|
399 |
+
msgid "The only cookie consent plugin you'll ever need."
|
400 |
+
msgstr ""
|
401 |
+
|
402 |
+
#. Author of the plugin/theme
|
403 |
+
msgid "Catapult_Themes"
|
404 |
+
msgstr ""
|
405 |
+
|
406 |
+
#. Author URI of the plugin/theme
|
407 |
+
msgid "http://catapultthemes.com/"
|
408 |
+
msgstr ""
|
trunk/public/class-ctcc-public.php
ADDED
@@ -0,0 +1,389 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Public class
|
4 |
+
*/
|
5 |
+
|
6 |
+
// Exit if accessed directly
|
7 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
8 |
+
exit;
|
9 |
+
}
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Plugin public class
|
13 |
+
**/
|
14 |
+
if ( ! class_exists( 'CTCC_Public' ) ) { // Don't initialise if there's already a class activated
|
15 |
+
|
16 |
+
class CTCC_Public {
|
17 |
+
|
18 |
+
public function __construct() {
|
19 |
+
//
|
20 |
+
}
|
21 |
+
|
22 |
+
/*
|
23 |
+
* Initialize the class and start calling our hooks and filters
|
24 |
+
* @since 2.0.0
|
25 |
+
*/
|
26 |
+
public function init() {
|
27 |
+
add_filter( 'body_class', array ( $this, 'body_class' ) );
|
28 |
+
add_action ( 'wp_enqueue_scripts', array ( $this, 'enqueue_scripts' ) );
|
29 |
+
add_action ( 'wp_head', array ( $this, 'add_css' ) );
|
30 |
+
add_action ( 'wp_footer', array ( $this, 'add_js' ), 1000 );
|
31 |
+
add_action ( 'wp_footer', array ( $this, 'add_notification_bar' ), 1000 );
|
32 |
+
}
|
33 |
+
|
34 |
+
/*
|
35 |
+
* Initialize the class and start calling our hooks and filters
|
36 |
+
* @since 2.0.0
|
37 |
+
*/
|
38 |
+
public function body_class( $classes ) {
|
39 |
+
$options = get_option( 'ctcc_options_settings' );
|
40 |
+
if( isset( $options['exclude_zones'] ) && is_array( $options['exclude_zones'] ) ) {
|
41 |
+
foreach( $options['exclude_zones'] as $zone ) {
|
42 |
+
$classes[] = 'ctcc-exclude-' . $zone;
|
43 |
+
}
|
44 |
+
}
|
45 |
+
return $classes;
|
46 |
+
}
|
47 |
+
|
48 |
+
/*
|
49 |
+
* Enqueue styles and scripts
|
50 |
+
* @since 2.0.0
|
51 |
+
*/
|
52 |
+
public function enqueue_scripts() {
|
53 |
+
$exclude = $this->show_bar();
|
54 |
+
// Only do all this if post isn't excluded
|
55 |
+
if( ! empty( $exclude ) ) {
|
56 |
+
$ctcc_options_settings = get_option ( 'ctcc_options_settings' );
|
57 |
+
$options = get_option ( 'ctcc_styles_settings' );
|
58 |
+
if ( isset ( $options['enqueue_styles'] ) ) {
|
59 |
+
wp_enqueue_style ( 'cookie-consent-style', CTCC_PLUGIN_URL . 'assets/css/style.css', '2.3.0' );
|
60 |
+
}
|
61 |
+
wp_enqueue_script ( 'cookie-consent', CTCC_PLUGIN_URL . 'assets/js/uk-cookie-consent-js.js', array ( 'jquery' ), '2.3.0', true );
|
62 |
+
wp_localize_script (
|
63 |
+
'cookie-consent',
|
64 |
+
'ctcc_vars',
|
65 |
+
array (
|
66 |
+
'expiry' => $ctcc_options_settings['cookie_expiry'],
|
67 |
+
'method' => isset ( $ctcc_options_settings['first_page'] ),
|
68 |
+
'version' => $ctcc_options_settings['cookie_version'],
|
69 |
+
)
|
70 |
+
);
|
71 |
+
}
|
72 |
+
}
|
73 |
+
|
74 |
+
/*
|
75 |
+
* Check if post or page is excluded from displaying the bar
|
76 |
+
* @since 2.2.0
|
77 |
+
*/
|
78 |
+
public function show_bar() {
|
79 |
+
global $post;
|
80 |
+
$options = get_option( 'ctcc_options_settings' );
|
81 |
+
if( isset( $post->ID) ) {
|
82 |
+
$post_id = $post->ID;
|
83 |
+
$excluded = get_post_meta( $post_id, 'ctcc_exclude', true );
|
84 |
+
if( $excluded == 1 && ! empty( $options['enable_metafield'] ) ) {
|
85 |
+
return false;
|
86 |
+
}
|
87 |
+
}
|
88 |
+
return true;
|
89 |
+
}
|
90 |
+
|
91 |
+
/*
|
92 |
+
* Add some CSS to the header
|
93 |
+
* @since 2.0.0
|
94 |
+
*/
|
95 |
+
public function add_css() {
|
96 |
+
$exclude = $this->show_bar();
|
97 |
+
// Only do all this if post isn't excluded
|
98 |
+
if( ! empty( $exclude ) ) {
|
99 |
+
$options = get_option ( 'ctcc_options_settings' );
|
100 |
+
$ctcc_styles_settings = get_option ( 'ctcc_styles_settings' );
|
101 |
+
$position_css = 'position: fixed;
|
102 |
+
left: 0;
|
103 |
+
top: 0;
|
104 |
+
width: 100%;';
|
105 |
+
// Figure out the bar position
|
106 |
+
if ( $ctcc_styles_settings['position'] == 'top-bar' ) {
|
107 |
+
$position_css = 'position: fixed;
|
108 |
+
left: 0;
|
109 |
+
top: 0;
|
110 |
+
width: 100%;';
|
111 |
+
} else if ( $ctcc_styles_settings['position'] == 'bottom-bar' ) {
|
112 |
+
$position_css = 'position: fixed;
|
113 |
+
left: 0;
|
114 |
+
bottom: 0;
|
115 |
+
width: 100%;';
|
116 |
+
} else if ( $ctcc_styles_settings['position'] == 'top-right-block' ) {
|
117 |
+
$position_css = 'position: fixed;
|
118 |
+
right: 20px;
|
119 |
+
top: 6%;
|
120 |
+
width: 300px;';
|
121 |
+
} else if ( $ctcc_styles_settings['position'] == 'top-left-block' ) {
|
122 |
+
$position_css = 'position: fixed;
|
123 |
+
left: 20px;
|
124 |
+
top: 6%;
|
125 |
+
width: 300px;';
|
126 |
+
} else if ( $ctcc_styles_settings['position'] == 'bottom-left-block' ) {
|
127 |
+
$position_css = 'position: fixed;
|
128 |
+
left: 20px;
|
129 |
+
bottom: 6%;
|
130 |
+
width: 300px;';
|
131 |
+
} else if ( $ctcc_styles_settings['position'] == 'bottom-right-block' ) {
|
132 |
+
$position_css = 'position: fixed;
|
133 |
+
right: 20px;
|
134 |
+
bottom: 6%;
|
135 |
+
width: 300px;';
|
136 |
+
}
|
137 |
+
// Get our styles
|
138 |
+
$text_color = $ctcc_styles_settings['text_color'];
|
139 |
+
$position = 'top';
|
140 |
+
$bg_color = $ctcc_styles_settings['bg_color'];
|
141 |
+
$link_color = $ctcc_styles_settings['link_color'];
|
142 |
+
$button_bg = $ctcc_styles_settings['button_bg_color'];
|
143 |
+
$button_color = $ctcc_styles_settings['button_color'];
|
144 |
+
if ( ! empty ( $ctcc_styles_settings['flat_button'] ) ){
|
145 |
+
$button_style = 'border: 0; padding: 6px 9px; border-radius: 3px;';
|
146 |
+
} else {
|
147 |
+
$button_style = '';
|
148 |
+
}
|
149 |
+
// Build our CSS
|
150 |
+
$css = '<style id="ctcc-css" type="text/css" media="screen">';
|
151 |
+
$css .= '
|
152 |
+
#catapult-cookie-bar {
|
153 |
+
box-sizing: border-box;
|
154 |
+
max-height: 0;
|
155 |
+
opacity: 0;
|
156 |
+
z-index: 99999;
|
157 |
+
overflow: hidden;
|
158 |
+
color: ' . $text_color . ';
|
159 |
+
' . $position_css . '
|
160 |
+
background-color: ' . $bg_color . ';
|
161 |
+
}
|
162 |
+
#catapult-cookie-bar a {
|
163 |
+
color: ' . $link_color . ';
|
164 |
+
}
|
165 |
+
#catapult-cookie-bar .x_close span {
|
166 |
+
background-color: ' . $button_color . ';
|
167 |
+
}
|
168 |
+
button#catapultCookie {
|
169 |
+
background:' . $button_bg . ';
|
170 |
+
color: ' . $button_color . ';
|
171 |
+
' . $button_style . '
|
172 |
+
}
|
173 |
+
#catapult-cookie-bar h3 {
|
174 |
+
color: ' . $text_color . ';
|
175 |
+
}
|
176 |
+
.has-cookie-bar #catapult-cookie-bar {
|
177 |
+
opacity: 1;
|
178 |
+
max-height: 999px;
|
179 |
+
min-height: 30px;
|
180 |
+
}';
|
181 |
+
$css .= '</style>';
|
182 |
+
echo $css;
|
183 |
+
// Add it to the header
|
184 |
+
}
|
185 |
+
}
|
186 |
+
|
187 |
+
/*
|
188 |
+
* Add some JS to the footer
|
189 |
+
* @since 2.0.0
|
190 |
+
*/
|
191 |
+
public function add_js() {
|
192 |
+
|
193 |
+
$exclude = $this->show_bar();
|
194 |
+
// Only do all this if post isn't excluded
|
195 |
+
if( ! empty( $exclude ) ) {
|
196 |
+
$options = get_option( 'ctcc_options_settings' );
|
197 |
+
$ctcc_styles_settings = get_option ( 'ctcc_styles_settings' );
|
198 |
+
|
199 |
+
if ( $ctcc_styles_settings['position'] == 'top-bar' || $ctcc_styles_settings['position'] == 'bottom-bar' ) {
|
200 |
+
$type = 'bar';
|
201 |
+
} else {
|
202 |
+
$type = 'block';
|
203 |
+
} ?>
|
204 |
+
|
205 |
+
<script type="text/javascript">
|
206 |
+
jQuery(document).ready(function($){
|
207 |
+
<?php if ( isset ( $_GET['cookie'] ) ) { ?>
|
208 |
+
catapultDeleteCookie('catAccCookies');
|
209 |
+
<?php } ?>
|
210 |
+
if(!catapultReadCookie("catAccCookies")){ // If the cookie has not been set then show the bar
|
211 |
+
$("html").addClass("has-cookie-bar");
|
212 |
+
$("html").addClass("cookie-bar-<?php echo $ctcc_styles_settings['position']; ?>");
|
213 |
+
$("html").addClass("cookie-bar-<?php echo $type; ?>");
|
214 |
+
<?php // Move the HTML down if the bar is at the top
|
215 |
+
if ( $ctcc_styles_settings['position'] == 'top-bar' ) {
|
216 |
+
?>
|
217 |
+
// Wait for the animation on the html to end before recalculating the required top margin
|
218 |
+
$("html").on('webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend', function(e) {
|
219 |
+
// code to execute after transition ends
|
220 |
+
var barHeight = $('#catapult-cookie-bar').outerHeight();
|
221 |
+
$("html").css("margin-top",barHeight);
|
222 |
+
$("body.admin-bar").css("margin-top",barHeight-32); // Push the body down if the admin bar is active
|
223 |
+
});
|
224 |
+
<?php } ?>
|
225 |
+
}
|
226 |
+
<?php if ( $options['closure'] == 'timed' ) {
|
227 |
+
// Add some script if it's on a timer
|
228 |
+
$duration = absint($options['duration']) * 1000; ?>
|
229 |
+
setTimeout(ctccCloseNotification, <?php echo $duration; ?>);
|
230 |
+
<?php } else if( $options['closure'] == 'scroll' ) {
|
231 |
+
if( isset( $options['scroll_height'] ) && intval( $options['scroll_height'] ) > 0 ) {
|
232 |
+
$height = intval( $options['scroll_height'] );
|
233 |
+
} else {
|
234 |
+
$height = 200;
|
235 |
+
}
|
236 |
+
?>
|
237 |
+
$(window).scroll(function(){
|
238 |
+
var scroll = $(window).scrollTop();
|
239 |
+
if ( scroll > <?php echo $height; ?> ) {
|
240 |
+
ctccCloseNotification();
|
241 |
+
}
|
242 |
+
});
|
243 |
+
<?php } ?>
|
244 |
+
<?php if ( ! empty ( $options['first_page'] ) ) {
|
245 |
+
// Add some script if the notification only displays on the first page ?>
|
246 |
+
ctccFirstPage();
|
247 |
+
<?php } ?>
|
248 |
+
});
|
249 |
+
</script>
|
250 |
+
|
251 |
+
<?php }
|
252 |
+
|
253 |
+
}
|
254 |
+
|
255 |
+
/*
|
256 |
+
* Add the notification bar itself
|
257 |
+
* @since 2.0.0
|
258 |
+
*/
|
259 |
+
public function add_notification_bar() {
|
260 |
+
|
261 |
+
$exclude = $this->show_bar();
|
262 |
+
// Only do all this if post isn't excluded
|
263 |
+
if( ! empty( $exclude ) ) {
|
264 |
+
|
265 |
+
$ctcc_options_settings = get_option ( 'ctcc_options_settings' );
|
266 |
+
$ctcc_content_settings = get_option ( 'ctcc_content_settings' );
|
267 |
+
$ctcc_styles_settings = get_option ( 'ctcc_styles_settings' );
|
268 |
+
|
269 |
+
// Check if it's a block or a bar
|
270 |
+
$is_block = true;
|
271 |
+
if ( $ctcc_styles_settings['position'] == 'top-bar' || $ctcc_styles_settings['position'] == 'bottom-bar' ) {
|
272 |
+
$is_block = false; // It's a bar
|
273 |
+
}
|
274 |
+
|
275 |
+
// Add some classes to the block
|
276 |
+
$classes = '';
|
277 |
+
if ( $is_block ) {
|
278 |
+
if ( ! empty ( $ctcc_styles_settings['rounded_corners'] ) ) {
|
279 |
+
$classes .= ' rounded-corners';
|
280 |
+
}
|
281 |
+
if ( ! empty ( $ctcc_styles_settings['drop_shadow'] ) ) {
|
282 |
+
$classes .= ' drop-shadow';
|
283 |
+
}
|
284 |
+
}
|
285 |
+
if ( ! empty ( $ctcc_styles_settings['x_close'] ) ) {
|
286 |
+
$classes .= ' use_x_close';
|
287 |
+
}
|
288 |
+
if ( empty ( $ctcc_styles_settings['display_accept_with_text'] ) ) {
|
289 |
+
$classes .= ' float-accept';
|
290 |
+
}
|
291 |
+
|
292 |
+
// Allowed tags
|
293 |
+
$allowed = array (
|
294 |
+
'a' => array (
|
295 |
+
'href' => array(),
|
296 |
+
'title' => array()
|
297 |
+
),
|
298 |
+
'br' => array(),
|
299 |
+
'em' => array(),
|
300 |
+
'strong' => array(),
|
301 |
+
'p' => array()
|
302 |
+
);
|
303 |
+
|
304 |
+
$content = '';
|
305 |
+
$close_content = '';
|
306 |
+
|
307 |
+
// Print the notification bar
|
308 |
+
$content = '<div id="catapult-cookie-bar" class="' . $classes . '">';
|
309 |
+
|
310 |
+
// Add a custom wrapper class if specified
|
311 |
+
if ( $ctcc_styles_settings['position'] == 'top-bar' || $ctcc_styles_settings['position'] == 'bottom-bar' ) {
|
312 |
+
$content .= '<div class="ctcc-inner ' . esc_attr ( str_replace ( '.', '', $ctcc_styles_settings['container_class'] ) ) . '">';
|
313 |
+
$close_content = '</div><!-- custom wrapper class -->';
|
314 |
+
}
|
315 |
+
|
316 |
+
// Add a title if it's a block
|
317 |
+
if ( $ctcc_styles_settings['position'] != 'top-bar' && $ctcc_styles_settings['position'] != 'bottom-bar' ) {
|
318 |
+
$heading_text = wp_kses ( $ctcc_content_settings['heading_text'], $allowed );
|
319 |
+
$heading_text = apply_filters( 'ctcc_heading_text', $heading_text );
|
320 |
+
$content .= sprintf ( '<h3>%s</h3>',
|
321 |
+
$heading_text
|
322 |
+
);
|
323 |
+
}
|
324 |
+
|
325 |
+
// Make the Read More link
|
326 |
+
$more_text = '';
|
327 |
+
if ( $ctcc_content_settings['more_info_text'] ) {
|
328 |
+
// Find what page we're linking to
|
329 |
+
if ( ! empty ( $ctcc_content_settings['more_info_url'] ) ) {
|
330 |
+
// Check the absolute URL first
|
331 |
+
$link = $ctcc_content_settings['more_info_url'];
|
332 |
+
} else {
|
333 |
+
// Make sure, we get the right page translation, using PolyLang, if pll_get_post function exists
|
334 |
+
$page_id = $ctcc_content_settings['more_info_page'];
|
335 |
+
if( function_exists( 'pll_get_post' ) ) {
|
336 |
+
$page_id = pll_get_post( $page_id );
|
337 |
+
}
|
338 |
+
// Use the internal page
|
339 |
+
$link = get_permalink( $page_id );
|
340 |
+
}
|
341 |
+
$more_info_text = wp_kses ( $ctcc_content_settings['more_info_text'], $allowed );
|
342 |
+
$more_info_text = apply_filters( 'ctcc_more_info_text', $more_info_text );
|
343 |
+
$more_text = sprintf (
|
344 |
+
'<a class="ctcc-more-info-link" tabindex=0 target="%s" href="%s">%s</a>',
|
345 |
+
esc_attr ( $ctcc_content_settings['more_info_target'] ),
|
346 |
+
esc_url ( $link ),
|
347 |
+
$more_info_text
|
348 |
+
);
|
349 |
+
}
|
350 |
+
|
351 |
+
$button_text = '';
|
352 |
+
if ( empty ( $ctcc_styles_settings['x_close'] ) ) {
|
353 |
+
$accept_text = wp_kses ( $ctcc_content_settings['accept_text'], $allowed );
|
354 |
+
$accept_text = apply_filters( 'ctcc_accept_text', $accept_text );
|
355 |
+
$button_text = sprintf (
|
356 |
+
'<button id="catapultCookie" tabindex=0 onclick="catapultAcceptCookies();">%s</button>',
|
357 |
+
$accept_text
|
358 |
+
);
|
359 |
+
}
|
360 |
+
|
361 |
+
// The main bar content
|
362 |
+
$notification_text = wp_kses_post ( do_shortcode( $ctcc_content_settings['notification_text'] ) );
|
363 |
+
$notification_text = apply_filters( 'ctcc_notification_text', $notification_text );
|
364 |
+
$content .= sprintf (
|
365 |
+
'<span class="ctcc-left-side">%s %s</span><span class="ctcc-right-side">%s</span>',
|
366 |
+
$notification_text,
|
367 |
+
$more_text,
|
368 |
+
$button_text
|
369 |
+
);
|
370 |
+
|
371 |
+
// X close button
|
372 |
+
if ( ! empty ( $ctcc_styles_settings['x_close'] ) ) {
|
373 |
+
$content .= '<div class="x_close"><span></span><span></span></div>';
|
374 |
+
}
|
375 |
+
|
376 |
+
// Close custom wrapper class if used
|
377 |
+
$content .= $close_content;
|
378 |
+
|
379 |
+
$content .= '</div><!-- #catapult-cookie-bar -->';
|
380 |
+
|
381 |
+
echo apply_filters ( 'catapult_cookie_content', $content, $ctcc_content_settings );
|
382 |
+
|
383 |
+
}
|
384 |
+
|
385 |
+
}
|
386 |
+
|
387 |
+
}
|
388 |
+
|
389 |
+
}
|
trunk/public/customizer.php
ADDED
@@ -0,0 +1,238 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Customizer
|
4 |
+
*/
|
5 |
+
|
6 |
+
// Exit if accessed directly
|
7 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
8 |
+
exit;
|
9 |
+
}
|
10 |
+
|
11 |
+
function ctcc_customize_register( $wp_customize ) {
|
12 |
+
// Do stuff with $wp_customize, the WP_Customize_Manager object.
|
13 |
+
//$options = get_option( 'ctcc_styles_settings' );
|
14 |
+
//echo $options['text_color'];
|
15 |
+
|
16 |
+
$wp_customize -> add_section ( 'cctc', array (
|
17 |
+
'title' => __( 'Cookie Consent', 'uk-cookie-consent' ),
|
18 |
+
'priority' => 999
|
19 |
+
) );
|
20 |
+
|
21 |
+
$wp_customize -> add_setting( 'ctcc_styles_settings[position]', array(
|
22 |
+
'type' => 'option', // or 'option'
|
23 |
+
'capability' => 'edit_theme_options',
|
24 |
+
'theme_supports' => '', // Rarely needed.
|
25 |
+
'default' => '',
|
26 |
+
'transport' => 'refresh', // or postMessage
|
27 |
+
'sanitize_callback' => '',
|
28 |
+
'sanitize_js_callback' => '', // Basically to_json.
|
29 |
+
) );
|
30 |
+
$wp_customize -> add_control( 'ctcc_styles_settings[position]', array(
|
31 |
+
'type' => 'select',
|
32 |
+
'priority' => 1, // Within the section.
|
33 |
+
'section' => 'cctc', // Required, core or custom.
|
34 |
+
'label' => __( 'Position', 'uk-cookie-consent' ),
|
35 |
+
'choices' => array (
|
36 |
+
'top-bar' => __( 'Top Bar', 'uk-cookie-consent' ),
|
37 |
+
'bottom-bar' => __( 'Bottom Bar', 'uk-cookie-consent' ),
|
38 |
+
'top-left-block' => __( 'Top Left Block', 'uk-cookie-consent' ),
|
39 |
+
'top-right-block' => __( 'Top Right Block', 'uk-cookie-consent' ),
|
40 |
+
'bottom-left-block' => __( 'Bottom Left Block', 'uk-cookie-consent' ),
|
41 |
+
'bottom-right-block' => __( 'Bottom Right Block', 'uk-cookie-consent' ),
|
42 |
+
),
|
43 |
+
'description' => __( 'Position and placement.', 'uk-cookie-consent' )
|
44 |
+
) );
|
45 |
+
$wp_customize -> add_setting( 'ctcc_styles_settings[container_class]', array(
|
46 |
+
'type' => 'option', // or 'option'
|
47 |
+
'capability' => 'edit_theme_options',
|
48 |
+
'theme_supports' => '', // Rarely needed.
|
49 |
+
'default' => '',
|
50 |
+
'transport' => 'refresh', // or postMessage
|
51 |
+
'sanitize_callback' => '',
|
52 |
+
'sanitize_js_callback' => '', // Basically to_json.
|
53 |
+
) );
|
54 |
+
$wp_customize -> add_control( 'ctcc_styles_settings[container_class]', array(
|
55 |
+
'type' => 'text',
|
56 |
+
'priority' => 2, // Within the section.
|
57 |
+
'section' => 'cctc', // Required, core or custom.
|
58 |
+
'label' => __( 'Container Class', 'uk-cookie-consent' ),
|
59 |
+
'description' => __( 'Optional wrapper class.', 'uk-cookie-consent' )
|
60 |
+
) );
|
61 |
+
$wp_customize -> add_setting( 'ctcc_styles_settings[enqueue_styles]', array(
|
62 |
+
'type' => 'option', // or 'option'
|
63 |
+
'capability' => 'edit_theme_options',
|
64 |
+
'theme_supports' => '', // Rarely needed.
|
65 |
+
'default' => '',
|
66 |
+
'transport' => 'refresh', // or postMessage
|
67 |
+
'sanitize_callback' => '',
|
68 |
+
'sanitize_js_callback' => '', // Basically to_json.
|
69 |
+
) );
|
70 |
+
$wp_customize -> add_control( 'ctcc_styles_settings[enqueue_styles]', array(
|
71 |
+
'type' => 'checkbox',
|
72 |
+
'priority' => 4, // Within the section.
|
73 |
+
'section' => 'cctc', // Required, core or custom.
|
74 |
+
'label' => __( 'Enqueue Styles', 'uk-cookie-consent' ),
|
75 |
+
'description' => __( 'Deselect this to dequeue the plugin stylesheet.', 'uk-cookie-consent' )
|
76 |
+
) );
|
77 |
+
$wp_customize -> add_setting( 'ctcc_styles_settings[rounded_corners]', array(
|
78 |
+
'type' => 'option', // or 'option'
|
79 |
+
'capability' => 'edit_theme_options',
|
80 |
+
'theme_supports' => '', // Rarely needed.
|
81 |
+
'default' => '',
|
82 |
+
'transport' => 'refresh', // or postMessage
|
83 |
+
'sanitize_callback' => '',
|
84 |
+
'sanitize_js_callback' => '', // Basically to_json.
|
85 |
+
) );
|
86 |
+
$wp_customize -> add_control( 'ctcc_styles_settings[rounded_corners]', array(
|
87 |
+
'type' => 'checkbox',
|
88 |
+
'priority' => 6, // Within the section.
|
89 |
+
'section' => 'cctc', // Required, core or custom.
|
90 |
+
'label' => __( 'Rounded Corners', 'uk-cookie-consent' ),
|
91 |
+
'description' => __( 'Round the corners on the block.', 'uk-cookie-consent' )
|
92 |
+
) );
|
93 |
+
$wp_customize -> add_setting( 'ctcc_styles_settings[drop_shadow]', array(
|
94 |
+
'type' => 'option', // or 'option'
|
95 |
+
'capability' => 'edit_theme_options',
|
96 |
+
'theme_supports' => '', // Rarely needed.
|
97 |
+
'default' => '',
|
98 |
+
'transport' => 'refresh', // or postMessage
|
99 |
+
'sanitize_callback' => '',
|
100 |
+
'sanitize_js_callback' => '', // Basically to_json.
|
101 |
+
) );
|
102 |
+
$wp_customize -> add_control( 'ctcc_styles_settings[drop_shadow]', array(
|
103 |
+
'type' => 'checkbox',
|
104 |
+
'priority' => 8, // Within the section.
|
105 |
+
'section' => 'cctc', // Required, core or custom.
|
106 |
+
'label' => __( 'Drop Shadow', 'uk-cookie-consent' ),
|
107 |
+
'description' => __( 'Add drop shadow to the block.', 'uk-cookie-consent' )
|
108 |
+
) );
|
109 |
+
$wp_customize -> add_setting( 'ctcc_styles_settings[display_accept_with_text]', array(
|
110 |
+
'type' => 'option', // or 'option'
|
111 |
+
'capability' => 'edit_theme_options',
|
112 |
+
'theme_supports' => '', // Rarely needed.
|
113 |
+
'default' => '',
|
114 |
+
'transport' => 'refresh', // or postMessage
|
115 |
+
'sanitize_callback' => '',
|
116 |
+
'sanitize_js_callback' => '', // Basically to_json.
|
117 |
+
) );
|
118 |
+
$wp_customize -> add_control( 'ctcc_styles_settings[display_accept_with_text]', array(
|
119 |
+
'type' => 'checkbox',
|
120 |
+
'priority' => 9, // Within the section.
|
121 |
+
'section' => 'cctc', // Required, core or custom.
|
122 |
+
'label' => __( 'Display Button With Text', 'uk-cookie-consent' ),
|
123 |
+
'description' => __( 'Deselect to float button to right.', 'uk-cookie-consent' )
|
124 |
+
) );
|
125 |
+
$wp_customize -> add_setting( 'ctcc_styles_settings[x_close]', array(
|
126 |
+
'type' => 'option', // or 'option'
|
127 |
+
'capability' => 'edit_theme_options',
|
128 |
+
'theme_supports' => '', // Rarely needed.
|
129 |
+
'default' => '',
|
130 |
+
'transport' => 'refresh', // or postMessage
|
131 |
+
'sanitize_callback' => '',
|
132 |
+
'sanitize_js_callback' => '', // Basically to_json.
|
133 |
+
) );
|
134 |
+
$wp_customize -> add_control( 'ctcc_styles_settings[x_close]', array(
|
135 |
+
'type' => 'checkbox',
|
136 |
+
'priority' => 10, // Within the section.
|
137 |
+
'section' => 'cctc', // Required, core or custom.
|
138 |
+
'label' => __( 'Use X Close', 'uk-cookie-consent' ),
|
139 |
+
'description' => __( 'Replace confirmation button with \'X\' icon.', 'uk-cookie-consent' )
|
140 |
+
) );
|
141 |
+
$wp_customize -> add_setting( 'ctcc_styles_settings[text_color]', array(
|
142 |
+
'type' => 'option', // or 'option'
|
143 |
+
'capability' => 'edit_theme_options',
|
144 |
+
'theme_supports' => '', // Rarely needed.
|
145 |
+
'default' => '',
|
146 |
+
'transport' => 'refresh', // or postMessage
|
147 |
+
'sanitize_callback' => '',
|
148 |
+
'sanitize_js_callback' => '', // Basically to_json.
|
149 |
+
) );
|
150 |
+
$wp_customize -> add_control( 'ctcc_styles_settings[text_color]', array(
|
151 |
+
'type' => 'color',
|
152 |
+
'priority' => 15, // Within the section.
|
153 |
+
'section' => 'cctc', // Required, core or custom.
|
154 |
+
'label' => __( 'Text Color', 'uk-cookie-consent' ),
|
155 |
+
'description' => __( 'Text color for your notification bar.', 'uk-cookie-consent' )
|
156 |
+
) );
|
157 |
+
$wp_customize -> add_setting( 'ctcc_styles_settings[bg_color]', array(
|
158 |
+
'type' => 'option', // or 'option'
|
159 |
+
'capability' => 'edit_theme_options',
|
160 |
+
'theme_supports' => '', // Rarely needed.
|
161 |
+
'default' => '',
|
162 |
+
'transport' => 'refresh', // or postMessage
|
163 |
+
'sanitize_callback' => '',
|
164 |
+
'sanitize_js_callback' => '', // Basically to_json.
|
165 |
+
) );
|
166 |
+
$wp_customize -> add_control( 'ctcc_styles_settings[bg_color]', array(
|
167 |
+
'type' => 'color',
|
168 |
+
'priority' => 20, // Within the section.
|
169 |
+
'section' => 'cctc', // Required, core or custom.
|
170 |
+
'label' => __( 'Background Color', 'uk-cookie-consent' ),
|
171 |
+
'description' => __( 'Background color for your notification bar.', 'uk-cookie-consent' )
|
172 |
+
) );
|
173 |
+
$wp_customize -> add_setting( 'ctcc_styles_settings[link_color]', array(
|
174 |
+
'type' => 'option', // or 'option'
|
175 |
+
'capability' => 'edit_theme_options',
|
176 |
+
'theme_supports' => '', // Rarely needed.
|
177 |
+
'default' => '',
|
178 |
+
'transport' => 'refresh', // or postMessage
|
179 |
+
'sanitize_callback' => '',
|
180 |
+
'sanitize_js_callback' => '', // Basically to_json.
|
181 |
+
) );
|
182 |
+
$wp_customize -> add_control( 'ctcc_styles_settings[link_color]', array(
|
183 |
+
'type' => 'color',
|
184 |
+
'priority' => 30, // Within the section.
|
185 |
+
'section' => 'cctc', // Required, core or custom.
|
186 |
+
'label' => __( 'Link Color', 'uk-cookie-consent' ),
|
187 |
+
'description' => __( 'Link color for your notification bar.', 'uk-cookie-consent' )
|
188 |
+
) );
|
189 |
+
$wp_customize -> add_setting( 'ctcc_styles_settings[button_color]', array(
|
190 |
+
'type' => 'option', // or 'option'
|
191 |
+
'capability' => 'edit_theme_options',
|
192 |
+
'theme_supports' => '', // Rarely needed.
|
193 |
+
'default' => '',
|
194 |
+
'transport' => 'refresh', // or postMessage
|
195 |
+
'sanitize_callback' => '',
|
196 |
+
'sanitize_js_callback' => '', // Basically to_json.
|
197 |
+
) );
|
198 |
+
$wp_customize -> add_control( 'ctcc_styles_settings[button_color]', array(
|
199 |
+
'type' => 'color',
|
200 |
+
'priority' => 40, // Within the section.
|
201 |
+
'section' => 'cctc', // Required, core or custom.
|
202 |
+
'label' => __( 'Button Color', 'uk-cookie-consent' ),
|
203 |
+
'description' => __( 'Text color for your notification bar button.', 'uk-cookie-consent' )
|
204 |
+
) );
|
205 |
+
$wp_customize -> add_setting( 'ctcc_styles_settings[button_bg_color]', array(
|
206 |
+
'type' => 'option', // or 'option'
|
207 |
+
'capability' => 'edit_theme_options',
|
208 |
+
'theme_supports' => '', // Rarely needed.
|
209 |
+
'default' => '',
|
210 |
+
'transport' => 'refresh', // or postMessage
|
211 |
+
'sanitize_callback' => '',
|
212 |
+
'sanitize_js_callback' => '', // Basically to_json.
|
213 |
+
) );
|
214 |
+
$wp_customize -> add_control( 'ctcc_styles_settings[button_bg_color]', array(
|
215 |
+
'type' => 'color',
|
216 |
+
'priority' => 50, // Within the section.
|
217 |
+
'section' => 'cctc', // Required, core or custom.
|
218 |
+
'label' => __( 'Button Background', 'uk-cookie-consent' ),
|
219 |
+
'description' => __( 'Background color for your notification bar button.', 'uk-cookie-consent' )
|
220 |
+
) );
|
221 |
+
$wp_customize -> add_setting( 'ctcc_styles_settings[flat_button]', array(
|
222 |
+
'type' => 'option', // or 'option'
|
223 |
+
'capability' => 'edit_theme_options',
|
224 |
+
'theme_supports' => '', // Rarely needed.
|
225 |
+
'default' => '',
|
226 |
+
'transport' => 'refresh', // or postMessage
|
227 |
+
'sanitize_callback' => '',
|
228 |
+
'sanitize_js_callback' => '', // Basically to_json.
|
229 |
+
) );
|
230 |
+
$wp_customize -> add_control( 'ctcc_styles_settings[flat_button]', array(
|
231 |
+
'type' => 'checkbox',
|
232 |
+
'priority' => 60, // Within the section.
|
233 |
+
'section' => 'cctc', // Required, core or custom.
|
234 |
+
'label' => __( 'Flat Button', 'uk-cookie-consent' ),
|
235 |
+
'description' => __( 'Deselect to inherit button styles from the theme.', 'uk-cookie-consent' )
|
236 |
+
) );
|
237 |
+
}
|
238 |
+
add_action( 'customize_register', 'ctcc_customize_register' );
|
trunk/public/index.php
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<?php // Silence is golden
|
trunk/readme.txt
ADDED
@@ -0,0 +1,242 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
=== Cookie Consent ===
|
2 |
+
Contributors: Catapult_Themes, husobj, jraczynski
|
3 |
+
Donate Link: https://www.paypal.me/catapultthemes
|
4 |
+
Tags: cookie law, cookies, eu cookie law, eu privacy directive, cookie compliance, cookie law, cookie notice, cookie notification, wpml, geo ip
|
5 |
+
Requires at least: 4.3
|
6 |
+
Tested up to: 4.8
|
7 |
+
Stable tag: 2.3.3
|
8 |
+
License: GPLv2 or later
|
9 |
+
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
+
The only cookie consent plugin you'll ever need.
|
11 |
+
|
12 |
+
== Description ==
|
13 |
+
Cookie Consent is one of the simplest and most popular cookie notification plugins out there. It's been actively developed and supported since 2012 and has over 100 5 star reviews.
|
14 |
+
|
15 |
+
> <strong>New in 2.3.0:</strong><br>Geo IP support - choose which continents to display notifications (requires GeoIP Detect plugin to be installed)<br>
|
16 |
+
> <strong>New in 2.2.0:</strong><br>Easily select pages or posts where the cookie notification doesn't display. You now have complete control over which pages display a notification and which don't.<br>Close on scroll - optionally choose scrolling as closure method.
|
17 |
+
|
18 |
+
= Simple set up =
|
19 |
+
One of the most popular aspects of the plugin is its simplicity of use - simply install and activate the plugin to automatically add the cookie consent notification bar. There is no need to configure it. On activation, the plugin creates and populates a page on your site with information about your cookie policy and automatically links to the page from the notification bar. So if you're using the default settings, it's a matter of seconds to get up and running.
|
20 |
+
|
21 |
+
= Features =
|
22 |
+
* Choice of dismissal method - on click, on scroll, or timed
|
23 |
+
* Choice of dismissal element - either button or 'x' close
|
24 |
+
* Option to show the notification on the first page only - subsequent pages visited by the user will not display the message
|
25 |
+
* Option to exclude selected pages and posts from displaying the notification
|
26 |
+
* Choice of position - either top or bottom bar, or floating in one of the corners of the screen
|
27 |
+
* Translation support
|
28 |
+
* Responsive
|
29 |
+
* Customization options - including the ability to update styles from within the customizer
|
30 |
+
* Inherits your theme styles where possible
|
31 |
+
* The option to use an absolute or external URL to link to for further information
|
32 |
+
* Set the cookie duration
|
33 |
+
* Set the cookie version - updating a version will reset the cookie on all user sites
|
34 |
+
|
35 |
+
= Translations =
|
36 |
+
|
37 |
+
* English
|
38 |
+
* Polish (jraczynski)
|
39 |
+
* Russian
|
40 |
+
* Slovakian (lacike)
|
41 |
+
* Italian (wocmultimedia)
|
42 |
+
|
43 |
+
= EU Directive =
|
44 |
+
We think this is the simplest but most effective method of dealing with the legislation.
|
45 |
+
|
46 |
+
The plug-in is a straightforward approach to help you comply with the EU regulations regarding usage of website cookies. It follows the notion of "implied consent" as described by the UK's Information Commissioner and makes the assumption that most users who choose not to accept cookies will do so for all websites. A user to your site is presented with a clear yet unobtrusive notification that the site is using cookies and may then acknowledge and dismiss the notification or click to find out more. The plug-in automatically creates a new page with pre-populated information on cookies and how to disable them, which you may edit further if you wish.
|
47 |
+
|
48 |
+
Importantly, the plug-in does not disable cookies on your site or prevent the user from continuing to browse the site. Several plug-ins have adopted the "explicit consent" approach which obliges users to opt in to cookies on your site. This is likely to deter visitors.
|
49 |
+
|
50 |
+
== Installation ==
|
51 |
+
1. Upload the `uk-cookie-consent` folder to the `/wp-content/plugins/` directory
|
52 |
+
1. Activate the plugin through the 'Plugins' menu in WordPress
|
53 |
+
1. Browse to the Cookie Consent option page in Settings to configure
|
54 |
+
== Frequently Asked Questions ==
|
55 |
+
|
56 |
+
= Where can I find out more about this plug-in? =
|
57 |
+
You can find out more about the plug-in on [its plug-in page](http://catapultthemes.com/cookie-consent/).
|
58 |
+
= Is there a demo? =
|
59 |
+
Yep. Take a look at [the demo](http://cookieconsent.catapultthemes.com/). Reset the cookie by [going to this URL](http://cookieconsent.catapultthemes.com/?cookie=delete).
|
60 |
+
= Does this definitely cover me under the legislation? =
|
61 |
+
You have to make up your own mind about that or consult a legal expert.
|
62 |
+
= Where can I find out more about the UK laws regarding cookies? =
|
63 |
+
You will find more details of the regulations on the [Information Commissioner's Office site](http://www.ico.gov.uk/for_organisations/privacy_and_electronic_communications/the_guide/cookies.aspx).
|
64 |
+
|
65 |
+
== Screenshots ==
|
66 |
+
1. Notification bar along the top of the screen
|
67 |
+
2. Detail of notification bar on the bottom of the screen
|
68 |
+
3. Notification box in corner
|
69 |
+
4. Customization panel
|
70 |
+
5. Example settings page
|
71 |
+
|
72 |
+
== Changelog ==
|
73 |
+
|
74 |
+
= 2.3.3 =
|
75 |
+
* Added: Polylang support for more_info setting
|
76 |
+
* Added: setting to opt out of tracking
|
77 |
+
* Updated: tracking class
|
78 |
+
|
79 |
+
= 2.3.2 =
|
80 |
+
* Updated: incorrect text domains
|
81 |
+
* Updated: tracking class to 1.0.1
|
82 |
+
* Updated: removed unnecessary keys from wpml-config.xml
|
83 |
+
|
84 |
+
= 2.3.1 =
|
85 |
+
* Added: link to create privacy policy
|
86 |
+
* Added: tracking
|
87 |
+
|
88 |
+
= 2.3.0 =
|
89 |
+
* Added: GeoIP support (suggested by jeffrobbins)
|
90 |
+
|
91 |
+
= 2.2.5 =
|
92 |
+
* Fixed: dismissed notification bar obscuring content
|
93 |
+
|
94 |
+
= 2.2.4 =
|
95 |
+
* Fixed: correct escaping for more info URL
|
96 |
+
|
97 |
+
= 2.2.3 =
|
98 |
+
* Updated: stable tag
|
99 |
+
|
100 |
+
= 2.2.2 =
|
101 |
+
* Fixed: text domain in class-ctcc-metafield (spotted by mmmisiek)
|
102 |
+
|
103 |
+
= 2.2.1 =
|
104 |
+
* Updated: better escaping (suggested by djpaul)
|
105 |
+
|
106 |
+
= 2.2.0 =
|
107 |
+
* Added: optionally exclude pages and posts from displaying the cookie notification (suggested by jeffrobbins)
|
108 |
+
* Added: close notification on scroll option (suggested by jeffrobbins)
|
109 |
+
* Added: class name for more info link
|
110 |
+
* Fixed: x-close responsive margin
|
111 |
+
* Updated: allow shortcodes in notification text
|
112 |
+
* Updated: better settings sanitization
|
113 |
+
|
114 |
+
= 2.1.7 =
|
115 |
+
* Updated: admin styles
|
116 |
+
|
117 |
+
= 2.1.6 =
|
118 |
+
* Updated: wpml-config.xml file (thanks to vukvukovich)
|
119 |
+
|
120 |
+
= 2.1.5 =
|
121 |
+
* Fixed: added missing Italian translation files
|
122 |
+
|
123 |
+
= 2.1.4 =
|
124 |
+
* Fixed: replaced wpml-config.xml file
|
125 |
+
|
126 |
+
= 2.1.3 =
|
127 |
+
* Updated: tags
|
128 |
+
|
129 |
+
= 2.1.2 =
|
130 |
+
* Updated: translation list
|
131 |
+
|
132 |
+
= 2.1.1 =
|
133 |
+
* Fixed: missing images in admin
|
134 |
+
|
135 |
+
= 2.1.0 =
|
136 |
+
* Added: Italian translation (thanks to wocmultimedia)
|
137 |
+
* Added: wpml-config.xml file
|
138 |
+
* Added: filters on all content
|
139 |
+
* Fixed: x button colour set by button colour
|
140 |
+
* Updated: changed button and 'read more' elements' tabindex to 0
|
141 |
+
* Updated: x button now CSS to avoid missing Unicode character
|
142 |
+
|
143 |
+
= 2.0.12 =
|
144 |
+
* Fixed: added flex-shrink: 0 to prevent button overflowing container on mobile
|
145 |
+
= 2.0.11 =
|
146 |
+
* Fixed: syntax error in class-ctcc-public.php
|
147 |
+
= 2.0.10 =
|
148 |
+
* Added: priority on add_js
|
149 |
+
= 2.0.9 =
|
150 |
+
* Fixed: prevent JavaScript conflict by calling color picker script on non-plugin pages
|
151 |
+
= 2.0.8 =
|
152 |
+
* Updated: admin images in assets folder
|
153 |
+
= 2.0.7 =
|
154 |
+
* Added: Slovakian translation (thanks to lacike)
|
155 |
+
= 2.0.6 =
|
156 |
+
* Added: flat button option
|
157 |
+
* Added: Russian translation
|
158 |
+
= 2.0.5 =
|
159 |
+
* Fixed: notification hides correctly when stylesheet is dequeued
|
160 |
+
= 2.0.4 =
|
161 |
+
* Added: Polish translation (thanks to jraczynski for all items in this update)
|
162 |
+
* Updated: .pot file generated with l18n tool
|
163 |
+
* Updated: correct text domain in customizer.php
|
164 |
+
* Updated: removed spaces in translator functions
|
165 |
+
* Updated: plugin name translatable
|
166 |
+
= 2.0.3 =
|
167 |
+
* Fixed: more_info_target option not saving
|
168 |
+
* Fixed: button text getting cropped
|
169 |
+
* Changed: default position of accept button with notification text
|
170 |
+
= 2.0.2 =
|
171 |
+
* Fixed: retain settings from previous version
|
172 |
+
= 2.0.1 =
|
173 |
+
* Fixed: admin formatting
|
174 |
+
= 2.0.0 =
|
175 |
+
* Major rewrite
|
176 |
+
* Added: Choice of dismissal method - either on click by the user or timed
|
177 |
+
* Added: Choice of dismissal element - either button or 'x' close
|
178 |
+
* Added: Option to show the notification on the first page only - subsequent pages visited by the user will not display the message
|
179 |
+
* Added: Choice of position - either top or bottom bar, or floating in one of the corners of the screen
|
180 |
+
* Changed: Better translation support
|
181 |
+
* Changed: Better responsive support
|
182 |
+
* Changed: More customization options - including the ability to update styles from within the customizer
|
183 |
+
* Changed: Inherits your theme styles where possible
|
184 |
+
* Changed: The option to use an absolute or external URL to link to for further information
|
185 |
+
* Added: Set the cookie duration
|
186 |
+
* Added: Set the cookie version - updating a version will reset the cookie on all user sites
|
187 |
+
= 1.8.2 =
|
188 |
+
* Admin update
|
189 |
+
|
190 |
+
= 1.8.1 =
|
191 |
+
* Fixed empty space at top of screen when bar is located at the bottom of screen
|
192 |
+
= 1.8 =
|
193 |
+
* Move HTML down to accommodate notification bar rather than obscuring content
|
194 |
+
* Enqueues JS in footer
|
195 |
+
* Improved translation support
|
196 |
+
= 1.7.1 =
|
197 |
+
* Ready for WP 3.8
|
198 |
+
= 1.7 =
|
199 |
+
* Updates to settings page
|
200 |
+
= 1.6 =
|
201 |
+
* Moved JS to footer (thanks to Andreas Larsen for the suggestion)
|
202 |
+
= 1.5 =
|
203 |
+
* Switched the logic so that the bar is initially hidden on the page and only displays if user has not previously dismissed it.
|
204 |
+
* Gives a slightly better performance.
|
205 |
+
* Thanks to chrisHe for the suggestion.
|
206 |
+
= 1.4.2. =
|
207 |
+
* Policy page created on register_activation_hook now
|
208 |
+
= 1.4.1 =
|
209 |
+
* Tweak to ensure jQuery is a dependency
|
210 |
+
= 1.4 =
|
211 |
+
* This plug-in now uses JavaScript to test whether the user has dismissed the front-end notification in order to solve issues with caching plug-ins.
|
212 |
+
* Added configuration options for colour and position of bar.
|
213 |
+
* Set notification button and link to first element in tab list.
|
214 |
+
* Thanks to husobj for contributions and suggestions including localisation and enqueueing scripts and stylesheets
|
215 |
+
= 1.3 =
|
216 |
+
* Reinstated user-defined permalink field
|
217 |
+
= 1.25 =
|
218 |
+
* Minor admin update
|
219 |
+
= 1.24 =
|
220 |
+
* Fixed text alignment issue with Thesis framework (thanks to cavnit for pointing this one out)
|
221 |
+
= 1.23 =
|
222 |
+
* Minor admin update
|
223 |
+
= 1.22 =
|
224 |
+
* Minor admin update
|
225 |
+
|
226 |
+
= 1.21 =
|
227 |
+
* Added resources to Settings page
|
228 |
+
= 1.2 =
|
229 |
+
* Change title of Cookies page to Cookie Policy and removed option to change title
|
230 |
+
* Added trailing slash to Cookie Policy url (thanks to mikeotgaar for spotting this)
|
231 |
+
= 1.1 =
|
232 |
+
* Added default text to messages
|
233 |
+
|
234 |
+
== Translations ==
|
235 |
+
* English
|
236 |
+
* Polish
|
237 |
+
* Russian
|
238 |
+
* Slovakian
|
239 |
+
* Italian
|
240 |
+
|
241 |
+
== Upgrade Notice ==
|
242 |
+
Please note that the upgrade to version 2.x is significant. Although we've made every effort to ensure your settings are retained from previous versions, you may notice minor design differences to the notification bar.
|
trunk/tracking/class-plugin-usage-tracker.php
ADDED
@@ -0,0 +1,842 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* This is the class that sends all the data back to the home site
|
4 |
+
* It also handles opting in and deactivation
|
5 |
+
* @version 1.1.1
|
6 |
+
*/
|
7 |
+
|
8 |
+
// Exit if accessed directly
|
9 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
+
exit;
|
11 |
+
}
|
12 |
+
|
13 |
+
if( ! class_exists( 'Plugin_Usage_Tracker') ) {
|
14 |
+
|
15 |
+
class Plugin_Usage_Tracker {
|
16 |
+
|
17 |
+
private $wisdom_version = '1.1.1';
|
18 |
+
private $home_url = '';
|
19 |
+
private $plugin_file = '';
|
20 |
+
private $plugin_name = '';
|
21 |
+
private $options = array();
|
22 |
+
private $require_optin = true;
|
23 |
+
private $include_goodbye_form = true;
|
24 |
+
private $marketing = false;
|
25 |
+
private $collect_email = false;
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Class constructor
|
29 |
+
*
|
30 |
+
* @param $_home_url The URL to the site we're sending data to
|
31 |
+
* @param $_plugin_file The file path for this plugin
|
32 |
+
* @param $_options Plugin options to track
|
33 |
+
* @param $_require_optin Whether user opt-in is required (always required on WordPress.org)
|
34 |
+
* @param $_include_goodbye_form Whether to include a form when the user deactivates
|
35 |
+
* @param $_marketing Marketing method:
|
36 |
+
* 0: Don't collect email addresses
|
37 |
+
* 1: Request permission same time as tracking opt-in
|
38 |
+
* 2: Request permission after opt-in
|
39 |
+
*/
|
40 |
+
public function __construct(
|
41 |
+
$_plugin_file,
|
42 |
+
$_home_url,
|
43 |
+
$_options,
|
44 |
+
$_require_optin=true,
|
45 |
+
$_include_goodbye_form=true,
|
46 |
+
$_marketing=false ) {
|
47 |
+
|
48 |
+
$this->plugin_file = $_plugin_file;
|
49 |
+
$this->home_url = trailingslashit( $_home_url );
|
50 |
+
$this->plugin_name = basename( $this->plugin_file, '.php' );
|
51 |
+
$this->options = $_options;
|
52 |
+
$this->require_optin = $_require_optin;
|
53 |
+
$this->include_goodbye_form = $_include_goodbye_form;
|
54 |
+
$this->marketing = $_marketing;
|
55 |
+
|
56 |
+
// Schedule some tracking when activated
|
57 |
+
register_activation_hook( $this->plugin_file, array( $this, 'schedule_tracking' ) );
|
58 |
+
// Deactivation hook
|
59 |
+
register_deactivation_hook( $this->plugin_file, array( $this, 'deactivate_this_plugin' ) );
|
60 |
+
|
61 |
+
// Get it going
|
62 |
+
$this->init();
|
63 |
+
|
64 |
+
}
|
65 |
+
|
66 |
+
public function init() {
|
67 |
+
// Check marketing
|
68 |
+
if( $this->marketing == 3 ) {
|
69 |
+
$this->set_can_collect_email( true, $this->plugin_name );
|
70 |
+
}
|
71 |
+
|
72 |
+
// Check whether opt-in is required
|
73 |
+
// If not, then tracking is allowed
|
74 |
+
if( ! $this->require_optin ) {
|
75 |
+
$this->set_is_tracking_allowed( true );
|
76 |
+
$this->update_block_notice();
|
77 |
+
$this->do_tracking();
|
78 |
+
}
|
79 |
+
|
80 |
+
// Hook our do_tracking function to the daily action
|
81 |
+
// add_filter( 'cron_schedules', array( $this, 'add_weekly_cron_schedule' ) );
|
82 |
+
add_action( 'put_do_weekly_action', array( $this, 'do_tracking' ) );
|
83 |
+
|
84 |
+
// Use this action for local testing
|
85 |
+
// add_action( 'admin_init', array( $this, 'do_tracking' ) );
|
86 |
+
|
87 |
+
// Display the admin notice on activation
|
88 |
+
add_action( 'admin_notices', array( $this, 'optin_notice' ) );
|
89 |
+
add_action( 'admin_notices', array( $this, 'marketing_notice' ) );
|
90 |
+
|
91 |
+
// Deactivation
|
92 |
+
add_filter( 'plugin_action_links_' . plugin_basename( $this->plugin_file ), array( $this, 'filter_action_links' ) );
|
93 |
+
add_action( 'admin_footer-plugins.php', array( $this, 'goodbye_ajax' ) );
|
94 |
+
add_action( 'wp_ajax_goodbye_form', array( $this, 'goodbye_form_callback' ) );
|
95 |
+
|
96 |
+
}
|
97 |
+
|
98 |
+
/**
|
99 |
+
* Add weekly option to the cron schedule
|
100 |
+
*
|
101 |
+
* @since 1.1.2
|
102 |
+
*/
|
103 |
+
public function add_weekly_cron_schedule( $schedules ) {
|
104 |
+
$schedules['weekly'] = array(
|
105 |
+
'interval' => 604800,
|
106 |
+
'display' => __( 'Once weekly', 'put-usage-tracker' )
|
107 |
+
);
|
108 |
+
return $schedules;
|
109 |
+
}
|
110 |
+
|
111 |
+
/**
|
112 |
+
* When the plugin is activated
|
113 |
+
* Create scheduled event
|
114 |
+
* And check if tracking is enabled - perhaps the plugin has been reactivated
|
115 |
+
*
|
116 |
+
* @since 1.0.0
|
117 |
+
*/
|
118 |
+
public function schedule_tracking() {
|
119 |
+
// For historical reasons, this is called 'weekly' but is in fact daily
|
120 |
+
if ( ! wp_next_scheduled( 'put_do_weekly_action' ) ) {
|
121 |
+
wp_schedule_event( time(), 'daily', 'put_do_weekly_action' );
|
122 |
+
}
|
123 |
+
// Run tracking here in case plugin has been reactivated
|
124 |
+
$this->do_tracking();
|
125 |
+
}
|
126 |
+
|
127 |
+
/**
|
128 |
+
* This is our function to get everything going
|
129 |
+
* Check that user has opted in
|
130 |
+
* Collect data
|
131 |
+
* Then send it back
|
132 |
+
*
|
133 |
+
* @since 1.0.0
|
134 |
+
*/
|
135 |
+
public function do_tracking() {
|
136 |
+
// If the home site hasn't been defined, we just drop out. Nothing much we can do.
|
137 |
+
if ( ! $this->home_url ) {
|
138 |
+
return;
|
139 |
+
}
|
140 |
+
|
141 |
+
// Check to see if the user has opted in to tracking
|
142 |
+
$allow_tracking = $this->get_is_tracking_allowed();
|
143 |
+
if( ! $allow_tracking ) {
|
144 |
+
return;
|
145 |
+
}
|
146 |
+
|
147 |
+
// Check to see if it's time to track
|
148 |
+
$track_time = $this->get_is_time_to_track();
|
149 |
+
if( ! $track_time ) {
|
150 |
+
return;
|
151 |
+
}
|
152 |
+
|
153 |
+
// Get our data
|
154 |
+
$body = $this->get_data();
|
155 |
+
|
156 |
+
// Send the data
|
157 |
+
$this->send_data( $body );
|
158 |
+
|
159 |
+
}
|
160 |
+
|
161 |
+
/**
|
162 |
+
* Send the data to the home site
|
163 |
+
*
|
164 |
+
* @since 1.0.0
|
165 |
+
*/
|
166 |
+
public function send_data( $body ) {
|
167 |
+
|
168 |
+
$request = wp_remote_post(
|
169 |
+
esc_url( $this->home_url . '?usage_tracker=hello' ),
|
170 |
+
array(
|
171 |
+
'method' => 'POST',
|
172 |
+
'timeout' => 20,
|
173 |
+
'redirection' => 5,
|
174 |
+
'httpversion' => '1.1',
|
175 |
+
'blocking' => true,
|
176 |
+
'body' => $body,
|
177 |
+
'user-agent' => 'PUT/1.0.0; ' . get_bloginfo( 'url' )
|
178 |
+
)
|
179 |
+
);
|
180 |
+
|
181 |
+
$this->set_track_time();
|
182 |
+
|
183 |
+
if( is_wp_error( $request ) ) {
|
184 |
+
return $request;
|
185 |
+
}
|
186 |
+
|
187 |
+
}
|
188 |
+
|
189 |
+
/**
|
190 |
+
* Here we collect most of the data
|
191 |
+
*
|
192 |
+
* @since 1.0.0
|
193 |
+
*/
|
194 |
+
public function get_data() {
|
195 |
+
|
196 |
+
// Use this to pass error messages back if necessary
|
197 |
+
$body['message'] = '';
|
198 |
+
|
199 |
+
// Use this array to send data back
|
200 |
+
$body = array(
|
201 |
+
'plugin_slug' => sanitize_text_field( $this->plugin_name ),
|
202 |
+
'url' => get_bloginfo( 'url' ),
|
203 |
+
'site_name' => get_bloginfo( 'name' ),
|
204 |
+
'site_version' => get_bloginfo( 'version' ),
|
205 |
+
'site_language' => get_bloginfo( 'language' ),
|
206 |
+
'charset' => get_bloginfo( 'charset' ),
|
207 |
+
'wisdom_version' => $this->wisdom_version,
|
208 |
+
'php_version' => phpversion(),
|
209 |
+
'multisite' => is_multisite(),
|
210 |
+
'file_location' => __FILE__
|
211 |
+
);
|
212 |
+
|
213 |
+
// Collect the email if the correct option has been set
|
214 |
+
if( $this->get_can_collect_email() ) {
|
215 |
+
$body['email'] = get_bloginfo( 'admin_email' );
|
216 |
+
}
|
217 |
+
$body['marketing_method'] = $this->marketing;
|
218 |
+
|
219 |
+
$body['server'] = isset( $_SERVER['SERVER_SOFTWARE'] ) ? $_SERVER['SERVER_SOFTWARE'] : '';
|
220 |
+
|
221 |
+
// Retrieve current plugin information
|
222 |
+
if( ! function_exists( 'get_plugins' ) ) {
|
223 |
+
include ABSPATH . '/wp-admin/includes/plugin.php';
|
224 |
+
}
|
225 |
+
|
226 |
+
$plugins = array_keys( get_plugins() );
|
227 |
+
$active_plugins = get_option( 'active_plugins', array() );
|
228 |
+
|
229 |
+
foreach ( $plugins as $key => $plugin ) {
|
230 |
+
if ( in_array( $plugin, $active_plugins ) ) {
|
231 |
+
// Remove active plugins from list so we can show active and inactive separately
|
232 |
+
unset( $plugins[$key] );
|
233 |
+
}
|
234 |
+
}
|
235 |
+
|
236 |
+
$body['active_plugins'] = $active_plugins;
|
237 |
+
$body['inactive_plugins'] = $plugins;
|
238 |
+
|
239 |
+
// Check text direction
|
240 |
+
$body['text_direction'] = 'LTR';
|
241 |
+
if( function_exists( 'is_rtl' ) ) {
|
242 |
+
if( is_rtl() ) {
|
243 |
+
$body['text_direction'] = 'RTL';
|
244 |
+
}
|
245 |
+
} else {
|
246 |
+
$body['text_direction'] = 'not set';
|
247 |
+
}
|
248 |
+
|
249 |
+
/**
|
250 |
+
* Get our plugin data
|
251 |
+
* Currently we grab plugin name and version
|
252 |
+
* Or, return a message if the plugin data is not available
|
253 |
+
* @since 1.0.0
|
254 |
+
*/
|
255 |
+
$plugin = $this->plugin_data();
|
256 |
+
if( empty( $plugin ) ) {
|
257 |
+
// We can't find the plugin data
|
258 |
+
// Send a message back to our home site
|
259 |
+
$body['message'] .= __( 'We can\'t detect any plugin information. This is most probably because you have not included the code in the plugin main file.', 'plugin-usage-tracker' );
|
260 |
+
$body['status'] = 'Data not found'; // Never translated
|
261 |
+
} else {
|
262 |
+
if( isset( $plugin['Name'] ) ) {
|
263 |
+
$body['plugin'] = sanitize_text_field( $plugin['Name'] );
|
264 |
+
}
|
265 |
+
if( isset( $plugin['Version'] ) ) {
|
266 |
+
$body['version'] = sanitize_text_field( $plugin['Version'] );
|
267 |
+
}
|
268 |
+
$body['status'] = 'Active'; // Never translated
|
269 |
+
}
|
270 |
+
|
271 |
+
/**
|
272 |
+
* Get our plugin options
|
273 |
+
* @since 1.0.0
|
274 |
+
*/
|
275 |
+
$options = $this->options;
|
276 |
+
$plugin_options = array();
|
277 |
+
if( ! empty( $options ) && is_array( $options ) ) {
|
278 |
+
foreach( $options as $option ) {
|
279 |
+
$fields = get_option( $option );
|
280 |
+
// Check for permission to send this option
|
281 |
+
if( isset( $fields['wisdom_registered_setting'] ) ) {
|
282 |
+
foreach( $fields as $key=>$value ) {
|
283 |
+
$plugin_options[$key] = $value;
|
284 |
+
}
|
285 |
+
}
|
286 |
+
}
|
287 |
+
}
|
288 |
+
$body['plugin_options'] = $this->options; // Returns array
|
289 |
+
$body['plugin_options_fields'] = $plugin_options; // Returns object
|
290 |
+
|
291 |
+
/**
|
292 |
+
* Get our theme data
|
293 |
+
* Currently we grab theme name and version
|
294 |
+
* @since 1.0.0
|
295 |
+
*/
|
296 |
+
$theme = wp_get_theme();
|
297 |
+
if( $theme->Name ) {
|
298 |
+
$body['theme'] = sanitize_text_field( $theme->Name );
|
299 |
+
}
|
300 |
+
if( $theme->Version ) {
|
301 |
+
$body['theme_version'] = sanitize_text_field( $theme->Version );
|
302 |
+
}
|
303 |
+
|
304 |
+
// Return the data
|
305 |
+
return $body;
|
306 |
+
|
307 |
+
}
|
308 |
+
|
309 |
+
/**
|
310 |
+
* Return plugin data
|
311 |
+
* @since 1.0.0
|
312 |
+
*/
|
313 |
+
public function plugin_data() {
|
314 |
+
// Being cautious here
|
315 |
+
if( ! function_exists( 'get_plugin_data' ) ) {
|
316 |
+
include ABSPATH . '/wp-admin/includes/plugin.php';
|
317 |
+
}
|
318 |
+
// Retrieve current plugin information
|
319 |
+
$plugin = get_plugin_data( $this->plugin_file );
|
320 |
+
return $plugin;
|
321 |
+
}
|
322 |
+
|
323 |
+
/**
|
324 |
+
* Deactivating plugin
|
325 |
+
* @since 1.0.0
|
326 |
+
*/
|
327 |
+
public function deactivate_this_plugin() {
|
328 |
+
// Check to see if the user has opted in to tracking
|
329 |
+
$allow_tracking = $this->get_is_tracking_allowed();
|
330 |
+
if( ! $allow_tracking ) {
|
331 |
+
return;
|
332 |
+
}
|
333 |
+
$body = $this->get_data();
|
334 |
+
$body['status'] = 'Deactivated'; // Never translated
|
335 |
+
$body['deactivated_date'] = time();
|
336 |
+
|
337 |
+
// Add deactivation form data
|
338 |
+
if( false !== get_option( 'wisdom_deactivation_reason_' . $this->plugin_name ) ) {
|
339 |
+
$body['deactivation_reason'] = get_option( 'wisdom_deactivation_reason_' . $this->plugin_name );
|
340 |
+
}
|
341 |
+
if( false !== get_option( 'wisdom_deactivation_details_' . $this->plugin_name ) ) {
|
342 |
+
$body['deactivation_details'] = get_option( 'wisdom_deactivation_details_' . $this->plugin_name );
|
343 |
+
}
|
344 |
+
|
345 |
+
$this->send_data( $body );
|
346 |
+
// Clear scheduled update
|
347 |
+
wp_clear_scheduled_hook( 'put_do_weekly_action' );
|
348 |
+
}
|
349 |
+
|
350 |
+
/**
|
351 |
+
* Is tracking allowed?
|
352 |
+
* @since 1.0.0
|
353 |
+
*/
|
354 |
+
public function get_is_tracking_allowed() {
|
355 |
+
// First, check if the user has changed their mind and opted out of tracking
|
356 |
+
if( $this->has_user_opted_out() ) {
|
357 |
+
$this->set_is_tracking_allowed( false, $this->plugin_name );
|
358 |
+
return false;
|
359 |
+
}
|
360 |
+
// The wisdom_allow_tracking option is an array of plugins that are being tracked
|
361 |
+
$allow_tracking = get_option( 'wisdom_allow_tracking' );
|
362 |
+
// If this plugin is in the array, then tracking is allowed
|
363 |
+
if( isset( $allow_tracking[$this->plugin_name] ) ) {
|
364 |
+
return true;
|
365 |
+
}
|
366 |
+
return false;
|
367 |
+
}
|
368 |
+
|
369 |
+
/**
|
370 |
+
* Set if tracking is allowed
|
371 |
+
* Option is an array of all plugins with tracking permitted
|
372 |
+
* More than one plugin may be using the tracker
|
373 |
+
* @since 1.0.0
|
374 |
+
* @param $is_allowed Boolean true if tracking is allowed, false if not
|
375 |
+
*/
|
376 |
+
public function set_is_tracking_allowed( $is_allowed, $plugin=null ) {
|
377 |
+
if( empty( $plugin ) ) {
|
378 |
+
$plugin = $this->plugin_name;
|
379 |
+
}
|
380 |
+
// The wisdom_allow_tracking option is an array of plugins that are being tracked
|
381 |
+
$allow_tracking = get_option( 'wisdom_allow_tracking' );
|
382 |
+
|
383 |
+
// If the user has decided to opt out
|
384 |
+
if( $this->has_user_opted_out() ) {
|
385 |
+
if( isset( $allow_tracking[$plugin] ) ) {
|
386 |
+
unset( $allow_tracking[$plugin] );
|
387 |
+
}
|
388 |
+
} else if( $is_allowed || ! $this->require_optin ) {
|
389 |
+
// If the user has agreed to allow tracking or if opt-in is not required
|
390 |
+
if( empty( $allow_tracking ) || ! is_array( $allow_tracking ) ) {
|
391 |
+
// If nothing exists in the option yet, start a new array with the plugin name
|
392 |
+
$allow_tracking = array( $plugin => $plugin );
|
393 |
+
} else {
|
394 |
+
// Else add the plugin name to the array
|
395 |
+
$allow_tracking[$plugin] = $plugin;
|
396 |
+
}
|
397 |
+
} else {
|
398 |
+
if( isset( $allow_tracking[$plugin] ) ) {
|
399 |
+
unset( $allow_tracking[$plugin] );
|
400 |
+
}
|
401 |
+
}
|
402 |
+
update_option( 'wisdom_allow_tracking', $allow_tracking );
|
403 |
+
}
|
404 |
+
|
405 |
+
/**
|
406 |
+
* Has the user opted out of allowing tracking?
|
407 |
+
* @since 1.1.0
|
408 |
+
* @return Boolean
|
409 |
+
*/
|
410 |
+
public function has_user_opted_out() {
|
411 |
+
// Iterate through the options that are being tracked looking for wisdom_opt_out setting
|
412 |
+
if( ! empty( $this->options ) ) {
|
413 |
+
foreach( $this->options as $option_name ) {
|
414 |
+
// Check each option
|
415 |
+
$options = get_option( $option_name );
|
416 |
+
// If we find the setting, return true
|
417 |
+
if( ! empty( $options['wisdom_opt_out'] ) ) {
|
418 |
+
return true;
|
419 |
+
}
|
420 |
+
}
|
421 |
+
}
|
422 |
+
return false;
|
423 |
+
}
|
424 |
+
|
425 |
+
/**
|
426 |
+
* Check if it's time to track
|
427 |
+
* @since 1.1.1
|
428 |
+
*/
|
429 |
+
public function get_is_time_to_track() {
|
430 |
+
// Let's see if we're due to track this plugin yet
|
431 |
+
$track_times = get_option( 'wisdom_last_track_time', array() );
|
432 |
+
if( ! isset( $track_times[$this->plugin_name] ) ) {
|
433 |
+
// If we haven't set a time for this plugin yet, then we must track it
|
434 |
+
return true;
|
435 |
+
} else {
|
436 |
+
// If the time is set, let's see if it's more than a day ago
|
437 |
+
if( $track_times[$this->plugin_name] < strtotime( '-1 day' ) ) {
|
438 |
+
return true;
|
439 |
+
}
|
440 |
+
}
|
441 |
+
return false;
|
442 |
+
}
|
443 |
+
|
444 |
+
/**
|
445 |
+
* Record the time we send tracking data
|
446 |
+
* @since 1.1.1
|
447 |
+
*/
|
448 |
+
public function set_track_time() {
|
449 |
+
// We've tracked, so record the time
|
450 |
+
$track_times = get_option( 'wisdom_last_track_time', array() );
|
451 |
+
// Set different times according to plugin, in case we are tracking multiple plugins
|
452 |
+
$track_times[$this->plugin_name] = time();
|
453 |
+
update_option( 'wisdom_last_track_time', $track_times );
|
454 |
+
}
|
455 |
+
|
456 |
+
/**
|
457 |
+
* Set if we should block the opt-in notice for this plugin
|
458 |
+
* Option is an array of all plugins that have received a response from the user
|
459 |
+
* @since 1.0.0
|
460 |
+
*/
|
461 |
+
public function update_block_notice( $plugin=null ) {
|
462 |
+
if( empty( $plugin ) ) {
|
463 |
+
$plugin = $this->plugin_name;
|
464 |
+
}
|
465 |
+
$block_notice = get_option( 'wisdom_block_notice' );
|
466 |
+
if( empty( $block_notice ) || ! is_array( $block_notice ) ) {
|
467 |
+
// If nothing exists in the option yet, start a new array with the plugin name
|
468 |
+
$block_notice = array( $plugin => $plugin );
|
469 |
+
} else {
|
470 |
+
// Else add the plugin name to the array
|
471 |
+
$block_notice[$plugin] = $plugin;
|
472 |
+
}
|
473 |
+
update_option( 'wisdom_block_notice', $block_notice );
|
474 |
+
}
|
475 |
+
|
476 |
+
/**
|
477 |
+
* Can we collect the email address?
|
478 |
+
* @since 1.0.0
|
479 |
+
*/
|
480 |
+
public function get_can_collect_email() {
|
481 |
+
// The wisdom_collect_email option is an array of plugins that are being tracked
|
482 |
+
$collect_email = get_option( 'wisdom_collect_email' );
|
483 |
+
// If this plugin is in the array, then we can collect the email address
|
484 |
+
if( isset( $collect_email[$this->plugin_name] ) ) {
|
485 |
+
return true;
|
486 |
+
}
|
487 |
+
return false;
|
488 |
+
}
|
489 |
+
|
490 |
+
/**
|
491 |
+
* Set if user has allowed us to collect their email address
|
492 |
+
* Option is an array of all plugins with email collection permitted
|
493 |
+
* More than one plugin may be using the tracker
|
494 |
+
* @since 1.0.0
|
495 |
+
* @param $can_collect Boolean true if collection is allowed, false if not
|
496 |
+
*/
|
497 |
+
public function set_can_collect_email( $can_collect, $plugin=null ) {
|
498 |
+
if( empty( $plugin ) ) {
|
499 |
+
$plugin = $this->plugin_name;
|
500 |
+
}
|
501 |
+
// The wisdom_collect_email option is an array of plugins that are being tracked
|
502 |
+
$collect_email = get_option( 'wisdom_collect_email' );
|
503 |
+
// If the user has agreed to allow tracking or if opt-in is not required
|
504 |
+
if( $can_collect ) {
|
505 |
+
if( empty( $collect_email ) || ! is_array( $collect_email ) ) {
|
506 |
+
// If nothing exists in the option yet, start a new array with the plugin name
|
507 |
+
$collect_email = array( $plugin => $plugin );
|
508 |
+
} else {
|
509 |
+
// Else add the plugin name to the array
|
510 |
+
$collect_email[$plugin] = $plugin;
|
511 |
+
}
|
512 |
+
} else {
|
513 |
+
if( isset( $collect_email[$plugin] ) ) {
|
514 |
+
unset( $collect_email[$plugin] );
|
515 |
+
}
|
516 |
+
}
|
517 |
+
update_option( 'wisdom_collect_email', $collect_email );
|
518 |
+
}
|
519 |
+
|
520 |
+
/**
|
521 |
+
* Display the admin notice to users to allow them to opt in
|
522 |
+
*
|
523 |
+
* @since 1.0.0
|
524 |
+
*/
|
525 |
+
public function optin_notice() {
|
526 |
+
// Check for plugin args
|
527 |
+
if( isset( $_GET['plugin'] ) && isset( $_GET['plugin_action'] ) ) {
|
528 |
+
$plugin = sanitize_text_field( $_GET['plugin'] );
|
529 |
+
$action = sanitize_text_field( $_GET['plugin_action'] );
|
530 |
+
if( $action == 'yes' ) {
|
531 |
+
$this->set_is_tracking_allowed( true, $plugin );
|
532 |
+
$this->do_tracking(); // Run this straightaway
|
533 |
+
} else {
|
534 |
+
$this->set_is_tracking_allowed( false, $plugin );
|
535 |
+
}
|
536 |
+
$this->update_block_notice( $plugin );
|
537 |
+
}
|
538 |
+
|
539 |
+
// Check whether to block the notice, e.g. because we're in a local environment
|
540 |
+
// wisdom_block_notice works the same as wisdom_allow_tracking, an array of plugin names
|
541 |
+
$block_notice = get_option( 'wisdom_block_notice' );
|
542 |
+
if( isset( $block_notice[$this->plugin_name] ) ) {
|
543 |
+
return;
|
544 |
+
}
|
545 |
+
|
546 |
+
if ( ! current_user_can( 'manage_options' ) ) {
|
547 |
+
return;
|
548 |
+
}
|
549 |
+
|
550 |
+
// @credit EDD
|
551 |
+
// Don't bother asking user to opt in if they're in local dev
|
552 |
+
if ( stristr( network_site_url( '/' ), 'dev' ) !== false || stristr( network_site_url( '/' ), 'localhost' ) !== false || stristr( network_site_url( '/' ), ':8888' ) !== false ) {
|
553 |
+
$this->update_block_notice();
|
554 |
+
} else {
|
555 |
+
|
556 |
+
// Display the notice requesting permission to track
|
557 |
+
// Retrieve current plugin information
|
558 |
+
$plugin = $this->plugin_data();
|
559 |
+
$plugin_name = $plugin['Name'];
|
560 |
+
|
561 |
+
// Args to add to query if user opts in to tracking
|
562 |
+
$yes_args = array(
|
563 |
+
'plugin' => $this->plugin_name,
|
564 |
+
'plugin_action' => 'yes'
|
565 |
+
);
|
566 |
+
|
567 |
+
// Decide how to request permission to collect email addresses
|
568 |
+
if( $this->marketing == 1 ) {
|
569 |
+
// Option 1 combines permissions to track and collect email
|
570 |
+
$yes_args['marketing_optin'] = 'yes';
|
571 |
+
} else if( $this->marketing == 2 ) {
|
572 |
+
// Option 2 enables a second notice that fires after the user opts in to tracking
|
573 |
+
$yes_args['marketing'] = 'yes';
|
574 |
+
}
|
575 |
+
$url_yes = add_query_arg( $yes_args );
|
576 |
+
$url_no = add_query_arg( array(
|
577 |
+
'plugin' => $this->plugin_name,
|
578 |
+
'plugin_action' => 'no'
|
579 |
+
) );
|
580 |
+
|
581 |
+
// Decide on notice text
|
582 |
+
if( $this->marketing != 1 ) {
|
583 |
+
// Standard notice text
|
584 |
+
$notice_text = __( 'Thank you for installing our plugin. We would like to track its usage on your site. We don\'t record any sensitive data, only information regarding the WordPress environment and plugin settings, which we will use to help us make improvements to the plugin. Tracking is completely optional.', 'plugin-usage-tracker' );
|
585 |
+
} else {
|
586 |
+
// If we have option 1 for marketing, we include reference to sending product information here
|
587 |
+
$notice_text = __( 'Thank you for installing our plugin. We\'d like your permission to track its usage on your site and subscribe you to our newsletter. We won\'t record any sensitive data, only information regarding the WordPress environment and plugin settings, which we will use to help us make improvements to the plugin. Tracking is completely optional.', 'plugin-usage-tracker' );
|
588 |
+
}
|
589 |
+
// And we allow you to filter the text anyway
|
590 |
+
$notice_text = apply_filters( 'wisdom_notice_text_' . esc_attr( $this->plugin_name ), $notice_text ); ?>
|
591 |
+
|
592 |
+
<div class="notice notice-info updated put-dismiss-notice">
|
593 |
+
<p><?php echo '<strong>' . esc_html( $plugin_name ) . '</strong>'; ?></p>
|
594 |
+
<p><?php echo esc_html( $notice_text ); ?></p>
|
595 |
+
<p>
|
596 |
+
<a href="<?php echo esc_url( $url_yes ); ?>" class="button-secondary"><?php _e( 'Allow', 'plugin-usage-tracker' ); ?></a>
|
597 |
+
<a href="<?php echo esc_url( $url_no ); ?>" class="button-secondary"><?php _e( 'Do Not Allow', 'plugin-usage-tracker' ); ?></a>
|
598 |
+
</p>
|
599 |
+
</div>
|
600 |
+
<?php
|
601 |
+
}
|
602 |
+
|
603 |
+
}
|
604 |
+
|
605 |
+
/**
|
606 |
+
* Display the marketing notice to users if enabled
|
607 |
+
* Only displays after the user has opted in to tracking
|
608 |
+
*
|
609 |
+
* @since 1.0.0
|
610 |
+
*/
|
611 |
+
public function marketing_notice() {
|
612 |
+
// Check if user has opted in to marketing
|
613 |
+
if( isset( $_GET['marketing_optin'] ) ) {
|
614 |
+
// Set marketing optin
|
615 |
+
$this->set_can_collect_email( sanitize_text_field( $_GET['marketing_optin'] ), $this->plugin_name );
|
616 |
+
// Do tracking
|
617 |
+
$this->do_tracking();
|
618 |
+
} else if( isset( $_GET['marketing'] ) && $_GET['marketing']=='yes' ) {
|
619 |
+
// Display the notice requesting permission to collect email address
|
620 |
+
// Retrieve current plugin information
|
621 |
+
$plugin = $this->plugin_data();
|
622 |
+
$plugin_name = $plugin['Name'];
|
623 |
+
|
624 |
+
$url_yes = add_query_arg( array(
|
625 |
+
'plugin' => $this->plugin_name,
|
626 |
+
'marketing_optin' => 'yes'
|
627 |
+
) );
|
628 |
+
$url_no = add_query_arg( array(
|
629 |
+
'plugin' => $this->plugin_name,
|
630 |
+
'marketing_optin' => 'no'
|
631 |
+
) );
|
632 |
+
|
633 |
+
$marketing_text = __( 'Thank you for opting in to tracking. Would you like to receive occasional news about this plugin, including details of new features and special offers?', 'plugin-usage-tracker' );
|
634 |
+
$marketing_text = apply_filters( 'wisdom_marketing_text_' . esc_attr( $this->plugin_name ), $marketing_text ); ?>
|
635 |
+
|
636 |
+
<div class="notice notice-info updated put-dismiss-notice">
|
637 |
+
<p><?php echo '<strong>' . esc_html( $plugin_name ) . '</strong>'; ?></p>
|
638 |
+
<p><?php echo esc_html( $marketing_text ); ?></p>
|
639 |
+
<p>
|
640 |
+
<a href="<?php echo esc_url( $url_yes ); ?>" data-putnotice="yes" class="button-secondary"><?php _e( 'Yes Please', 'plugin-usage-tracker' ); ?></a>
|
641 |
+
<a href="<?php echo esc_url( $url_no ); ?>" data-putnotice="no" class="button-secondary"><?php _e( 'No Thank You', 'plugin-usage-tracker' ); ?></a>
|
642 |
+
</p>
|
643 |
+
</div>
|
644 |
+
<?php }
|
645 |
+
}
|
646 |
+
|
647 |
+
/**
|
648 |
+
* Filter the deactivation link to allow us to present a form when the user deactivates the plugin
|
649 |
+
* @since 1.0.0
|
650 |
+
*/
|
651 |
+
public function filter_action_links( $links ) {
|
652 |
+
// Check to see if the user has opted in to tracking
|
653 |
+
if( ! $this->get_is_tracking_allowed() ) {
|
654 |
+
return $links;
|
655 |
+
}
|
656 |
+
if( isset( $links['deactivate'] ) && $this->include_goodbye_form ) {
|
657 |
+
$deactivation_link = $links['deactivate'];
|
658 |
+
// Insert an onClick action to allow form before deactivating
|
659 |
+
$deactivation_link = str_replace( '<a ', '<div class="put-goodbye-form-wrapper"><span class="put-goodbye-form" id="put-goodbye-form-' . esc_attr( $this->plugin_name ) . '"></span></div><a onclick="javascript:event.preventDefault();" id="put-goodbye-link-' . esc_attr( $this->plugin_name ) . '" ', $deactivation_link );
|
660 |
+
$links['deactivate'] = $deactivation_link;
|
661 |
+
}
|
662 |
+
return $links;
|
663 |
+
}
|
664 |
+
|
665 |
+
/*
|
666 |
+
* Form text strings
|
667 |
+
* These are non-filterable and used as fallback in case filtered strings aren't set correctly
|
668 |
+
* @since 1.0.0
|
669 |
+
*/
|
670 |
+
public function form_default_text() {
|
671 |
+
$form = array();
|
672 |
+
$form['heading'] = __( 'Sorry to see you go', 'plugin-usage-tracker' );
|
673 |
+
$form['body'] = __( 'Before you deactivate the plugin, would you quickly give us your reason for doing so?', 'plugin-usage-tracker' );
|
674 |
+
$form['options'] = array(
|
675 |
+
__( 'Set up is too difficult', 'plugin-usage-tracker' ),
|
676 |
+
__( 'Lack of documentation', 'plugin-usage-tracker' ),
|
677 |
+
__( 'Not the features I wanted', 'plugin-usage-tracker' ),
|
678 |
+
__( 'Found a better plugin', 'plugin-usage-tracker' ),
|
679 |
+
__( 'Installed by mistake', 'plugin-usage-tracker' ),
|
680 |
+
__( 'Only required temporarily', 'plugin-usage-tracker' ),
|
681 |
+
__( 'Didn\'t work', 'plugin-usage-tracker' )
|
682 |
+
);
|
683 |
+
$form['details'] = __( 'Details (optional)', 'plugin-usage-tracker' );
|
684 |
+
return $form;
|
685 |
+
}
|
686 |
+
|
687 |
+
/**
|
688 |
+
* Form text strings
|
689 |
+
* These can be filtered
|
690 |
+
* The filter hook must be unique to the plugin
|
691 |
+
* @since 1.0.0
|
692 |
+
*/
|
693 |
+
public function form_filterable_text() {
|
694 |
+
$form = $this->form_default_text();
|
695 |
+
return apply_filters( 'wisdom_form_text_' . esc_attr( $this->plugin_name ), $form );
|
696 |
+
}
|
697 |
+
|
698 |
+
/**
|
699 |
+
* Form text strings
|
700 |
+
* These can be filtered
|
701 |
+
* @since 1.0.0
|
702 |
+
*/
|
703 |
+
public function goodbye_ajax() {
|
704 |
+
// Get our strings for the form
|
705 |
+
$form = $this->form_filterable_text();
|
706 |
+
if( ! isset( $form['heading'] ) || ! isset( $form['body'] ) || ! isset( $form['options'] ) || ! is_array( $form['options'] ) || ! isset( $form['details'] ) ) {
|
707 |
+
// If the form hasn't been filtered correctly, we revert to the default form
|
708 |
+
$form = $this->form_default_text();
|
709 |
+
}
|
710 |
+
// Build the HTML to go in the form
|
711 |
+
$html = '<div class="put-goodbye-form-head"><strong>' . esc_html( $form['heading'] ) . '</strong></div>';
|
712 |
+
$html .= '<div class="put-goodbye-form-body"><p>' . esc_html( $form['body'] ) . '</p>';
|
713 |
+
if( is_array( $form['options'] ) ) {
|
714 |
+
$html .= '<div class="put-goodbye-options"><p>';
|
715 |
+
foreach( $form['options'] as $option ) {
|
716 |
+
$html .= '<input type="checkbox" name="put-goodbye-options[]" id="' . str_replace( " ", "", esc_attr( $option ) ) . '" value="' . esc_attr( $option ) . '"> <label for="' . str_replace( " ", "", esc_attr( $option ) ) . '">' . esc_attr( $option ) . '</label><br>';
|
717 |
+
}
|
718 |
+
$html .= '</p><label for="put-goodbye-reasons">' . esc_html( $form['details'] ) .'</label><textarea name="put-goodbye-reasons" id="put-goodbye-reasons" rows="2" style="width:100%"></textarea>';
|
719 |
+
$html .= '</div><!-- .put-goodbye-options -->';
|
720 |
+
}
|
721 |
+
$html .= '</div><!-- .put-goodbye-form-body -->';
|
722 |
+
$html .= '<p class="deactivating-spinner"><span class="spinner"></span> ' . __( 'Submitting form', 'plugin-usage-tracker' ) . '</p>';
|
723 |
+
?>
|
724 |
+
<div class="put-goodbye-form-bg"></div>
|
725 |
+
<style type="text/css">
|
726 |
+
.put-form-active .put-goodbye-form-bg {
|
727 |
+
background: rgba( 0, 0, 0, .5 );
|
728 |
+
position: fixed;
|
729 |
+
top: 0;
|
730 |
+
left: 0;
|
731 |
+
width: 100%;
|
732 |
+
height: 100%;
|
733 |
+
}
|
734 |
+
.put-goodbye-form-wrapper {
|
735 |
+
position: relative;
|
736 |
+
z-index: 999;
|
737 |
+
display: none;
|
738 |
+
}
|
739 |
+
.put-form-active .put-goodbye-form-wrapper {
|
740 |
+
display: block;
|
741 |
+
}
|
742 |
+
.put-goodbye-form {
|
743 |
+
display: none;
|
744 |
+
}
|
745 |
+
.put-form-active .put-goodbye-form {
|
746 |
+
position: absolute;
|
747 |
+
bottom: 30px;
|
748 |
+
left: 0;
|
749 |
+
max-width: 400px;
|
750 |
+
background: #fff;
|
751 |
+
white-space: normal;
|
752 |
+
}
|
753 |
+
.put-goodbye-form-head {
|
754 |
+
background: #0073aa;
|
755 |
+
color: #fff;
|
756 |
+
padding: 8px 18px;
|
757 |
+
}
|
758 |
+
.put-goodbye-form-body {
|
759 |
+
padding: 8px 18px;
|
760 |
+
color: #444;
|
761 |
+
}
|
762 |
+
.deactivating-spinner {
|
763 |
+
display: none;
|
764 |
+
}
|
765 |
+
.deactivating-spinner .spinner {
|
766 |
+
float: none;
|
767 |
+
margin: 4px 4px 0 18px;
|
768 |
+
vertical-align: bottom;
|
769 |
+
visibility: visible;
|
770 |
+
}
|
771 |
+
.put-goodbye-form-footer {
|
772 |
+
padding: 8px 18px;
|
773 |
+
}
|
774 |
+
</style>
|
775 |
+
<script>
|
776 |
+
jQuery(document).ready(function($){
|
777 |
+
$("#put-goodbye-link-<?php echo esc_attr( $this->plugin_name ); ?>").on("click",function(){
|
778 |
+
// We'll send the user to this deactivation link when they've completed or dismissed the form
|
779 |
+
var url = document.getElementById("put-goodbye-link-<?php echo esc_attr( $this->plugin_name ); ?>");
|
780 |
+
$('body').toggleClass('put-form-active');
|
781 |
+
$("#put-goodbye-form-<?php echo esc_attr( $this->plugin_name ); ?>").fadeIn();
|
782 |
+
$("#put-goodbye-form-<?php echo esc_attr( $this->plugin_name ); ?>").html( '<?php echo $html; ?>' + '<div class="put-goodbye-form-footer"><p><a id="put-submit-form" class="button primary" href="#"><?php _e( 'Submit and Deactivate', 'plugin-usage-tracker' ); ?></a> <a class="secondary button" href="'+url+'"><?php _e( 'Just Deactivate', 'plugin-usage-tracker' ); ?></a></p></div>');
|
783 |
+
$('#put-submit-form').on('click', function(e){
|
784 |
+
// As soon as we click, the body of the form should disappear
|
785 |
+
$("#put-goodbye-form-<?php echo esc_attr( $this->plugin_name ); ?> .put-goodbye-form-body").fadeOut();
|
786 |
+
$("#put-goodbye-form-<?php echo esc_attr( $this->plugin_name ); ?> .put-goodbye-form-footer").fadeOut();
|
787 |
+
// Fade in spinner
|
788 |
+
$("#put-goodbye-form-<?php echo esc_attr( $this->plugin_name ); ?> .deactivating-spinner").fadeIn();
|
789 |
+
e.preventDefault();
|
790 |
+
var values = new Array();
|
791 |
+
$.each($("input[name='put-goodbye-options[]']:checked"), function(){
|
792 |
+
values.push($(this).val());
|
793 |
+
});
|
794 |
+
var details = $('#put-goodbye-reasons').val();
|
795 |
+
var data = {
|
796 |
+
'action': 'goodbye_form',
|
797 |
+
'values': values,
|
798 |
+
'details': details,
|
799 |
+
'security': "<?php echo wp_create_nonce ( 'wisdom_goodbye_form' ); ?>",
|
800 |
+
'dataType': "json"
|
801 |
+
}
|
802 |
+
$.post(
|
803 |
+
ajaxurl,
|
804 |
+
data,
|
805 |
+
function(response){
|
806 |
+
// Redirect to original deactivation URL
|
807 |
+
window.location.href = url;
|
808 |
+
}
|
809 |
+
);
|
810 |
+
});
|
811 |
+
// If we click outside the form, the form will close
|
812 |
+
$('.put-goodbye-form-bg').on('click',function(){
|
813 |
+
$("#put-goodbye-form-<?php echo esc_attr( $this->plugin_name ); ?>").fadeOut();
|
814 |
+
$('body').removeClass('put-form-active');
|
815 |
+
});
|
816 |
+
});
|
817 |
+
});
|
818 |
+
</script>
|
819 |
+
<?php }
|
820 |
+
|
821 |
+
/**
|
822 |
+
* AJAX callback when the form is submitted
|
823 |
+
* @since 1.0.0
|
824 |
+
*/
|
825 |
+
public function goodbye_form_callback() {
|
826 |
+
check_ajax_referer( 'wisdom_goodbye_form', 'security' );
|
827 |
+
if( isset( $_POST['values'] ) ) {
|
828 |
+
$values = json_encode( wp_unslash( $_POST['values'] ) );
|
829 |
+
update_option( 'wisdom_deactivation_reason_' . $this->plugin_name, $values );
|
830 |
+
}
|
831 |
+
if( isset( $_POST['details'] ) ) {
|
832 |
+
$details = sanitize_text_field( $_POST['details'] );
|
833 |
+
update_option( 'wisdom_deactivation_details_' . $this->plugin_name, $details );
|
834 |
+
}
|
835 |
+
$this->do_tracking(); // Run this straightaway
|
836 |
+
echo 'success';
|
837 |
+
wp_die();
|
838 |
+
}
|
839 |
+
|
840 |
+
}
|
841 |
+
|
842 |
+
}
|
trunk/uk-cookie-consent.php
ADDED
@@ -0,0 +1,99 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
Plugin Name: Cookie Consent
|
4 |
+
Plugin URI: http://catapultthemes.com/cookie-consent/
|
5 |
+
Description: The only cookie consent plugin you'll ever need.
|
6 |
+
Version: 2.3.3
|
7 |
+
Author: Catapult_Themes
|
8 |
+
Author URI: http://catapultthemes.com/
|
9 |
+
Text Domain: uk-cookie-consent
|
10 |
+
Domain Path: /languages
|
11 |
+
*/
|
12 |
+
// Exit if accessed directly
|
13 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
14 |
+
exit;
|
15 |
+
}
|
16 |
+
/**
|
17 |
+
* Define constants
|
18 |
+
**/
|
19 |
+
if ( ! defined( 'CTCC_PLUGIN_URL' ) ) {
|
20 |
+
define( 'CTCC_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
|
21 |
+
}
|
22 |
+
|
23 |
+
if ( is_admin() ) {
|
24 |
+
require_once dirname( __FILE__ ) . '/admin/class-ctcc-admin.php';
|
25 |
+
$CTCC_Admin = new CTCC_Admin();
|
26 |
+
$CTCC_Admin -> init();
|
27 |
+
|
28 |
+
$options = get_option( 'ctcc_options_settings' );
|
29 |
+
// Add the metafield if enabled
|
30 |
+
if( ! empty( $options['enable_metafield'] ) ) {
|
31 |
+
require_once dirname( __FILE__ ) . '/admin/class-ctcc-metafield.php';
|
32 |
+
$CTCC_Metafield = new CTCC_Metafield();
|
33 |
+
$CTCC_Metafield -> init();
|
34 |
+
}
|
35 |
+
} else {
|
36 |
+
require_once dirname( __FILE__ ) . '/public/class-ctcc-public.php';
|
37 |
+
$CTCC_Public = new CTCC_Public();
|
38 |
+
$CTCC_Public -> init();
|
39 |
+
}
|
40 |
+
require_once dirname( __FILE__ ) . '/public/customizer.php';
|
41 |
+
|
42 |
+
|
43 |
+
function ctcc_load_plugin_textdomain() {
|
44 |
+
load_plugin_textdomain( 'uk-cookie-consent', FALSE, basename( dirname( __FILE__ ) ) . '/languages/' );
|
45 |
+
}
|
46 |
+
add_action( 'plugins_loaded', 'ctcc_load_plugin_textdomain' );
|
47 |
+
|
48 |
+
/*
|
49 |
+
* Automatically create cookie policy page on activation
|
50 |
+
*
|
51 |
+
*/
|
52 |
+
function ctcc_create_policy_page() {
|
53 |
+
//Check to see if the info page has been created
|
54 |
+
$more_info_page = get_option ( 'ctcc_more_info_page' );
|
55 |
+
if ( empty ( $more_info_page ) ) { // The page hasn't been set yet
|
56 |
+
// Create the page parameters
|
57 |
+
$pagename = __( 'Cookie Policy', 'uk-cookie-consent' );
|
58 |
+
$content = __( 'This site uses cookies - small text files that are placed on your machine to help the site provide a better user experience. In general, cookies are used to retain user preferences, store information for things like shopping carts, and provide anonymised tracking data to third party applications like Google Analytics. As a rule, cookies will make your browsing experience better. However, you may prefer to disable cookies on this site and on others. The most effective way to do this is to disable cookies in your browser. We suggest consulting the Help section of your browser or taking a look at <a href="http://www.aboutcookies.org">the About Cookies website</a> which offers guidance for all modern browsers', 'uk-cookie-consent' );
|
59 |
+
$cpage = get_page_by_title ( $pagename ); // Double check there's not already a Cookie Policy page
|
60 |
+
if ( !$cpage ) {
|
61 |
+
global $user_ID;
|
62 |
+
$page['post_type'] = 'page';
|
63 |
+
$page['post_content'] = $content;
|
64 |
+
$page['post_parent'] = 0;
|
65 |
+
$page['post_author'] = $user_ID;
|
66 |
+
$page['post_status'] = 'publish';
|
67 |
+
$page['post_title'] = $pagename;
|
68 |
+
$pageid = wp_insert_post ( $page );
|
69 |
+
} else {
|
70 |
+
// There's already a page called Cookie Policy so we'll use that
|
71 |
+
$pageid = $cpage -> ID;
|
72 |
+
}
|
73 |
+
// Update the option
|
74 |
+
update_option ( 'ctcc_more_info_page', $pageid );
|
75 |
+
}
|
76 |
+
}
|
77 |
+
register_activation_hook ( __FILE__, 'ctcc_create_policy_page' );
|
78 |
+
|
79 |
+
/**
|
80 |
+
* This function allows you to track usage of your plugin
|
81 |
+
* Place in your main plugin file
|
82 |
+
* Refer to https://wisdomplugin.com/support for help
|
83 |
+
*/
|
84 |
+
if( ! class_exists( 'Plugin_Usage_Tracker') ) {
|
85 |
+
require_once dirname( __FILE__ ) . '/tracking/class-plugin-usage-tracker.php';
|
86 |
+
}
|
87 |
+
if( ! function_exists( 'uk_cookie_consent_start_plugin_tracking' ) ) {
|
88 |
+
function uk_cookie_consent_start_plugin_tracking() {
|
89 |
+
$wisdom = new Plugin_Usage_Tracker(
|
90 |
+
__FILE__,
|
91 |
+
'https://wisdomplugin.com',
|
92 |
+
array( 'ctcc_options_settings' ),
|
93 |
+
true,
|
94 |
+
true,
|
95 |
+
1
|
96 |
+
);
|
97 |
+
}
|
98 |
+
uk_cookie_consent_start_plugin_tracking();
|
99 |
+
}
|
trunk/wpml-config.xml
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<wpml-config>
|
2 |
+
<admin-texts>
|
3 |
+
<key name="ctcc_content_settings">
|
4 |
+
<key name="heading_text"/>
|
5 |
+
<key name="notification_text"/>
|
6 |
+
<key name="accept_text"/>
|
7 |
+
<key name="more_info_text"/>
|
8 |
+
<key name="more_info_page"/>
|
9 |
+
<key name="more_info_url"/>
|
10 |
+
</key>
|
11 |
+
</admin-texts>
|
12 |
+
</wpml-config>
|
uk-cookie-consent.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Cookie Consent
|
4 |
Plugin URI: http://catapultthemes.com/cookie-consent/
|
5 |
Description: The only cookie consent plugin you'll ever need.
|
6 |
-
Version: 2.
|
7 |
Author: Catapult_Themes
|
8 |
Author URI: http://catapultthemes.com/
|
9 |
Text Domain: uk-cookie-consent
|
@@ -19,15 +19,27 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
19 |
if ( ! defined( 'CTCC_PLUGIN_URL' ) ) {
|
20 |
define( 'CTCC_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
|
21 |
}
|
|
|
22 |
if ( is_admin() ) {
|
23 |
require_once dirname( __FILE__ ) . '/admin/class-ctcc-admin.php';
|
24 |
$CTCC_Admin = new CTCC_Admin();
|
25 |
$CTCC_Admin -> init();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
}
|
27 |
-
require_once dirname( __FILE__ ) . '/public/class-ctcc-public.php';
|
28 |
-
$CTCC_Public = new CTCC_Public();
|
29 |
-
$CTCC_Public -> init();
|
30 |
require_once dirname( __FILE__ ) . '/public/customizer.php';
|
|
|
|
|
31 |
function ctcc_load_plugin_textdomain() {
|
32 |
load_plugin_textdomain( 'uk-cookie-consent', FALSE, basename( dirname( __FILE__ ) ) . '/languages/' );
|
33 |
}
|
@@ -62,4 +74,26 @@ function ctcc_create_policy_page() {
|
|
62 |
update_option ( 'ctcc_more_info_page', $pageid );
|
63 |
}
|
64 |
}
|
65 |
-
register_activation_hook ( __FILE__, 'ctcc_create_policy_page' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
Plugin Name: Cookie Consent
|
4 |
Plugin URI: http://catapultthemes.com/cookie-consent/
|
5 |
Description: The only cookie consent plugin you'll ever need.
|
6 |
+
Version: 2.3.2
|
7 |
Author: Catapult_Themes
|
8 |
Author URI: http://catapultthemes.com/
|
9 |
Text Domain: uk-cookie-consent
|
19 |
if ( ! defined( 'CTCC_PLUGIN_URL' ) ) {
|
20 |
define( 'CTCC_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
|
21 |
}
|
22 |
+
|
23 |
if ( is_admin() ) {
|
24 |
require_once dirname( __FILE__ ) . '/admin/class-ctcc-admin.php';
|
25 |
$CTCC_Admin = new CTCC_Admin();
|
26 |
$CTCC_Admin -> init();
|
27 |
+
|
28 |
+
$options = get_option( 'ctcc_options_settings' );
|
29 |
+
// Add the metafield if enabled
|
30 |
+
if( ! empty( $options['enable_metafield'] ) ) {
|
31 |
+
require_once dirname( __FILE__ ) . '/admin/class-ctcc-metafield.php';
|
32 |
+
$CTCC_Metafield = new CTCC_Metafield();
|
33 |
+
$CTCC_Metafield -> init();
|
34 |
+
}
|
35 |
+
} else {
|
36 |
+
require_once dirname( __FILE__ ) . '/public/class-ctcc-public.php';
|
37 |
+
$CTCC_Public = new CTCC_Public();
|
38 |
+
$CTCC_Public -> init();
|
39 |
}
|
|
|
|
|
|
|
40 |
require_once dirname( __FILE__ ) . '/public/customizer.php';
|
41 |
+
|
42 |
+
|
43 |
function ctcc_load_plugin_textdomain() {
|
44 |
load_plugin_textdomain( 'uk-cookie-consent', FALSE, basename( dirname( __FILE__ ) ) . '/languages/' );
|
45 |
}
|
74 |
update_option ( 'ctcc_more_info_page', $pageid );
|
75 |
}
|
76 |
}
|
77 |
+
register_activation_hook ( __FILE__, 'ctcc_create_policy_page' );
|
78 |
+
|
79 |
+
/**
|
80 |
+
* This function allows you to track usage of your plugin
|
81 |
+
* Place in your main plugin file
|
82 |
+
* Refer to https://wisdomplugin.com/support for help
|
83 |
+
*/
|
84 |
+
if( ! class_exists( 'Plugin_Usage_Tracker') ) {
|
85 |
+
require_once dirname( __FILE__ ) . '/tracking/class-plugin-usage-tracker.php';
|
86 |
+
}
|
87 |
+
if( ! function_exists( 'uk_cookie_consent_start_plugin_tracking' ) ) {
|
88 |
+
function uk_cookie_consent_start_plugin_tracking() {
|
89 |
+
$wisdom = new Plugin_Usage_Tracker(
|
90 |
+
__FILE__,
|
91 |
+
'https://wisdomplugin.com',
|
92 |
+
array( 'ctcc_options_settings' ),
|
93 |
+
true,
|
94 |
+
true,
|
95 |
+
1
|
96 |
+
);
|
97 |
+
}
|
98 |
+
uk_cookie_consent_start_plugin_tracking();
|
99 |
+
}
|
wpml-config.xml
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<wpml-config>
|
2 |
+
<admin-texts>
|
3 |
+
<key name="ctcc_content_settings">
|
4 |
+
<key name="heading_text"/>
|
5 |
+
<key name="notification_text"/>
|
6 |
+
<key name="accept_text"/>
|
7 |
+
<key name="more_info_text"/>
|
8 |
+
<key name="more_info_page"/>
|
9 |
+
<key name="more_info_url"/>
|
10 |
+
</key>
|
11 |
+
</admin-texts>
|
12 |
+
</wpml-config>
|