Cookie Notice by dFactory - Version 2.4.1

Version Description

  • New: Contact Form 7 reCaptcha support
  • Tweak: Switched health status from critical to recommended when Cookie Compliance is not integrated
  • Tweak: Add SimeSite=Lax for created cookies
Download this release

Release Info

Developer dfactory
Plugin Icon 128x128 Cookie Notice by dFactory
Version 2.4.1
Comparing to
See all releases

Code changes from version 2.4.0 to 2.4.1

cookie-notice.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  Plugin Name: Cookie Notice & Compliance for GDPR / CCPA
4
  Description: Cookie Notice allows you to you elegantly inform users that your site uses cookies and helps you comply with GDPR, CCPA and other data privacy laws.
5
- Version: 2.4.0
6
  Author: Hu-manity.co
7
  Author URI: https://hu-manity.co/
8
  Plugin URI: https://hu-manity.co/
@@ -29,7 +29,7 @@ if ( ! defined( 'ABSPATH' ) )
29
  * Cookie Notice class.
30
  *
31
  * @class Cookie_Notice
32
- * @version 2.4.0
33
  */
34
  class Cookie_Notice {
35
 
@@ -106,7 +106,7 @@ class Cookie_Notice {
106
  'update_delay_date' => 0,
107
  'update_threshold_date' => 0
108
  ],
109
- 'version' => '2.4.0'
110
  ];
111
 
112
  /**
@@ -154,6 +154,10 @@ class Cookie_Notice {
154
  * @return void
155
  */
156
  public function __construct() {
 
 
 
 
157
  register_activation_hook( __FILE__, [ $this, 'activation' ] );
158
  register_deactivation_hook( __FILE__, [ $this, 'deactivation' ] );
159
 
@@ -208,6 +212,15 @@ class Cookie_Notice {
208
  add_action( 'wp_ajax_cn-deactivate-plugin', [ $this, 'deactivate_plugin' ] );
209
  }
210
 
 
 
 
 
 
 
 
 
 
211
  /**
212
  * Set plugin status.
213
  *
@@ -919,9 +932,9 @@ class Cookie_Notice {
919
  if ( $page === 'plugins.php' ) {
920
  add_thickbox();
921
 
922
- wp_enqueue_script( 'cookie-notice-admin-plugins', plugins_url( '/js/admin-plugins.js', __FILE__ ), [ 'jquery' ], $this->defaults['version'] );
923
 
924
- wp_enqueue_style( 'cookie-notice-admin-plugins', plugins_url( '/css/admin-plugins.css', __FILE__ ), [], $this->defaults['version'] );
925
 
926
  wp_localize_script(
927
  'cookie-notice-admin-plugins',
@@ -935,7 +948,7 @@ class Cookie_Notice {
935
 
936
  // notice js and css
937
  wp_enqueue_script(
938
- 'cookie-notice-admin-notice', plugins_url( '/js/admin-notice.js', __FILE__ ), [ 'jquery' ], Cookie_Notice()->defaults['version']
939
  );
940
 
941
  wp_localize_script(
@@ -949,7 +962,7 @@ class Cookie_Notice {
949
  );
950
 
951
  wp_enqueue_style(
952
- 'cookie-notice-admin-notice', plugins_url( '/css/admin-notice.css', __FILE__ ), [], Cookie_Notice()->defaults['version']
953
  );
954
  }
955
 
2
  /*
3
  Plugin Name: Cookie Notice & Compliance for GDPR / CCPA
4
  Description: Cookie Notice allows you to you elegantly inform users that your site uses cookies and helps you comply with GDPR, CCPA and other data privacy laws.
5
+ Version: 2.4.1
6
  Author: Hu-manity.co
7
  Author URI: https://hu-manity.co/
8
  Plugin URI: https://hu-manity.co/
29
  * Cookie Notice class.
30
  *
31
  * @class Cookie_Notice
32
+ * @version 2.4.1
33
  */
34
  class Cookie_Notice {
35
 
106
  'update_delay_date' => 0,
107
  'update_threshold_date' => 0
108
  ],
109
+ 'version' => '2.4.1'
110
  ];
111
 
112
  /**
154
  * @return void
155
  */
156
  public function __construct() {
157
+ // define plugin constants
158
+ $this->define_constants();
159
+
160
+ // activation hooks
161
  register_activation_hook( __FILE__, [ $this, 'activation' ] );
162
  register_deactivation_hook( __FILE__, [ $this, 'deactivation' ] );
163
 
212
  add_action( 'wp_ajax_cn-deactivate-plugin', [ $this, 'deactivate_plugin' ] );
213
  }
214
 
215
+ /**
216
+ * Setup plugin constants.
217
+ *
218
+ * @return void
219
+ */
220
+ private function define_constants() {
221
+ define( 'COOKIE_NOTICE_URL', plugins_url( '', __FILE__ ) );
222
+ }
223
+
224
  /**
225
  * Set plugin status.
226
  *
932
  if ( $page === 'plugins.php' ) {
933
  add_thickbox();
934
 
935
+ wp_enqueue_script( 'cookie-notice-admin-plugins', COOKIE_NOTICE_URL . '/js/admin-plugins.js', [ 'jquery' ], $this->defaults['version'] );
936
 
937
+ wp_enqueue_style( 'cookie-notice-admin-plugins', COOKIE_NOTICE_URL . '/css/admin-plugins.css', [], $this->defaults['version'] );
938
 
939
  wp_localize_script(
940
  'cookie-notice-admin-plugins',
948
 
949
  // notice js and css
950
  wp_enqueue_script(
951
+ 'cookie-notice-admin-notice', COOKIE_NOTICE_URL . '/js/admin-notice.js', [ 'jquery' ], Cookie_Notice()->defaults['version']
952
  );
953
 
954
  wp_localize_script(
962
  );
963
 
964
  wp_enqueue_style(
965
+ 'cookie-notice-admin-notice', COOKIE_NOTICE_URL . '/css/admin-notice.css', [], Cookie_Notice()->defaults['version']
966
  );
967
  }
968
 
includes/dashboard.php CHANGED
@@ -114,16 +114,16 @@ class Cookie_Notice_Dashboard {
114
  $analytics = get_option( 'cookie_notice_app_analytics' );
115
 
116
  // styles
117
- wp_enqueue_style( 'cn-admin-dashboard', plugins_url( '../css/admin-dashboard.css', __FILE__ ), [], $cn->defaults['version'] );
118
- wp_enqueue_style( 'cn-microtip', plugins_url( '../assets/microtip/microtip.min.css', __FILE__ ), [], $cn->defaults['version'] );
119
 
120
  // bail if compliance is not active
121
  if ( $cn->get_status() !== 'active' )
122
  return;
123
 
124
  // scripts
125
- wp_enqueue_script( 'cn-admin-chartjs', plugins_url( '../assets/chartjs/chart.min.js', __FILE__ ), [ 'jquery' ], $cn->defaults['version'], true );
126
- wp_enqueue_script( 'cn-admin-dashboard', plugins_url( '../js/admin-dashboard.js', __FILE__ ), [ 'jquery', 'cn-admin-chartjs' ], $cn->defaults['version'], true );
127
 
128
  // cycle usage data
129
  $cycle_usage = [
@@ -308,7 +308,7 @@ class Cookie_Notice_Dashboard {
308
  } else {
309
  $html .= '
310
  <div id="cn-dashboard-accordion" class="cn-accordion cn-widget-block">
311
- <img src="' . plugins_url( '../img/cookie-compliance-widget.png', __FILE__ ) . '" alt="Cookie Compliance widget" />
312
  <div id="cn-dashboard-upgrade">
313
  <div id="cn-dashboard-modal">
314
  <h2>' . __( 'View consent activity inside WordPress Dashboard', 'cookie-notice' ) . '</h2>
@@ -502,20 +502,15 @@ class Cookie_Notice_Dashboard {
502
  */
