Cookie Consent - Version 2.1.2

Version Description

  • Fixed: missing images in admin
Download this release

Release Info

Developer Catapult_Themes
Plugin Icon 128x128 Cookie Consent
Version 2.1.2
Comparing to
See all releases

Code changes from version 2.3.2 to 2.1.2

Thumbs.db ADDED
Binary file
admin/class-ctcc-admin.php CHANGED
@@ -84,22 +84,6 @@ if ( ! class_exists ( 'CTCC_Admin' ) ) {
84
  'ctcc_options_section'
85
  );
86
 
87
- add_settings_field (
88
- 'enable_metafield',
89
- __( 'Selectively Exclude Pages', 'uk-cookie-consent' ),
90
- array ( $this, 'enable_metafield_render' ),
91
- 'ctcc_options',
92
- 'ctcc_options_section'
93
- );
94
-
95
- add_settings_field (
96
- 'exclude_zones',
97
- __( 'Exclude Zones', 'uk-cookie-consent' ),
98
- array ( $this, 'exclude_zones_render' ),
99
- 'ctcc_options',
100
- 'ctcc_options_section'
101
- );
102
-
103
  add_settings_field (
104
  'duration',
105
  __( 'Notification Duration', 'uk-cookie-consent' ),
@@ -108,14 +92,6 @@ if ( ! class_exists ( 'CTCC_Admin' ) ) {
108
  'ctcc_options_section'
109
  );
110
 
111
- add_settings_field (
112
- 'scroll_height',
113
- __( 'Scroll Height', 'uk-cookie-consent' ),
114
- array ( $this, 'scroll_height_render' ),
115
- 'ctcc_options',
116
- 'ctcc_options_section'
117
- );
118
-
119
  add_settings_field (
120
  'cookie_expiry',
121
  __( 'Cookie Expiry', 'uk-cookie-consent' ),
@@ -142,25 +118,9 @@ if ( ! class_exists ( 'CTCC_Admin' ) ) {
142
 
143
  }
144
 
145
- public function sanitize_content( $input ){
146
- $output = array();
147
- foreach( $input as $key=>$value ) {
148
- if( isset($input[$key] ) ) {
149
- if( $key == 'notification_text' ) {
150
- $output[$key] = esc_attr( $input[$key] );
151
- } else if( $key == 'more_info_url' ) {
152
- $output[$key] = esc_url( $input[$key] );
153
- } else {
154
- $output[$key] = sanitize_text_field( $input[$key] );
155
- }
156
- }
157
- }
158
- return $output;
159
- }
160
-
161
  public function register_content_init() {
162
 
163
- register_setting ( 'ctcc_content', 'ctcc_content_settings', array( $this, 'sanitize_content') );
164
 
165
  add_settings_section (
166
  'ctcc_content_section',
@@ -371,10 +331,7 @@ if ( ! class_exists ( 'CTCC_Admin' ) ) {
371
  public function get_default_options_settings() {
372
  $defaults = array (
373
  'closure' => 'click',
374
- 'scroll_height' => 200,
375
  'first_page' => 0,
376
- 'enable_metafield' => 0,
377
- 'zones_only' => '',
378
  'duration' => 60,
379
  'cookie_expiry' => 30,
380
  'cookie_version' => 1
@@ -461,66 +418,38 @@ if ( ! class_exists ( 'CTCC_Admin' ) ) {
461
  public function closure_render() {
462
  $options = get_option( 'ctcc_options_settings' ); ?>
463
  <select name='ctcc_options_settings[closure]'>
464
- <option value='click' <?php selected( $options['closure'], 'click' ); ?>><?php _e( 'On Click', 'uk-cookie-consent' ); ?></option>
465
- <option value='scroll' <?php selected( $options['closure'], 'scroll' ); ?>><?php _e( 'On Scroll', 'uk-cookie-consent' ); ?></option>
466
- <option value='timed' <?php selected( $options['closure'], 'timed' ); ?>><?php _e( 'Timed', 'uk-cookie-consent' ); ?></option>
467
-
468
  </select>
469
- <p class="description"><?php _e( 'How you want the user to close the notification', 'uk-cookie-consent' ); ?></p>
470
  <?php
471
  }
472
 
473
  public function first_page_render() {
474
  $options = get_option( 'ctcc_options_settings' ); ?>
475
- <input type='checkbox' name='ctcc_options_settings[first_page]' <?php checked ( ! empty ( $options['first_page'] ), 1 ); ?> value='1'>
476
- <p class="description"><?php _e( 'Select this to show the notification only on the first page the user visits', 'uk-cookie-consent' ); ?></p>
477
- <?php
478
- }
479
-
480
- public function exclude_zones_render() {
481
- $options = get_option( 'ctcc_options_settings' );
482
- $zones = array();
483
- if( isset( $options['exclude_zones'] ) ) {
484
- $zones = $options['exclude_zones'];
485
- } ?>
486
- <select multiple name='ctcc_options_settings[exclude_zones][]'>
487
- <option value='AF' <?php selected( in_array( 'AF', $zones ) ); ?>><?php _e( 'Africa', 'uk-cookie-consent' ); ?></option>
488
- <option value='AN' <?php selected( in_array( 'AN', $zones ) ); ?>><?php _e( 'Antarctica', 'uk-cookie-consent' ); ?></option>
489
- <option value='AS' <?php selected( in_array( 'AS', $zones ) ); ?>><?php _e( 'Asia', 'uk-cookie-consent' ); ?></option>
490
- <option value='EU' <?php selected( in_array( 'EU', $zones ) ); ?>><?php _e( 'Europe', 'uk-cookie-consent' ); ?></option>
491
- <option value='NA' <?php selected( in_array( 'NA', $zones ) ); ?>><?php _e( 'North America', 'uk-cookie-consent' ); ?></option>
492
- <option value='OC' <?php selected( in_array( 'OC', $zones ) ); ?>><?php _e( 'Oceania', 'uk-cookie-consent' ); ?></option>
493
- <option value='SA' <?php selected( in_array( 'SA', $zones ) ); ?>><?php _e( 'South America', 'uk-cookie-consent' ); ?></option>
494
- </select>
495
- <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>
496
- <?php
497
- }
498
-
499
- public function scroll_height_render() {
500
- $options = get_option( 'ctcc_options_settings' ); ?>
501
- <input type="number" min="1" name="ctcc_options_settings[scroll_height]" value="<?php echo esc_attr( $options['scroll_height'] ); ?>">
502
- <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>
503
  <?php
504
  }
505
 
506
  public function duration_render() {
507
  $options = get_option( 'ctcc_options_settings' ); ?>
508
- <input type="number" min="1" name="ctcc_options_settings[duration]" value="<?php echo esc_attr( $options['duration'] ); ?>">
509
- <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>
510
  <?php
511
  }
512
 
513
  public function cookie_expiry_render() {
514
  $options = get_option( 'ctcc_options_settings' ); ?>
515
- <input type="number" min="1" name="ctcc_options_settings[cookie_expiry]" value="<?php echo esc_attr( $options['cookie_expiry'] ); ?>">
516
- <p class="description"><?php _e( 'The number of days that the cookie is set for', 'uk-cookie-consent' ); ?></p>
517
  <?php
518
  }
519
 
520
  public function cookie_version_render() {
521
  $options = get_option( 'ctcc_options_settings' ); ?>
522
- <input type="text" name="ctcc_options_settings[cookie_version]" value="<?php echo esc_attr( $options['cookie_version'] ); ?>">
523
- <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>
524
  <?php
525
  }
526
 
@@ -530,29 +459,29 @@ if ( ! class_exists ( 'CTCC_Admin' ) ) {
530
 
531
  public function heading_text_render() {
532
  $ctcc_content_settings = get_option( 'ctcc_content_settings' ); ?>
533
- <input type="text" name="ctcc_content_settings[heading_text]" value="<?php echo esc_attr( $ctcc_content_settings['heading_text'] ); ?>">
534
- <p class="description"><?php _e( 'The heading text - only applies if you are not using a top or bottom bar', 'uk-cookie-consent' ); ?></p>
535
  <?php
536
  }
537
 
538
  public function notification_text_render() {
539
  $ctcc_content_settings = get_option( 'ctcc_content_settings' ); ?>
540
- <input class="widefat" type="text" name="ctcc_content_settings[notification_text]" value="<?php echo esc_attr( $ctcc_content_settings['notification_text'] ); ?>">
541
- <p class="description"><?php _e( 'The default text to indicate that your site uses cookies', 'uk-cookie-consent' ); ?></p>
542
  <?php
543
  }
544
 
545
  public function accept_text_render() {
546
  $ctcc_content_settings = get_option( 'ctcc_content_settings' ); ?>
547
- <input type="text" name="ctcc_content_settings[accept_text]" value="<?php echo esc_attr( $ctcc_content_settings['accept_text'] ); ?>">
548
- <p class="description"><?php _e( 'The default text to dismiss the notification', 'uk-cookie-consent' ); ?></p>
549
  <?php
550
  }
551
 
552
  public function more_info_text_render() {
553
  $ctcc_content_settings = get_option( 'ctcc_content_settings' ); ?>
554
- <input type="text" name="ctcc_content_settings[more_info_text]" value="<?php echo esc_attr( $ctcc_content_settings['more_info_text'] ); ?>">
555
- <p class="description"><?php _e( 'The default text to use to link to a page providing further information', 'uk-cookie-consent' ); ?></p>
556
  <?php
557
  }
558
 
@@ -568,24 +497,24 @@ if ( ! class_exists ( 'CTCC_Admin' ) ) {
568
  <option value='<?php echo $page -> ID; ?>' <?php selected( $ctcc_content_settings['more_info_page'], $page -> ID ); ?>><?php echo $page -> post_title; ?></option>
569
  <?php } ?>
570
  </select>
571
- <p class="description"><?php _e( 'The page containing further information about your cookie policy', 'uk-cookie-consent' ); ?></p>
572
  <?php }
573
  }
574
 
575
  public function more_info_url_render() {
576
  $ctcc_content_settings = get_option( 'ctcc_content_settings' ); ?>
577
- <input type="url" name="ctcc_content_settings[more_info_url]" value="<?php echo esc_url( $ctcc_content_settings['more_info_url'] ); ?>">
578
- <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>
579
  <?php
580
  }
581
 
582
  public function more_info_target_render() {
583
  $ctcc_content_settings = get_option( 'ctcc_content_settings' ); ?>
584
  <select name='ctcc_content_settings[more_info_target]'>
585
- <option value='_blank' <?php selected( $ctcc_content_settings['more_info_target'], '_blank' ); ?>><?php _e( 'New Tab', 'uk-cookie-consent' ); ?></option>
586
- <option value='_self' <?php selected( $ctcc_content_settings['more_info_target'], '_self' ); ?>><?php _e( 'Same Tab', 'uk-cookie-consent' ); ?></option>
587
  </select>
588
- <p class="description"><?php _e( 'Open the More Information page in the same or new tab.', 'uk-cookie-consent' ); ?></p>
589
  <?php
590
  }
591
 
@@ -596,126 +525,111 @@ if ( ! class_exists ( 'CTCC_Admin' ) ) {
596
  public function position_render() {
597
  $options = get_option( 'ctcc_styles_settings' ); ?>
598
  <select name='ctcc_styles_settings[position]'>
599
- <option value='top-bar' <?php selected( $options['position'], 'top-bar' ); ?>><?php _e( 'Top Bar', 'uk-cookie-consent' ); ?></option>
600
- <option value='bottom-bar' <?php selected( $options['position'], 'bottom-bar' ); ?>><?php _e( 'Bottom Bar', 'uk-cookie-consent' ); ?></option>
601
- <option value='top-left-block' <?php selected( $options['position'], 'top-left-block' ); ?>><?php _e( 'Top Left Block', 'uk-cookie-consent' ); ?></option>
602
- <option value='top-right-block' <?php selected( $options['position'], 'top-right-block' ); ?>><?php _e( 'Top Right Block', 'uk-cookie-consent' ); ?></option>
603
- <option value='bottom-left-block' <?php selected( $options['position'], 'bottom-left-block' ); ?>><?php _e( 'Bottom Left Block', 'uk-cookie-consent' ); ?></option>
604
- <option value='bottom-right-block' <?php selected( $options['position'], 'bottom-right-block' ); ?>><?php _e( 'Bottom Right Block', 'uk-cookie-consent' ); ?></option>
605
  </select>
606
- <p class="description"><?php _e( 'Where the notification should appear', 'uk-cookie-consent' ); ?></p>
607
  <?php
608
  }
609
 
610
  public function container_class_render() {
611
  $options = get_option( 'ctcc_styles_settings' ); ?>
612
- <input type="text" name="ctcc_styles_settings[container_class]" value="<?php echo esc_attr( $options['container_class'] ); ?>">
613
- <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>
614
  <?php
615
  }
616
 
617
  public function enqueue_styles_render() {
618
  $options = get_option( 'ctcc_styles_settings' ); ?>
619
  <input type='checkbox' name='ctcc_styles_settings[enqueue_styles]' <?php checked ( ! empty ( $options['enqueue_styles'] ), 1 ); ?> value='1'>
620
- <p class="description"><?php _e( 'Deselect this to dequeue the plugin stylesheet', 'uk-cookie-consent' ); ?></p>
621
  <?php
622
  }
623
 
624
  public function rounded_corners_render() {
625
  $options = get_option( 'ctcc_styles_settings' ); ?>
626
  <input type='checkbox' name='ctcc_styles_settings[rounded_corners]' <?php checked ( ! empty ( $options['rounded_corners'] ), 1 ); ?> value='1'>
627
- <p class="description"><?php _e( 'Round the corners on the block (doesn\'t apply to the top or bottom bar)', 'uk-cookie-consent' ); ?></p>
628
  <?php
629
  }
630
 
631
  public function drop_shadow_render() {
632
  $options = get_option( 'ctcc_styles_settings' ); ?>
633
  <input type='checkbox' name='ctcc_styles_settings[drop_shadow]' <?php checked ( ! empty ( $options['drop_shadow'] ), 1 ); ?> value='1'>
634
- <p class="description"><?php _e( 'Add drop shadow to the block (doesn\'t apply to the top or bottom bar)', 'uk-cookie-consent' ); ?></p>
635
  <?php
636
  }
637
 
638
  public function display_accept_with_text_render() {
639
  $options = get_option( 'ctcc_styles_settings' ); ?>
640
  <input type='checkbox' name='ctcc_styles_settings[display_accept_with_text]' <?php checked ( ! empty ( $options['display_accept_with_text'] ), 1 ); ?> value='1'>
641
- <p class="description"><?php _e( 'Display the confirmation button with notification text', 'uk-cookie-consent' ); ?></p>
642
  <?php
643
  }
644
 
645
  public function x_close_render() {
646
  $options = get_option( 'ctcc_styles_settings' ); ?>
647
  <input type='checkbox' name='ctcc_styles_settings[x_close]' <?php checked ( ! empty ( $options['x_close'] ), 1 ); ?> value='1'>
648
- <p class="description"><?php _e( 'Remove confirmation button and use \'X\' icon instead', 'uk-cookie-consent' ); ?></p>
649
  <?php
650
  }
651
 
652
  public function text_color_render() {
653
  $options = get_option( 'ctcc_styles_settings' ); ?>
654
- <input type="text" class="cctc-color-field" name="ctcc_styles_settings[text_color]" value="<?php echo esc_attr( $options['text_color'] ); ?>">
655
- <p class="description"><?php _e( 'The text color on the notification', 'uk-cookie-consent' ); ?></p>
656
  <?php
657
  }
658
 
659
  public function bg_color_render() {
660
  $options = get_option( 'ctcc_styles_settings' ); ?>
661
- <input type="text" class="cctc-color-field" name="ctcc_styles_settings[bg_color]" value="<?php echo esc_attr( $options['bg_color'] ); ?>">
662
- <p class="description"><?php _e( 'The background color for the notification', 'uk-cookie-consent' ); ?></p>
663
  <?php
664
  }
665
 
666
  public function link_color_render() {
667
  $options = get_option( 'ctcc_styles_settings' ); ?>
668
- <input type="text" class="cctc-color-field" name="ctcc_styles_settings[link_color]" value="<?php echo esc_attr( $options['link_color'] ); ?>">
669
- <p class="description"><?php _e( 'The link color on the notification', 'uk-cookie-consent' ); ?></p>
670
  <?php
671
  }
672
 
673
  public function button_color_render() {
674
  $options = get_option( 'ctcc_styles_settings' ); ?>
675
- <input type="text" class="cctc-color-field" name="ctcc_styles_settings[button_color]" value="<?php echo esc_attr( $options['button_color'] ); ?>">
676
- <p class="description"><?php _e( 'The text color on the notification button', 'uk-cookie-consent' ); ?></p>
677
  <?php
678
  }
679
 
680
  public function button_bg_color_render() {
681
  $options = get_option( 'ctcc_styles_settings' ); ?>
682
- <input type="text" class="cctc-color-field" name="ctcc_styles_settings[button_bg_color]" value="<?php echo esc_attr( $options['button_bg_color'] ); ?>">
683
- <p class="description"><?php _e( 'The background color on the notification button', 'uk-cookie-consent' ); ?></p>
684
  <?php
685
  }
686
 
687
  public function flat_button_render() {
688
  $options = get_option( 'ctcc_styles_settings' ); ?>
689
  <input type='checkbox' name='ctcc_styles_settings[flat_button]' <?php checked ( ! empty ( $options['flat_button'] ), 1 ); ?> value='1'>
690
- <p class="description"><?php _e( 'Remove the border from the button', 'uk-cookie-consent' ); ?></p>
691
- <?php
692
- }
693
-
694
- public function enable_metafield_render() {
695
- $options = get_option( 'ctcc_options_settings' ); ?>
696
- <input type='checkbox' name='ctcc_options_settings[enable_metafield]' <?php checked ( ! empty ( $options['enable_metafield'] ), 1 ); ?> value='1'>
697
- <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>
698
  <?php
699
  }
700
 
701
  public function settings_section_callback() {
702
- echo '<p>' . __( 'Basic settings', 'uk-cookie-consent' ) . '</p>';
703
- echo '<p><a href="http://iubenda.refr.cc/JKNZ55D" target="_blank">' . __( 'Create your own privacy policy here') . '</a></p>';
704
  }
705
 
706
  public function content_settings_section_callback() {
707
- echo '<p>' .__( 'Update the content displayed to the user', 'uk-cookie-consent' ) . '</p>';
708
- echo '<p><a href="http://iubenda.refr.cc/JKNZ55D" target="_blank">' . __( 'Create your own privacy policy here') . '</a></p>';
709
  }
710
 
711
  public function styles_settings_section_callback() {
712
- echo '<p>' .__( 'Change the styles here if you like - but it\'s better in the Customizer', 'uk-cookie-consent' ) . '</p>';
713
- echo '<p><a href="http://iubenda.refr.cc/JKNZ55D" target="_blank">' . __( 'Create your own privacy policy here') . '</a></p>';
714
- }
715
-
716
- public function pages_settings_section_callback() {
717
- echo '<p>' . __( 'Use this section to set exclusion rules for pages and posts.', 'uk-cookie-consent' ) . '</p>';
718
- echo '<p><a href="http://iubenda.refr.cc/JKNZ55D" target="_blank">' . __( 'Create your own privacy policy here') . '</a></p>';
719
  }
720
 
721
  public function options_page() {
@@ -756,27 +670,22 @@ if ( ! class_exists ( 'CTCC_Admin' ) ) {
756
  </form>
757
  <form method="post" action="">
758
  <p class="submit">
759
- <input name="reset" class="button button-secondary" type="submit" value="<?php _e( 'Reset plugin defaults', 'uk-cookie-consent' ); ?>" >
760
  <input type="hidden" name="action" value="reset" />
761
  </p>
762
  </form>
763
  </div><!-- .ctdb-inner-wrap -->
764
-
765
  <div class="ctdb-banners">
766
- <div class="ctdb-banner hide-dbpro">
767
- <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>
768
- </div>
769
  <div class="ctdb-banner">
770
- <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>
771
  </div>
772
  <div class="ctdb-banner">
773
- <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>
774
  </div>
775
  <div class="ctdb-banner">
776
- <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>
777
  </div>
778
  </div>
779
-
780
  </div><!-- .ctdb-outer-wrap -->
781
  </div><!-- .wrap -->
782
  <?php
84
  'ctcc_options_section'
85
  );
86
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
87
  add_settings_field (
88
  'duration',
89
  __( 'Notification Duration', 'uk-cookie-consent' ),
92
  'ctcc_options_section'
93
  );
94
 
 
 
 
 
 
 
 
 
95
  add_settings_field (
96
  'cookie_expiry',
97
  __( 'Cookie Expiry', 'uk-cookie-consent' ),
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
  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
  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 ( 'On Click', 'uk-cookie-consent' ); ?></option>
422
+ <option value='timed' <?php selected( $options['closure'], 'timed' ); ?>><?php _e ( 'Timed', 'uk-cookie-consent' ); ?></option>
 
 
423
  </select>
424
+ <p class="description"><?php _e ( 'How you want the user to close the notification', 'uk-cookie-consent' ); ?></p>
425
  <?php
426
  }
427
 
428
  public function first_page_render() {
429
  $options = get_option( 'ctcc_options_settings' ); ?>
430
+ <input type='checkbox' name='ctcc_options_settings[first_page]' <?php checked ( ! empty ( $options['first_page'] ), 1 ); ?> value='1'>
431
+ <p class="description"><?php _e ( 'Select this to show the notification only on the first page the user visits', 'uk-cookie-consent' ); ?></p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 ( 'If you chose Timer as the close method, enter how many seconds the notification should display for', 'uk-cookie-consent' ); ?></p>
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 ( 'The number of days that the cookie is set for', 'uk-cookie-consent' ); ?></p>
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 ( '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>
453
  <?php
454
  }
455
 
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 ( 'The heading text - only applies if you are not using a top or bottom bar', 'uk-cookie-consent' ); ?></p>
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 ( 'The default text to indicate that your site uses cookies', 'uk-cookie-consent' ); ?></p>
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 ( 'The default text to dismiss the notification', 'uk-cookie-consent' ); ?></p>
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 ( 'The default text to use to link to a page providing further information', 'uk-cookie-consent' ); ?></p>
485
  <?php
486
  }
487
 
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 ( 'The page containing further information about your cookie policy', 'discussion-board' ); ?></p>
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 ( '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>
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 ( 'New Tab', 'uk-cookie-consent' ); ?></option>
515
+ <option value='_self' <?php selected( $ctcc_content_settings['more_info_target'], '_self' ); ?>><?php _e ( 'Same Tab', 'uk-cookie-consent' ); ?></option>
516
  </select>
517
+ <p class="description"><?php _e ( 'Open the More Information page in the same or new tab.', 'uk-cookie-consent' ); ?></p>
518
  <?php
519
  }
520
 
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 ( 'Top Bar', 'uk-cookie-consent' ); ?></option>
529
+ <option value='bottom-bar' <?php selected( $options['position'], 'bottom-bar' ); ?>><?php _e ( 'Bottom Bar', 'uk-cookie-consent' ); ?></option>
530
+ <option value='top-left-block' <?php selected( $options['position'], 'top-left-block' ); ?>><?php _e ( 'Top Left Block', 'uk-cookie-consent' ); ?></option>
531
+ <option value='top-right-block' <?php selected( $options['position'], 'top-right-block' ); ?>><?php _e ( 'Top Right Block', 'uk-cookie-consent' ); ?></option>
532
+ <option value='bottom-left-block' <?php selected( $options['position'], 'bottom-left-block' ); ?>><?php _e ( 'Bottom Left Block', 'uk-cookie-consent' ); ?></option>
533
+ <option value='bottom-right-block' <?php selected( $options['position'], 'bottom-right-block' ); ?>><?php _e ( 'Bottom Right Block', 'uk-cookie-consent' ); ?></option>
534
  </select>
535
+ <p class="description"><?php _e ( 'Where the notification should appear', 'uk-cookie-consent' ); ?></p>
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 ( '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>
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 ( 'Deselect this to dequeue the plugin stylesheet', 'uk-cookie-consent' ); ?></p>
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 ( 'Round the corners on the block (doesn\'t apply to the top or bottom bar)', 'uk-cookie-consent' ); ?></p>
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 ( 'Add drop shadow to the block (doesn\'t apply to the top or bottom bar)', 'uk-cookie-consent' ); ?></p>
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 ( 'Display the confirmation button with notification text', 'uk-cookie-consent' ); ?></p>
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 ( 'Remove confirmation button and use \'X\' icon instead', 'uk-cookie-consent' ); ?></p>
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 ( 'The text color on the notification', 'uk-cookie-consent' ); ?></p>
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 ( 'The background color for the notification', 'uk-cookie-consent' ); ?></p>
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 ( 'The link color on the notification', 'uk-cookie-consent' ); ?></p>
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 ( 'The text color on the notification button', 'uk-cookie-consent' ); ?></p>
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 ( 'The background color on the notification button', 'uk-cookie-consent' ); ?></p>
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 ( 'Remove the border from the button', 'uk-cookie-consent' ); ?></p>
 
 
 
 
 
 
 
620
  <?php
621
  }
622
 
623
  public function settings_section_callback() {
624
+ echo __( '<p>Basic settings</p>', 'uk-cookie-consent' );
 
625
  }
626
 
627
  public function content_settings_section_callback() {
628
+ echo __( '<p>Update the content displayed to the user</p>', 'uk-cookie-consent' );
 
629
  }
630
 
631
  public function styles_settings_section_callback() {
632
+ echo __( '<p>Change the styles here if you like - but it\'s better in the Customizer</p>', 'uk-cookie-consent' );
 
 
 
 
 
 
633
  }
634
 
635
  public function options_page() {
670
  </form>
671
  <form method="post" action="">
672
  <p class="submit">
673
+ <input name="reset" class="button button-secondary" type="submit" value="<?php _e ( 'Reset plugin defaults', 'uk-cookie-consent' ); ?>" >
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="https://catapultthemes.com/downloads/super-hero-slider-pro/?utm_source=plugin_ad&utm_medium=wp_plugin&utm_content=bcd&utm_campaign=campaign"><img src="<?php echo CTCC_PLUGIN_URL . 'assets/images/superhero-ad.png'; ?>" alt="" ></a>
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-ad.jpg'; ?>" alt="" ></a>
684
  </div>
685
  <div class="ctdb-banner">
686
+ <a href="https://catapultthemes.com/downloads/category/themes/?utm_source=plugin_ad&utm_medium=wp_plugin&utm_content=cookieconsent&utm_campaign=campaign"><img src="<?php echo CTCC_PLUGIN_URL . 'assets/images/themes-ad.png'; ?>" alt="" ></a>
687
  </div>
688
  </div>
 
689
  </div><!-- .ctdb-outer-wrap -->
690
  </div><!-- .wrap -->
691
  <?php
admin/class-ctcc-metafield.php DELETED
@@ -1,189 +0,0 @@
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,15 +17,6 @@ html.has-cookie-bar.cookie-bar-top-bar {
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,11 +64,6 @@ button#catapultCookie {
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,6 +86,8 @@ button#catapultCookie {
100
  -webkit-transform: translateY(-50%);
101
  transform: translateY(-50%);
102
  }
 
 
103
  .x_close {
104
  -webkit-backface-visibility: hidden;
105
  backface-visibility: hidden;
17
  -moz-transition: all 0.25s;
18
  transition: all 0.25s;
19
  }
 
 
 
 
 
 
 
 
 
20
  #catapult-cookie-bar.rounded-corners {
21
  border-radius: 3px;
22
  }
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
  -webkit-transform: translateY(-50%);
87
  transform: translateY(-50%);
88
  }
89
+
90
+
91
  .x_close {
92
  -webkit-backface-visibility: hidden;
93
  backface-visibility: hidden;
assets/images/dbpro-ad-view.png DELETED
Binary file
assets/images/hero-3d-banner.jpg ADDED
Binary file
assets/images/mode-3d-banner-cc.jpg ADDED
Binary file
assets/images/mode-3d-banner.jpg ADDED
Binary file
assets/images/sellastic-ad1.jpg DELETED
Binary file
assets/images/shs-3d-banner.png ADDED
Binary file
assets/images/superhero-ad1.png DELETED
Binary file
assets/images/themes-ad1.jpg DELETED
Binary file
assets/images/themes-ad1.png DELETED
Binary file
assets/js/uk-cookie-consent-js.js CHANGED
@@ -23,7 +23,6 @@ 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() {
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() {
languages/uk-cookie-consent-it_IT.mo DELETED
Binary file
languages/uk-cookie-consent-it_IT.po DELETED
@@ -1,453 +0,0 @@
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,80 +12,41 @@ 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
-
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,95 +54,91 @@ if ( ! class_exists( 'CTCC_Public' ) ) { // Don't initialise if there's already
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,67 +147,49 @@ if ( ! class_exists( 'CTCC_Public' ) ) { // Don't initialise if there's already
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,124 +197,118 @@ if ( ! class_exists( 'CTCC_Public' ) ) { // Don't initialise if there's already
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
- // Use the internal page
334
- $link = get_permalink ( $ctcc_content_settings['more_info_page'] );
335
- }
336
- $more_info_text = wp_kses ( $ctcc_content_settings['more_info_text'], $allowed );
337
- $more_info_text = apply_filters( 'ctcc_more_info_text', $more_info_text );
338
- $more_text = sprintf (
339
- '<a class="ctcc-more-info-link" tabindex=0 target="%s" href="%s">%s</a>',
340
- esc_attr ( $ctcc_content_settings['more_info_target'] ),
341
- esc_url ( $link ),
342
- $more_info_text
343
- );
344
- }
345
 
346
- $button_text = '';
347
- if ( empty ( $ctcc_styles_settings['x_close'] ) ) {
348
- $accept_text = wp_kses ( $ctcc_content_settings['accept_text'], $allowed );
349
- $accept_text = apply_filters( 'ctcc_accept_text', $accept_text );
350
- $button_text = sprintf (
351
- '<button id="catapultCookie" tabindex=0 onclick="catapultAcceptCookies();">%s</button>',
352
- $accept_text
353
- );
 
 
354
  }
 
 
 
 
 
 
 
 
 
355
 
356
- // The main bar content
357
- $notification_text = wp_kses_post ( do_shortcode( $ctcc_content_settings['notification_text'] ) );
358
- $notification_text = apply_filters( 'ctcc_notification_text', $notification_text );
359
- $content .= sprintf (
360
- '<span class="ctcc-left-side">%s %s</span><span class="ctcc-right-side">%s</span>',
361
- $notification_text,
362
- $more_text,
363
- $button_text
364
  );
 
365
 
366
- // X close button
367
- if ( ! empty ( $ctcc_styles_settings['x_close'] ) ) {
368
- $content .= '<div class="x_close"><span></span><span></span></div>';
369
- }
 
 
 
 
 
 
 
 
 
 
370
 
371
- // Close custom wrapper class if used
372
- $content .= $close_content;
373
 
374
- $content .= '</div><!-- #catapult-cookie-bar -->';
375
 
376
- echo apply_filters ( 'catapult_cookie_content', $content, $ctcc_content_settings );
377
-
378
- }
379
 
380
  }
381
 
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
+ $ctcc_options_settings = get_option ( 'ctcc_options_settings' );
36
+ $options = get_option ( 'ctcc_styles_settings' );
37
+ if ( isset ( $options['enqueue_styles'] ) ) {
38
+ wp_enqueue_style ( 'cookie-consent-style', CTCC_PLUGIN_URL . 'assets/css/style.css', '2.0.0' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
39
  }
40
+ wp_enqueue_script ( 'cookie-consent', CTCC_PLUGIN_URL . 'assets/js/uk-cookie-consent-js.js', array ( 'jquery' ), '2.0.0', true );
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
  * @since 2.0.0
55
  */
56
  public function add_css() {
57
+ $options = get_option ( 'ctcc_options_settings' );
58
+ $ctcc_styles_settings = get_option ( 'ctcc_styles_settings' );
59
+ $position_css = 'position: fixed;
60
+ left: 0;
61
+ top: 0;
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
+ right: 20px;
77
+ top: 6%;
78
+ width: 300px;';
79
+ } else if ( $ctcc_styles_settings['position'] == 'top-left-block' ) {
80
+ $position_css = 'position: fixed;
81
+ left: 20px;
82
+ top: 6%;
83
+ width: 300px;';
84
+ } else if ( $ctcc_styles_settings['position'] == 'bottom-left-block' ) {
85
+ $position_css = 'position: fixed;
86
+ left: 20px;
87
+ bottom: 6%;
88
+ width: 300px;';
89
+ } else if ( $ctcc_styles_settings['position'] == 'bottom-right-block' ) {
90
+ $position_css = 'position: fixed;
91
+ right: 20px;
92
+ bottom: 6%;
93
+ width: 300px;';
94
+ }
95
+ // Get our styles
96
+ $text_color = $ctcc_styles_settings['text_color'];
97
+ $position = 'top';
98
+ $bg_color = $ctcc_styles_settings['bg_color'];
99
+ $link_color = $ctcc_styles_settings['link_color'];
100
+ $button_bg = $ctcc_styles_settings['button_bg_color'];
101
+ $button_color = $ctcc_styles_settings['button_color'];
102
+ if ( ! empty ( $ctcc_styles_settings['flat_button'] ) ){
103
+ $button_style = 'border: 0; padding: 6px 9px; border-radius: 3px;';
104
+ } else {
105
+ $button_style = '';
106
+ }
107
+ // Build our CSS
108
+ $css = '<style id="ctcc-css" type="text/css" media="screen">';
109
+ $css .= '
110
+ #catapult-cookie-bar {
111
+ box-sizing: border-box;
112
+ max-height: 0;
113
+ opacity: 0;
114
+ z-index: 99999;
115
+ overflow: hidden;
116
+ color: ' . $text_color . ';
117
+ ' . $position_css . '
118
+ background-color: ' . $bg_color . ';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
119
  }
120
+ #catapult-cookie-bar a {
121
+ color: ' . $link_color . ';
122
+ }
123
+ #catapult-cookie-bar .x_close span {
124
+ background-color: ' . $button_color . ';
125
+ }
126
+ button#catapultCookie {
127
+ background:' . $button_bg . ';
128
+ color: ' . $button_color . ';
129
+ ' . $button_style . '
130
+ }
131
+ #catapult-cookie-bar h3 {
132
+ color: ' . $text_color . ';
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
  */
148
  public function add_js() {
149
 
150
+ $options = get_option( 'ctcc_options_settings' );
151
+ $ctcc_styles_settings = get_option ( 'ctcc_styles_settings' );
 
 
 
152
 
153
+ if ( $ctcc_styles_settings['position'] == 'top-bar' || $ctcc_styles_settings['position'] == 'bottom-bar' ) {
154
+ $type = 'bar';
155
+ } else {
156
+ $type = 'block';
157
+ } ?>
158
 
159
+ <script type="text/javascript">
160
+ jQuery(document).ready(function($){
161
+ <?php if ( isset ( $_GET['cookie'] ) ) { ?>
162
+ catapultDeleteCookie('catAccCookies');
163
+ <?php } ?>
164
+ if(!catapultReadCookie("catAccCookies")){ // If the cookie has not been set then show the bar
165
+ $("html").addClass("has-cookie-bar");
166
+ $("html").addClass("cookie-bar-<?php echo $ctcc_styles_settings['position']; ?>");
167
+ $("html").addClass("cookie-bar-<?php echo $type; ?>");
168
+ <?php // Move the HTML down if the bar is at the top
169
+ if ( $ctcc_styles_settings['position'] == 'top-bar' ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
170
  ?>
171
+ // Wait for the animation on the html to end before recalculating the required top margin
172
+ $("html").on('webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend', function(e) {
173
+ // code to execute after transition ends
174
+ var barHeight = $('#catapult-cookie-bar').outerHeight();
175
+ $("html").css("margin-top",barHeight);
176
+ $("body.admin-bar").css("margin-top",barHeight-32); // Push the body down if the admin bar is active
177
+ });
178
  <?php } ?>
179
+ }
180
+ <?php if ( $options['closure'] == 'timed' ) {
181
+ // Add some script if it's on a timer
182
+ $duration = absint($options['duration']) * 1000; ?>
183
+ setTimeout(ctccCloseNotification, <?php echo $duration; ?>);
184
+ <?php } ?>
185
+ <?php if ( ! empty ( $options['first_page'] ) ) {
186
+ // Add some script if the notification only displays on the first page ?>
187
+ ctccFirstPage();
188
+ <?php } ?>
189
+ });
190
+ </script>
191
 
192
+ <?php }
193
 
194
  /*
195
  * Add the notification bar itself
197
  */
198
  public function add_notification_bar() {
199
 
200
+ $ctcc_options_settings = get_option ( 'ctcc_options_settings' );
201
+ $ctcc_content_settings = get_option ( 'ctcc_content_settings' );
202
+ $ctcc_styles_settings = get_option ( 'ctcc_styles_settings' );
 
 
 
 
203
 
204
+ // Check if it's a block or a bar
205
+ $is_block = true;
206
+ if ( $ctcc_styles_settings['position'] == 'top-bar' || $ctcc_styles_settings['position'] == 'bottom-bar' ) {
207
+ $is_block = false; // It's a bar
208
+ }
209
 
210
+ // Add some classes to the block
211
+ $classes = '';
212
+ if ( $is_block ) {
213
+ if ( ! empty ( $ctcc_styles_settings['rounded_corners'] ) ) {
214
+ $classes .= ' rounded-corners';
 
 
 
 
215
  }
216
+ if ( ! empty ( $ctcc_styles_settings['drop_shadow'] ) ) {
217
+ $classes .= ' drop-shadow';
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
+ // Allowed tags
228
+ $allowed = array (
229
+ 'a' => array (
230
+ 'href' => array(),
231
+ 'title' => array()
232
+ ),
233
+ 'br' => array(),
234
+ 'em' => array(),
235
+ 'strong' => array(),
236
+ 'p' => array()
237
+ );
238
 
239
+ $content = '';
240
+ $close_content = '';
241
 
242
+ // Print the notification bar
243
+ $content = '<div id="catapult-cookie-bar" class="' . $classes . '">';
 
 
 
244
 
245
+ // Add a custom wrapper class if specified
246
+ if ( $ctcc_styles_settings['position'] == 'top-bar' || $ctcc_styles_settings['position'] == 'bottom-bar' ) {
247
+ $content .= '<div class="ctcc-inner ' . esc_attr ( str_replace ( '.', '', $ctcc_styles_settings['container_class'] ) ) . '">';
248
+ $close_content = '</div><!-- custom wrapper class -->';
249
+ }
 
 
 
250
 
251
+ // Add a title if it's a block
252
+ if ( $ctcc_styles_settings['position'] != 'top-bar' && $ctcc_styles_settings['position'] != 'bottom-bar' ) {
253
+ $heading_text = wp_kses ( $ctcc_content_settings['heading_text'], $allowed );
254
+ $heading_text = apply_filters( 'ctcc_heading_text', $heading_text );
255
+ $content .= sprintf ( '<h3>%s</h3>',
256
+ $heading_text
257
+ );
258
+ }
 
 
 
 
 
 
 
 
 
 
 
 
259
 
260
+ // Make the Read More link
261
+ $more_text = '';
262
+ if ( $ctcc_content_settings['more_info_text'] ) {
263
+ // Find what page we're linking to
264
+ if ( ! empty ( $ctcc_content_settings['more_info_url'] ) ) {
265
+ // Check the absolute URL first
266
+ $link = $ctcc_content_settings['more_info_url'];
267
+ } else {
268
+ // Use the internal page
269
+ $link = get_permalink ( $ctcc_content_settings['more_info_page'] );
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
+ $button_text = '';
282
+ if ( empty ( $ctcc_styles_settings['x_close'] ) ) {
283
+ $accept_text = wp_kses ( $ctcc_content_settings['accept_text'], $allowed );
284
+ $accept_text = apply_filters( 'ctcc_accept_text', $accept_text );
285
+ $button_text = sprintf (
286
+ '<button id="catapultCookie" tabindex=0 onclick="catapultAcceptCookies();">%s</button>',
287
+ $accept_text
 
288
  );
289
+ }
290
 
291
+ // The main bar content
292
+ $notification_text = wp_kses ( $ctcc_content_settings['notification_text'], $allowed );
293
+ $notification_text = apply_filters( 'ctcc_notification_text', $notification_text );
294
+ $content .= sprintf (
295
+ '<span class="ctcc-left-side">%s %s</span><span class="ctcc-right-side">%s</span>',
296
+ $notification_text,
297
+ $more_text,
298
+ $button_text
299
+ );
300
+
301
+ // X close button
302
+ if ( ! empty ( $ctcc_styles_settings['x_close'] ) ) {
303
+ $content .= '<div class="x_close"><span></span><span></span></div>';
304
+ }
305
 
306
+ // Close custom wrapper class if used
307
+ $content .= $close_content;
308
 
309
+ $content .= '</div><!-- #catapult-cookie-bar -->';
310
 
311
+ echo apply_filters ( 'catapult_cookie_content', $content, $ctcc_content_settings );
 
 
312
 
313
  }
314
 
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,32 +1,29 @@
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.7.3
7
- Stable tag: 2.3.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 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,10 +32,10 @@ One of the most popular aspects of the plugin is its simplicity of use - simply
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,68 +58,16 @@ Yep. Take a look at [the demo](http://cookieconsent.catapultthemes.com/). Reset
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.2 =
75
- * Updated: incorrect text domains
76
- * Updated: tracking class to 1.0.1
77
- * Updated: removed unnecessary keys from wpml-config.xml
78
-
79
- = 2.3.1 =
80
- * Added: link to create privacy policy
81
- * Added: tracking
82
-
83
- = 2.3.0 =
84
- * Added: GeoIP support (suggested by jeffrobbins)
85
-
86
- = 2.2.5 =
87
- * Fixed: dismissed notification bar obscuring content
88
-
89
- = 2.2.4 =
90
- * Fixed: correct escaping for more info URL
91
-
92
- = 2.2.3 =
93
- * Updated: stable tag
94
-
95
- = 2.2.2 =
96
- * Fixed: text domain in class-ctcc-metafield (spotted by mmmisiek)
97
-
98
- = 2.2.1 =
99
- * Updated: better escaping (suggested by djpaul)
100
-
101
- = 2.2.0 =
102
- * Added: optionally exclude pages and posts from displaying the cookie notification (suggested by jeffrobbins)
103
- * Added: close notification on scroll option (suggested by jeffrobbins)
104
- * Added: class name for more info link
105
- * Fixed: x-close responsive margin
106
- * Updated: allow shortcodes in notification text
107
- * Updated: better settings sanitization
108
-
109
- = 2.1.7 =
110
- * Updated: admin styles
111
-
112
- = 2.1.6 =
113
- * Updated: wpml-config.xml file (thanks to vukvukovich)
114
-
115
- = 2.1.5 =
116
- * Fixed: added missing Italian translation files
117
-
118
- = 2.1.4 =
119
- * Fixed: replaced wpml-config.xml file
120
-
121
- = 2.1.3 =
122
- * Updated: tags
123
-
124
  = 2.1.2 =
125
- * Updated: translation list
126
 
127
  = 2.1.1 =
128
  * Fixed: missing images in admin
1
  === Cookie Consent ===
2
  Contributors: Catapult_Themes, husobj, jraczynski
3
+ Donate Link: https://paypal.com
4
+ Tags: cookie law, cookies, EU, implied consent, uk cookie consent, compliance, eu cookie law, eu privacy directive, privacy, privacy directive, consent, cookie, cookie compliance, cookie law, eu cookie, notice, notification, notify, cookie notice, cookie notification, cookie notify, wpml
5
  Requires at least: 4.3
6
+ Tested up to: 4.6.1
7
+ Stable tag: 2.1.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 2.0 is a major rewrite of the popular Cookie Consent plugin. We've retained all the features that originally made the plugin so popular, such as speed of set-up, but added new features based on feedback and requests.
14
 
15
+ = Activation =
16
+ One of the most popular aspects of the plugin is its simplicity of use. The new version is no different - simply install and activate the plugin to automatically add the cookie consent notification bar without any 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.
17
 
18
+ = New Features =
19
+ We've extended the options with the plugin and in version 2.0, we've added many new features, including:
20
+ * Choice of dismissal method - either on click by the user or timed
 
 
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
+ * Better translation support
25
+ * Better responsive support
26
+ * More customization options - including the ability to update styles from within the customizer
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
  = 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
  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
+ * Fixed: missing images in admin
71
 
72
  = 2.1.1 =
73
  * Fixed: missing images in admin
tracking/class-plugin-usage-tracker.php DELETED
@@ -1,767 +0,0 @@
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.0.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.0.0';
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 weekly 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
- if ( ! wp_next_scheduled( 'put_do_weekly_action' ) ) {
120
- wp_schedule_event( time(), 'weekly', 'put_do_weekly_action' );
121
- }
122
- // Run tracking here in case plugin has been reactivated
123
- $this->do_tracking();
124
- }
125
-
126
- /**
127
- * This is our function to get everything going
128
- * Check that user has opted in
129
- * Collect data
130
- * Then send it back
131
- *
132
- * @since 1.0.0
133
- */
134
- public function do_tracking() {
135
- // If the home site hasn't been defined, we just drop out. Nothing much we can do.
136
- if ( ! $this->home_url ) {
137
- return;
138
- }
139
-
140
- // Check to see if the user has opted in to tracking
141
- $allow_tracking = $this->get_is_tracking_allowed();
142
- if( ! $allow_tracking ) {
143
- return;
144
- }
145
-
146
- // Get our data
147
- $body = $this->get_data();
148
-
149
- // Send the data
150
- $this->send_data( $body );
151
-
152
- }
153
-
154
- /**
155
- * Send the data to the home site
156
- *
157
- * @since 1.0.0
158
- */
159
- public function send_data( $body ) {
160
-
161
- $request = wp_remote_post(
162
- esc_url( $this->home_url . '?usage_tracker=hello' ),
163
- array(
164
- 'method' => 'POST',
165
- 'timeout' => 20,
166
- 'redirection' => 5,
167
- 'httpversion' => '1.1',
168
- 'blocking' => true,
169
- 'body' => $body,
170
- 'user-agent' => 'PUT/1.0.0; ' . get_bloginfo( 'url' )
171
- )
172
- );
173
-
174
- if( is_wp_error( $request ) ) {
175
- return $request;
176
- }
177
-
178
- }
179
-
180
- /**
181
- * Here we collect most of the data
182
- *
183
- * @since 1.0.0
184
- */
185
- public function get_data() {
186
-
187
- // Use this to pass error messages back if necessary
188
- $body['message'] = '';
189
-
190
- // Use this array to send data back
191
- $body = array(
192
- 'plugin_slug' => sanitize_text_field( $this->plugin_name ),
193
- 'url' => get_bloginfo( 'url' ),
194
- 'site_name' => get_bloginfo( 'name' ),
195
- 'site_version' => get_bloginfo( 'version' ),
196
- 'site_language' => get_bloginfo( 'language' ),
197
- 'charset' => get_bloginfo( 'charset' ),
198
- 'wisdom_version' => $this->wisdom_version,
199
- 'php_version' => phpversion(),
200
- 'multisite' => is_multisite(),
201
- 'file_location' => __FILE__
202
- );
203
-
204
- // Collect the email if the correct option has been set
205
- if( $this->get_can_collect_email() ) {
206
- $body['email'] = get_bloginfo( 'admin_email' );
207
- }
208
- $body['marketing_method'] = $this->marketing;
209
-
210
- $body['server'] = isset( $_SERVER['SERVER_SOFTWARE'] ) ? $_SERVER['SERVER_SOFTWARE'] : '';
211
-
212
- // Retrieve current plugin information
213
- if( ! function_exists( 'get_plugins' ) ) {
214
- include ABSPATH . '/wp-admin/includes/plugin.php';
215
- }
216
-
217
- $plugins = array_keys( get_plugins() );
218
- $active_plugins = get_option( 'active_plugins', array() );
219
-
220
- foreach ( $plugins as $key => $plugin ) {
221
- if ( in_array( $plugin, $active_plugins ) ) {
222
- // Remove active plugins from list so we can show active and inactive separately
223
- unset( $plugins[$key] );
224
- }
225
- }
226
-
227
- $body['active_plugins'] = $active_plugins;
228
- $body['inactive_plugins'] = $plugins;
229
-
230
- // Check text direction
231
- $body['text_direction'] = 'LTR';
232
- if( is_rtl() ) {
233
- $body['text_direction'] = 'RTL';
234
- }
235
-
236
- /**
237
- * Get our plugin data
238
- * Currently we grab plugin name and version
239
- * Or, return a message if the plugin data is not available
240
- * @since 1.0.0
241
- */
242
- $plugin = $this->plugin_data();
243
- if( empty( $plugin ) ) {
244
- // We can't find the plugin data
245
- // Send a message back to our home site
246
- $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' );
247
- $body['status'] = 'Data not found'; // Never translated
248
- } else {
249
- if( isset( $plugin['Name'] ) ) {
250
- $body['plugin'] = sanitize_text_field( $plugin['Name'] );
251
- }
252
- if( isset( $plugin['Version'] ) ) {
253
- $body['version'] = sanitize_text_field( $plugin['Version'] );
254
- }
255
- $body['status'] = 'Active'; // Never translated
256
- }
257
-
258
- /**
259
- * Get our plugin options
260
- * @since 1.0.0
261
- */
262
- $options = $this->options;
263
- $plugin_options = array();
264
- if( ! empty( $options ) && is_array( $options ) ) {
265
- foreach( $options as $option ) {
266
- $fields = get_option( $option );
267
- // Check for permission to send this option
268
- if( isset( $fields['wisdom_registered_setting'] ) ) {
269
- foreach( $fields as $key=>$value ) {
270
- $plugin_options[$key] = $value;
271
- }
272
- }
273
- }
274
- }
275
- $body['plugin_options'] = $this->options; // Returns array
276
- $body['plugin_options_fields'] = $plugin_options; // Returns object
277
-
278
- /**
279
- * Get our theme data
280
- * Currently we grab theme name and version
281
- * @since 1.0.0
282
- */
283
- $theme = wp_get_theme();
284
- if( $theme->Name ) {
285
- $body['theme'] = sanitize_text_field( $theme->Name );
286
- }
287
- if( $theme->Version ) {
288
- $body['theme_version'] = sanitize_text_field( $theme->Version );
289
- }
290
-
291
- // Return the data
292
- return $body;
293
-
294
- }
295
-
296
- /**
297
- * Return plugin data
298
- * @since 1.0.0
299
- */
300
- public function plugin_data() {
301
- // Being cautious here
302
- if( ! function_exists( 'get_plugin_data' ) ) {
303
- include ABSPATH . '/wp-admin/includes/plugin.php';
304
- }
305
- // Retrieve current plugin information
306
- $plugin = get_plugin_data( $this->plugin_file );
307
- return $plugin;
308
- }
309
-
310
- /**
311
- * Deactivating plugin
312
- * @since 1.0.0
313
- */
314
- public function deactivate_this_plugin() {
315
- // Check to see if the user has opted in to tracking
316
- $allow_tracking = $this->get_is_tracking_allowed();
317
- if( ! $allow_tracking ) {
318
- return;
319
- }
320
- $body = $this->get_data();
321
- $body['status'] = 'Deactivated'; // Never translated
322
- $body['deactivated_date'] = time();
323
-
324
- // Add deactivation form data
325
- if( false !== get_option( 'wisdom_deactivation_reason_' . $this->plugin_name ) ) {
326
- $body['deactivation_reason'] = get_option( 'wisdom_deactivation_reason_' . $this->plugin_name );
327
- }
328
- if( false !== get_option( 'wisdom_deactivation_details_' . $this->plugin_name ) ) {
329
- $body['deactivation_details'] = get_option( 'wisdom_deactivation_details_' . $this->plugin_name );
330
- }
331
-
332
- $this->send_data( $body );
333
- // Clear scheduled update
334
- wp_clear_scheduled_hook( 'wisdom_do_weekly_action' );
335
- }
336
-
337
- /**
338
- * Is tracking allowed?
339
- * @since 1.0.0
340
- */
341
- public function get_is_tracking_allowed() {
342
- // The wisdom_allow_tracking option is an array of plugins that are being tracked
343
- $allow_tracking = get_option( 'wisdom_allow_tracking' );
344
- // If this plugin is in the array, then tracking is allowed
345
- if( isset( $allow_tracking[$this->plugin_name] ) ) {
346
- return true;
347
- }
348
- return false;
349
- }
350
-
351
- /**
352
- * Set if tracking is allowed
353
- * Option is an array of all plugins with tracking permitted
354
- * More than one plugin may be using the tracker
355
- * @since 1.0.0
356
- * @param $is_allowed Boolean true if tracking is allowed, false if not
357
- */
358
- public function set_is_tracking_allowed( $is_allowed, $plugin=null ) {
359
- if( empty( $plugin ) ) {
360
- $plugin = $this->plugin_name;
361
- }
362
- // The wisdom_allow_tracking option is an array of plugins that are being tracked
363
- $allow_tracking = get_option( 'wisdom_allow_tracking' );
364
- // If the user has agreed to allow tracking or if opt-in is not required
365
- if( $is_allowed || ! $this->require_optin ) {
366
- if( empty( $allow_tracking ) || ! is_array( $allow_tracking ) ) {
367
- // If nothing exists in the option yet, start a new array with the plugin name
368
- $allow_tracking = array( $plugin => $plugin );
369
- } else {
370
- // Else add the plugin name to the array
371
- $allow_tracking[$plugin] = $plugin;
372
- }
373
- } else {
374
- if( isset( $allow_tracking[$plugin] ) ) {
375
- unset( $allow_tracking[$plugin] );
376
- }
377
- }
378
- update_option( 'wisdom_allow_tracking', $allow_tracking );
379
- }
380
-
381
- /**
382
- * Set if we should block the opt-in notice for this plugin
383
- * Option is an array of all plugins that have received a response from the user
384
- * @since 1.0.0
385
- */
386
- public function update_block_notice( $plugin=null ) {
387
- if( empty( $plugin ) ) {
388
- $plugin = $this->plugin_name;
389
- }
390
- $block_notice = get_option( 'wisdom_block_notice' );
391
- if( empty( $block_notice ) || ! is_array( $block_notice ) ) {
392
- // If nothing exists in the option yet, start a new array with the plugin name
393
- $block_notice = array( $plugin => $plugin );
394
- } else {
395
- // Else add the plugin name to the array
396
- $block_notice[$plugin] = $plugin;
397
- }
398
- update_option( 'wisdom_block_notice', $block_notice );
399
- }
400
-
401
- /**
402
- * Can we collect the email address?
403
- * @since 1.0.0
404
- */
405
- public function get_can_collect_email() {
406
- // The wisdom_collect_email option is an array of plugins that are being tracked
407
- $collect_email = get_option( 'wisdom_collect_email' );
408
- // If this plugin is in the array, then we can collect the email address
409
- if( isset( $collect_email[$this->plugin_name] ) ) {
410
- return true;
411
- }
412
- return false;
413
- }
414
-
415
- /**
416
- * Set if user has allowed us to collect their email address
417
- * Option is an array of all plugins with email collection permitted
418
- * More than one plugin may be using the tracker
419
- * @since 1.0.0
420
- * @param $can_collect Boolean true if collection is allowed, false if not
421
- */
422
- public function set_can_collect_email( $can_collect, $plugin=null ) {
423
- if( empty( $plugin ) ) {
424
- $plugin = $this->plugin_name;
425
- }
426
- // The wisdom_collect_email option is an array of plugins that are being tracked
427
- $collect_email = get_option( 'wisdom_collect_email' );
428
- // If the user has agreed to allow tracking or if opt-in is not required
429
- if( $can_collect ) {
430
- if( empty( $collect_email ) || ! is_array( $collect_email ) ) {
431
- // If nothing exists in the option yet, start a new array with the plugin name
432
- $collect_email = array( $plugin => $plugin );
433
- } else {
434
- // Else add the plugin name to the array
435
- $collect_email[$plugin] = $plugin;
436
- }
437
- } else {
438
- if( isset( $collect_email[$plugin] ) ) {
439
- unset( $collect_email[$plugin] );
440
- }
441
- }
442
- update_option( 'wisdom_collect_email', $collect_email );
443
- }
444
-
445
- /**
446
- * Display the admin notice to users to allow them to opt in
447
- *
448
- * @since 1.0.0
449
- */
450
- public function optin_notice() {
451
- // Check for plugin args
452
- if( isset( $_GET['plugin'] ) && isset( $_GET['plugin_action'] ) ) {
453
- $plugin = sanitize_text_field( $_GET['plugin'] );
454
- $action = sanitize_text_field( $_GET['plugin_action'] );
455
- if( $action == 'yes' ) {
456
- $this->set_is_tracking_allowed( true, $plugin );
457
- $this->do_tracking(); // Run this straightaway
458
- } else {
459
- $this->set_is_tracking_allowed( false, $plugin );
460
- }
461
- $this->update_block_notice( $plugin );
462
- }
463
-
464
- // Check whether to block the notice, e.g. because we're in a local environment
465
- // wisdom_block_notice works the same as wisdom_allow_tracking, an array of plugin names
466
- $block_notice = get_option( 'wisdom_block_notice' );
467
- if( isset( $block_notice[$this->plugin_name] ) ) {
468
- return;
469
- }
470
-
471
- if ( ! current_user_can( 'manage_options' ) ) {
472
- return;
473
- }
474
-
475
- // @credit EDD
476
- // Don't bother asking user to opt in if they're in local dev
477
- if ( stristr( network_site_url( '/' ), 'dev' ) !== false || stristr( network_site_url( '/' ), 'localhost' ) !== false || stristr( network_site_url( '/' ), ':8888' ) !== false ) {
478
- $this->update_block_notice();
479
- } else {
480
-
481
- // Display the notice requesting permission to track
482
- // Retrieve current plugin information
483
- $plugin = $this->plugin_data();
484
- $plugin_name = $plugin['Name'];
485
-
486
- // Args to add to query if user opts in to tracking
487
- $yes_args = array(
488
- 'plugin' => $this->plugin_name,
489
- 'plugin_action' => 'yes'
490
- );
491
-
492
- // Decide how to request permission to collect email addresses
493
- if( $this->marketing == 1 ) {
494
- // Option 1 combines permissions to track and collect email
495
- $yes_args['marketing_optin'] = 'yes';
496
- } else if( $this->marketing == 2 ) {
497
- // Option 2 enables a second notice that fires after the user opts in to tracking
498
- $yes_args['marketing'] = 'yes';
499
- }
500
- $url_yes = add_query_arg( $yes_args );
501
- $url_no = add_query_arg( array(
502
- 'plugin' => $this->plugin_name,
503
- 'plugin_action' => 'no'
504
- ) );
505
-
506
- // Decide on notice text
507
- if( $this->marketing != 1 ) {
508
- // Standard notice text
509
- $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' );
510
- } else {
511
- // If we have option 1 for marketing, we include reference to sending product information here
512
- $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' );
513
- }
514
- // And we allow you to filter the text anyway
515
- $notice_text = apply_filters( 'wisdom_notice_text_' . esc_attr( $this->plugin_name ), $notice_text ); ?>
516
-
517
- <div class="notice notice-info updated put-dismiss-notice">
518
- <p><?php echo '<strong>' . esc_html( $plugin_name ) . '</strong>'; ?></p>
519
- <p><?php echo esc_html( $notice_text ); ?></p>
520
- <p>
521
- <a href="<?php echo esc_url( $url_yes ); ?>" class="button-secondary"><?php _e( 'Allow', 'plugin-usage-tracker' ); ?></a>
522
- <a href="<?php echo esc_url( $url_no ); ?>" class="button-secondary"><?php _e( 'Do Not Allow', 'plugin-usage-tracker' ); ?></a>
523
- </p>
524
- </div>
525
- <?php
526
- }
527
-
528
- }
529
-
530
- /**
531
- * Display the marketing notice to users if enabled
532
- * Only displays after the user has opted in to tracking
533
- *
534
- * @since 1.0.0
535
- */
536
- public function marketing_notice() {
537
- // Check if user has opted in to marketing
538
- if( isset( $_GET['marketing_optin'] ) ) {
539
- // Set marketing optin
540
- $this->set_can_collect_email( sanitize_text_field( $_GET['marketing_optin'] ), $this->plugin_name );
541
- // Do tracking
542
- $this->do_tracking();
543
- } else if( isset( $_GET['marketing'] ) && $_GET['marketing']=='yes' ) {
544
- // Display the notice requesting permission to collect email address
545
- // Retrieve current plugin information
546
- $plugin = $this->plugin_data();
547
- $plugin_name = $plugin['Name'];
548
-
549
- $url_yes = add_query_arg( array(
550
- 'plugin' => $this->plugin_name,
551
- 'marketing_optin' => 'yes'
552
- ) );
553
- $url_no = add_query_arg( array(
554
- 'plugin' => $this->plugin_name,
555
- 'marketing_optin' => 'no'
556
- ) );
557
-
558
- $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' );
559
- $marketing_text = apply_filters( 'wisdom_marketing_text_' . esc_attr( $this->plugin_name ), $marketing_text ); ?>
560
-
561
- <div class="notice notice-info updated put-dismiss-notice">
562
- <p><?php echo '<strong>' . esc_html( $plugin_name ) . '</strong>'; ?></p>
563
- <p><?php echo esc_html( $marketing_text ); ?></p>
564
- <p>
565
- <a href="<?php echo esc_url( $url_yes ); ?>" data-putnotice="yes" class="button-secondary"><?php _e( 'Yes Please', 'plugin-usage-tracker' ); ?></a>
566
- <a href="<?php echo esc_url( $url_no ); ?>" data-putnotice="no" class="button-secondary"><?php _e( 'No Thank You', 'plugin-usage-tracker' ); ?></a>
567
- </p>
568
- </div>
569
- <?php }
570
- }
571
-
572
- /**
573
- * Filter the deactivation link to allow us to present a form when the user deactivates the plugin
574
- * @since 1.0.0
575
- */
576
- public function filter_action_links( $links ) {
577
- // Check to see if the user has opted in to tracking
578
- if( ! $this->get_is_tracking_allowed() ) {
579
- return $links;
580
- }
581
- if( isset( $links['deactivate'] ) && $this->include_goodbye_form ) {
582
- $deactivation_link = $links['deactivate'];
583
- // Insert an onClick action to allow form before deactivating
584
- $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 );
585
- $links['deactivate'] = $deactivation_link;
586
- }
587
- return $links;
588
- }
589
-
590
- /*
591
- * Form text strings
592
- * These are non-filterable and used as fallback in case filtered strings aren't set correctly
593
- * @since 1.0.0
594
- */
595
- public function form_default_text() {
596
- $form = array();
597
- $form['heading'] = __( 'Sorry to see you go', 'plugin-usage-tracker' );
598
- $form['body'] = __( 'Before you deactivate the plugin, would you quickly give us your reason for doing so?', 'plugin-usage-tracker' );
599
- $form['options'] = array(
600
- __( 'Set up is too difficult', 'plugin-usage-tracker' ),
601
- __( 'Lack of documentation', 'plugin-usage-tracker' ),
602
- __( 'Not the features I wanted', 'plugin-usage-tracker' ),
603
- __( 'Found a better plugin', 'plugin-usage-tracker' ),
604
- __( 'Installed by mistake', 'plugin-usage-tracker' ),
605
- __( 'Only required temporarily', 'plugin-usage-tracker' ),
606
- __( 'Didn\'t work', 'plugin-usage-tracker' )
607
- );
608
- $form['details'] = __( 'Details (optional)', 'plugin-usage-tracker' );
609
- return $form;
610
- }
611
-
612
- /**
613
- * Form text strings
614
- * These can be filtered
615
- * The filter hook must be unique to the plugin
616
- * @since 1.0.0
617
- */
618
- public function form_filterable_text() {
619
- $form = $this->form_default_text();
620
- return apply_filters( 'wisdom_form_text_' . esc_attr( $this->plugin_name ), $form );
621
- }
622
-
623
- /**
624
- * Form text strings
625
- * These can be filtered
626
- * @since 1.0.0
627
- */
628
- public function goodbye_ajax() {
629
- // Get our strings for the form
630
- $form = $this->form_filterable_text();
631
- if( ! isset( $form['heading'] ) || ! isset( $form['body'] ) || ! isset( $form['options'] ) || ! is_array( $form['options'] ) || ! isset( $form['details'] ) ) {
632
- // If the form hasn't been filtered correctly, we revert to the default form
633
- $form = $this->form_default_text();
634
- }
635
- // Build the HTML to go in the form
636
- $html = '<div class="put-goodbye-form-head"><strong>' . esc_html( $form['heading'] ) . '</strong></div>';
637
- $html .= '<div class="put-goodbye-form-body"><p>' . esc_html( $form['body'] ) . '</p>';
638
- if( is_array( $form['options'] ) ) {
639
- $html .= '<div class="put-goodbye-options"><p>';
640
- foreach( $form['options'] as $option ) {
641
- $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>';
642
- }
643
- $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>';
644
- $html .= '</div><!-- .put-goodbye-options -->';
645
- }
646
- $html .= '</div><!-- .put-goodbye-form-body -->';
647
- $html .= '<p class="deactivating-spinner"><span class="spinner"></span> ' . __( 'Submitting form', 'plugin-usage-tracker' ) . '</p>';
648
- ?>
649
- <div class="put-goodbye-form-bg"></div>
650
- <style type="text/css">
651
- .put-form-active .put-goodbye-form-bg {
652
- background: rgba( 0, 0, 0, .5 );
653
- position: fixed;
654
- top: 0;
655
- left: 0;
656
- width: 100%;
657
- height: 100%;
658
- }
659
- .put-goodbye-form-wrapper {
660
- position: relative;
661
- z-index: 999;
662
- display: none;
663
- }
664
- .put-form-active .put-goodbye-form-wrapper {
665
- display: block;
666
- }
667
- .put-goodbye-form {
668
- display: none;
669
- }
670
- .put-form-active .put-goodbye-form {
671
- position: absolute;
672
- bottom: 30px;
673
- left: 0;
674
- max-width: 400px;
675
- background: #fff;
676
- white-space: normal;
677
- }
678
- .put-goodbye-form-head {
679
- background: #0073aa;
680
- color: #fff;
681
- padding: 8px 18px;
682
- }
683
- .put-goodbye-form-body {
684
- padding: 8px 18px;
685
- color: #444;
686
- }
687
- .deactivating-spinner {
688
- display: none;
689
- }
690
- .deactivating-spinner .spinner {
691
- float: none;
692
- margin: 4px 4px 0 18px;
693
- vertical-align: bottom;
694
- visibility: visible;
695
- }
696
- .put-goodbye-form-footer {
697
- padding: 8px 18px;
698
- }
699
- </style>
700
- <script>
701
- jQuery(document).ready(function($){
702
- $("#put-goodbye-link-<?php echo esc_attr( $this->plugin_name ); ?>").on("click",function(){
703
- // We'll send the user to this deactivation link when they've completed or dismissed the form
704
- var url = document.getElementById("put-goodbye-link-<?php echo esc_attr( $this->plugin_name ); ?>");
705
- $('body').toggleClass('put-form-active');
706
- $("#put-goodbye-form-<?php echo esc_attr( $this->plugin_name ); ?>").fadeIn();
707
- $("#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 __( 'Submit and Deactivate', 'plugin-usage-tracker' ); ?></a>&nbsp;<a class="secondary button" href="'+url+'"><?php __( 'Just Deactivate', 'plugin-usage-tracker' ); ?></a></p></div>');
708
- $('#put-submit-form').on('click', function(e){
709
- // As soon as we click, the body of the form should disappear
710
- $("#put-goodbye-form-<?php echo esc_attr( $this->plugin_name ); ?> .put-goodbye-form-body").fadeOut();
711
- $("#put-goodbye-form-<?php echo esc_attr( $this->plugin_name ); ?> .put-goodbye-form-footer").fadeOut();
712
- // Fade in spinner
713
- $("#put-goodbye-form-<?php echo esc_attr( $this->plugin_name ); ?> .deactivating-spinner").fadeIn();
714
- e.preventDefault();
715
- var values = new Array();
716
- $.each($("input[name='put-goodbye-options[]']:checked"), function(){
717
- values.push($(this).val());
718
- });
719
- var details = $('#put-goodbye-reasons').val();
720
- var data = {
721
- 'action': 'goodbye_form',
722
- 'values': values,
723
- 'details': details,
724
- 'security': "<?php echo wp_create_nonce ( 'wisdom_goodbye_form' ); ?>",
725
- 'dataType': "json"
726
- }
727
- $.post(
728
- ajaxurl,
729
- data,
730
- function(response){
731
- // Redirect to original deactivation URL
732
- window.location.href = url;
733
- }
734
- );
735
- });
736
- // If we click outside the form, the form will close
737
- $('.put-goodbye-form-bg').on('click',function(){
738
- $("#put-goodbye-form-<?php echo esc_attr( $this->plugin_name ); ?>").fadeOut();
739
- $('body').removeClass('put-form-active');
740
- });
741
- });
742
- });
743
- </script>
744
- <?php }
745
-
746
- /**
747
- * AJAX callback when the form is submitted
748
- * @since 1.0.0
749
- */
750
- public function goodbye_form_callback() {
751
- check_ajax_referer( 'wisdom_goodbye_form', 'security' );
752
- if( isset( $_POST['values'] ) ) {
753
- $values = json_encode( wp_unslash( $_POST['values'] ) );
754
- update_option( 'wisdom_deactivation_reason_' . $this->plugin_name, $values );
755
- }
756
- if( isset( $_POST['details'] ) ) {
757
- $details = sanitize_text_field( $_POST['details'] );
758
- update_option( 'wisdom_deactivation_details_' . $this->plugin_name, $details );
759
- }
760
- $this->do_tracking(); // Run this straightaway
761
- echo 'success';
762
- wp_die();
763
- }
764
-
765
- }
766
-
767
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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.3.2
7
  Author: Catapult_Themes
8
  Author URI: http://catapultthemes.com/
9
  Text Domain: uk-cookie-consent
@@ -19,27 +19,15 @@ if ( ! defined( 'ABSPATH' ) ) {
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,26 +62,4 @@ function ctcc_create_policy_page() {
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(),
93
- true,
94
- true,
95
- 1
96
- );
97
- }
98
- uk_cookie_consent_start_plugin_tracking();
99
- }
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.1.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
  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
  update_option ( 'ctcc_more_info_page', $pageid );
63
  }
64
  }
65
+ register_activation_hook ( __FILE__, 'ctcc_create_policy_page' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
wpml-config.xml DELETED
@@ -1,12 +0,0 @@
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>