503
  public function test_cookie_compliance() {
504
  if ( Cookie_Notice()->get_status() !== 'active' ) {
505
- $setup_link = add_query_arg( [
506
- 'page' => 'cookie-notice',
507
- 'welcome' => 1
508
- ], admin_url( 'admin.php' ) );
509
-
510
  return [
511
  'label' => __( 'Your site does not have Cookie Compliance', 'cookie-notice' ),
512
- 'status' => 'critical',
513
  'badge' => [
514
  'label' => __( 'Cookie Notice', 'cookie-notice' ),
515
  'color' => 'blue'
516
  ],
517
  'description' => __( "Run Compliance Check to determine your site's compliance with updated data processing and consent rules under GDPR, CCPA and other international data privacy laws.", 'cookie-notice' ),
518
- 'actions' => sprintf( '<p><a href="%s" target="_blank" rel="noopener noreferrer">%s</a></p>', $setup_link, __( 'Run Compliance Check', 'cookie-notice' ) ),
519
  'test' => 'cookie_compliance_status'
520
  ];
521
  }
114
  $analytics = get_option( 'cookie_notice_app_analytics' );
115
 
116
  // styles
117
+ wp_enqueue_style( 'cn-admin-dashboard', COOKIE_NOTICE_URL . '/css/admin-dashboard.css', [], $cn->defaults['version'] );
118
+ wp_enqueue_style( 'cn-microtip', COOKIE_NOTICE_URL . '/assets/microtip/microtip.min.css', [], $cn->defaults['version'] );
119
 
120
  // bail if compliance is not active
121
  if ( $cn->get_status() !== 'active' )
122
  return;
123
 
124
  // scripts
125
+ wp_enqueue_script( 'cn-admin-chartjs', COOKIE_NOTICE_URL . '/assets/chartjs/chart.min.js', [ 'jquery' ], $cn->defaults['version'], true );
126
+ wp_enqueue_script( 'cn-admin-dashboard', COOKIE_NOTICE_URL . '/js/admin-dashboard.js', [ 'jquery', 'cn-admin-chartjs' ], $cn->defaults['version'], true );
127
 
128
  // cycle usage data
129
  $cycle_usage = [
308
  } else {
309
  $html .= '
310
  <div id="cn-dashboard-accordion" class="cn-accordion cn-widget-block">
311
+ <img src="' . COOKIE_NOTICE_URL . '/img/cookie-compliance-widget.png" alt="Cookie Compliance widget" />
312
  <div id="cn-dashboard-upgrade">
313
  <div id="cn-dashboard-modal">
314
  <h2>' . __( 'View consent activity inside WordPress Dashboard', 'cookie-notice' ) . '</h2>
502
  */
503
  public function test_cookie_compliance() {
504
  if ( Cookie_Notice()->get_status() !== 'active' ) {
 
 
 
 
 
505
  return [
506
  'label' => __( 'Your site does not have Cookie Compliance', 'cookie-notice' ),
507
+ 'status' => 'recommended',
508
  'badge' => [
509
  'label' => __( 'Cookie Notice', 'cookie-notice' ),
510
  'color' => 'blue'
511
  ],
512
  'description' => __( "Run Compliance Check to determine your site's compliance with updated data processing and consent rules under GDPR, CCPA and other international data privacy laws.", 'cookie-notice' ),
513
+ 'actions' => sprintf( '<p><a href="%s" target="_blank" rel="noopener noreferrer">%s</a></p>', admin_url( 'admin.php?page=cookie-notice&welcome=1' ), __( 'Run Compliance Check', 'cookie-notice' ) ),
514
  'test' => 'cookie_compliance_status'
515
  ];
516
  }
includes/frontend.php CHANGED
@@ -20,7 +20,7 @@ class Cookie_Notice_Frontend {
20
  */
21
  public function __construct() {
22
  // actions
23
- add_action( 'init', array( $this, 'init' ) );
24
  }
25
 
26
  /**
@@ -50,23 +50,72 @@ class Cookie_Notice_Frontend {
50
  if ( ! $this->preview_mode && ! $this->is_bot && ! $this->hide_banner && ! ( is_admin() && $pagenow === 'widgets.php' && isset( $_GET['legacy-widget-preview'] ) ) ) {
51
  // init cookie compliance
52
  if ( Cookie_Notice()->get_status() === 'active' ) {
53
- add_action( 'send_headers', array( $this, 'add_compliance_http_header' ) );
54
- add_action( 'wp_head', array( $this, 'add_cookie_compliance' ), 0 );
 
 
 
 
 
 
 
 
55
  // init cookie notice
56
  } else {
57
  // actions
58
- add_action( 'wp_enqueue_scripts', array( $this, 'wp_enqueue_notice_scripts' ) );
59
- add_filter( 'script_loader_tag', array( $this, 'wp_enqueue_script_async' ), 10, 3 );
60
- add_action( 'wp_head', array( $this, 'wp_print_header_scripts' ) );
61
- add_action( 'wp_print_footer_scripts', array( $this, 'wp_print_footer_scripts' ) );
62
- add_action( 'wp_footer', array( $this, 'add_cookie_notice' ), 1000 );
63
 
64
  // filters
65
- add_filter( 'body_class', array( $this, 'change_body_class' ) );
66
  }
67
  }
68
  }
69
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
70
  /**
71
  * Add CORS header for API requests and purge cache.
72
  *
@@ -176,7 +225,7 @@ class Cookie_Notice_Frontend {
176
  }
177
 
178
  // get cookie container args
179
- $options = apply_filters( 'cn_cookie_notice_args', array(
180
  'position' => $cn->options['general']['position'],
181
  'css_class' => $cn->options['general']['css_class'],
182
  'button_class' => 'cn-button',
@@ -193,10 +242,10 @@ class Cookie_Notice_Frontend {
193
  'link_target' => $cn->options['general']['link_target'],
194
  'link_position' => $cn->options['general']['link_position'],
195
  'aria_label' => 'Cookie Notice'
196
- ) );
197
 
198
  // check legacy parameters
199
- $options = $cn->check_legacy_params( $options, array( 'refuse_opt', 'see_more' ) );
200
 
201
  if ( $options['see_more'] === true )
202
  $options['message_text'] = do_shortcode( wp_kses_post( $options['message_text'] ) );
@@ -240,7 +289,7 @@ class Cookie_Notice_Frontend {
240
  // get main instance
241
  $cn = Cookie_Notice();
242
 
243
- wp_enqueue_script( 'cookie-notice-front', plugins_url( '../js/front' . ( ! ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '.min' : '' ) . '.js', __FILE__ ), array(), $cn->defaults['version'], isset( $cn->options['general']['script_placement'] ) && $cn->options['general']['script_placement'] === 'footer' );
244
 
245
  wp_localize_script(
246
  'cookie-notice-front',
@@ -266,7 +315,7 @@ class Cookie_Notice_Frontend {
266
  ]
267
  );
268
 
269
- wp_enqueue_style( 'cookie-notice-front', plugins_url( '../css/front' . ( ! ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '.min' : '' ) . '.css', __FILE__ ) );
270
  }
271
 
272
  /**
20
  */
21
  public function __construct() {
22
  // actions
23
+ add_action( 'init', [ $this, 'init' ] );
24
  }
25
 
26
  /**
50
  if ( ! $this->preview_mode && ! $this->is_bot && ! $this->hide_banner && ! ( is_admin() && $pagenow === 'widgets.php' && isset( $_GET['legacy-widget-preview'] ) ) ) {
51
  // init cookie compliance
52
  if ( Cookie_Notice()->get_status() === 'active' ) {
53
+ add_action( 'send_headers', [ $this, 'add_compliance_http_header' ] );
54
+ add_action( 'wp_head', [ $this, 'add_cookie_compliance' ], 0 );
55
+
56
+ // contact form 7 5.1+ recaptcha v3 compatibility
57
+ if ( class_exists( 'WPCF7' ) && class_exists( 'WPCF7_RECAPTCHA' ) && defined( 'WPCF7_VERSION' ) && version_compare( WPCF7_VERSION, '5.1', '>=' ) ) {
58
+ $service = WPCF7_RECAPTCHA::get_instance();
59
+
60
+ if ( $service->is_active() )
61
+ add_action( 'wp_enqueue_scripts', [ $this, 'contact_form_7_recaptcha' ], 21 );
62
+ }
63
  // init cookie notice
64
  } else {
65
  // actions
66
+ add_action( 'wp_enqueue_scripts', [ $this, 'wp_enqueue_notice_scripts' ] );
67
+ add_filter( 'script_loader_tag', [ $this, 'wp_enqueue_script_async' ], 10, 3 );
68
+ add_action( 'wp_head', [ $this, 'wp_print_header_scripts' ] );
69
+ add_action( 'wp_print_footer_scripts', [ $this, 'wp_print_footer_scripts' ] );
70
+ add_action( 'wp_footer', [ $this, 'add_cookie_notice' ], 1000 );
71
 
72
  // filters
73
+ add_filter( 'body_class', [ $this, 'change_body_class' ] );
74
  }
75
  }
76
  }
77
 
78
+ /**
79
+ * Replace original recaptcha script from Contact Form 7.
80
+ *
81
+ * @return void
82
+ */
83
+ public function contact_form_7_recaptcha() {
84
+ // deregister original script
85
+ wp_deregister_script( 'wpcf7-recaptcha' );
86
+
87
+ $service = WPCF7_RECAPTCHA::get_instance();
88
+
89
+ // register new script
90
+ wp_register_script(
91
+ 'wpcf7-recaptcha',
92
+ COOKIE_NOTICE_URL . '/includes/modules/contact-form-7/recaptcha.js',
93
+ [
94
+ 'google-recaptcha',
95
+ 'wp-polyfill',
96
+ ],
97
+ WPCF7_VERSION,
98
+ true
99
+ );
100
+
101
+ wp_enqueue_script( 'wpcf7-recaptcha' );
102
+
103
+ wp_localize_script(
104
+ 'wpcf7-recaptcha',
105
+ 'wpcf7_recaptcha',
106
+ [
107
+ 'sitekey' => $service->get_sitekey(),
108
+ 'actions' => apply_filters(
109
+ 'wpcf7_recaptcha_actions',
110
+ [
111
+ 'homepage' => 'homepage',
112
+ 'contactform' => 'contactform'
113
+ ]
114
+ )
115
+ ]
116
+ );
117
+ }
118
+
119
  /**
120
  * Add CORS header for API requests and purge cache.
121
  *
225
  }
226
 
227
  // get cookie container args
228
+ $options = apply_filters( 'cn_cookie_notice_args', [
229
  'position' => $cn->options['general']['position'],
230
  'css_class' => $cn->options['general']['css_class'],
231
  'button_class' => 'cn-button',
242
  'link_target' => $cn->options['general']['link_target'],
243
  'link_position' => $cn->options['general']['link_position'],
244
  'aria_label' => 'Cookie Notice'
245
+ ] );
246
 
247
  // check legacy parameters
248
+ $options = $cn->check_legacy_params( $options, [ 'refuse_opt', 'see_more' ] );
249
 
250
  if ( $options['see_more'] === true )
251
  $options['message_text'] = do_shortcode( wp_kses_post( $options['message_text'] ) );
289
  // get main instance
290
  $cn = Cookie_Notice();
291
 
292
+ wp_enqueue_script( 'cookie-notice-front', COOKIE_NOTICE_URL . '/js/front' . ( ! ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '.min' : '' ) . '.js', [], $cn->defaults['version'], isset( $cn->options['general']['script_placement'] ) && $cn->options['general']['script_placement'] === 'footer' );
293
 
294
  wp_localize_script(
295
  'cookie-notice-front',
315
  ]
316
  );
317
 
318
+ wp_enqueue_style( 'cookie-notice-front', COOKIE_NOTICE_URL . '/css/front' . ( ! ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '.min' : '' ) . '.css' );
319
  }
320
 
321
  /**
includes/modules/contact-form-7/recaptcha.js ADDED
@@ -0,0 +1,89 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ( function( window, document, undefined ) {
2
+
3
+ 'use strict';
4
+
5
+ /**
6
+ * Initialize recaptcha.
7
+ *
8
+ * @return {void}
9
+ */
10
+ function initRecaptcha() {
11
+ wpcf7_recaptcha = {
12
+ ...( wpcf7_recaptcha ?? {} )
13
+ };
14
+
15
+ const siteKey = wpcf7_recaptcha.sitekey;
16
+ const { homepage, contactform } = wpcf7_recaptcha.actions;
17
+
18
+ const execute = options => {
19
+ const { action, func, params } = options;
20
+
21
+ grecaptcha.execute( siteKey, {
22
+ action,
23
+ } ).then( token => {
24
+ const event = new CustomEvent( 'wpcf7grecaptchaexecuted', {
25
+ detail: {
26
+ action,
27
+ token
28
+ }
29
+ } );
30
+
31
+ document.dispatchEvent( event );
32
+ } ).then( () => {
33
+ if ( typeof func === 'function' ) {
34
+ func( ...params );
35
+ }
36
+ } ).catch( error => console.error( error ) );
37
+ };
38
+
39
+ grecaptcha.ready( () => {
40
+ execute( {
41
+ action: homepage
42
+ } );
43
+ } );
44
+
45
+ document.addEventListener( 'change', event => {
46
+ execute( {
47
+ action: contactform
48
+ } );
49
+ } );
50
+
51
+ if ( typeof wpcf7 !== 'undefined' && typeof wpcf7.submit === 'function' ) {
52
+ const submit = wpcf7.submit;
53
+
54
+ wpcf7.submit = ( form, options = {} ) => {
55
+ execute( {
56
+ action: contactform,
57
+ func: submit,
58
+ params: [ form, options ]
59
+ } );
60
+ };
61
+ }
62
+
63
+ document.addEventListener( 'wpcf7grecaptchaexecuted', event => {
64
+ const fields = document.querySelectorAll( 'form.wpcf7-form input[name="_wpcf7_recaptcha_response"]' );
65
+
66
+ for ( let i = 0; i < fields.length; i++ ) {
67
+ let field = fields[ i ];
68
+
69
+ field.setAttribute( 'value', event.detail.token );
70
+ }
71
+ } );
72
+ }
73
+
74
+ /**
75
+ * Handle cookies-unblocked event.
76
+ *
77
+ * @return {void}
78
+ */
79
+ document.addEventListener( 'cookies-unblocked.hu', function( e ) {
80
+ e.detail.data.scripts.forEach( function( script ) {
81
+ // find google recaptcha in valid category
82
+ if ( script.id === 'google-recaptcha-js' && e.detail.categories[script.dataset.huCategory] === true ) {
83
+ script.onload = initRecaptcha;
84
+ script.onreadystatechange = initRecaptcha;
85
+ }
86
+ } );
87
+ }, false );
88
+
89
+ } )( window, document );
includes/settings.php CHANGED
@@ -231,8 +231,8 @@ class Cookie_Notice_Settings {
231
  <div class="cn-lead">
232
  <p>' . __( 'A free web application to help you deliver better consent experiences and comply with GDPR, CCPA and other data privacy laws more effectively.', 'cookie-notice' ) . '</p>
233
  </div>
234
- <img src="//cns2-53eb.kxcdn.com/screen-dashboard-small.png">
235
- <a href="https://cookie-compliance.co/" class="button button-primary button-hero cn-button" target="_blank">' . __( 'Learn more', 'cookie-notice' ) . '</a>';
236
  }
237
 
238
  echo '
@@ -252,7 +252,7 @@ class Cookie_Notice_Settings {
252
  </label>
253
  <label for="cn-faq-2" class="cn-toggle-item">
254
  <input id="cn-faq-2" type="checkbox" />
255
- <span class="cn-toggle-heading">' . __( 'Does the Cookie Compiance integration make my site fully compliant with GDPR?', 'cookie-notice' ) . '</span>
256
  <span class="cn-toggle-body">' . __( 'Yes! The plugin + web application version includes technical compliance features to meet requirements for over 100 countries and legal jurisdictions.', 'cookie-notice' ) . '</span>
257
  </label>
258
  <label for="cn-faq-3" class="cn-toggle-item">
@@ -263,7 +263,7 @@ class Cookie_Notice_Settings {
263
  <label for="cn-faq-4" class="cn-toggle-item">
264
  <input id="cn-faq-4" type="checkbox" />
265
  <span class="cn-toggle-heading">' . __( 'Where can I find pricing options?', 'cookie-notice' ) . '</span>
266
- <span class="cn-toggle-body">' . __( 'You can learn more about the features and pricing by visiting the Cookie Compliance website here:', 'cookie-notice' ) . ' <a href="https://cookie-compliance.co/" target="_blank">https://cookie-compliance.co/</a></span>
267
  </label>
268
  </div>
269
  </div>';
@@ -501,7 +501,7 @@ class Cookie_Notice_Settings {
501
  </div>
502
  <div id="cn_app_actions">
503
  <a href="' . esc_url( $url ) . '" class="button button-primary button-hero cn-button cn-run-welcome">' . __( 'Add Compliance features', 'cookie-notice' ) . '</a>
504
- <p class="description">' . __( 'Sign up to Cookie Compliance&trade; and add GDPR, CCPA and other international data privacy laws compliance features.', 'cookie-notice' ) . '</p>
505
  </div>';
506
  break;
507
  }
@@ -1226,7 +1226,7 @@ class Cookie_Notice_Settings {
1226
  // get main instance
1227
  $cn = Cookie_Notice();
1228
 
1229
- wp_enqueue_script( 'cookie-notice-admin', plugins_url( '../js/admin' . ( ! ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '.min' : '' ) . '.js', __FILE__ ), [ 'jquery', 'wp-color-picker' ], $cn->defaults['version'] );
1230
 
1231
  wp_localize_script(
1232
  'cookie-notice-admin',
@@ -1242,7 +1242,7 @@ class Cookie_Notice_Settings {
1242
  wp_enqueue_style( 'wp-color-picker' );
1243
  }
1244
 
1245
- wp_enqueue_style( 'cookie-notice-admin', plugins_url( '../css/admin' . ( ! ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '.min' : '' ) . '.css', __FILE__ ) );
1246
  }
1247
 
1248
  /**
231
  <div class="cn-lead">
232
  <p>' . __( 'A free web application to help you deliver better consent experiences and comply with GDPR, CCPA and other data privacy laws more effectively.', 'cookie-notice' ) . '</p>
233
  </div>
234
+ <img alt="' . __( 'Cookie Compliance dashboard', 'cookie-notice' ) . '" src="' . COOKIE_NOTICE_URL . '/img/screen-compliance.png">
235
+ <a href="https://cookie-compliance.co/?utm_campaign=learn+more&utm_source=wordpress&utm_medium=banner" class="button button-primary button-hero cn-button" target="_blank">' . __( 'Learn more', 'cookie-notice' ) . '</a>';
236
  }
237
 
238
  echo '
252
  </label>
253
  <label for="cn-faq-2" class="cn-toggle-item">
254
  <input id="cn-faq-2" type="checkbox" />
255
+ <span class="cn-toggle-heading">' . __( 'Does the Cookie Compliance integration make my site fully compliant with GDPR?', 'cookie-notice' ) . '</span>
256
  <span class="cn-toggle-body">' . __( 'Yes! The plugin + web application version includes technical compliance features to meet requirements for over 100 countries and legal jurisdictions.', 'cookie-notice' ) . '</span>
257
  </label>
258
  <label for="cn-faq-3" class="cn-toggle-item">
263
  <label for="cn-faq-4" class="cn-toggle-item">
264
  <input id="cn-faq-4" type="checkbox" />
265
  <span class="cn-toggle-heading">' . __( 'Where can I find pricing options?', 'cookie-notice' ) . '</span>
266
+ <span class="cn-toggle-body">' . __( 'You can learn more about the features and pricing by visiting the Cookie Compliance website here:', 'cookie-notice' ) . ' <a href="https://cookie-compliance.co/?utm_campaign=pricing+options&utm_source=wordpress&utm_medium=textlink" target="_blank">https://cookie-compliance.co/</a></span>
267
  </label>
268
  </div>
269
  </div>';
501
  </div>
502
  <div id="cn_app_actions">
503
  <a href="' . esc_url( $url ) . '" class="button button-primary button-hero cn-button cn-run-welcome">' . __( 'Add Compliance features', 'cookie-notice' ) . '</a>
504
+ <p class="description">' . sprintf( __( 'Sign up to <a href="%s" target="_blank">Cookie Compliance&trade;</a> and add GDPR, CCPA and other international data privacy laws compliance features.', 'cookie-notice' ), 'https://cookie-compliance.co/?utm_campaign=sign-up&utm_source=wordpress&utm_medium=textlink' ) . '</p>
505
  </div>';
506
  break;
507
  }
1226
  // get main instance
1227
  $cn = Cookie_Notice();
1228
 
1229
+ wp_enqueue_script( 'cookie-notice-admin', COOKIE_NOTICE_URL . '/js/admin' . ( ! ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '.min' : '' ) . '.js', [ 'jquery', 'wp-color-picker' ], $cn->defaults['version'] );
1230
 
1231
  wp_localize_script(
1232
  'cookie-notice-admin',
1242
  wp_enqueue_style( 'wp-color-picker' );
1243
  }
1244
 
1245
+ wp_enqueue_style( 'cookie-notice-admin', COOKIE_NOTICE_URL . '/css/admin' . ( ! ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '.min' : '' ) . '.css' );
1246
  }
1247
 
1248
  /**
includes/welcome-frontend.php CHANGED
@@ -18,7 +18,7 @@ class Cookie_Notice_Welcome_Frontend {
18
  * @return void
19
  */
20
  public function __construct() {
21
- add_action( 'after_setup_theme', array( $this, 'preview_init' ), 1 );
22
  }
23
 
24
  /**
@@ -36,12 +36,12 @@ class Cookie_Notice_Welcome_Frontend {
36
  add_filter( 'cn_cookie_notice_output', '__return_false', 1000 );
37
 
38
  // actions
39
- add_action( 'wp_enqueue_scripts', array( $this, 'wp_dequeue_scripts' ) );
40
 
41
  // only in live preview
42
  if ( $this->preview_mode === 1 ) {
43
- add_action( 'wp_enqueue_scripts', array( $this, 'wp_enqueue_scripts' ) );
44
- add_action( 'wp_head', array( $this, 'wp_head_scripts' ), 0 );
45
  }
46
  }
47
  }
@@ -54,17 +54,17 @@ class Cookie_Notice_Welcome_Frontend {
54
  public function wp_enqueue_scripts() {
55
  // show only in live preview
56
  if ( $this->preview_mode === 1 ) {
57
- wp_enqueue_script( 'cookie-notice-welcome-frontend', plugins_url( '../js/front-welcome.js', __FILE__ ), array( 'jquery', 'underscore' ), Cookie_Notice()->defaults['version'] );
58
 
59
  wp_localize_script(
60
  'cookie-notice-welcome-frontend',
61
  'cnFrontWelcome',
62
- array(
63
  'previewMode' => $this->preview_mode,
64
  'allowedURLs' => $this->get_allowed_urls(),
65
- 'levelNames' => Cookie_Notice()->settings->level_names,
66
- 'textStrings' => Cookie_Notice()->settings->text_strings
67
- )
68
  );
69
  }
70
  }
@@ -85,15 +85,15 @@ class Cookie_Notice_Welcome_Frontend {
85
  * @return void
86
  */
87
  public function wp_head_scripts() {
88
- $options = array(
89
  'currentLanguage' => 'en',
90
  'previewMode' => true,
91
  'debugMode' => true,
92
- 'config' => array(
93
  'privacyPaper' => true,
94
  'privacyContact' => true
95
- )
96
- );
97
 
98
  echo '
99
  <!-- Hu Banner -->
@@ -110,7 +110,7 @@ class Cookie_Notice_Welcome_Frontend {
110
  * @return array
111
  */
112
  public function get_allowed_urls() {
113
- $allowed_urls = array( home_url( '/' ) );
114
 
115
  if ( is_ssl() && ! $this->is_cross_domain() )
116
  $allowed_urls[] = home_url( '/', 'https' );
18
  * @return void
19
  */
20
  public function __construct() {
21
+ add_action( 'after_setup_theme', [ $this, 'preview_init' ], 1 );
22
  }
23
 
24
  /**
36
  add_filter( 'cn_cookie_notice_output', '__return_false', 1000 );
37
 
38
  // actions
39
+ add_action( 'wp_enqueue_scripts', [ $this, 'wp_dequeue_scripts' ] );
40
 
41
  // only in live preview
42
  if ( $this->preview_mode === 1 ) {
43
+ add_action( 'wp_enqueue_scripts', [ $this, 'wp_enqueue_scripts' ] );
44
+ add_action( 'wp_head', [ $this, 'wp_head_scripts' ], 0 );
45
  }
46
  }
47
  }
54
  public function wp_enqueue_scripts() {
55
  // show only in live preview
56
  if ( $this->preview_mode === 1 ) {
57
+ wp_enqueue_script( 'cookie-notice-welcome-frontend', COOKIE_NOTICE_URL . '/js/front-welcome.js', [ 'jquery', 'underscore' ], Cookie_Notice()->defaults['version'] );
58
 
59
  wp_localize_script(
60
  'cookie-notice-welcome-frontend',
61
  'cnFrontWelcome',
62
+ [
63
  'previewMode' => $this->preview_mode,
64
  'allowedURLs' => $this->get_allowed_urls(),
65
+ 'levelNames' => Cookie_Notice()->settings->level_names,
66
+ 'textStrings' => Cookie_Notice()->settings->text_strings
67
+ ]
68
  );
69
  }
70
  }
85
  * @return void
86
  */
87
  public function wp_head_scripts() {
88
+ $options = [
89
  'currentLanguage' => 'en',
90
  'previewMode' => true,
91
  'debugMode' => true,
92
+ 'config' => [
93
  'privacyPaper' => true,
94
  'privacyContact' => true
95
+ ]
96
+ ];
97
 
98
  echo '
99
  <!-- Hu Banner -->
110
  * @return array
111
  */
112
  public function get_allowed_urls() {
113
+ $allowed_urls = [ home_url( '/' ) ];
114
 
115
  if ( is_ssl() && ! $this->is_cross_domain() )
116
  $allowed_urls[] = home_url( '/', 'https' );
includes/welcome.php CHANGED
@@ -60,14 +60,14 @@ class Cookie_Notice_Welcome {
60
 
61
  wp_enqueue_style( 'dashicons' );
62
 
63
- wp_enqueue_style( 'cookie-notice-modaal', plugins_url( '../assets/modaal/css/modaal.min.css', __FILE__ ), [], $cn->defaults['version'] );
64
- wp_enqueue_script( 'cookie-notice-modaal', plugins_url( '../assets/modaal/js/modaal.min.js', __FILE__ ), [], $cn->defaults['version'] );
65
 
66
- wp_enqueue_style( 'cookie-notice-spectrum', plugins_url( '../assets/spectrum/spectrum.min.css', __FILE__ ), [], $cn->defaults['version'] );
67
- wp_enqueue_style( 'cookie-notice-microtip', plugins_url( '../assets/microtip/microtip.min.css', __FILE__ ), [], $cn->defaults['version'] );
68
 
69
- wp_enqueue_script( 'cookie-notice-spectrum', plugins_url( '../assets/spectrum/spectrum.min.js', __FILE__ ), [], $cn->defaults['version'] );
70
- wp_enqueue_script( 'cookie-notice-welcome', plugins_url( '../js/admin-welcome.js', __FILE__ ), array( 'jquery', 'jquery-ui-core', 'jquery-ui-progressbar' ), $cn->defaults['version'] );
71
  wp_enqueue_script( 'cookie-notice-braintree-client', 'https://js.braintreegateway.com/web/3.71.0/js/client.min.js', [], null, false );
72
  wp_enqueue_script( 'cookie-notice-braintree-hostedfields', 'https://js.braintreegateway.com/web/3.71.0/js/hosted-fields.min.js', [], null, false );
73
  wp_enqueue_script( 'cookie-notice-braintree-paypal', 'https://js.braintreegateway.com/web/3.71.0/js/paypal-checkout.min.js', [], null, false );
@@ -75,7 +75,7 @@ class Cookie_Notice_Welcome {
75
  // check network
76
  $network = $cn->is_network_admin();
77
 
78
- $js_args = array(
79
  'ajaxURL' => admin_url( 'admin-ajax.php' ),
80
  'network' => (int) $network,
81
  'nonce' => wp_create_nonce( 'cookie-notice-welcome' ),
@@ -92,7 +92,7 @@ class Cookie_Notice_Welcome {
92
  'compliancePassed' => __( '<em>Compliance Passed!</em>Congratulations. Your website meets minimum viable compliance.', 'cookie-notice' ),
93
  'licensesAvailable' => __( 'available', 'cookie-notice' ),
94
  'invalidFields' => __( 'Please fill all the required fields.', 'cookie-notice' )
95
- );
96
 
97
  // delete the show modal transient
98
  if ( $network )
@@ -106,7 +106,7 @@ class Cookie_Notice_Welcome {
106
  $js_args
107
  );
108
 
109
- wp_enqueue_style( 'cookie-notice-welcome', plugins_url( '../css/admin-welcome.css', __FILE__ ) );
110
  }
111
 
112
  /**
@@ -144,10 +144,10 @@ class Cookie_Notice_Welcome {
144
  if ( ( isset( $_GET['action'] ) && 'upgrade-plugin' == $_GET['action'] ) && ( isset( $_GET['plugin'] ) && strstr( $_GET['plugin'], 'cookie-notice.php' ) ) )
145
  return;
146
 
147
- add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
148
- add_action( 'admin_footer', array( $this, 'admin_footer' ) );
149
 
150
- // add_filter( 'admin_body_class', array( $this, 'admin_body_class' ) );
151
  }
152
 
153
  /**
@@ -183,8 +183,8 @@ class Cookie_Notice_Welcome {
183
  if ( ! current_user_can( 'install_plugins' ) )
184
  wp_die( _( 'You do not have permission to access this page.', 'cookie-notice' ) );
185
 
186
- $sidebars = array( 'about', 'login', 'register', 'configure', 'select_plan', 'success' );
187
- $steps = array( 1, 2, 3, 4 );
188
  $screens = array_merge( $sidebars, $steps );
189
  $screen = ! empty( $screen ) && in_array( $screen, $screens ) ? $screen : ( isset( $_REQUEST['screen'] ) && in_array( $_REQUEST['screen'], $screens ) ? $_REQUEST['screen'] : '' );
190
 
@@ -215,7 +215,7 @@ class Cookie_Notice_Welcome {
215
  <p><b>' . __( 'Cookie Compliance is a free web application that enables websites to take a proactive approach to data protection and consent laws.', 'cookie-notice' ) . '</b></p>
216
  <div class="cn-hero-image">
217
  <div class="cn-flex-item">
218
- <img src="' . plugins_url( '../img/screen-compliance.png', __FILE__ ) . '" alt="Cookie Notice dashboard" />
219
  </div>
220
  </div>
221
  <p>' . __( 'It is the first solution to offer <b>intentional consent</b>, a new consent framework that incorporates the latest guidelines from over 100+ countries, and emerging standards from leading international organizations like the IEEE.', 'cookie-notice' ) . '</p>
@@ -263,10 +263,10 @@ class Cookie_Notice_Welcome {
263
  <div class="cn-hero-image">
264
  <div class="cn-flex-item">
265
  <div class="cn-logo-container">
266
- <img src="' . plugins_url( '../img/cookie-notice-logo-dark.png', __FILE__ ) . '">
267
  <span class="cn-badge">' . __( 'WP Plugin', 'cookie-notice' ) . '</span>
268
  </div>
269
- <img src="' . plugins_url( '../img/screen-notice.png', __FILE__ ) . '" alt="Cookie Notice dashboard" />
270
  <ul class="cn-features-list">
271
  <li><span>' . __( '<b>Free</b>', 'cookie-notice' ) . '</span></li>
272
  <li><span>' . __( 'Customizable notice message', 'cookie-notice' ) . '</span></li>
@@ -279,10 +279,10 @@ class Cookie_Notice_Welcome {
279
  </div>
280
  <div class="cn-flex-item">
281
  <div class="cn-logo-container">
282
- <img src="' . plugins_url( '../img/cookie-compliance-logo-dark.png', __FILE__ ) . '">
283
  <span class="cn-badge">' . __( 'Web App', 'cookie-notice' ) . '</span>
284
  </div>
285
- <img src="' . plugins_url( '../img/screen-compliance.png', __FILE__ ) . '"alt="Cookie Compliance dashboard" />
286
  <ul class="cn-features-list">
287
  <li><span>' . __( '<b>Free plan</b>', 'cookie-notice' ) . '</span></li>
288
  <li><span>' . __( 'Consent Analytics Dashboard', 'cookie-notice' ) . '</span></li>
@@ -318,6 +318,7 @@ class Cookie_Notice_Welcome {
318
  <p class="cn-included"><span class="cn-icon"></span>' . __( 'Consent Analytics Dashboard', 'cookie-notice' ) . '</p>
319
  <p class="cn-excluded"><span class="cn-icon"></span>' . __( '<b>1,000</b> visits / month', 'cookie-notice' ) . '</p>
320
  <p class="cn-excluded"><span class="cn-icon"></span>' . __( '<b>30 days</b> consent storage', 'cookie-notice' ) . '</p>
 
321
  <p class="cn-excluded"><span class="cn-icon"></span>' . __( '<b>1 additional</b> language', 'cookie-notice' ) . '</p>
322
  <p class="cn-excluded"><span class="cn-icon"></span>' . __( '<b>Basic</b> Support', 'cookie-notice' ) . '</p>
323
  </div>
@@ -347,8 +348,9 @@ class Cookie_Notice_Welcome {
347
  <p class="cn-included"><span class="cn-icon"></span>' . __( 'Consent Analytics Dashboard', 'cookie-notice' ) . '</p>
348
  <p class="cn-included"><span class="cn-icon"></span>' . __( '<b>Unlimited</b> visits', 'cookie-notice' ) . '</p>
349
  <p class="cn-included"><span class="cn-icon"></span>' . __( '<b>Lifetime</b> consent storage', 'cookie-notice' ) . '</p>
 
350
  <p class="cn-included"><span class="cn-icon"></span>' . __( '<b>Unlimited</b> languages', 'cookie-notice' ) . '</p>
351
- <p class="cn-included"><span class="cn-icon"></span>' . __( '<b>Premium</b> Support', 'cookie-notice' ) . '</p>
352
  </div>
353
  <div class="cn-pricing-footer">
354
  <button type="button" class="cn-btn cn-btn-outline">' . __( 'Start Premium', 'cookie-notice' ) . '</button>
@@ -398,7 +400,7 @@ class Cookie_Notice_Welcome {
398
  <div class="cn-inner">
399
  <div class="cn-header">
400
  <div class="cn-top-bar">
401
- <div class="cn-logo"><img src="' . plugins_url( '../img/cookie-notice-logo.png', __FILE__ ) . '" alt="Cookie Notice logo" /></div>
402
  </div>
403
  </div>
404
  <div class="cn-body">
@@ -427,7 +429,7 @@ class Cookie_Notice_Welcome {
427
  <div class="cn-inner">
428
  <div class="cn-header">
429
  <div class="cn-top-bar">
430
- <div class="cn-logo"><img src="' . plugins_url( '../img/cookie-notice-logo.png', __FILE__ ) . '" alt="Cookie Notice logo" /></div>
431
  </div>
432
  </div>
433
  <div class="cn-body">
@@ -488,11 +490,11 @@ class Cookie_Notice_Welcome {
488
  <div class="cn-field cn-field-radio-image">
489
  <label>' . __( 'Select your preferred display position', 'cookie-notice' ) . '​:</label>
490
  <div class="cn-radio-image-wrapper">
491
- <label for="cn_position_bottom"><input id="cn_position_bottom" type="radio" name="cn_position" value="bottom" title="' . __( 'Bottom', 'cookie-notice' ) . '" checked><img src="' . plugins_url( '../img/layout-bottom.png', __FILE__ ) . '" width="24" height="24"></label>
492
- <label for="cn_position_top"><input id="cn_position_top" type="radio" name="cn_position" value="top" title="' . __( 'Top', 'cookie-notice' ) . '"><img src="' . plugins_url( '../img/layout-top.png', __FILE__ ) . '" width="24" height="24"></label>
493
- <label for="cn_position_left"><input id="cn_position_left" type="radio" name="cn_position" value="left" title="' . __( 'Left', 'cookie-notice' ) . '"><img src="' . plugins_url( '../img/layout-left.png', __FILE__ ) . '" width="24" height="24"></label>
494
- <label for="cn_position_right"><input id="cn_position_right" type="radio" name="cn_position" value="right" title="' . __( 'Right', 'cookie-notice' ) . '"><img src="' . plugins_url( '../img/layout-right.png', __FILE__ ) . '" width="24" height="24"></label>
495
- <label for="cn_position_center"><input id="cn_position_center" type="radio" name="cn_position" value="center" title="' . __( 'Center', 'cookie-notice' ) . '"><img src="' . plugins_url( '../img/layout-center.png', __FILE__ ) . '" width="24" height="24"></label>
496
  </div>
497
  </div>
498
  <div class="cn-field cn-fieldset">
@@ -525,7 +527,7 @@ class Cookie_Notice_Welcome {
525
  <div class="cn-inner">
526
  <div class="cn-header">
527
  <div class="cn-top-bar">
528
- <div class="cn-logo"><img src="' . plugins_url( '../img/cookie-notice-logo.png', __FILE__ ) . '" alt="Cookie Notice logo" /></div>
529
  </div>
530
  </div>
531
  <div class="cn-body">
@@ -633,7 +635,7 @@ class Cookie_Notice_Welcome {
633
  <div class="cn-inner">
634
  <div class="cn-header">
635
  <div class="cn-top-bar">
636
- <div class="cn-logo"><img src="' . plugins_url( '../img/cookie-notice-logo.png', __FILE__ ) . '" alt="Cookie Notice logo" /></div>
637
  </div>
638
  </div>
639
  <div class="cn-body">
@@ -745,7 +747,7 @@ class Cookie_Notice_Welcome {
745
  <div class="cn-inner">
746
  <div class="cn-header">
747
  <div class="cn-top-bar">
748
- <div class="cn-logo"><img src="' . plugins_url( '../img/cookie-notice-logo.png', __FILE__ ) . '" alt="Cookie Notice logo" /></div>
749
  </div>
750
  </div>
751
  <div class="cn-body">
60
 
61
  wp_enqueue_style( 'dashicons' );
62
 
63
+ wp_enqueue_style( 'cookie-notice-modaal', COOKIE_NOTICE_URL . '/assets/modaal/css/modaal.min.css', [], $cn->defaults['version'] );
64
+ wp_enqueue_script( 'cookie-notice-modaal', COOKIE_NOTICE_URL . '/assets/modaal/js/modaal.min.js', [], $cn->defaults['version'] );
65
 
66
+ wp_enqueue_style( 'cookie-notice-spectrum', COOKIE_NOTICE_URL . '/assets/spectrum/spectrum.min.css', [], $cn->defaults['version'] );
67
+ wp_enqueue_style( 'cookie-notice-microtip', COOKIE_NOTICE_URL . '/assets/microtip/microtip.min.css', [], $cn->defaults['version'] );
68
 
69
+ wp_enqueue_script( 'cookie-notice-spectrum', COOKIE_NOTICE_URL . '/assets/spectrum/spectrum.min.js', [], $cn->defaults['version'] );
70
+ wp_enqueue_script( 'cookie-notice-welcome', COOKIE_NOTICE_URL . '/js/admin-welcome.js', [ 'jquery', 'jquery-ui-core', 'jquery-ui-progressbar' ], $cn->defaults['version'] );
71
  wp_enqueue_script( 'cookie-notice-braintree-client', 'https://js.braintreegateway.com/web/3.71.0/js/client.min.js', [], null, false );
72
  wp_enqueue_script( 'cookie-notice-braintree-hostedfields', 'https://js.braintreegateway.com/web/3.71.0/js/hosted-fields.min.js', [], null, false );
73
  wp_enqueue_script( 'cookie-notice-braintree-paypal', 'https://js.braintreegateway.com/web/3.71.0/js/paypal-checkout.min.js', [], null, false );
75
  // check network
76
  $network = $cn->is_network_admin();
77
 
78
+ $js_args = [
79
  'ajaxURL' => admin_url( 'admin-ajax.php' ),
80
  'network' => (int) $network,
81
  'nonce' => wp_create_nonce( 'cookie-notice-welcome' ),
92
  'compliancePassed' => __( '<em>Compliance Passed!</em>Congratulations. Your website meets minimum viable compliance.', 'cookie-notice' ),
93
  'licensesAvailable' => __( 'available', 'cookie-notice' ),
94
  'invalidFields' => __( 'Please fill all the required fields.', 'cookie-notice' )
95
+ ];
96
 
97
  // delete the show modal transient
98
  if ( $network )
106
  $js_args
107
  );
108
 
109
+ wp_enqueue_style( 'cookie-notice-welcome', COOKIE_NOTICE_URL . '/css/admin-welcome.css' );
110
  }
111
 
112
  /**
144
  if ( ( isset( $_GET['action'] ) && 'upgrade-plugin' == $_GET['action'] ) && ( isset( $_GET['plugin'] ) && strstr( $_GET['plugin'], 'cookie-notice.php' ) ) )
145
  return;
146
 
147
+ add_action( 'admin_enqueue_scripts', [ $this, 'admin_enqueue_scripts' ] );
148
+ add_action( 'admin_footer', [ $this, 'admin_footer' ] );
149
 
150
+ // add_filter( 'admin_body_class', [ $this, 'admin_body_class' ] );
151
  }
152
 
153
  /**
183
  if ( ! current_user_can( 'install_plugins' ) )
184
  wp_die( _( 'You do not have permission to access this page.', 'cookie-notice' ) );
185
 
186
+ $sidebars = [ 'about', 'login', 'register', 'configure', 'select_plan', 'success' ];
187
+ $steps = [ 1, 2, 3, 4 ];
188
  $screens = array_merge( $sidebars, $steps );
189
  $screen = ! empty( $screen ) && in_array( $screen, $screens ) ? $screen : ( isset( $_REQUEST['screen'] ) && in_array( $_REQUEST['screen'], $screens ) ? $_REQUEST['screen'] : '' );
190
 
215
  <p><b>' . __( 'Cookie Compliance is a free web application that enables websites to take a proactive approach to data protection and consent laws.', 'cookie-notice' ) . '</b></p>
216
  <div class="cn-hero-image">
217
  <div class="cn-flex-item">
218
+ <img src="' . COOKIE_NOTICE_URL . '/img/screen-compliance.png" alt="Cookie Notice dashboard" />
219
  </div>
220
  </div>
221
  <p>' . __( 'It is the first solution to offer <b>intentional consent</b>, a new consent framework that incorporates the latest guidelines from over 100+ countries, and emerging standards from leading international organizations like the IEEE.', 'cookie-notice' ) . '</p>
263
  <div class="cn-hero-image">
264
  <div class="cn-flex-item">
265
  <div class="cn-logo-container">
266
+ <img src="' . COOKIE_NOTICE_URL . '/img/cookie-notice-logo-dark.png">
267
  <span class="cn-badge">' . __( 'WP Plugin', 'cookie-notice' ) . '</span>
268
  </div>
269
+ <img src="' . COOKIE_NOTICE_URL . '/img/screen-notice.png" alt="Cookie Notice dashboard" />
270
  <ul class="cn-features-list">
271
  <li><span>' . __( '<b>Free</b>', 'cookie-notice' ) . '</span></li>
272
  <li><span>' . __( 'Customizable notice message', 'cookie-notice' ) . '</span></li>
279
  </div>
280
  <div class="cn-flex-item">
281
  <div class="cn-logo-container">
282
+ <img src="' . COOKIE_NOTICE_URL . '/img/cookie-compliance-logo-dark.png">
283
  <span class="cn-badge">' . __( 'Web App', 'cookie-notice' ) . '</span>
284
  </div>
285
+ <img src="' . COOKIE_NOTICE_URL . '/img/screen-compliance.png" alt="Cookie Compliance dashboard" />
286
  <ul class="cn-features-list">
287
  <li><span>' . __( '<b>Free plan</b>', 'cookie-notice' ) . '</span></li>
288
  <li><span>' . __( 'Consent Analytics Dashboard', 'cookie-notice' ) . '</span></li>
318
  <p class="cn-included"><span class="cn-icon"></span>' . __( 'Consent Analytics Dashboard', 'cookie-notice' ) . '</p>
319
  <p class="cn-excluded"><span class="cn-icon"></span>' . __( '<b>1,000</b> visits / month', 'cookie-notice' ) . '</p>
320
  <p class="cn-excluded"><span class="cn-icon"></span>' . __( '<b>30 days</b> consent storage', 'cookie-notice' ) . '</p>
321
+ <p class="cn-excluded"><span class="cn-icon"></span>' . __( '<b>Geolocation</b> support', 'cookie-notice' ) . '</p>
322
  <p class="cn-excluded"><span class="cn-icon"></span>' . __( '<b>1 additional</b> language', 'cookie-notice' ) . '</p>
323
  <p class="cn-excluded"><span class="cn-icon"></span>' . __( '<b>Basic</b> Support', 'cookie-notice' ) . '</p>
324
  </div>
348
  <p class="cn-included"><span class="cn-icon"></span>' . __( 'Consent Analytics Dashboard', 'cookie-notice' ) . '</p>
349
  <p class="cn-included"><span class="cn-icon"></span>' . __( '<b>Unlimited</b> visits', 'cookie-notice' ) . '</p>
350
  <p class="cn-included"><span class="cn-icon"></span>' . __( '<b>Lifetime</b> consent storage', 'cookie-notice' ) . '</p>
351
+ <p class="cn-included"><span class="cn-icon"></span>' . __( '<b>Geolocation</b> support', 'cookie-notice' ) . '</p>
352
  <p class="cn-included"><span class="cn-icon"></span>' . __( '<b>Unlimited</b> languages', 'cookie-notice' ) . '</p>
353
+ <p class="cn-included"><span class="cn-icon"></span>' . __( '<b>Priority</b> Support', 'cookie-notice' ) . '</p>
354
  </div>
355
  <div class="cn-pricing-footer">
356
  <button type="button" class="cn-btn cn-btn-outline">' . __( 'Start Premium', 'cookie-notice' ) . '</button>
400
  <div class="cn-inner">
401
  <div class="cn-header">
402
  <div class="cn-top-bar">
403
+ <div class="cn-logo"><img src="' . COOKIE_NOTICE_URL . '/img/cookie-notice-logo.png" alt="Cookie Notice logo" /></div>
404
  </div>
405
  </div>
406
  <div class="cn-body">
429
  <div class="cn-inner">
430
  <div class="cn-header">
431
  <div class="cn-top-bar">
432
+ <div class="cn-logo"><img src="' . COOKIE_NOTICE_URL . '/img/cookie-notice-logo.png" alt="Cookie Notice logo" /></div>
433
  </div>
434
  </div>
435
  <div class="cn-body">
490
  <div class="cn-field cn-field-radio-image">
491
  <label>' . __( 'Select your preferred display position', 'cookie-notice' ) . '​:</label>
492
  <div class="cn-radio-image-wrapper">
493
+ <label for="cn_position_bottom"><input id="cn_position_bottom" type="radio" name="cn_position" value="bottom" title="' . __( 'Bottom', 'cookie-notice' ) . '" checked><img src="' . COOKIE_NOTICE_URL . '/img/layout-bottom.png" width="24" height="24"></label>
494
+ <label for="cn_position_top"><input id="cn_position_top" type="radio" name="cn_position" value="top" title="' . __( 'Top', 'cookie-notice' ) . '"><img src="' . COOKIE_NOTICE_URL . '/img/layout-top.png" width="24" height="24"></label>
495
+ <label for="cn_position_left"><input id="cn_position_left" type="radio" name="cn_position" value="left" title="' . __( 'Left', 'cookie-notice' ) . '"><img src="' . COOKIE_NOTICE_URL . '/img/layout-left.png" width="24" height="24"></label>
496
+ <label for="cn_position_right"><input id="cn_position_right" type="radio" name="cn_position" value="right" title="' . __( 'Right', 'cookie-notice' ) . '"><img src="' . COOKIE_NOTICE_URL . '/img/layout-right.png" width="24" height="24"></label>
497
+ <label for="cn_position_center"><input id="cn_position_center" type="radio" name="cn_position" value="center" title="' . __( 'Center', 'cookie-notice' ) . '"><img src="' . COOKIE_NOTICE_URL . '/img/layout-center.png" width="24" height="24"></label>
498
  </div>
499
  </div>
500
  <div class="cn-field cn-fieldset">
527
  <div class="cn-inner">
528
  <div class="cn-header">
529
  <div class="cn-top-bar">
530
+ <div class="cn-logo"><img src="' . COOKIE_NOTICE_URL . '/img/cookie-notice-logo.png" alt="Cookie Notice logo" /></div>
531
  </div>
532
  </div>
533
  <div class="cn-body">
635
  <div class="cn-inner">
636
  <div class="cn-header">
637
  <div class="cn-top-bar">
638
+ <div class="cn-logo"><img src="' . COOKIE_NOTICE_URL . '/img/cookie-notice-logo.png" alt="Cookie Notice logo" /></div>
639
  </div>
640
  </div>
641
  <div class="cn-body">
747
  <div class="cn-inner">
748
  <div class="cn-header">
749
  <div class="cn-top-bar">
750
+ <div class="cn-logo"><img src="' . COOKIE_NOTICE_URL . '/img/cookie-notice-logo.png" alt="Cookie Notice logo" /></div>
751
  </div>
752
  </div>
753
  <div class="cn-body">
languages/cookie-notice.pot CHANGED
@@ -2,7 +2,7 @@
2
  msgid ""
3
  msgstr ""
4
  "Project-Id-Version: Cookie Notice\n"
5
- "POT-Creation-Date: 2022-08-24 11:16+0200\n"
6
  "PO-Revision-Date: 2015-03-24 11:30+0100\n"
7
  "Last-Translator: Bartosz Arendt <info@dfactory.eu>\n"
8
  "Language-Team: dFactory <info@dfactory.eu>\n"
2
  msgid ""
3
  msgstr ""
4
  "Project-Id-Version: Cookie Notice\n"
5
+ "POT-Creation-Date: 2022-08-24 11:17+0200\n"
6
  "PO-Revision-Date: 2015-03-24 11:30+0100\n"
7
  "Last-Translator: Bartosz Arendt <info@dfactory.eu>\n"
8
  "Language-Team: dFactory <info@dfactory.eu>\n"
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: humanityco
3
  Tags: gdpr, ccpa, cookies, consent, compliance
4
  Requires at least: 4.7
5
  Requires PHP: 5.4
6
- Tested up to: 6.0.1
7
- Stable tag: 2.4.0
8
  License: MIT License
9
  License URI: http://opensource.org/licenses/MIT
10
 
@@ -121,6 +121,11 @@ Yes! The plugin + web appliaction version includes technical compliance features
121
 
122
  == Changelog ==
123
 
 
 
 
 
 
124
  = 2.4.0 =
125
  * New: Advanced Multisite support
126
  * Fix: Polylang translation not working for shortcode
@@ -428,5 +433,7 @@ Initial release
428
 
429
  == Upgrade Notice ==
430
 
431
- = 2.4.0 =
432
- * New: Advanced Multisite support
 
 
3
  Tags: gdpr, ccpa, cookies, consent, compliance
4
  Requires at least: 4.7
5
  Requires PHP: 5.4
6
+ Tested up to: 6.0.2
7
+ Stable tag: 2.4.1
8
  License: MIT License
9
  License URI: http://opensource.org/licenses/MIT
10
 
121
 
122
  == Changelog ==
123
 
124
+ = 2.4.1 =
125
+ * New: Contact Form 7 reCaptcha support
126
+ * Tweak: Switched health status from critical to recommended when Cookie Compliance is not integrated
127
+ * Tweak: Add SimeSite=Lax for created cookies
128
+
129
  = 2.4.0 =
130
  * New: Advanced Multisite support
131
  * Fix: Polylang translation not working for shortcode
433
 
434
  == Upgrade Notice ==
435
 
436
+ = 2.4.1 =
437
+ * New: Contact Form 7 reCaptcha support
438
+ * Tweak: Switched health status from critical to recommended when Cookie Compliance is not integrated
439
+ * Tweak: Add SimeSite=Lax for created cookies