Email Subscribers & Newsletters - Version 4.6.0

Version Description

Download this release

Release Info

Developer Icegram
Plugin Icon 128x128 Email Subscribers & Newsletters
Version 4.6.0
Comparing to
See all releases

Code changes from version 4.5.6 to 4.6.0

Files changed (49) hide show
  1. email-subscribers.php +3 -3
  2. lite/admin/class-email-subscribers-admin.php +38 -82
  3. lite/admin/class-ig-es-onboarding.php +1432 -0
  4. lite/admin/css/email-subscribers-admin.css +17 -217
  5. lite/admin/dist/main.css +1 -1
  6. lite/admin/images/anne-email-suggestion.svg +1 -0
  7. lite/admin/images/anne-welcome.svg +1 -0
  8. lite/admin/images/anne-working.svg +1 -0
  9. lite/admin/images/icegram_logo.svg +1 -0
  10. lite/admin/js/es-onboarding.js +497 -36
  11. lite/admin/partials/onboarding.php +545 -165
  12. lite/includes/class-email-subscribers-activator.php +2 -2
  13. lite/includes/class-email-subscribers.php +26 -0
  14. lite/includes/class-es-common.php +83 -27
  15. lite/includes/class-es-install.php +31 -446
  16. lite/includes/classes/class-es-admin-settings.php +42 -32
  17. lite/includes/classes/class-es-campaigns-table.php +12 -6
  18. lite/includes/classes/class-es-contacts-table.php +241 -223
  19. lite/includes/classes/class-es-cron.php +1 -1
  20. lite/includes/classes/class-es-export-subscribers.php +1 -1
  21. lite/includes/classes/class-es-forms-table.php +29 -23
  22. lite/includes/classes/class-es-handle-subscription.php +49 -3
  23. lite/includes/classes/class-es-ig-redirect.php +4 -4
  24. lite/includes/classes/class-es-import-subscribers.php +8 -8
  25. lite/includes/classes/class-es-lists-table.php +17 -10
  26. lite/includes/classes/class-es-mailer.php +6 -3
  27. lite/includes/classes/class-es-newsletters.php +1 -1
  28. lite/includes/classes/class-es-post-notifications.php +5 -5
  29. lite/includes/classes/class-es-reports-data.php +13 -0
  30. lite/includes/classes/class-es-reports-table.php +15 -9
  31. lite/includes/classes/class-es-templates-table.php +5 -5
  32. lite/includes/db/class-es-db-campaigns.php +51 -48
  33. lite/includes/db/class-es-db-lists-contacts.php +38 -15
  34. lite/includes/db/class-es-db-lists.php +6 -3
  35. lite/includes/es-core-functions.php +69 -8
  36. lite/includes/feedback/class-ig-feedback.php +351 -359
  37. lite/includes/feedback/class-ig-tracker.php +4 -4
  38. lite/includes/pro-features.php +3 -3
  39. lite/includes/services/class-es-email-delivery-check.php +53 -0
  40. lite/includes/services/class-es-send-test-email.php +37 -0
  41. lite/includes/services/class-es-services.php +67 -0
  42. lite/includes/upgrade/es-update-functions.php +45 -0
  43. lite/includes/workflows/admin/class-es-workflow-admin-edit.php +1 -1
  44. lite/includes/workflows/admin/views/meta-box-actions.php +2 -2
  45. lite/includes/workflows/class-es-workflows-table.php +13 -7
  46. lite/public/class-email-subscribers-public.php +2 -1
  47. lite/public/partials/class-es-shortcode.php +1 -1
  48. lite/public/partials/subscription-successfull.php +6 -3
  49. readme.txt +12 -1
email-subscribers.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Email Subscribers & Newsletters
4
  * Plugin URI: https://www.icegram.com/
5
  * Description: Add subscription forms on website, send HTML newsletters & automatically notify subscribers about new blog posts once it is published.
6
- * Version: 4.5.6
7
  * Author: Icegram
8
  * Author URI: https://www.icegram.com/
9
  * Requires at least: 3.9
@@ -67,7 +67,7 @@ if ( ! version_compare( PHP_VERSION, IG_ES_MIN_PHP_VER, '>=' ) ) {
67
  * @since 4.3.0
68
  */
69
  if ( ! defined( 'IG_ES_FEEDBACK_TRACKER_VERSION' ) ) {
70
- define( 'IG_ES_FEEDBACK_TRACKER_VERSION', '1.2.3' );
71
  }
72
 
73
 
@@ -163,7 +163,7 @@ if ( $is_premium ) {
163
  /* ***************************** Initial Compatibility Work (End) ******************* */
164
 
165
  if ( ! defined( 'ES_PLUGIN_VERSION' ) ) {
166
- define( 'ES_PLUGIN_VERSION', '4.5.6' );
167
  }
168
 
169
  // Plugin Folder Path.
3
  * Plugin Name: Email Subscribers & Newsletters
4
  * Plugin URI: https://www.icegram.com/
5
  * Description: Add subscription forms on website, send HTML newsletters & automatically notify subscribers about new blog posts once it is published.
6
+ * Version: 4.6.0
7
  * Author: Icegram
8
  * Author URI: https://www.icegram.com/
9
  * Requires at least: 3.9
67
  * @since 4.3.0
68
  */
69
  if ( ! defined( 'IG_ES_FEEDBACK_TRACKER_VERSION' ) ) {
70
+ define( 'IG_ES_FEEDBACK_TRACKER_VERSION', '1.2.4' );
71
  }
72
 
73
 
163
  /* ***************************** Initial Compatibility Work (End) ******************* */
164
 
165
  if ( ! defined( 'ES_PLUGIN_VERSION' ) ) {
166
+ define( 'ES_PLUGIN_VERSION', '4.6.0' );
167
  }
168
 
169
  // Plugin Folder Path.
lite/admin/class-email-subscribers-admin.php CHANGED
@@ -66,7 +66,6 @@ class Email_Subscribers_Admin {
66
  add_action( 'admin_menu', array( $this, 'email_subscribers_admin_menu' ) );
67
  add_action( 'wp_ajax_es_klawoo_subscribe', array( $this, 'klawoo_subscribe' ) );
68
  add_action( 'admin_footer', array( $this, 'remove_submenu' ) );
69
- add_action( 'wp_ajax_send_test_email', array( $this, 'send_test_email' ) );
70
  add_action( 'admin_init', array( $this, 'es_save_onboarding_skip' ) );
71
 
72
  // Ajax handler for campaign status toggle.
@@ -126,7 +125,6 @@ class Email_Subscribers_Admin {
126
 
127
  wp_enqueue_script( $this->email_subscribers, plugin_dir_url( __FILE__ ) . 'js/email-subscribers-admin.js', array( 'jquery', 'jquery-ui-core', 'jquery-ui-tabs' ), $this->version, false );
128
 
129
-
130
  $ig_es_js_data = array(
131
  'security' => wp_create_nonce( 'ig-es-admin-ajax-nonce' ),
132
  'i18n_data' => array(
@@ -140,8 +138,6 @@ class Email_Subscribers_Admin {
140
 
141
  wp_localize_script( $this->email_subscribers, 'ig_es_js_data', $ig_es_js_data );
142
 
143
- wp_enqueue_script( 'custom', plugin_dir_url( __FILE__ ) . 'js/es-onboarding.js', array( 'jquery' ), $this->version, false );
144
-
145
  $page_prefix = 'email-subscribers_page_';
146
 
147
  if ( ES()->is_es_admin_screen( $page_prefix . 'es_workflows' ) ) {
@@ -279,10 +275,21 @@ class Email_Subscribers_Admin {
279
  new ES_Tracking();
280
  }
281
 
282
- // Function for Klawoo's Subscribe form on Help & Info page
283
- public static function klawoo_subscribe() {
 
 
 
 
284
 
285
- check_ajax_referer( 'ig-es-admin-ajax-nonce', 'security' );
 
 
 
 
 
 
 
286
 
287
  $url = 'http://app.klawoo.com/subscribe';
288
 
@@ -294,7 +301,11 @@ class Email_Subscribers_Admin {
294
  if ( ! empty( $_POST ) ) {
295
  $params = ig_es_get_data( $_POST, '', array(), true );
296
  } else {
297
- exit();
 
 
 
 
298
  }
299
  $method = 'POST';
300
  $qs = http_build_query( $params );
@@ -314,20 +325,29 @@ class Email_Subscribers_Admin {
314
  }
315
  }
316
 
317
- $response = wp_remote_request( $url, $options );
318
-
319
- if ( 200 == wp_remote_retrieve_response_code( $response ) ) {
320
- $data = $response['body'];
321
  if ( 'error' != $data ) {
322
 
323
  $message_start = substr( $data, strpos( $data, '<body>' ) + 6 );
324
  $remove = substr( $message_start, strpos( $message_start, '</body>' ) );
325
  $message = trim( str_replace( $remove, '', $message_start ) );
326
- echo wp_kses_post( $message );
327
- exit();
 
 
 
 
 
 
328
  }
329
  }
330
- exit();
 
 
 
 
331
  }
332
 
333
  /**
@@ -356,8 +376,8 @@ class Email_Subscribers_Admin {
356
  * @since 4.2.1
357
  */
358
  public function render_contacts() {
359
- $campaigns = new ES_Contacts_Table();
360
- $campaigns->render();
361
  }
362
 
363
  /**
@@ -500,70 +520,6 @@ class Email_Subscribers_Admin {
500
 
501
  }
502
 
503
- public function send_test_email() {
504
-
505
- check_ajax_referer( 'ig-es-admin-ajax-nonce', 'security' );
506
-
507
- $message = array(
508
- 'status' => 'ERROR',
509
- 'message' => __( 'Something went wrong', 'email-subscribers' )
510
- );
511
-
512
- $emails = ig_es_get_request_data( 'emails', array() );
513
- $es_from_name = ig_es_get_request_data( 'es_from_name', '' );
514
- $es_from_email = ig_es_get_request_data( 'es_from_email', '' );
515
- update_option( 'ig_es_from_name', $es_from_name );
516
- update_option( 'ig_es_from_email', $es_from_email );
517
- if ( is_array( $emails ) && count( $emails ) > 0 ) {
518
- $default_list = ES()->lists_db->get_list_by_name( IG_DEFAULT_LIST );
519
- $list_id = $default_list['id'];
520
- //add to the default list
521
- foreach ( $emails as $email ) {
522
- $data = array(
523
- 'first_name' => ES_Common::get_name_from_email( $email ),
524
- 'email' => $email,
525
- 'source' => 'admin',
526
- 'form_id' => 0,
527
- 'status' => 'verified',
528
- 'unsubscribed' => 0,
529
- 'hash' => ES_Common::generate_guid(),
530
- 'created_at' => ig_get_current_date_time()
531
- );
532
- $contact_id = ES()->contacts_db->insert( $data );
533
- if ( $contact_id ) {
534
- $data = array(
535
- 'contact_id' => $contact_id,
536
- 'status' => 'subscribed',
537
- 'optin_type' => IG_SINGLE_OPTIN,
538
- 'subscribed_at' => ig_get_current_date_time(),
539
- 'subscribed_ip' => null
540
- );
541
-
542
- ES()->lists_contacts_db->add_contact_to_lists( $data, $list_id );
543
- }
544
- }
545
- $res = ES_Install::create_and_send_default_broadcast();
546
- $res = ES_Install::create_and_send_default_post_notification();
547
-
548
- if ( $res && is_array( $res ) && ! empty( $res['status'] ) ) {
549
- if ( 'SUCCESS' === $res['status'] ) {
550
- update_option( 'ig_es_onboarding_test_campaign_success', 'yes' );
551
- } else {
552
- update_option( 'ig_es_onboarding_test_campaign_error', 'yes' );
553
- }
554
- }
555
-
556
- update_option( 'ig_es_onboarding_complete', 'yes' );
557
-
558
- $response = array();
559
- $response['dashboard_url'] = admin_url( 'admin.php?page=es_dashboard' );
560
- $response['status'] = 'SUCCESS';
561
- echo json_encode( $res );
562
- exit;
563
-
564
- }
565
- }
566
-
567
  //save skip signup option
568
  public function es_save_onboarding_skip() {
569
 
@@ -635,7 +591,7 @@ class Email_Subscribers_Admin {
635
  'es_contacts_per_page',
636
  'es_lists_per_page',
637
  'es_forms_per_page',
638
- 'es_workflows_per_page'
639
  );
640
 
641
  return apply_filters( 'ig_es_admin_screen_options', $admin_screen_options );
66
  add_action( 'admin_menu', array( $this, 'email_subscribers_admin_menu' ) );
67
  add_action( 'wp_ajax_es_klawoo_subscribe', array( $this, 'klawoo_subscribe' ) );
68
  add_action( 'admin_footer', array( $this, 'remove_submenu' ) );
 
69
  add_action( 'admin_init', array( $this, 'es_save_onboarding_skip' ) );
70
 
71
  // Ajax handler for campaign status toggle.
125
 
126
  wp_enqueue_script( $this->email_subscribers, plugin_dir_url( __FILE__ ) . 'js/email-subscribers-admin.js', array( 'jquery', 'jquery-ui-core', 'jquery-ui-tabs' ), $this->version, false );
127
 
 
128
  $ig_es_js_data = array(
129
  'security' => wp_create_nonce( 'ig-es-admin-ajax-nonce' ),
130
  'i18n_data' => array(
138
 
139
  wp_localize_script( $this->email_subscribers, 'ig_es_js_data', $ig_es_js_data );
140
 
 
 
141
  $page_prefix = 'email-subscribers_page_';
142
 
143
  if ( ES()->is_es_admin_screen( $page_prefix . 'es_workflows' ) ) {
275
  new ES_Tracking();
276
  }
277
 
278
+ /**
279
+ * Function for Klawoo's Subscribe form on Help & Info page
280
+ *
281
+ * @param boolean $return Flag to check return response instead of exiting in the function itself.
282
+ */
283
+ public static function klawoo_subscribe( $return = false ) {
284
 
285
+ // We don't need to do nonce validation in case if the function is being called from other function.
286
+ if ( ! $return ) {
287
+ check_ajax_referer( 'ig-es-admin-ajax-nonce', 'security' );
288
+ }
289
+
290
+ $response = array(
291
+ 'status' => 'error',
292
+ );
293
 
294
  $url = 'http://app.klawoo.com/subscribe';
295
 
301
  if ( ! empty( $_POST ) ) {
302
  $params = ig_es_get_data( $_POST, '', array(), true );
303
  } else {
304
+ if ( ! $return ) {
305
+ exit();
306
+ } else {
307
+ return $response;
308
+ }
309
  }
310
  $method = 'POST';
311
  $qs = http_build_query( $params );
325
  }
326
  }
327
 
328
+ $request_response = wp_remote_request( $url, $options );
329
+ if ( 200 == wp_remote_retrieve_response_code( $request_response ) ) {
330
+ $data = $request_response['body'];
 
331
  if ( 'error' != $data ) {
332
 
333
  $message_start = substr( $data, strpos( $data, '<body>' ) + 6 );
334
  $remove = substr( $message_start, strpos( $message_start, '</body>' ) );
335
  $message = trim( str_replace( $remove, '', $message_start ) );
336
+ if ( ! $return ) {
337
+ echo wp_kses_post( $message );
338
+ exit();
339
+ } else {
340
+ $response['status'] = 'success';
341
+ $response['message'] = $message;
342
+ return $response;
343
+ }
344
  }
345
  }
346
+ if ( ! $return ) {
347
+ exit();
348
+ } else {
349
+ return $response;
350
+ }
351
  }
352
 
353
  /**
376
  * @since 4.2.1
377
  */
378
  public function render_contacts() {
379
+ $contacts = new ES_Contacts_Table();
380
+ $contacts->render();
381
  }
382
 
383
  /**
520
 
521
  }
522
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
523
  //save skip signup option
524
  public function es_save_onboarding_skip() {
525
 
591
  'es_contacts_per_page',
592
  'es_lists_per_page',
593
  'es_forms_per_page',
594
+ 'es_workflows_per_page',
595
  );
596
 
597
  return apply_filters( 'ig_es_admin_screen_options', $admin_screen_options );
lite/admin/class-ig-es-onboarding.php ADDED
@@ -0,0 +1,1432 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // Exit if accessed directly
4
+ if ( ! defined( 'ABSPATH' ) ) {
5
+ exit;
6
+ }
7
+
8
+ /**
9
+ * The onboarding-specific functionality of the plugin.
10
+ *
11
+ * @link http://example.com
12
+ * @since 4.6.0
13
+ *
14
+ * @package Email_Subscribers
15
+ */
16
+
17
+
18
+ if ( ! class_exists( 'IG_ES_Onboarding' ) ) {
19
+
20
+ /**
21
+ * The onboarding-specific functionality of the plugin.
22
+ *
23
+ */
24
+ class IG_ES_Onboarding {
25
+
26
+ /**
27
+ * Class instance.
28
+ *
29
+ * @var Onboarding instance
30
+ */
31
+ protected static $instance = null;
32
+
33
+ /**
34
+ * Added Logger Context
35
+ *
36
+ * @since 4.6.0
37
+ * @var array
38
+ *
39
+ */
40
+ protected static $logger_context = array(
41
+ 'source' => 'ig_es_onboarding'
42
+ );
43
+
44
+ /**
45
+ * Variable to hold all onboarding tasks list
46
+ *
47
+ * @since 4.6.0
48
+ * @var array
49
+ *
50
+ */
51
+ private static $all_onboarding_tasks = array(
52
+ 'configuration_tasks' => array(
53
+ 'set_settings',
54
+ 'create_default_lists',
55
+ 'create_contacts_and_add_to_list',
56
+ 'add_workflow_for_user_registration',
57
+ 'create_default_newsletter_broadcast',
58
+ 'create_default_post_notification',
59
+ 'create_default_subscription_form',
60
+ 'add_widget_to_sidebar',
61
+ ),
62
+ 'email_delivery_check_tasks' => array(
63
+ 'queue_default_broadcast_newsletter',
64
+ 'dispatch_emails_from_server',
65
+ 'check_test_email_on_server',
66
+ 'evaluate_email_delivery',
67
+ ),
68
+ 'completion_tasks' => array(
69
+ 'subscribe_to_klawoo',
70
+ 'save_final_configuration',
71
+ )
72
+ );
73
+
74
+ /**
75
+ * Option name for current task name.
76
+ *
77
+ * @since 4.6.0
78
+ * @var array
79
+ *
80
+ */
81
+ private static $onboarding_current_task_option = 'ig_es_onboarding_current_task';
82
+
83
+ /**
84
+ * Option name which holds common data between tasks.
85
+ *
86
+ * e.g. created subscription form id from create_default_subscription_form function so we can use it in add_widget_to_sidebar
87
+ *
88
+ * @since 4.6.0
89
+ * @var array
90
+ *
91
+ */
92
+ private static $onboarding_tasks_data_option = 'ig_es_onboarding_tasks_data';
93
+
94
+ /**
95
+ * Option name which holds tasks which are done.
96
+ *
97
+ * @since 4.6.0
98
+ * @var array
99
+ *
100
+ */
101
+ private static $onboarding_tasks_done_option = 'ig_es_onboarding_tasks_done';
102
+
103
+ /**
104
+ * Option name which holds tasks which are failed.
105
+ *
106
+ * @since 4.6.0
107
+ * @var array
108
+ *
109
+ */
110
+ private static $onboarding_tasks_failed_option = 'ig_es_onboarding_tasks_failed';
111
+
112
+ /**
113
+ * Option name which holds tasks which are skipped due to dependency on other tasks.
114
+ *
115
+ * @since 4.6.0
116
+ * @var array
117
+ *
118
+ */
119
+ private static $onboarding_tasks_skipped_option = 'ig_es_onboarding_tasks_skipped';
120
+
121
+ /**
122
+ * Option name which store the step which has been completed.
123
+ *
124
+ * @since 4.6.0
125
+ * @var string
126
+ *
127
+ */
128
+ private static $onboarding_step_option = 'ig_es_onboarding_step';
129
+
130
+ /**
131
+ * Initialize the class and set its properties.
132
+ *
133
+ * @since 4.6.0
134
+ */
135
+ public function __construct() {
136
+ add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
137
+ add_action( 'wp_ajax_ig_es_handle_request', array( $this, 'handle_request' ) );
138
+ }
139
+
140
+ /**
141
+ * Get class instance.
142
+ *
143
+ * @since 4.6.0
144
+ */
145
+ public static function instance() {
146
+ if ( ! self::$instance ) {
147
+ self::$instance = new self();
148
+ }
149
+ return self::$instance;
150
+ }
151
+
152
+ /**
153
+ * Register the JavaScript for the onboarding process.
154
+ *
155
+ * @since 4.6.0
156
+ */
157
+ public function enqueue_scripts() {
158
+
159
+ if ( ! ES()->is_es_admin_screen() ) {
160
+ return;
161
+ }
162
+
163
+ $current_page = ig_es_get_request_data( 'page' );
164
+
165
+ if ( 'es_dashboard' === $current_page ) {
166
+
167
+ if ( ! self::is_onboarding_completed() ) {
168
+ wp_enqueue_script( 'ig-es-onboarding', plugin_dir_url( __FILE__ ) . 'js/es-onboarding.js', array( 'jquery' ), ES_PLUGIN_VERSION, false );
169
+ $onboarding_data = $this->get_onboarding_data();
170
+ $onboarding_data['next_task'] = $this->get_next_onboarding_task();
171
+ $onboarding_data['error_message'] = __( 'An error occured. Please try again later.', 'email-subscribers' );
172
+ wp_localize_script( 'ig-es-onboarding', 'ig_es_onboarding_data', $onboarding_data );
173
+ }
174
+ }
175
+ }
176
+
177
+ /**
178
+ * Method to perform configuration and list, ES form, campaigns creation related operations in the onboarding
179
+ *
180
+ * @since 4.6.0
181
+ */
182
+ public function handle_request() {
183
+
184
+ $response = array();
185
+
186
+ check_ajax_referer( 'ig-es-admin-ajax-nonce', 'security' );
187
+
188
+ $request = ig_es_get_request_data( 'request' );
189
+
190
+ if ( ! empty( $request ) ) {
191
+ $ajax_action = 'ajax_' . $request;
192
+ if ( is_callable( array( $this, $ajax_action ) ) ) {
193
+ $response = call_user_func( array( $this, $ajax_action ) );
194
+ }
195
+ }
196
+
197
+ wp_send_json( $response );
198
+ }
199
+
200
+ /**
201
+ * Method to perform configuration and list, ES form, campaigns creation related operations in the onboarding
202
+ *
203
+ * @since 4.6.0
204
+ */
205
+ public function ajax_perform_configuration_tasks() {
206
+
207
+ update_option( self::$onboarding_step_option, 2 );
208
+ return $this->perform_onboarding_tasks( 'configuration_tasks' );
209
+ }
210
+
211
+ /**
212
+ * Method to perform email delivery tasks.
213
+ *
214
+ * @since 4.6.0
215
+ */
216
+ public function ajax_queue_default_broadcast_newsletter() {
217
+ return $this->perform_onboarding_tasks( 'email_delivery_check_tasks', 'queue_default_broadcast_newsletter' );
218
+ }
219
+
220
+ /**
221
+ * Method to perform email delivery tasks.
222
+ *
223
+ * @since 4.6.0
224
+ */
225
+ public function ajax_dispatch_emails_from_server() {
226
+ return $this->perform_onboarding_tasks( 'email_delivery_check_tasks', 'dispatch_emails_from_server' );
227
+ }
228
+
229
+ /**
230
+ * Method to perform email delivery tasks.
231
+ *
232
+ * @since 4.6.0
233
+ */
234
+ public function ajax_check_test_email_on_server() {
235
+
236
+ return $this->perform_onboarding_tasks( 'email_delivery_check_tasks', 'check_test_email_on_server' );
237
+ }
238
+
239
+ /**
240
+ * Method to perform email delivery tasks.
241
+ *
242
+ * @since 4.6.0
243
+ */
244
+ public function ajax_checking_spam_score_delivery_metrics() {
245
+ return $this->perform_onboarding_tasks( 'email_delivery_check_tasks', 'checking_spam_score_delivery_metrics' );
246
+ }
247
+
248
+ /**
249
+ * Method to perform email delivery tasks.
250
+ *
251
+ * @since 4.6.0
252
+ */
253
+ public function ajax_evaluate_email_delivery() {
254
+ return $this->perform_onboarding_tasks( 'email_delivery_check_tasks', 'evaluate_email_delivery' );
255
+ }
256
+
257
+ /**
258
+ * Method to perform email delivery tasks.
259
+ *
260
+ * @since 4.6.0
261
+ */
262
+ public function ajax_finishing_onboarding() {
263
+
264
+ $response = $this->perform_onboarding_tasks( 'completion_tasks' );
265
+
266
+ // Delete the onboarding data used during onboarding process.
267
+ $this->delete_onboarding_data();
268
+
269
+ $settings_url = admin_url( 'admin.php?page=es_settings' );
270
+ $response['redirect_url'] = $settings_url;
271
+
272
+ return $response;
273
+ }
274
+
275
+ /**
276
+ * Method to updatee the onboarding step
277
+ *
278
+ * @return bool
279
+ *
280
+ * @since 4.6.0
281
+ */
282
+ public static function ajax_update_onboarding_step() {
283
+
284
+ $response = array(
285
+ 'status' => 'error',
286
+ );
287
+
288
+ $step = ig_es_get_request_data( 'step' );
289
+ if ( ! empty( $step ) ) {
290
+ self::update_onboarding_step( $step );
291
+ $response['status'] = 'success';
292
+ }
293
+
294
+ return $response;
295
+ }
296
+
297
+ /**
298
+ * Method to perform give onboarding tasks types.
299
+ *
300
+ * @param string $task_group Tasks group
301
+ * @param string $task_name Specific task
302
+ *
303
+ * @since 4.6.0
304
+ */
305
+ public function perform_onboarding_tasks( $task_group = '', $task_name = '' ) {
306
+
307
+ $response = array(
308
+ 'status' => '',
309
+ 'tasks' => array(),
310
+ );
311
+
312
+ $logger = get_ig_logger();
313
+ $task_group = ! empty( $task_group ) ? $task_group : 'configuration_tasks';
314
+
315
+ $all_onboarding_tasks = self::$all_onboarding_tasks;
316
+
317
+ $current_tasks = array();
318
+ if ( ! empty( $all_onboarding_tasks[ $task_group ] ) ) {
319
+ // Get specific task else all tasks in a group.
320
+ if ( ! empty( $task_name ) ) {
321
+ $task_index = array_search( $task_name, $all_onboarding_tasks[ $task_group ], true );
322
+ if ( false !== $task_index ) {
323
+ $current_tasks = array( $task_name );
324
+ }
325
+ } else {
326
+ $current_tasks = $all_onboarding_tasks[ $task_group ];
327
+ }
328
+ }
329
+
330
+ $onboarding_tasks_done = get_option( self::$onboarding_tasks_done_option, array() );
331
+ $current_tasks_done = ! empty( $onboarding_tasks_done[$task_group] ) ? $onboarding_tasks_done[$task_group] : array();
332
+
333
+ $onboarding_tasks_failed = get_option( self::$onboarding_tasks_failed_option, array() );
334
+ $current_tasks_failed = ! empty( $onboarding_tasks_failed[$task_group] ) ? $onboarding_tasks_failed[$task_group] : array();
335
+
336
+ $onboarding_tasks_skipped = get_option( self::$onboarding_tasks_skipped_option, array() );
337
+ $current_tasks_skipped = ! empty( $onboarding_tasks_skipped[$task_group] ) ? $onboarding_tasks_skipped[$task_group] : array();
338
+
339
+ $onboarding_tasks_data = get_option( self::$onboarding_tasks_data_option, array() );
340
+ if ( ! empty( $current_tasks ) ) {
341
+ foreach ( $current_tasks as $current_task ) {
342
+ if ( ! in_array( $current_task, $current_tasks_done, true ) ) {
343
+
344
+ if ( is_callable( array( $this, $current_task ) ) ) {
345
+ $logger->info( 'Doing Task:' . $current_task, self::$logger_context );
346
+
347
+ // Call callback function.
348
+ $task_response = call_user_func( array( $this, $current_task ) );
349
+ if ( 'success' === $task_response['status'] ) {
350
+ if ( ! empty( $task_response['tasks_data'] ) ) {
351
+ if ( ! isset( $onboarding_tasks_data[$current_task] ) ) {
352
+ $onboarding_tasks_data[$current_task] = array();
353
+ }
354
+ $onboarding_tasks_data[$current_task] = array_merge( $onboarding_tasks_data[$current_task], $task_response['tasks_data'] );
355
+ }
356
+ $logger->info( 'Task Done:' . $current_task, self::$logger_context );
357
+ // Set success status only if not already set else it can override error/skipped statuses set previously from other tasks.
358
+ if ( empty( $response['status'] ) ) {
359
+ $response['status'] = 'success';
360
+ }
361
+ $current_tasks_done[] = $current_task;
362
+ } else if ( 'skipped' === $task_response['status'] ) {
363
+ $response['status'] = 'skipped';
364
+ $current_tasks_skipped[] = $current_task;
365
+ } else {
366
+ $logger->info( 'Task Failed:' . $current_task, self::$logger_context );
367
+ $response['status'] = 'error';
368
+ $current_tasks_failed[] = $current_task;
369
+ }
370
+
371
+ $response['tasks'][$current_task] = $task_response;
372
+
373
+ $onboarding_tasks_done[$task_group] = $current_tasks_done;
374
+ $onboarding_tasks_failed[$task_group] = $current_tasks_failed;
375
+ $onboarding_tasks_skipped[$task_group] = $current_tasks_skipped;
376
+
377
+ update_option( self::$onboarding_tasks_done_option, $onboarding_tasks_done );
378
+ update_option( self::$onboarding_tasks_failed_option, $onboarding_tasks_failed );
379
+ update_option( self::$onboarding_tasks_skipped_option, $onboarding_tasks_skipped );
380
+ update_option( self::$onboarding_tasks_data_option, $onboarding_tasks_data );
381
+ update_option( self::$onboarding_current_task_option, $current_task );
382
+ } else {
383
+ $logger->info( 'Missing Task:' . $current_task, self::$logger_context );
384
+ }
385
+ } else {
386
+ $response['tasks'][$current_task] = array(
387
+ 'status' => 'success',
388
+ );
389
+ $logger->info( 'Task already done:' . $current_task, self::$logger_context );
390
+ }
391
+ }
392
+ }
393
+
394
+ return $response;
395
+ }
396
+
397
+ /**
398
+ * Set settings required for ES settings.
399
+ *
400
+ * @since 4.6.0
401
+ */
402
+ public function set_settings() {
403
+
404
+ $response = array(
405
+ 'status' => 'error',
406
+ );
407
+
408
+ $from_name = ig_es_get_request_data( 'es_from_name', '' );
409
+ $from_email = ig_es_get_request_data( 'es_from_email', '' );
410
+ $enable_double_optin = ig_es_get_request_data( 'enable_double_optin', 'yes' );
411
+ $optin_type = 'yes' === $enable_double_optin ? 'double_opt_in': 'single_opt_in';
412
+ $is_trial = ig_es_get_request_data( 'is_trial', '' );
413
+
414
+ if ( ! empty( $is_trial ) ) {
415
+ // Update trial preferences.
416
+ update_option( 'ig_es_is_trial', $is_trial );
417
+ update_option( 'ig_es_trial_started_at', current_time( 'timestamp' ) );
418
+ }
419
+
420
+ update_option( 'ig_es_optin_type', $optin_type );
421
+
422
+ if ( ! empty( $from_name ) && ! empty( $from_email ) ) {
423
+ update_option( 'ig_es_from_name', $from_name );
424
+ update_option( 'ig_es_from_email', $from_email );
425
+ $response['status'] = 'success';
426
+ } else {
427
+ $response['status'] = 'error';
428
+ }
429
+
430
+ return $response;
431
+ }
432
+
433
+ /**
434
+ * Create default list contact
435
+ *
436
+ * @since 4.0.0
437
+ */
438
+ public function create_default_lists() {
439
+
440
+ $response = array(
441
+ 'status' => 'error',
442
+ );
443
+
444
+ $default_list = ES()->lists_db->get_list_by_name( IG_DEFAULT_LIST );
445
+ // Check if list already not exists.
446
+ if ( empty( $default_list['id'] ) ) {
447
+ // Add default list.
448
+ $default_list_id = ES()->lists_db->add_list( IG_DEFAULT_LIST );
449
+ } else {
450
+ $default_list_id = $default_list['id'];
451
+ }
452
+
453
+ $main_list = ES()->lists_db->get_list_by_name( IG_MAIN_LIST );
454
+ // Check if list already not exists.
455
+ if ( empty( $main_list['id'] ) ) {
456
+ // Add main list.
457
+ $main_list_id = ES()->lists_db->add_list( IG_MAIN_LIST );
458
+ } else {
459
+ $main_list_id = $main_list['id'];
460
+ }
461
+
462
+ // Check if lists created successfully.
463
+ if ( $default_list_id && $main_list_id ) {
464
+ $response['status'] = 'success';
465
+ } else {
466
+ /* translators: 1. Main list name. 2. Default list name. */
467
+ $response['message'] = sprintf( __( 'Unable to create %1$s and %2$s list.', 'email-subscribers' ), IG_MAIN_LIST, IG_DEFAULT_LIST );
468
+ $response['status'] = 'error';
469
+ }
470
+
471
+ return $response;
472
+ }
473
+
474
+ public function create_contacts_and_add_to_list() {
475
+
476
+ // Get default list data.
477
+ $default_list_id = 0;
478
+ $default_list = ES()->lists_db->get_list_by_name( IG_DEFAULT_LIST );
479
+
480
+ if ( ! empty( $default_list['id'] ) ) {
481
+ $default_list_id = $default_list['id'];
482
+ }
483
+
484
+ // Get main list data.
485
+ $main_list_id = 0;
486
+ $main_list = ES()->lists_db->get_list_by_name( IG_MAIN_LIST );
487
+
488
+ if ( ! empty( $main_list['id'] ) ) {
489
+ $main_list_id = $main_list['id'];
490
+ }
491
+
492
+ // Get contact data for admin
493
+ $admin_email = get_option( 'admin_email' );
494
+ $admin_name = get_option( 'admin_email' );
495
+ $user = get_user_by( 'email', $admin_email );
496
+ $wp_user_id = 0;
497
+ if ( $user instanceof WP_User ) {
498
+ $wp_user_id = $user->ID;
499
+ }
500
+
501
+ // Prepare admin contact data.
502
+ $data = array(
503
+ 'wp_user_id' => $wp_user_id,
504
+ 'first_name' => $admin_name,
505
+ 'last_name' => '',
506
+ 'email' => $admin_email,
507
+ 'source' => 'admin',
508
+ 'form_id' => 0,
509
+ 'status' => 'verified',
510
+ 'unsubscribed' => 0,
511
+ 'hash' => ES_Common::generate_guid(),
512
+ 'created_at' => ig_get_current_date_time()
513
+ );
514
+
515
+ $contact_id = ES()->contacts_db->insert( $data );
516
+ if ( $contact_id ) {
517
+
518
+ // Prepare admin contact list data.
519
+ $data = array(
520
+ 'contact_id' => $contact_id,
521
+ 'status' => 'subscribed',
522
+ 'optin_type' => IG_SINGLE_OPTIN,
523
+ 'subscribed_at' => ig_get_current_date_time(),
524
+ 'subscribed_ip' => null,
525
+ );
526
+
527
+ if ( ! empty( $default_list_id ) ) {
528
+ $contacts_added = ES()->lists_contacts_db->add_contact_to_lists( $data, $default_list_id );
529
+ if ( $contacts_added ) {
530
+ $response['status'] = 'success';
531
+ }
532
+ }
533
+
534
+ if ( ! empty( $main_list_id ) ) {
535
+ $contacts_added = ES()->lists_contacts_db->add_contact_to_lists( $data, $main_list_id );
536
+ if ( $contacts_added ) {
537
+ $response['status'] = 'success';
538
+ }
539
+ }
540
+ }
541
+
542
+ // Get details of other emails.
543
+ $emails = ig_es_get_request_data( 'emails', array() );
544
+ if ( is_array( $emails ) && count( $emails ) > 0 ) {
545
+ $default_list = ES()->lists_db->get_list_by_name( IG_DEFAULT_LIST );
546
+ // Add to the default list.
547
+ foreach ( $emails as $email ) {
548
+ $data = array(
549
+ 'first_name' => ES_Common::get_name_from_email( $email ),
550
+ 'email' => $email,
551
+ 'source' => 'admin',
552
+ 'form_id' => 0,
553
+ 'status' => 'verified',
554
+ 'unsubscribed' => 0,
555
+ 'hash' => ES_Common::generate_guid(),
556
+ 'created_at' => ig_get_current_date_time()
557
+ );
558
+ $contact_id = ES()->contacts_db->insert( $data );
559
+ if ( $contact_id ) {
560
+ $data = array(
561
+ 'contact_id' => $contact_id,
562
+ 'status' => 'subscribed',
563
+ 'optin_type' => IG_SINGLE_OPTIN,
564
+ 'subscribed_at' => ig_get_current_date_time(),
565
+ 'subscribed_ip' => null,
566
+ );
567
+
568
+ $contacts_added = ES()->lists_contacts_db->add_contact_to_lists( $data, $default_list_id );
569
+ if ( $contacts_added ) {
570
+ $response['status'] = 'success';
571
+ }
572
+ }
573
+ }
574
+ }
575
+
576
+ return $response;
577
+ }
578
+
579
+ /**
580
+ * Add user registration workflow
581
+ *
582
+ * @return $response
583
+ *
584
+ * @since 4.6.0
585
+ */
586
+ public function add_workflow_for_user_registration() {
587
+
588
+ $response = array(
589
+ 'status' => 'error',
590
+ );
591
+
592
+ $workflow_query_args = array(
593
+ 'trigger_name' => 'ig_es_user_registered',
594
+ );
595
+
596
+ $workflows = ES()->workflows_db->get_workflows( $workflow_query_args );
597
+
598
+ // Add workflow only if there is no workflow for user registration already present.
599
+ if ( empty( $workflows ) ) {
600
+ $main_list = ES()->lists_db->get_list_by_name( IG_MAIN_LIST );
601
+
602
+ // Check if Main list exists.
603
+ if ( ! empty( $main_list ) ) {
604
+ $workflow_title = __( 'User Registered', 'email-subscribers' );
605
+ $workflow_name = sanitize_title( $workflow_title );
606
+ $trigger_name = 'ig_es_user_registered';
607
+ $main_list_id = $main_list['id'];
608
+ $workflow_meta = array();
609
+ $workflow_meta['when_to_run'] = 'immediately';
610
+ $workflow_status = 0;
611
+
612
+ $workflow_actions = array(
613
+ array(
614
+ 'action_name' => 'ig_es_add_to_list',
615
+ 'ig-es-list' => ES_Clean::id( $main_list_id ),
616
+ ),
617
+ );
618
+
619
+ $workflow_data = array(
620
+ 'name' => $workflow_name,
621
+ 'title' => $workflow_title,
622
+ 'trigger_name' => $trigger_name,
623
+ 'actions' => maybe_serialize( $workflow_actions ),
624
+ 'meta' => maybe_serialize( $workflow_meta ),
625
+ 'priority' => 0,
626
+ 'status' => $workflow_status,
627
+ );
628
+
629
+ $workflow_id = ES()->workflows_db->insert_workflow( $workflow_data );
630
+ if ( $workflow_id ) {
631
+ $response['status'] = 'success';
632
+ }
633
+ }
634
+ }
635
+
636
+ return $response;
637
+ }
638
+
639
+ /**
640
+ * Create default form
641
+ *
642
+ * @since 4.6.0
643
+ */
644
+ public function create_default_subscription_form() {
645
+
646
+ $response = array(
647
+ 'status' => 'error',
648
+ );
649
+
650
+ $form_data = array();
651
+ $default_list = ES()->lists_db->get_list_by_name( IG_MAIN_LIST );
652
+ $list_id = $default_list['id'];
653
+
654
+ $body = array(
655
+ array(
656
+ 'type' => 'text',
657
+ 'name' => 'Name',
658
+ 'id' => 'name',
659
+ 'params' => array(
660
+ 'label' => 'Name',
661
+ 'show' => true,
662
+ 'required' => true
663
+ ),
664
+
665
+ 'position' => 1
666
+ ),
667
+
668
+ array(
669
+ 'type' => 'text',
670
+ 'name' => 'Email',
671
+ 'id' => 'email',
672
+ 'params' => array(
673
+ 'label' => 'Email',
674
+ 'show' => true,
675
+ 'required' => true
676
+ ),
677
+
678
+ 'position' => 2
679
+ ),
680
+
681
+ array(
682
+ 'type' => 'checkbox',
683
+ 'name' => 'Lists',
684
+ 'id' => 'lists',
685
+ 'params' => array(
686
+ 'label' => 'Lists',
687
+ 'show' => false,
688
+ 'required' => true,
689
+ 'values' => array( $list_id )
690
+ ),
691
+
692
+ 'position' => 3
693
+ ),
694
+
695
+ array(
696
+ 'type' => 'submit',
697
+ 'name' => 'submit',
698
+ 'id' => 'submit',
699
+ 'params' => array(
700
+ 'label' => 'Subscribe',
701
+ 'show' => true
702
+ ),
703
+
704
+ 'position' => 4
705
+ ),
706
+
707
+ );
708
+
709
+ $settings = array(
710
+ 'lists' => array( $list_id ),
711
+ 'desc' => ''
712
+ );
713
+
714
+ $add_gdpr_consent = ig_es_get_request_data( 'add_gdpr_consent', '' );
715
+
716
+ // Add GDPR setting if admin has opted for.
717
+ if ( 'yes' === $add_gdpr_consent ) {
718
+ $settings['gdpr']['consent'] = 'yes';
719
+ $settings['gdpr']['consent_text'] = __( 'Please accept terms & condition', 'email-subscribers' );
720
+ }
721
+
722
+ $form_data['name'] = 'First Form';
723
+ $form_data['body'] = maybe_serialize( $body );
724
+ $form_data['settings'] = maybe_serialize( $settings );
725
+ $form_data['styles'] = '';
726
+ $form_data['created_at'] = ig_get_current_date_time();
727
+ $form_data['updated_at'] = null;
728
+ $form_data['deleted_at'] = null;
729
+ $form_data['af_id'] = 0;
730
+
731
+ // Add Form.
732
+ $form_id = ES()->forms_db->add_form( $form_data );
733
+ if ( ! empty( $form_id ) ) {
734
+ $response['status'] = 'success';
735
+ $response['tasks_data'] = array(
736
+ 'form_id' => $form_id
737
+ );
738
+ } else {
739
+ $response['status'] = 'error';
740
+ }
741
+
742
+ return $response;
743
+ }
744
+
745
+ /**
746
+ * Add ES widget to active sidebar
747
+ *
748
+ * @since 4.6.0
749
+ */
750
+ public function add_widget_to_sidebar() {
751
+
752
+ global $wp_registered_sidebars;
753
+
754
+ $response = array(
755
+ 'status' => 'error',
756
+ );
757
+
758
+ if ( ! empty( $wp_registered_sidebars ) ) {
759
+ foreach ( $wp_registered_sidebars as $sidebar ) {
760
+ $sidebar_id = $sidebar['id'];
761
+ if ( is_active_sidebar( $sidebar_id ) ) {
762
+ $onboarding_tasks_data = get_option( self::$onboarding_tasks_data_option, array() );
763
+ // Get created form id from create_default_subscription_form task's data.
764
+ if ( ! empty( $onboarding_tasks_data['create_default_subscription_form']['form_id'] ) ) {
765
+ $form_id = $onboarding_tasks_data['create_default_subscription_form']['form_id'];
766
+ $widget_data = array(
767
+ 'form_id' => $form_id,
768
+ );
769
+ $widget_added = ig_es_insert_widget_in_sidebar( 'email-subscribers-form', $widget_data, $sidebar_id );
770
+ if ( $widget_added ) {
771
+ $response['status'] = 'success';
772
+ $response['tasks_data'] = array(
773
+ 'sidebar_id' => $sidebar_id,
774
+ 'sidebar_name' => $sidebar['name'],
775
+ );
776
+ /* translators: Active sidebar name. */
777
+ $response['message'] = sprintf( __( 'Adding the form to "%s" sidebar, so you can show it on the site', 'email-subscribers' ), $sidebar['name'] );
778
+ } else {
779
+ /* translators: Active sidebar name. */
780
+ $response['message'] = sprintf( __( 'Unable to add form widget to "%s" sidebar. Widget may already exists.', 'email-subscribers' ), $sidebar['name'] );
781
+ }
782
+ break;
783
+ } else {
784
+ /* translators: Active sidebar name. */
785
+ $response['message'] = sprintf( __( 'Unable to add form widget to "%s" sidebar. No subscription form found.', 'email-subscribers' ), $sidebar['name'] );
786
+ break;
787
+ }
788
+ }
789
+ }
790
+ }
791
+
792
+ return $response;
793
+ }
794
+
795
+ /**
796
+ * Create and send default broadcast while onboarding
797
+ *
798
+ * @return array|mixed|void
799
+ *
800
+ * @since 4.0.0
801
+ */
802
+ public function create_default_newsletter_broadcast() {
803
+
804
+ $response = array(
805
+ 'status' => 'error',
806
+ );
807
+
808
+ /**
809
+ * - Create Default Template
810
+ * - Create Broadcast Campaign
811
+ */
812
+ $from_name = ES_Common::get_ig_option( 'from_name' );
813
+ $from_email = ES_Common::get_ig_option( 'from_email' );
814
+
815
+ // First Create Default Template.
816
+ $sample = '<strong style="color: #990000">What can you achieve using Email Subscribers?</strong><p>Add subscription forms on website, send HTML newsletters & automatically notify subscribers about new blog posts once it is published.';
817
+ $sample .= ' You can also Import or Export subscribers from any list to Email Subscribers.</p>';
818
+ $sample .= ' <strong style="color: #990000">Plugin Features</strong><ol>';
819
+ $sample .= ' <li>Send notification emails to subscribers when new blog posts are published.</li>';
820
+ $sample .= ' <li>Subscribe form available with 3 options to setup.</li>';
821
+ $sample .= ' <li>Double Opt-In and Single Opt-In support.</li>';
822
+ $sample .= ' <li>Email notification to admin when a new user signs up (Optional).</li>';
823
+ $sample .= ' <li>Automatic welcome email to subscriber.</li>';
824
+ $sample .= ' <li>Auto add unsubscribe link in the email.</li>';
825
+ $sample .= ' <li>Import/Export subscriber emails to migrate to any lists.</li>';
826
+ $sample .= ' <li>Default WordPress editor to create emails.</li>';
827
+ $sample .= ' </ol>';
828
+ $sample .= ' <strong>Thanks & Regards,</strong><br/>Admin<br/>';
829
+
830
+ $title = esc_html__( 'Welcome To Email Subscribers', 'email-subscribers' );
831
+ $es_post = array(
832
+ 'post_title' => $title,
833
+ 'post_content' => $sample,
834
+ 'post_status' => 'publish',
835
+ 'post_type' => 'es_template',
836
+ 'meta_input' => array(
837
+ 'es_template_type' => 'newsletter'
838
+ )
839
+ );
840
+
841
+ // Insert the post into the database
842
+ $post_id = wp_insert_post( $es_post );
843
+
844
+ // Create Broadcast Campaign
845
+
846
+ $default_list = ES()->lists_db->get_list_by_name( IG_DEFAULT_LIST );
847
+
848
+ if ( ! empty( $default_list ) ) {
849
+ $list_id = $default_list['id'];
850
+
851
+ if ( ! empty( $post_id ) ) {
852
+
853
+ $data['slug'] = sanitize_title( $title );
854
+ $data['name'] = $title;
855
+ $data['type'] = 'newsletter';
856
+ $data['from_email'] = $from_email;
857
+ $data['reply_to_email'] = $from_email;
858
+ $data['from_name'] = $from_name;
859
+ $data['reply_to_name'] = $from_name;
860
+ $data['list_ids'] = $list_id;
861
+ $data['base_template_id'] = $post_id;
862
+ $data['body'] = $sample;
863
+ $data['status'] = 1;
864
+
865
+ $broadcast_id = ES()->campaigns_db->save_campaign( $data );
866
+
867
+ if ( $broadcast_id ) {
868
+ $response['status'] = 'success';
869
+ $response['tasks_data'] = array(
870
+ 'broadcast_id' => $broadcast_id,
871
+ );
872
+ }
873
+
874
+ }
875
+ }
876
+
877
+ return $response;
878
+ }
879
+
880
+ /**
881
+ * Method to queue created default newsletter broadcast.
882
+ *
883
+ * @since 4.6.0
884
+ */
885
+ public function queue_default_broadcast_newsletter() {
886
+
887
+ $response = array(
888
+ 'status' => 'error',
889
+ );
890
+
891
+ $onboarding_tasks_data = get_option( self::$onboarding_tasks_data_option, array() );
892
+ $campaign_id = ! empty( $onboarding_tasks_data['create_default_newsletter_broadcast']['broadcast_id'] ) ? $onboarding_tasks_data['create_default_newsletter_broadcast']['broadcast_id']: 0;
893
+
894
+ if ( ! empty( $campaign_id ) ) {
895
+ $default_list = ES()->lists_db->get_list_by_name( IG_DEFAULT_LIST );
896
+ if ( ! empty( $default_list ) ) {
897
+ $list_id = $default_list['id'];
898
+ $subscribers = ES()->contacts_db->get_active_contacts_by_list_id( $list_id );
899
+ if ( ! empty( $subscribers ) && count( $subscribers ) > 0 ) {
900
+ $content_body = ES()->campaigns_db->get_column( 'body', $campaign_id );
901
+ $title = ES()->campaigns_db->get_column( 'name', $campaign_id );
902
+ $guid = ES_Common::generate_guid( 6 );
903
+ $now = ig_get_current_date_time();
904
+
905
+ $data = array(
906
+ 'hash' => $guid,
907
+ 'campaign_id' => $campaign_id,
908
+ 'subject' => $title,
909
+ 'body' => $content_body,
910
+ 'count' => count( $subscribers ),
911
+ 'status' => 'In Queue',
912
+ 'start_at' => $now,
913
+ 'finish_at' => $now,
914
+ 'created_at' => $now,
915
+ 'updated_at' => $now,
916
+ );
917
+
918
+ $report_id = ES_DB_Mailing_Queue::add_notification( $data );
919
+
920
+ $delivery_data = array();
921
+ $delivery_data['hash'] = $guid;
922
+ $delivery_data['subscribers'] = $subscribers;
923
+ $delivery_data['campaign_id'] = $campaign_id;
924
+ $delivery_data['mailing_queue_id'] = $report_id;
925
+ $delivery_data['status'] = 'In Queue';
926
+ ES_DB_Sending_Queue::do_batch_insert( $delivery_data );
927
+
928
+ $response['status'] = 'success';
929
+ $response['tasks_data'] = array(
930
+ 'report_id' => $report_id,
931
+ 'notification_guid' => $guid,
932
+ );
933
+ }
934
+ }
935
+ }
936
+
937
+ return $response;
938
+ }
939
+
940
+ /**
941
+ * Method to send default broadcast campaign.
942
+ *
943
+ * @since 4.6.0
944
+ */
945
+ public function dispatch_emails_from_server() {
946
+
947
+ $response = array(
948
+ 'status' => 'error',
949
+ );
950
+
951
+ $service = new ES_Send_Test_Email();
952
+
953
+ $res = $service->send_test_email();
954
+
955
+ $onboarding_tasks_data = get_option( self::$onboarding_tasks_data_option, array() );
956
+ $campaign_id = ! empty( $onboarding_tasks_data['create_default_newsletter_broadcast']['broadcast_id'] ) ? $onboarding_tasks_data['create_default_newsletter_broadcast']['broadcast_id']: 0;
957
+ $report_id = ! empty( $onboarding_tasks_data['queue_default_broadcast_newsletter']['report_id'] ) ? $onboarding_tasks_data['queue_default_broadcast_newsletter']['report_id'] : 0;
958
+
959
+ if ( ! empty( $campaign_id ) && ! empty( $report_id ) ) {
960
+
961
+ $content_body = ES()->campaigns_db->get_column( 'body', $campaign_id );
962
+ $title = ES()->campaigns_db->get_column( 'name', $campaign_id );
963
+ $email_created = time();
964
+ $from_name = ES_Common::get_ig_option( 'from_name' );
965
+ $from_email = ES_Common::get_ig_option( 'from_email' );
966
+ $notification_guid = ! empty( $onboarding_tasks_data['queue_default_broadcast_newsletter']['notification_guid'] ) ? $onboarding_tasks_data['queue_default_broadcast_newsletter']['notification_guid'] : 0;
967
+
968
+ // Newsletter Send.
969
+ $email_template = ES_Common::convert_es_templates( $content_body, $from_name, $from_email, $email_created );
970
+
971
+ $merge_tags = array(
972
+ 'message_id' => $report_id,
973
+ 'campaign_id' => $campaign_id,
974
+ );
975
+
976
+ $send_limit = ES()->mailer->get_total_emails_send_now();
977
+
978
+ $emails_data = ES_DB_Sending_Queue::get_emails_to_be_sent_by_hash( $notification_guid, $send_limit );
979
+ $emails = array();
980
+ foreach ( $emails_data as $email ) {
981
+ $emails[] = $email['email'];
982
+ }
983
+
984
+ ES_DB_Mailing_Queue::update_sent_status( $notification_guid, 'Sending' );
985
+
986
+ $res = ES()->mailer->send( $title, $email_template, $emails, $merge_tags );
987
+
988
+ ES_DB_Mailing_Queue::update_sent_status( $notification_guid, 'Sent' );
989
+
990
+ if ( $res && is_array( $res ) && ! empty( $res['status'] ) ) {
991
+ if ( 'SUCCESS' === $res['status'] ) {
992
+ $response['status'] = 'success';
993
+ update_option( 'ig_es_onboarding_test_campaign_success', 'yes' );
994
+ } else {
995
+ $response['status'] = 'error';
996
+ $response['message'] = ! empty( $res['message'] ) ? $res['message']: '';
997
+ $response['additional_message'] = __( 'Seems like your server is not setup correctly to send emails. Please confirm if you\'re getting any other emails from within WordPress', 'email-subscribers' );
998
+ update_option( 'ig_es_onboarding_test_campaign_error', 'yes' );
999
+ }
1000
+ }
1001
+ }
1002
+
1003
+ return $response;
1004
+ }
1005
+
1006
+ /**
1007
+ * Method to check test email on Icegram servers.
1008
+ *
1009
+ * @since 4.6.0
1010
+ */
1011
+ public function check_test_email_on_server() {
1012
+
1013
+ $response = array(
1014
+ 'status' => 'error',
1015
+ );
1016
+
1017
+ // Check test email only if user has opted for trial or is a premium user.
1018
+ if ( ES()->is_trial() || ES()->is_premium() ) {
1019
+ $onboarding_tasks_failed = get_option( self::$onboarding_tasks_failed_option, array() );
1020
+ $email_delivery_check_tasks_failed = ! empty( $onboarding_tasks_failed['email_delivery_check_tasks'] ) ? $onboarding_tasks_failed['email_delivery_check_tasks']: array();
1021
+
1022
+ // Peform test email checking if dispatch_emails_from_server task hasn't failed.
1023
+ if ( ! in_array( 'dispatch_emails_from_server', $email_delivery_check_tasks_failed, true ) ) {
1024
+ $service = new ES_Email_Delivery_Check();
1025
+ return $service->test_email_delivery();
1026
+ } else {
1027
+ $response['status'] = 'skipped';
1028
+ }
1029
+ }
1030
+
1031
+ return $response;
1032
+ }
1033
+
1034
+ /**
1035
+ * Method to check spam score of test email recieved on Icegram servers.
1036
+ *
1037
+ * @since 4.6.0
1038
+ */
1039
+ public function checking_spam_score_delivery_metrics() {
1040
+
1041
+ $response = array(
1042
+ 'status' => 'error',
1043
+ );
1044
+
1045
+ // Check spam score only if user has opted for trial or is a premium user.
1046
+ if ( ES()->is_trial() || ES()->is_premium() ) {
1047
+ $onboarding_tasks_failed = get_option( self::$onboarding_tasks_failed_option, array() );
1048
+ $email_delivery_check_tasks_failed = ! empty( $onboarding_tasks_failed['email_delivery_check_tasks'] ) ? $onboarding_tasks_failed['email_delivery_check_tasks']: array();
1049
+
1050
+ $onboarding_tasks_skipped = get_option( self::$onboarding_tasks_skipped_option, array() );
1051
+ $email_delivery_check_tasks_skipped = ! empty( $onboarding_tasks_skipped['email_delivery_check_tasks'] ) ? $onboarding_tasks_skipped['email_delivery_check_tasks']: array();
1052
+
1053
+ // Peform test email spam score only if check_test_email_on_server task hasn't failed or skipped.
1054
+ if ( ! in_array( 'check_test_email_on_server', $email_delivery_check_tasks_failed, true ) && ! in_array( 'check_test_email_on_server', $email_delivery_check_tasks_skipped, true ) ) {
1055
+ $response['status'] = 'success';
1056
+ } else {
1057
+ $response['status'] = 'skipped';
1058
+ }
1059
+ }
1060
+
1061
+ return $response;
1062
+ }
1063
+
1064
+ /**
1065
+ * Method to check test email on Icegram servers.
1066
+ *
1067
+ * @since 4.6.0
1068
+ */
1069
+ public function evaluate_email_delivery() {
1070
+
1071
+ $response = array(
1072
+ 'status' => 'error',
1073
+ );
1074
+
1075
+ // Evaluate email delivery only if user has opted for trial or is a premium user.
1076
+ if ( ES()->is_trial() || ES()->is_premium() ) {
1077
+ $onboarding_tasks_failed = get_option( self::$onboarding_tasks_failed_option, array() );
1078
+ $email_delivery_check_tasks_failed = ! empty( $onboarding_tasks_failed['email_delivery_check_tasks'] ) ? $onboarding_tasks_failed['email_delivery_check_tasks']: array();
1079
+
1080
+ $onboarding_tasks_skipped = get_option( self::$onboarding_tasks_skipped_option, array() );
1081
+ $email_delivery_check_tasks_skipped = ! empty( $onboarding_tasks_skipped['email_delivery_check_tasks'] ) ? $onboarding_tasks_skipped['email_delivery_check_tasks']: array();
1082
+
1083
+ // Peform email delivery evaulation only if check_test_email_on_server task hasn't failed or skipped.
1084
+ if ( ! in_array( 'check_test_email_on_server', $email_delivery_check_tasks_failed, true ) && ! in_array( 'check_test_email_on_server', $email_delivery_check_tasks_skipped, true ) ) {
1085
+ $response['status'] = 'success';
1086
+ } else {
1087
+ $response['status'] = 'skipped';
1088
+ }
1089
+ }
1090
+ return $response;
1091
+ }
1092
+
1093
+ /**
1094
+ * Create default Post notification while on boarding
1095
+ *
1096
+ * @return array|int|mixed|void|WP_Error
1097
+ *
1098
+ * @since 4.6.0
1099
+ */
1100
+ public function create_default_post_notification() {
1101
+
1102
+ $response = array(
1103
+ 'status' => 'error',
1104
+ );
1105
+ $create_post_notification = ig_es_get_request_data( 'create_post_notification', '' );
1106
+ if ( 'no' === $create_post_notification ) {
1107
+ $response['status'] = 'skipped';
1108
+ return $response;
1109
+ }
1110
+
1111
+ $from_name = ES_Common::get_ig_option( 'from_name' );
1112
+ $from_email = ES_Common::get_ig_option( 'from_email' );
1113
+
1114
+ $content = "Hello {{NAME}},\r\n\r\n";
1115
+ $content .= "We have published a new blog article on our website : {{POSTTITLE}}\r\n";
1116
+ $content .= "{{POSTIMAGE}}\r\n\r\n";
1117
+ $content .= 'You can view it from this link : ';
1118
+ $content .= "{{POSTLINK}}\r\n\r\n";
1119
+ $content .= "Thanks & Regards,\r\n";
1120
+ $content .= "Admin\r\n\r\n";
1121
+ $content .= 'You received this email because in the past you have provided us your email address : {{EMAIL}} to receive notifications when new updates are posted.';
1122
+
1123
+ $title = esc_html__( 'New Post Published - {{POSTTITLE}}', 'email-subscribers' );
1124
+ // Create Post Notification object
1125
+ $post = array(
1126
+ 'post_title' => $title,
1127
+ 'post_content' => $content,
1128
+ 'post_status' => 'publish',
1129
+ 'post_type' => 'es_template',
1130
+ 'meta_input' => array(
1131
+ 'es_template_type' => 'post_notification'
1132
+ )
1133
+ );
1134
+ // Insert the post into the database
1135
+ $post_id = wp_insert_post( $post );
1136
+
1137
+ $default_list = ES()->lists_db->get_list_by_name( IG_DEFAULT_LIST );
1138
+
1139
+ if ( ! empty( $post_id ) ) {
1140
+ $list_id = $default_list['id'];
1141
+
1142
+ $categories_objects = get_terms( array(
1143
+ 'taxonomy' => 'category',
1144
+ 'hide_empty' => false,
1145
+ ) );
1146
+
1147
+ $categories = array();
1148
+ if ( count( $categories_objects ) > 0 ) {
1149
+ foreach ( $categories_objects as $category ) {
1150
+ if ( $category instanceof WP_Term ) {
1151
+ $categories[] = $category->term_id;
1152
+ }
1153
+ }
1154
+ }
1155
+
1156
+ $categories_str = ES_Common::convert_categories_array_to_string( $categories );
1157
+
1158
+ $data['slug'] = sanitize_title( $title );
1159
+ $data['name'] = $title;
1160
+ $data['type'] = 'post_notification';
1161
+ $data['from_email'] = $from_name;
1162
+ $data['reply_to_email'] = $from_name;
1163
+ $data['from_name'] = $from_email;
1164
+ $data['reply_to_name'] = $from_email;
1165
+ $data['categories'] = $categories_str;
1166
+ $data['list_ids'] = $list_id;
1167
+ $data['base_template_id'] = $post_id;
1168
+ $data['status'] = 0;
1169
+
1170
+ $post_notification_id = ES()->campaigns_db->save_campaign( $data );
1171
+ if ( $post_notification_id ) {
1172
+ $response['status'] = 'success';
1173
+ $response['tasks_data'] = array(
1174
+ 'post_notification_id' => $post_notification_id
1175
+ );
1176
+ }
1177
+ }
1178
+
1179
+ return $response;
1180
+ }
1181
+
1182
+ /**
1183
+ * Method to subscribe to klawoo in the onboarding process.
1184
+ *
1185
+ * @since 4.6.0
1186
+ */
1187
+ public function subscribe_to_klawoo() {
1188
+
1189
+ $response = Email_Subscribers_Admin::klawoo_subscribe( true );
1190
+
1191
+ return $response;
1192
+ }
1193
+
1194
+ /**
1195
+ * Method to subscribe to klawoo in the onboarding process.
1196
+ *
1197
+ * @since 4.6.0
1198
+ */
1199
+ public function save_final_configuration() {
1200
+
1201
+ $response = array();
1202
+
1203
+ $is_trial = ig_es_get_request_data( 'is_trial', '' );
1204
+
1205
+ if ( ! empty( $is_trial ) ) {
1206
+ // Update trial preferences.
1207
+ update_option( 'ig_es_is_trial', $is_trial );
1208
+ update_option( 'ig_es_trial_started_at', current_time( 'timestamp' ) );
1209
+ }
1210
+
1211
+ // Set flag for onboarding completion.
1212
+ update_option( 'ig_es_onboarding_complete', 'yes' );
1213
+
1214
+ $response['status'] = 'success';
1215
+
1216
+ return $response;
1217
+ }
1218
+
1219
+ /**
1220
+ * Method to delete the all onboarding data used in onboarding process.
1221
+ */
1222
+ public function delete_onboarding_data() {
1223
+
1224
+ $response = array(
1225
+ 'status' => 'error',
1226
+ );
1227
+
1228
+ $onboarding_options = $this->get_onboarding_data_options();
1229
+
1230
+ foreach ( $onboarding_options as $option ) {
1231
+ $deleted = delete_option( $option );
1232
+ }
1233
+
1234
+ $response['status'] = 'success';
1235
+
1236
+ return $response;
1237
+ }
1238
+
1239
+ /**
1240
+ * Method to get the onboarding data options used in onboarding process.
1241
+ *
1242
+ * @since 4.6.0
1243
+ */
1244
+ public function get_onboarding_data_options() {
1245
+
1246
+ $onboarding_options = array(
1247
+ self::$onboarding_tasks_done_option,
1248
+ self::$onboarding_tasks_failed_option,
1249
+ self::$onboarding_tasks_data_option,
1250
+ self::$onboarding_tasks_skipped_option,
1251
+ self::$onboarding_step_option,
1252
+ self::$onboarding_current_task_option,
1253
+ );
1254
+
1255
+ return $onboarding_options;
1256
+ }
1257
+
1258
+ /**
1259
+ * Method to get saved onboarding data.
1260
+ *
1261
+ * @since 4.6.0
1262
+ */
1263
+ public function get_onboarding_data() {
1264
+
1265
+ $onboarding_data = array();
1266
+
1267
+ $onboarding_options = $this->get_onboarding_data_options();
1268
+
1269
+ foreach ( $onboarding_options as $option ) {
1270
+ $option_data = get_option( $option );
1271
+ $onboarding_data[$option] = $option_data;
1272
+ }
1273
+
1274
+ return $onboarding_data;
1275
+ }
1276
+
1277
+ /**
1278
+ * Method to get the current onboarding step
1279
+ *
1280
+ * @return int $onboarding_step Current onboarding step.
1281
+ *
1282
+ * @since 4.6.0
1283
+ */
1284
+ public static function get_onboarding_step() {
1285
+ $onboarding_step = (int) get_option( self::$onboarding_step_option, 1 );
1286
+ return $onboarding_step;
1287
+ }
1288
+
1289
+ /**
1290
+ * Method to updatee the onboarding step
1291
+ *
1292
+ * @return bool
1293
+ *
1294
+ * @since 4.6.0
1295
+ */
1296
+ public static function update_onboarding_step( $step = 1 ) {
1297
+ if ( ! empty( $step ) ) {
1298
+ update_option( self::$onboarding_step_option, $step );
1299
+ return true;
1300
+ }
1301
+
1302
+ return false;
1303
+ }
1304
+
1305
+ /**
1306
+ * Method to check if onboarding is completed
1307
+ *
1308
+ * @return string
1309
+ *
1310
+ * @since 4.6.0
1311
+ */
1312
+ public static function is_onboarding_completed() {
1313
+
1314
+ $onboarding_complete = get_option( 'ig_es_onboarding_complete', 'no' );
1315
+
1316
+ if ( 'yes' === $onboarding_complete ) {
1317
+ return true;
1318
+ }
1319
+
1320
+ return false;
1321
+ }
1322
+
1323
+ /**
1324
+ * Method to get next task for onboarding.
1325
+ *
1326
+ * @return string
1327
+ *
1328
+ * @since 4.6.0
1329
+ */
1330
+ public function get_next_onboarding_task() {
1331
+ $all_onboarding_tasks = self::$all_onboarding_tasks;
1332
+ $current_task = get_option( self::$onboarding_current_task_option, '' );
1333
+
1334
+ // Variable to hold tasks list without any grouping.
1335
+ $onboarding_tasks = array();
1336
+ foreach ( $all_onboarding_tasks as $task_group => $grouped_tasks ) {
1337
+ foreach ( $grouped_tasks as $task ) {
1338
+ $onboarding_tasks[] = $task;
1339
+ }
1340
+ }
1341
+
1342
+ $next_task = '';
1343
+ if ( ! empty( $current_task ) ) {
1344
+ $current_task_index = array_search( $current_task, $onboarding_tasks, true );
1345
+ if ( ! empty( $current_task_index ) ) {
1346
+
1347
+ $next_task_index = $current_task_index + 1;
1348
+ $next_task = ! empty( $onboarding_tasks[ $next_task_index ] ) ? $onboarding_tasks[ $next_task_index ] : '';
1349
+
1350
+ // Check if previous required tasks are completed then only return next task else return blank task.
1351
+ if ( ! $this->is_required_tasks_completed( $next_task ) ) {
1352
+ $next_task = '';
1353
+ }
1354
+ }
1355
+ }
1356
+
1357
+ return $next_task;
1358
+ }
1359
+
1360
+ /**
1361
+ * Method to check if all required task has been completed.
1362
+ *
1363
+ * @param string $task_name Task name.
1364
+ *
1365
+ * @return bool
1366
+ *
1367
+ * @since 4.6.0
1368
+ */
1369
+ public function is_required_tasks_completed( $task_name = '' ) {
1370
+
1371
+ if ( empty( $task_name ) ) {
1372
+ return false;
1373
+ }
1374
+
1375
+ $required_tasks = $this->get_required_tasks( $task_name );
1376
+
1377
+ // If there are not any required tasks which means this task can run without any dependency.
1378
+ if ( empty( $required_tasks ) ) {
1379
+ return true;
1380
+ }
1381
+
1382
+ $done_tasks = get_option( self::$onboarding_tasks_done_option, array() );
1383
+
1384
+ // Variable to hold list of all done tasks without any grouping.
1385
+ $all_done_tasks = array();
1386
+ $is_required_tasks_done = false;
1387
+ if ( ! empty( $done_tasks ) ) {
1388
+ foreach ( $done_tasks as $task_group => $grouped_tasks ) {
1389
+ foreach ( $grouped_tasks as $task ) {
1390
+ $all_done_tasks[] = $task;
1391
+ }
1392
+ }
1393
+ }
1394
+
1395
+ $remaining_required_tasks = array_diff( $required_tasks, $all_done_tasks );
1396
+
1397
+ // Check if there are any required tasks remaining.
1398
+ if ( empty( $remaining_required_tasks ) ) {
1399
+ $is_required_tasks_done = true;
1400
+ }
1401
+
1402
+ return $is_required_tasks_done;
1403
+ }
1404
+
1405
+ /**
1406
+ * Method to get lists of required tasks for this task.
1407
+ *
1408
+ * @return array $required_tasks List of required tasks.
1409
+ */
1410
+ public function get_required_tasks( $task_name = '' ) {
1411
+
1412
+ if ( empty( $task_name ) ) {
1413
+ return array();
1414
+ }
1415
+
1416
+ $required_tasks_mapping = array(
1417
+ 'check_test_email_on_server' => array(
1418
+ 'dispatch_emails_from_server',
1419
+ ),
1420
+ 'evaluate_email_delivery' => array(
1421
+ 'check_test_email_on_server'
1422
+ ),
1423
+ );
1424
+
1425
+ $required_tasks = ! empty( $required_tasks_mapping[ $task_name ] ) ? $required_tasks_mapping[ $task_name ] : array();
1426
+
1427
+ return $required_tasks;
1428
+ }
1429
+ }
1430
+
1431
+ IG_ES_Onboarding::instance();
1432
+ }
lite/admin/css/email-subscribers-admin.css CHANGED
@@ -955,218 +955,6 @@ h5.es-badge {
955
  margin-left: -0.6em;
956
  }
957
 
958
- /*onboarding css */
959
- #slider-wrapper {
960
- background: #fff;
961
- border-radius: 0.5rem;
962
- -webkit-box-shadow: 0 5px 20px rgba(0, 0, 0, 0.07);
963
- box-shadow: 0 5px 20px rgba(0, 0, 0, 0.07);
964
- -webkit-box-sizing: border-box;
965
- box-sizing: border-box;
966
- color: #444;
967
- display: block;
968
- margin: 1.5em auto 0;
969
- max-width: 50em;
970
- overflow: hidden;
971
- padding: 2em 3em;
972
- height: 50em;
973
- -webkit-transform: translate(0%, 7vw);
974
- transform: translate(0%, 7vw);
975
- font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
976
- }
977
-
978
- .sp {
979
- background: #FFF;
980
- height: 22em;
981
- position: absolute;
982
- font-size: 1.1em;
983
- line-height: 2em;
984
- width: 40em;
985
- }
986
-
987
- .es-footer {
988
- float: right;
989
- margin-top: 75%;
990
- /*font-weight: bold;*/
991
- font-size: 1.2em;
992
- cursor: pointer;
993
- /*text-decoration: underline;*/
994
- }
995
-
996
- a.button-send, .es-error-actions .es-dashboard-btn {
997
- text-decoration: none !important;
998
- color: #fff;
999
- font-size: 1.1em;
1000
- font-weight: 500;
1001
- padding: 0.50em 0.55em;
1002
- border-radius: 6px;
1003
- background-color: hsl(234,62%,60%) !important;
1004
- padding: 0.7em 0.5em;
1005
- margin-left:5px;
1006
- transition: all .0.5s;
1007
- /*transition: background-color 0.5s;*/
1008
- cursor: pointer;
1009
- }
1010
-
1011
- a.button-send:hover, .es-error-actions .es-dashboard-btn {
1012
- background-color: hsl(234,100%,68%) !important;
1013
- }
1014
-
1015
- /*.es-send-email-screen img.es-loader {
1016
- display: inline-block;
1017
- vertical-align: middle;
1018
- margin-right: 1em;
1019
- }*/
1020
-
1021
- .sp input[type="email"].error {
1022
- border: 1px solid red;
1023
- }
1024
-
1025
- .es-error-actions {
1026
- text-align: center;
1027
- margin-top: 3em;
1028
- }
1029
-
1030
- .es-error-actions .es-dashboard-btn {
1031
-
1032
- }
1033
-
1034
- .es-error-actions .button-hero {
1035
- width: 46% !important;
1036
- }
1037
-
1038
- .sp h1 {
1039
- font-size: 1.25rem;
1040
- font-weight: 700;
1041
- color: #1a202c;
1042
- line-height: 1.5rem;
1043
- padding-bottom: 1rem;
1044
- border-bottom-width: 1px;
1045
- border-color: #edf2f7;
1046
- color: #5a67d8;
1047
- text-align: center;
1048
- letter-spacing: 0.025em;
1049
- /*color: #387bff;
1050
- line-height: 1.3em;*/
1051
- }
1052
- .sp > p {
1053
- padding: 1rem 0 0 0;
1054
- font-size: 1rem;
1055
- font-weight: 500;
1056
- color: #4a5568;
1057
- letter-spacing: 0.015em;
1058
- }
1059
-
1060
- .sp ol{
1061
- padding: 1rem 0 1rem 0;
1062
- list-style: disc;
1063
- }
1064
-
1065
- .sp ol li{
1066
- margin: 0 3px 0 18px;
1067
- color: #666666;
1068
- }
1069
-
1070
- .sp .es-ltr {
1071
- padding: 1em;
1072
- }
1073
-
1074
- .sp .button-hero {
1075
- color: #FFFFFF !important;
1076
- border-color: #03a025 !important;
1077
- background: #03a025 !important;
1078
- box-shadow: 0 1px 0 #03a025;
1079
- font-weight: bold;
1080
- height: 3em;
1081
- line-height: 1em;
1082
-
1083
- }
1084
-
1085
- .sp .es-actions {
1086
- margin: 30px auto;
1087
- display: block;
1088
- text-align: center;
1089
- width: 45%;
1090
- padding-top: 2em;
1091
- }
1092
-
1093
- .sp form[name=klawoo_subscribe] {
1094
- margin-right: 2em;
1095
- }
1096
-
1097
- .sp .dashicons {
1098
- vertical-align: middle;
1099
- color: #44ad69;
1100
- margin-right: 0.3em;
1101
- }
1102
-
1103
- .sp form[name=klawoo_subscribe] input[type="email"], .sp form[name=klawoo_subscribe] input[type="text"] {
1104
- width: 320px;
1105
- padding: 1.25em 1em;
1106
- }
1107
-
1108
- #es-send-email-form .es_from_name,#es-send-email-form .es_from_email,#es-send-email-form .es_email,.sp .es-ltr{
1109
- appearance: none;
1110
- border-radius: 0.375rem;
1111
- font-size: 0.90rem;
1112
- line-height: 1.5;
1113
- color: inherit;
1114
- }
1115
-
1116
- #es-send-email-form .es_from_name:focus,#es-send-email-form .es_from_email:focus,#es-send-email-form .es_email:focus,.sp .es-ltr:focus{
1117
- -webkit-box-shadow:0 0 0 3px rgba(164,202,254,.75);
1118
- box-shadow:0 0 0 3px rgba(164,202,254,.75);
1119
- }
1120
-
1121
- #es-send-email-form .es_from_email{
1122
- margin-left: 1.3rem;
1123
- }
1124
-
1125
- #es-send-email-form input[type="email"] {
1126
- width: 18em;
1127
- padding: 0.4em 0.5em;
1128
- border: none;
1129
- border-bottom: 1px solid gray;
1130
- }
1131
-
1132
- .es-form-wrapper {
1133
- padding: 0.5em 0.8em;
1134
- background-color: #f9f9f9;
1135
- border-radius: 0.35rem;
1136
- }
1137
-
1138
- .es-send-email-screen .es-form-wrapper form {
1139
- margin-top: 0.8em;
1140
- }
1141
-
1142
- .sp.es-receive-error li {
1143
- margin-bottom: 0;
1144
- }
1145
-
1146
- .es-email-sending-error {
1147
- line-height: 1em;
1148
- padding: 1em 1em 1em 0;
1149
- }
1150
-
1151
- .es-error form.es-onboarding {
1152
- margin-top: 1em;
1153
- }
1154
-
1155
- .sp .es-gray {
1156
- color: #737373;
1157
- line-height: 1.75;
1158
- }
1159
-
1160
- .sp .es-skip, .es-receive-error-btn {
1161
- cursor: pointer;
1162
- color: hsl(0, 0%, 55%);
1163
- }
1164
- .sp .es-skip:hover, .es-receive-error-btn:hover {
1165
- color: hsl(0, 0%, 45%);
1166
- }
1167
-
1168
- /* onboarding :end */
1169
-
1170
  .ig-es-indicator {
1171
  text-align: center;
1172
  z-index: 26;
@@ -1744,8 +1532,8 @@ body.email-subscribers_page_es_workflows #post-body .postbox .inside {
1744
  cursor: pointer;
1745
  text-indent: -999em;
1746
  display: block;
1747
- width: 38px;
1748
- height: 22px;
1749
  border-radius: 30px;
1750
  border: none;
1751
  position: relative;
@@ -1767,8 +1555,8 @@ body.email-subscribers_page_es_workflows #post-body .postbox .inside {
1767
  content: '';
1768
  position: absolute;
1769
  display: block;
1770
- width: 18px;
1771
- height: 18px;
1772
  top: 2px;
1773
  left: 2px;
1774
  -webkit-transition: all .15s ease;
@@ -1923,6 +1711,18 @@ div.broadcast_side_content{
1923
  border-color: #a0aec0;
1924
  }
1925
 
1926
- .wp-core-ui #search-submit, .wp-core-ui #doaction, .wp-core-ui #doaction2, .wp-core-ui #post-query-submit{
1927
  border-color : hsl(215,13.8%,54.1%);
1928
  }
 
 
 
 
 
 
 
 
 
 
 
 
955
  margin-left: -0.6em;
956
  }
957
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
958
  .ig-es-indicator {
959
  text-align: center;
960
  z-index: 26;
1532
  cursor: pointer;
1533
  text-indent: -999em;
1534
  display: block;
1535
+ width: 2.25rem;
1536
+ height: 1.25rem;
1537
  border-radius: 30px;
1538
  border: none;
1539
  position: relative;
1555
  content: '';
1556
  position: absolute;
1557
  display: block;
1558
+ width: 1rem;
1559
+ height: 1rem;
1560
  top: 2px;
1561
  left: 2px;
1562
  -webkit-transition: all .15s ease;
1711
  border-color: #a0aec0;
1712
  }
1713
 
1714
+ .wp-core-ui #search-submit, .wp-core-ui #doaction, .wp-core-ui #doaction2, .wp-core-ui #post-query-submit{
1715
  border-color : hsl(215,13.8%,54.1%);
1716
  }
1717
+
1718
+ /* Template Page */
1719
+
1720
+ .post-type-es_template b{
1721
+ font-weight:600;
1722
+ }
1723
+
1724
+ .post-type-es_template #wp-content-editor-tools{
1725
+ padding-top: 18px;
1726
+ }
1727
+
1728
+ /* Template Page : end */
lite/admin/dist/main.css CHANGED
@@ -1 +1 @@
1
- /*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{-webkit-box-sizing:content-box;box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{-webkit-box-sizing:border-box;box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{-webkit-box-sizing:border-box;box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}[hidden],template{display:none}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}button{background-color:transparent;background-image:none;padding:0}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}fieldset,ol,ul{margin:0;padding:0}ol,ul{list-style:none}html{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5}*,:after,:before{-webkit-box-sizing:border-box;box-sizing:border-box;border:0 solid #d2d6dc}hr{border-top-width:1px}img{border-style:solid}textarea{resize:vertical}input::-webkit-input-placeholder,textarea::-webkit-input-placeholder{color:#a0aec0}input::-moz-placeholder,textarea::-moz-placeholder{color:#a0aec0}input::-ms-input-placeholder,textarea::-ms-input-placeholder{color:#a0aec0}input::placeholder,textarea::placeholder{color:#a0aec0}[role=button],button{cursor:pointer}table{border-collapse:collapse}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}button,input,optgroup,select,textarea{padding:0;line-height:inherit;color:inherit}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}a{--text-opacity:1;color:#5850ec;color:rgba(88,80,236,var(--text-opacity))}img{border-width:0}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}.form-input{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#d2d6dc;border-width:1px;border-radius:.375rem;padding:.5rem .75rem;font-size:1rem;line-height:1.5}.form-input::-webkit-input-placeholder{color:#9fa6b2;opacity:1}.form-input::-moz-placeholder{color:#9fa6b2;opacity:1}.form-input::-ms-input-placeholder{color:#9fa6b2;opacity:1}.form-input::placeholder{color:#9fa6b2;opacity:1}.form-input:focus{outline:none;-webkit-box-shadow:0 0 0 3px rgba(164,202,254,.45);box-shadow:0 0 0 3px rgba(164,202,254,.45);border-color:#a4cafe}.form-textarea{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#d2d6dc;border-width:1px;border-radius:.375rem;padding:.5rem .75rem;font-size:1rem;line-height:1.5}.form-textarea::-webkit-input-placeholder{color:#9fa6b2;opacity:1}.form-textarea::-moz-placeholder{color:#9fa6b2;opacity:1}.form-textarea::-ms-input-placeholder{color:#9fa6b2;opacity:1}.form-textarea::placeholder{color:#9fa6b2;opacity:1}.form-textarea:focus{outline:none;-webkit-box-shadow:0 0 0 3px rgba(164,202,254,.45);box-shadow:0 0 0 3px rgba(164,202,254,.45);border-color:#a4cafe}.form-multiselect{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#d2d6dc;border-width:1px;border-radius:.375rem;padding:.5rem .75rem;font-size:1rem;line-height:1.5}.form-multiselect:focus{outline:none;-webkit-box-shadow:0 0 0 3px rgba(164,202,254,.45);box-shadow:0 0 0 3px rgba(164,202,254,.45);border-color:#a4cafe}.form-select{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M7 7l3-3 3 3m0 6l-3 3-3-3' stroke='%239fa6b2' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-print-color-adjust:exact;color-adjust:exact;background-repeat:no-repeat;background-color:#fff;border-color:#d2d6dc;border-width:1px;border-radius:.375rem;padding:.5rem 2.5rem .5rem .75rem;font-size:1rem;line-height:1.5;background-position:right .5rem center;background-size:1.5em 1.5em}.form-select::-ms-expand{color:#9fa6b2;border:none}@media not print{.form-select::-ms-expand{display:none}}@media print and (-ms-high-contrast:active),print and (-ms-high-contrast:none){.form-select{padding-right:.75rem}}.form-select:focus{outline:none;-webkit-box-shadow:0 0 0 3px rgba(164,202,254,.45);box-shadow:0 0 0 3px rgba(164,202,254,.45);border-color:#a4cafe}.form-checkbox{-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-print-color-adjust:exact;color-adjust:exact;display:inline-block;vertical-align:middle;background-origin:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-ms-flex-negative:0;flex-shrink:0;height:1rem;width:1rem;color:#3f83f8;background-color:#fff;border-color:#d2d6dc;border-width:1px;border-radius:.25rem}.form-checkbox:checked{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 16 16' fill='%23fff' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5.707 7.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4a1 1 0 00-1.414-1.414L7 8.586 5.707 7.293z'/%3E%3C/svg%3E");border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:50%;background-repeat:no-repeat}@media not print{.form-checkbox::-ms-check{border-width:1px;color:transparent;background:inherit;border-color:inherit;border-radius:inherit}}.form-checkbox:focus{outline:none;-webkit-box-shadow:0 0 0 3px rgba(164,202,254,.45);box-shadow:0 0 0 3px rgba(164,202,254,.45);border-color:#a4cafe}.form-checkbox:checked:focus{border-color:transparent}.form-radio{-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-print-color-adjust:exact;color-adjust:exact;display:inline-block;vertical-align:middle;background-origin:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-ms-flex-negative:0;flex-shrink:0;border-radius:100%;height:1rem;width:1rem;color:#3f83f8;background-color:#fff;border-color:#d2d6dc;border-width:1px}.form-radio:checked{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 16 16' fill='%23fff' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='8' cy='8' r='3'/%3E%3C/svg%3E");border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:50%;background-repeat:no-repeat}@media not print{.form-radio::-ms-check{border-width:1px;color:transparent;background:inherit;border-color:inherit;border-radius:inherit}}.form-radio:focus{outline:none;-webkit-box-shadow:0 0 0 3px rgba(164,202,254,.45);box-shadow:0 0 0 3px rgba(164,202,254,.45);border-color:#a4cafe}.form-radio:checked:focus{border-color:transparent}.ig-es-primary-button,.ig-es-send-queue-emails{border-color:transparent;padding:.5rem 1rem;background-color:#fff;background-color:rgba(255,255,255,var(--bg-opacity));color:#fff;color:rgba(255,255,255,var(--text-opacity));background-color:#5850ec;background-color:rgba(88,80,236,var(--bg-opacity))}.ig-es-primary-button,.ig-es-send-queue-emails,.ig-es-title-button,.wp-heading-inline+.page-title-action{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;border-radius:.375rem;border-width:1px;font-size:.875rem;line-height:1.25rem;font-weight:500;--text-opacity:1;--bg-opacity:1;-webkit-transition-property:background-color,border-color,color,fill,stroke,opacity,-webkit-box-shadow,-webkit-transform;transition-property:background-color,border-color,color,fill,stroke,opacity,-webkit-box-shadow,-webkit-transform;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,-webkit-box-shadow,-webkit-transform;-webkit-transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(.4,0,.2,1);-webkit-transition-duration:.15s;transition-duration:.15s}.ig-es-title-button,.wp-heading-inline+.page-title-action{--border-opacity:1;border-color:#d2d6dc;border-color:rgba(210,214,220,var(--border-opacity));color:#374151;color:rgba(55,65,81,var(--text-opacity));background-color:#fff;background-color:rgba(255,255,255,var(--bg-opacity));padding:.25rem .75rem}.wrap .wp-heading-inline+.page-title-action{margin-left:.5rem}.ig-es-title-button:hover,.wp-heading-inline+.page-title-action:hover{--bg-opacity:1;background-color:#f9fafb;background-color:rgba(249,250,251,var(--bg-opacity));--text-opacity:1;color:#374151;color:rgba(55,65,81,var(--text-opacity))}.ig-es-title-button:focus,.wp-heading-inline+.page-title-action:focus{outline:0;-webkit-box-shadow:0 0 0 3px rgba(118,169,250,.45);box-shadow:0 0 0 3px rgba(118,169,250,.45);--border-opacity:1;border-color:#a4cafe;border-color:rgba(164,202,254,var(--border-opacity))}.ig-es-primary-button:hover{--bg-opacity:1;background-color:#6875f5;background-color:rgba(104,117,245,var(--bg-opacity));--text-opacity:1;color:#fff;color:rgba(255,255,255,var(--text-opacity))}.ig-es-primary-button:focus{outline:0;-webkit-box-shadow:0 0 0 3px rgba(164,202,254,.45);box-shadow:0 0 0 3px rgba(164,202,254,.45)}.ig-es-imp-button{display:-webkit-inline-box!important;display:-ms-inline-flexbox!important;display:inline-flex!important;-webkit-box-pack:center!important;-ms-flex-pack:center!important;justify-content:center!important;border-radius:.375rem!important;border-width:1px!important;border-color:transparent!important;background-color:#fff!important;background-color:rgba(255,255,255,var(--bg-opacity))!important;font-size:.875rem!important;line-height:1.25rem!important;font-weight:500!important;background-color:#0e9f6e!important;background-color:rgba(14,159,110,var(--bg-opacity))!important;-webkit-transition-property:background-color,border-color,color,fill,stroke,opacity,-webkit-box-shadow,-webkit-transform!important;transition-property:background-color,border-color,color,fill,stroke,opacity,-webkit-box-shadow,-webkit-transform!important;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform!important;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,-webkit-box-shadow,-webkit-transform!important;-webkit-transition-timing-function:cubic-bezier(.4,0,.2,1)!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important;-webkit-transition-duration:.15s!important;transition-duration:.15s!important}.ig-es-imp-button,.ig-es-imp-button:hover{--text-opacity:1!important;color:#fff!important;color:rgba(255,255,255,var(--text-opacity))!important;--bg-opacity:1!important}.ig-es-imp-button:hover{background-color:#31c48d!important;background-color:rgba(49,196,141,var(--bg-opacity))!important}.ig-es-imp-button:focus{outline:0!important;-webkit-box-shadow:0 0 0 3px rgba(132,225,188,.45)!important;box-shadow:0 0 0 3px rgba(132,225,188,.45)!important}.ig-es-link-button{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;border-radius:.375rem;border-width:1px;border-color:transparent;background-color:#fff;background-color:rgba(255,255,255,var(--bg-opacity));font-size:.875rem;line-height:1.25rem;font-weight:500;background-color:#ff5a1f;background-color:rgba(255,90,31,var(--bg-opacity));-webkit-transition-property:background-color,border-color,color,fill,stroke,opacity,-webkit-box-shadow,-webkit-transform;transition-property:background-color,border-color,color,fill,stroke,opacity,-webkit-box-shadow,-webkit-transform;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,-webkit-box-shadow,-webkit-transform;-webkit-transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(.4,0,.2,1);-webkit-transition-duration:.15s;transition-duration:.15s}.ig-es-link-button,.ig-es-link-button:hover{--text-opacity:1;color:#fff;color:rgba(255,255,255,var(--text-opacity));--bg-opacity:1}.ig-es-link-button:hover{background-color:#ff8a4c;background-color:rgba(255,138,76,var(--bg-opacity))}.ig-es-link-button:focus{outline:0;-webkit-box-shadow:0 0 0 3px rgba(253,186,140,.45);box-shadow:0 0 0 3px rgba(253,186,140,.45)}.ig-es-action.js-open .ig-es-action__header{--bg-opacity:1;background-color:#5850ec;background-color:rgba(88,80,236,var(--bg-opacity));--text-opacity:1;color:#fff;color:rgba(255,255,255,var(--text-opacity))}.form-checkbox{content:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 16 16' fill='%23fff' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5.707 7.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4a1 1 0 00-1.414-1.414L7 8.586 5.707 7.293z'/%3E%3C/svg%3E")}.form-radio{content:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 16 16' fill='%23fff' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='8' cy='8' r='3'/%3E%3C/svg%3E")}.form-checkbox:checked,.form-radio:checked{--text-opacity:1!important;color:#5850ec!important;color:rgba(88,80,236,var(--text-opacity))!important}.form-select{font-size:.875rem!important;--border-opacity:1!important;border-color:#9fa6b2!important;border-color:rgba(159,166,178,var(--border-opacity))!important;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M7 7l3-3 3 3m0 6l-3 3-3-3' stroke='%239fa6b2' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")!important}.form-select:focus,input[type=number]:focus{outline:0!important;-webkit-box-shadow:0 0 0 3px rgba(164,202,254,.45)!important;box-shadow:0 0 0 3px rgba(164,202,254,.45)!important;--border-opacity:1!important;border-color:#a4cafe!important;border-color:rgba(164,202,254,var(--border-opacity))!important}.es-check-toggle:checked~.es-mail-toggle-line{--bg-opacity:1;background-color:#5850ec;background-color:rgba(88,80,236,var(--bg-opacity))}.es-check-toggle:checked~.es-mail-toggle-dot{--transform-translate-x:0;--transform-translate-y:0;--transform-rotate:0;--transform-skew-x:0;--transform-skew-y:0;--transform-scale-x:1;--transform-scale-y:1;-webkit-transform:translateX(var(--transform-translate-x)) translateY(var(--transform-translate-y)) rotate(var(--transform-rotate)) skewX(var(--transform-skew-x)) skewY(var(--transform-skew-y)) scaleX(var(--transform-scale-x)) scaleY(var(--transform-scale-y));transform:translateX(var(--transform-translate-x)) translateY(var(--transform-translate-y)) rotate(var(--transform-rotate)) skewX(var(--transform-skew-x)) skewY(var(--transform-skew-y)) scaleX(var(--transform-scale-x)) scaleY(var(--transform-scale-y));--transform-translate-x:100%}[type=radio]:checked+.es-mailer-logo{-webkit-transition-property:all;transition-property:all;-webkit-transition-duration:.1s;transition-duration:.1s;-webkit-transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(.4,0,.2,1);--transform-translate-x:0;--transform-translate-y:0;--transform-rotate:0;--transform-skew-x:0;--transform-skew-y:0;--transform-scale-x:1;--transform-scale-y:1;-webkit-transform:translateX(var(--transform-translate-x)) translateY(var(--transform-translate-y)) rotate(var(--transform-rotate)) skewX(var(--transform-skew-x)) skewY(var(--transform-skew-y)) scaleX(var(--transform-scale-x)) scaleY(var(--transform-scale-y));transform:translateX(var(--transform-translate-x)) translateY(var(--transform-translate-y)) rotate(var(--transform-rotate)) skewX(var(--transform-skew-x)) skewY(var(--transform-skew-y)) scaleX(var(--transform-scale-x)) scaleY(var(--transform-scale-y));--transform-scale-x:1.1;--transform-scale-y:1.1;-webkit-box-shadow:0 0 3px 3px #5a67d8;box-shadow:0 0 3px 3px #5a67d8}.wp-core-ui .button,.wp-core-ui .button-secondary{--border-opacity:1;border-color:#5850ec;border-color:rgba(88,80,236,var(--border-opacity));color:#5850ec;color:rgba(88,80,236,var(--text-opacity))}.wp-core-ui .button,.wp-core-ui .button-primary,.wp-core-ui .button-secondary{font-size:.875rem;border-radius:.375rem;border-width:1px;line-height:1.25rem;font-weight:500;--text-opacity:1}.wp-core-ui .button-primary{--bg-opacity:1;background-color:#5850ec;background-color:rgba(88,80,236,var(--bg-opacity));color:#fff;color:rgba(255,255,255,var(--text-opacity));-webkit-transition-property:background-color,border-color,color,fill,stroke,opacity,-webkit-box-shadow,-webkit-transform;transition-property:background-color,border-color,color,fill,stroke,opacity,-webkit-box-shadow,-webkit-transform;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,-webkit-box-shadow,-webkit-transform;-webkit-transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(.4,0,.2,1);-webkit-transition-duration:.15s;transition-duration:.15s}.wp-core-ui .button-primary:hover,.wp-core-ui .button:hover{--border-opacity:1;border-color:#5850ec;border-color:rgba(88,80,236,var(--border-opacity));--text-opacity:1;color:#6875f5;color:rgba(104,117,245,var(--text-opacity))}.wp-core-ui .search-box input[name=s],.wp-core-ui select{border-radius:.375rem}.wp-core-ui #bulk-action-selector-top,.wp-core-ui #doaction,.wp-core-ui #doaction2,.wp-core-ui #filter-by-date,.wp-core-ui #post-query-submit,.wp-core-ui #poststuff select,.wp-core-ui #search-submit{cursor:pointer;line-height:1.25rem;--text-opacity:1;color:#4b5563;color:rgba(75,85,99,var(--text-opacity));background-color:transparent;font-size:.875rem}.wp-core-ui #search-submit{margin-left:.375rem}.wp-core-ui #doaction2:focus .wp-core-ui #post-query-submit:focus,.wp-core-ui #doaction:focus,.wp-core-ui #search-submit:focus{outline:0;-webkit-box-shadow:0 0 0 3px rgba(159,166,178,.45);box-shadow:0 0 0 3px rgba(159,166,178,.45)}.es-items-lists table.fixed,.post-type-es_template table.fixed{margin-top:1.5rem;margin-bottom:1rem;-webkit-box-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px 0 rgba(0,0,0,.06);box-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px 0 rgba(0,0,0,.06);border-radius:.5rem;overflow:hidden}.es-items-lists table.fixed tfoot td,.es-items-lists table.fixed tfoot th,.es-items-lists table.fixed thead td,.es-items-lists table.fixed thead th,.post-type-es_template table.fixed tfoot th,.post-type-es_template table.fixed thead td,.post-type-es_template table.fixed thead th{--bg-opacity:1;background-color:#f4f5f7;background-color:rgba(244,245,247,var(--bg-opacity));border-bottom-width:1px;--border-opacity:1;border-color:#e5e7eb;border-color:rgba(229,231,235,var(--border-opacity));--text-opacity:1;color:#6b7280;color:rgba(107,114,128,var(--text-opacity));font-weight:500;letter-spacing:.05em}.es-items-lists table.fixed tfoot th,.es-items-lists table.fixed thead th,.post-type-es_template table.fixed tfoot th,.post-type-es_template table.fixed thead th{padding-top:.5rem;padding-bottom:.5rem}.es-items-lists .widefat thead td input,.post-type-es_template .widefat thead td input{margin-right:1.5rem}.post-type-es_template .wrap{padding-top:.75rem;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.post-type-es_template .wrap>h1{padding-top:0;line-height:2.25rem}.es-items-lists .striped>tbody tr,.post-type-es_template .striped>tbody tr{border-bottom-width:1px;--border-opacity:1;border-color:#e5e7eb;border-color:rgba(229,231,235,var(--border-opacity));padding-top:.5rem;padding-bottom:.5rem}.bg-white,.es-items-lists .striped>tbody>:nth-child(odd),.post-type-es_template .striped>tbody>:nth-child(odd){--bg-opacity:1;background-color:#fff;background-color:rgba(255,255,255,var(--bg-opacity))}.bg-gray-100{--bg-opacity:1;background-color:#f4f5f7;background-color:rgba(244,245,247,var(--bg-opacity))}.bg-gray-200{--bg-opacity:1;background-color:#e5e7eb;background-color:rgba(229,231,235,var(--bg-opacity))}.bg-gray-300{--bg-opacity:1;background-color:#d2d6dc;background-color:rgba(210,214,220,var(--bg-opacity))}.bg-red-100{--bg-opacity:1;background-color:#fde8e8;background-color:rgba(253,232,232,var(--bg-opacity))}.bg-green-100{--bg-opacity:1;background-color:#def7ec;background-color:rgba(222,247,236,var(--bg-opacity))}.bg-green-600{--bg-opacity:1;background-color:#057a55;background-color:rgba(5,122,85,var(--bg-opacity))}.bg-teal-50{--bg-opacity:1;background-color:#edfafa;background-color:rgba(237,250,250,var(--bg-opacity))}.bg-teal-100{--bg-opacity:1;background-color:#d5f5f6;background-color:rgba(213,245,246,var(--bg-opacity))}.bg-blue-50{--bg-opacity:1;background-color:#ebf5ff;background-color:rgba(235,245,255,var(--bg-opacity))}.bg-indigo-500{--bg-opacity:1;background-color:#6875f5;background-color:rgba(104,117,245,var(--bg-opacity))}.bg-indigo-600{--bg-opacity:1;background-color:#5850ec;background-color:rgba(88,80,236,var(--bg-opacity))}.bg-indigo-800{--bg-opacity:1;background-color:#42389d;background-color:rgba(66,56,157,var(--bg-opacity))}.hover\:bg-gray-50:hover{--bg-opacity:1;background-color:#f9fafb;background-color:rgba(249,250,251,var(--bg-opacity))}.hover\:bg-gray-100:hover{--bg-opacity:1;background-color:#f4f5f7;background-color:rgba(244,245,247,var(--bg-opacity))}.hover\:bg-green-500:hover{--bg-opacity:1;background-color:#0e9f6e;background-color:rgba(14,159,110,var(--bg-opacity))}.hover\:bg-indigo-500:hover{--bg-opacity:1;background-color:#6875f5;background-color:rgba(104,117,245,var(--bg-opacity))}.focus\:bg-gray-50:focus{--bg-opacity:1;background-color:#f9fafb;background-color:rgba(249,250,251,var(--bg-opacity))}.focus\:bg-gray-100:focus{--bg-opacity:1;background-color:#f4f5f7;background-color:rgba(244,245,247,var(--bg-opacity))}.border-collapse{border-collapse:collapse}.border-transparent{border-color:transparent}.border-gray-100{--border-opacity:1;border-color:#f4f5f7;border-color:rgba(244,245,247,var(--border-opacity))}.border-gray-200{--border-opacity:1;border-color:#e5e7eb;border-color:rgba(229,231,235,var(--border-opacity))}.border-gray-300{--border-opacity:1;border-color:#d2d6dc;border-color:rgba(210,214,220,var(--border-opacity))}.border-gray-400{--border-opacity:1;border-color:#9fa6b2;border-color:rgba(159,166,178,var(--border-opacity))}.border-indigo-500{--border-opacity:1;border-color:#6875f5;border-color:rgba(104,117,245,var(--border-opacity))}.border-indigo-600{--border-opacity:1;border-color:#5850ec;border-color:rgba(88,80,236,var(--border-opacity))}.hover\:border-gray-200:hover{--border-opacity:1;border-color:#e5e7eb;border-color:rgba(229,231,235,var(--border-opacity))}.hover\:border-gray-500:hover{--border-opacity:1;border-color:#6b7280;border-color:rgba(107,114,128,var(--border-opacity))}.hover\:border-red-400:hover{--border-opacity:1;border-color:#f98080;border-color:rgba(249,128,128,var(--border-opacity))}.hover\:border-indigo-600:hover{--border-opacity:1;border-color:#5850ec;border-color:rgba(88,80,236,var(--border-opacity))}.focus\:border-blue-300:focus{--border-opacity:1;border-color:#a4cafe;border-color:rgba(164,202,254,var(--border-opacity))}.rounded{border-radius:.25rem}.rounded-md{border-radius:.375rem}.rounded-lg{border-radius:.5rem}.rounded-full{border-radius:9999px}.rounded-r-lg{border-top-right-radius:.5rem;border-bottom-right-radius:.5rem}.rounded-l-lg{border-top-left-radius:.5rem;border-bottom-left-radius:.5rem}.border-dashed{border-style:dashed}.border-0{border-width:0}.border{border-width:1px}.border-t{border-top-width:1px}.border-r{border-right-width:1px}.border-b{border-bottom-width:1px}.cursor-auto{cursor:auto}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:-webkit-box;display:-ms-flexbox;display:flex}.inline-flex{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex}.table{display:table}.table-cell{display:table-cell}.grid{display:grid}.hidden{display:none}.flex-row{-webkit-box-orient:horizontal;-ms-flex-direction:row;flex-direction:row}.flex-col,.flex-row{-webkit-box-direction:normal}.flex-col{-webkit-box-orient:vertical;-ms-flex-direction:column;flex-direction:column}.flex-wrap{-ms-flex-wrap:wrap;flex-wrap:wrap}.items-start{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.items-center{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.self-start{-ms-flex-item-align:start;align-self:flex-start}.justify-start{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.justify-center{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.justify-between{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.flex-1{-webkit-box-flex:1;-ms-flex:1 1 0%;flex:1 1 0%}.flex-auto{-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto}.flex-none{-webkit-box-flex:0;-ms-flex:none;flex:none}.flex-shrink-0{-ms-flex-negative:0;flex-shrink:0}.float-right{float:right}.float-left{float:left}.font-sans{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.font-thin{font-weight:200}.font-normal{font-weight:400}.font-medium{font-weight:500}.font-semibold{font-weight:600}.font-bold{font-weight:700}.h-0{height:0}.h-3{height:.75rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-10{height:2.5rem}.h-15{height:3.75rem}.h-20{height:5rem}.h-48{height:12rem}.h-auto{height:auto}.h-full{height:100%}.text-xs{font-size:.75rem}.text-sm{font-size:.875rem}.text-base{font-size:1rem}.text-lg{font-size:1.125rem}.text-xl{font-size:1.25rem}.text-2xl{font-size:1.5rem}.text-3xl{font-size:1.875rem}.text-4xl{font-size:2.25rem}.leading-4{line-height:1rem}.leading-5{line-height:1.25rem}.leading-6{line-height:1.5rem}.leading-7{line-height:1.75rem}.leading-9{line-height:2.25rem}.leading-none{line-height:1}.leading-snug{line-height:1.375}.leading-normal{line-height:1.5}.leading-relaxed{line-height:1.625}.list-none{list-style-type:none}.list-disc{list-style-type:disc}.list-decimal{list-style-type:decimal}.m-4{margin:1rem}.my-1{margin-top:.25rem;margin-bottom:.25rem}.mx-1{margin-left:.25rem;margin-right:.25rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.my-3{margin-top:.75rem;margin-bottom:.75rem}.my-4{margin-top:1rem;margin-bottom:1rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-6{margin-left:1.5rem;margin-right:1.5rem}.my-8{margin-top:2rem;margin-bottom:2rem}.mx-8{margin-left:2rem;margin-right:2rem}.mx-auto{margin-left:auto;margin-right:auto}.mt-0{margin-top:0}.mb-0{margin-bottom:0}.mt-1{margin-top:.25rem}.mr-1{margin-right:.25rem}.mb-1{margin-bottom:.25rem}.ml-1{margin-left:.25rem}.mt-2{margin-top:.5rem}.mr-2{margin-right:.5rem}.mb-2{margin-bottom:.5rem}.ml-2{margin-left:.5rem}.mt-3{margin-top:.75rem}.mr-3{margin-right:.75rem}.mb-3{margin-bottom:.75rem}.ml-3{margin-left:.75rem}.mt-4{margin-top:1rem}.mr-4{margin-right:1rem}.mb-4{margin-bottom:1rem}.ml-4{margin-left:1rem}.ml-5{margin-left:1.25rem}.mt-6{margin-top:1.5rem}.mr-6{margin-right:1.5rem}.mb-6{margin-bottom:1.5rem}.ml-6{margin-left:1.5rem}.mt-7{margin-top:1.75rem}.mb-7{margin-bottom:1.75rem}.ml-7{margin-left:1.75rem}.mt-8{margin-top:2rem}.mr-8{margin-right:2rem}.mr-10{margin-right:2.5rem}.mt-12{margin-top:3rem}.ml-12{margin-left:3rem}.mt-16{margin-top:4rem}.mr-16{margin-right:4rem}.ml-16{margin-left:4rem}.mt-1\.5{margin-top:.375rem}.mr-1\.5{margin-right:.375rem}.mt-3\.5{margin-top:.875rem}.mb-3\.5{margin-bottom:.875rem}.-mr-1{margin-right:-.25rem}.max-h-full{max-height:100%}.max-w-7xl{max-width:80rem}.max-w-full{max-width:100%}.min-h-screen{min-height:100vh}.min-w-0{min-width:0}.min-w-full{min-width:100%}.opacity-0{opacity:0}.opacity-100{opacity:1}.focus\:outline-none:focus{outline:0}.overflow-hidden{overflow:hidden}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.px-1{padding-left:.25rem;padding-right:.25rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.px-2{padding-left:.5rem;padding-right:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.px-3{padding-left:.75rem;padding-right:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.px-4{padding-left:1rem;padding-right:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.py-12{padding-top:3rem;padding-bottom:3rem}.px-12{padding-left:3rem;padding-right:3rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.pt-1{padding-top:.25rem}.pr-1{padding-right:.25rem}.pb-1{padding-bottom:.25rem}.pl-1{padding-left:.25rem}.pt-2{padding-top:.5rem}.pr-2{padding-right:.5rem}.pb-2{padding-bottom:.5rem}.pl-2{padding-left:.5rem}.pt-3{padding-top:.75rem}.pb-3{padding-bottom:.75rem}.pl-3{padding-left:.75rem}.pt-4{padding-top:1rem}.pr-4{padding-right:1rem}.pb-4{padding-bottom:1rem}.pl-4{padding-left:1rem}.pl-5{padding-left:1.25rem}.pt-6{padding-top:1.5rem}.pr-6{padding-right:1.5rem}.pb-6{padding-bottom:1.5rem}.pl-6{padding-left:1.5rem}.pt-7{padding-top:1.75rem}.pt-8{padding-top:2rem}.pb-8{padding-bottom:2rem}.pl-8{padding-left:2rem}.pt-10{padding-top:2.5rem}.pl-10{padding-left:2.5rem}.pr-12{padding-right:3rem}.pb-12{padding-bottom:3rem}.pl-16{padding-left:4rem}.pt-1\.5{padding-top:.375rem}.pointer-events-none{pointer-events:none}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:-webkit-sticky;position:sticky}.inset-y-0{top:0;bottom:0}.top-0{top:0}.right-0{right:0}.left-0{left:0}.shadow-xs{-webkit-box-shadow:0 0 0 1px rgba(0,0,0,.05);box-shadow:0 0 0 1px rgba(0,0,0,.05)}.shadow-sm{-webkit-box-shadow:0 1px 2px 0 rgba(0,0,0,.05);box-shadow:0 1px 2px 0 rgba(0,0,0,.05)}.shadow{-webkit-box-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px 0 rgba(0,0,0,.06);box-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px 0 rgba(0,0,0,.06)}.shadow-md{-webkit-box-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -1px rgba(0,0,0,.06);box-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -1px rgba(0,0,0,.06)}.shadow-lg{-webkit-box-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -2px rgba(0,0,0,.05);box-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -2px rgba(0,0,0,.05)}.shadow-xl{-webkit-box-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 10px 10px -5px rgba(0,0,0,.04);box-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 10px 10px -5px rgba(0,0,0,.04)}.shadow-inner{-webkit-box-shadow:inset 0 2px 4px 0 rgba(0,0,0,.06);box-shadow:inset 0 2px 4px 0 rgba(0,0,0,.06)}.hover\:shadow-md:hover{-webkit-box-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -1px rgba(0,0,0,.06);box-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -1px rgba(0,0,0,.06)}.focus\:shadow-lg:focus{-webkit-box-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -2px rgba(0,0,0,.05);box-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -2px rgba(0,0,0,.05)}.focus\:shadow-outline:focus{-webkit-box-shadow:0 0 0 3px rgba(118,169,250,.45);box-shadow:0 0 0 3px rgba(118,169,250,.45)}.focus\:shadow-outline-blue:focus{-webkit-box-shadow:0 0 0 3px rgba(164,202,254,.45);box-shadow:0 0 0 3px rgba(164,202,254,.45)}.focus\:shadow-outline-red:focus{-webkit-box-shadow:0 0 0 3px rgba(248,180,180,.45);box-shadow:0 0 0 3px rgba(248,180,180,.45)}.focus\:shadow-outline-indigo:focus{-webkit-box-shadow:0 0 0 3px rgba(180,198,252,.45);box-shadow:0 0 0 3px rgba(180,198,252,.45)}.table-fixed{table-layout:fixed}.text-left{text-align:left}.text-center{text-align:center}.text-white{--text-opacity:1;color:#fff;color:rgba(255,255,255,var(--text-opacity))}.text-black{--text-opacity:1;color:#000;color:rgba(0,0,0,var(--text-opacity))}.text-gray-400{--text-opacity:1;color:#9fa6b2;color:rgba(159,166,178,var(--text-opacity))}.text-gray-500{--text-opacity:1;color:#6b7280;color:rgba(107,114,128,var(--text-opacity))}.text-gray-600{--text-opacity:1;color:#4b5563;color:rgba(75,85,99,var(--text-opacity))}.text-gray-700{--text-opacity:1;color:#374151;color:rgba(55,65,81,var(--text-opacity))}.text-gray-800{--text-opacity:1;color:#252f3f;color:rgba(37,47,63,var(--text-opacity))}.text-gray-900{--text-opacity:1;color:#161e2e;color:rgba(22,30,46,var(--text-opacity))}.text-red-600{--text-opacity:1;color:#e02424;color:rgba(224,36,36,var(--text-opacity))}.text-red-800{--text-opacity:1;color:#9b1c1c;color:rgba(155,28,28,var(--text-opacity))}.text-orange-400{--text-opacity:1;color:#ff8a4c;color:rgba(255,138,76,var(--text-opacity))}.text-orange-500{--text-opacity:1;color:#ff5a1f;color:rgba(255,90,31,var(--text-opacity))}.text-yellow-400{--text-opacity:1;color:#e3a008;color:rgba(227,160,8,var(--text-opacity))}.text-green-400{--text-opacity:1;color:#31c48d;color:rgba(49,196,141,var(--text-opacity))}.text-green-600{--text-opacity:1;color:#057a55;color:rgba(5,122,85,var(--text-opacity))}.text-green-800{--text-opacity:1;color:#03543f;color:rgba(3,84,63,var(--text-opacity))}.text-teal-400{--text-opacity:1;color:#16bdca;color:rgba(22,189,202,var(--text-opacity))}.text-teal-500{--text-opacity:1;color:#0694a2;color:rgba(6,148,162,var(--text-opacity))}.text-teal-700{--text-opacity:1;color:#036672;color:rgba(3,102,114,var(--text-opacity))}.text-blue-400{--text-opacity:1;color:#76a9fa;color:rgba(118,169,250,var(--text-opacity))}.text-blue-500{--text-opacity:1;color:#3f83f8;color:rgba(63,131,248,var(--text-opacity))}.text-blue-700{--text-opacity:1;color:#1a56db;color:rgba(26,86,219,var(--text-opacity))}.text-blue-800{--text-opacity:1;color:#1e429f;color:rgba(30,66,159,var(--text-opacity))}.text-indigo-100{--text-opacity:1;color:#e5edff;color:rgba(229,237,255,var(--text-opacity))}.text-indigo-400{--text-opacity:1;color:#8da2fb;color:rgba(141,162,251,var(--text-opacity))}.text-indigo-500{--text-opacity:1;color:#6875f5;color:rgba(104,117,245,var(--text-opacity))}.text-indigo-600{--text-opacity:1;color:#5850ec;color:rgba(88,80,236,var(--text-opacity))}.hover\:text-white:hover{--text-opacity:1;color:#fff;color:rgba(255,255,255,var(--text-opacity))}.hover\:text-gray-800:hover{--text-opacity:1;color:#252f3f;color:rgba(37,47,63,var(--text-opacity))}.hover\:text-gray-900:hover{--text-opacity:1;color:#161e2e;color:rgba(22,30,46,var(--text-opacity))}.hover\:text-blue-700:hover{--text-opacity:1;color:#1a56db;color:rgba(26,86,219,var(--text-opacity))}.hover\:text-indigo-500:hover{--text-opacity:1;color:#6875f5;color:rgba(104,117,245,var(--text-opacity))}.focus\:text-gray-900:focus{--text-opacity:1;color:#161e2e;color:rgba(22,30,46,var(--text-opacity))}.active\:text-indigo-600:active{--text-opacity:1;color:#5850ec;color:rgba(88,80,236,var(--text-opacity))}.italic{font-style:italic}.not-italic{font-style:normal}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.underline{text-decoration:underline}.no-underline{text-decoration:none}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.select-none{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.align-middle{vertical-align:middle}.whitespace-no-wrap{white-space:nowrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.w-0{width:0}.w-3{width:.75rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-7{width:1.75rem}.w-8{width:2rem}.w-10{width:2.5rem}.w-40{width:10rem}.w-56{width:14rem}.w-auto{width:auto}.w-1\/2{width:50%}.w-1\/3{width:33.333333%}.w-2\/3{width:66.666667%}.w-1\/4{width:25%}.w-2\/4{width:50%}.w-3\/4{width:75%}.w-1\/5{width:20%}.w-2\/5{width:40%}.w-3\/5{width:60%}.w-4\/5{width:80%}.w-3\/6{width:50%}.w-4\/6{width:66.666667%}.w-5\/6{width:83.333333%}.w-1\/12{width:8.333333%}.w-2\/12{width:16.666667%}.w-3\/12{width:25%}.w-4\/12{width:33.333333%}.w-9\/12{width:75%}.w-11\/12{width:91.666667%}.w-full{width:100%}.z-20{z-index:20}.z-40{z-index:40}.z-50{z-index:50}.gap-8{grid-gap:2rem;gap:2rem}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.transform{--transform-translate-x:0;--transform-translate-y:0;--transform-rotate:0;--transform-skew-x:0;--transform-skew-y:0;--transform-scale-x:1;--transform-scale-y:1;-webkit-transform:translateX(var(--transform-translate-x)) translateY(var(--transform-translate-y)) rotate(var(--transform-rotate)) skewX(var(--transform-skew-x)) skewY(var(--transform-skew-y)) scaleX(var(--transform-scale-x)) scaleY(var(--transform-scale-y));transform:translateX(var(--transform-translate-x)) translateY(var(--transform-translate-y)) rotate(var(--transform-rotate)) skewX(var(--transform-skew-x)) skewY(var(--transform-skew-y)) scaleX(var(--transform-scale-x)) scaleY(var(--transform-scale-y))}.origin-top-right{-webkit-transform-origin:top right;transform-origin:top right}.scale-95{--transform-scale-x:.95;--transform-scale-y:.95}.scale-100{--transform-scale-x:1;--transform-scale-y:1}.transition-all{-webkit-transition-property:all;transition-property:all}.transition{-webkit-transition-property:background-color,border-color,color,fill,stroke,opacity,-webkit-box-shadow,-webkit-transform;transition-property:background-color,border-color,color,fill,stroke,opacity,-webkit-box-shadow,-webkit-transform;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,-webkit-box-shadow,-webkit-transform}.ease-in{-webkit-transition-timing-function:cubic-bezier(.4,0,1,1);transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-out{-webkit-transition-timing-function:cubic-bezier(0,0,.2,1);transition-timing-function:cubic-bezier(0,0,.2,1)}.ease-in-out{-webkit-transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-75{-webkit-transition-duration:75ms;transition-duration:75ms}.duration-100{-webkit-transition-duration:.1s;transition-duration:.1s}.duration-150{-webkit-transition-duration:.15s;transition-duration:.15s}.duration-300{-webkit-transition-duration:.3s;transition-duration:.3s}@media (min-width:640px){.sm\:rounded-md{border-radius:.375rem}.sm\:rounded-lg{border-radius:.5rem}.sm\:grid{display:grid}.sm\:justify-start{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.sm\:text-sm{font-size:.875rem}.sm\:text-2xl{font-size:1.5rem}.sm\:leading-5{line-height:1.25rem}.sm\:leading-9{line-height:2.25rem}.sm\:px-0{padding-left:0;padding-right:0}.sm\:px-2{padding-left:.5rem;padding-right:.5rem}.sm\:px-4{padding-left:1rem;padding-right:1rem}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sm\:w-32{width:8rem}.sm\:w-1\/3{width:33.333333%}.sm\:w-2\/3{width:66.666667%}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (min-width:768px){.md\:flex{display:-webkit-box;display:-ms-flexbox;display:flex}.md\:items-start{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.md\:items-center{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.md\:justify-end{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.md\:justify-between{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.md\:text-base{font-size:1rem}.md\:mx-0{margin-left:0;margin-right:0}.md\:my-2{margin-top:.5rem;margin-bottom:.5rem}.md\:mt-0{margin-top:0}.md\:ml-2{margin-left:.5rem}.md\:ml-4{margin-left:1rem}.md\:ml-8{margin-left:2rem}.md\:-mr-8{margin-right:-2rem}.md\:max-w-xl{max-width:36rem}.md\:max-w-5xl{max-width:64rem}.md\:p-2{padding:.5rem}.md\:p-6{padding:1.5rem}.md\:py-0{padding-top:0;padding-bottom:0}.md\:px-1{padding-left:.25rem;padding-right:.25rem}.md\:px-2{padding-left:.5rem;padding-right:.5rem}.md\:pb-2{padding-bottom:.5rem}.md\:pr-4{padding-right:1rem}.md\:pt-6{padding-top:1.5rem}.md\:w-3\/5{width:60%}}@media (min-width:1024px){.lg\:bg-transparent{background-color:transparent}.lg\:border-transparent{border-color:transparent}.lg\:rounded-full{border-radius:9999px}.lg\:block{display:block}.lg\:inline-flex{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex}.lg\:grid{display:grid}.lg\:text-sm{font-size:.875rem}.lg\:text-lg{font-size:1.125rem}.lg\:my-0{margin-top:0;margin-bottom:0}.lg\:mx-5{margin-left:1.25rem;margin-right:1.25rem}.lg\:ml-16{margin-left:4rem}.lg\:-mr-16{margin-right:-4rem}.lg\:p-6{padding:1.5rem}.lg\:p-8{padding:2rem}.lg\:px-3{padding-left:.75rem;padding-right:.75rem}.lg\:px-4{padding-left:1rem;padding-right:1rem}.lg\:px-8{padding-left:2rem;padding-right:2rem}.lg\:pt-2{padding-top:.5rem}.lg\:pb-2{padding-bottom:.5rem}.lg\:pl-2{padding-left:.5rem}.lg\:shadow-none{-webkit-box-shadow:none;box-shadow:none}.lg\:w-40{width:10rem}.lg\:w-1\/2{width:50%}.lg\:w-3\/5{width:60%}.lg\:w-3\/12{width:25%}.lg\:w-7\/12{width:58.333333%}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (min-width:1280px){.xl\:mx-7{margin-left:1.75rem;margin-right:1.75rem}.xl\:mr-0{margin-right:0}.xl\:ml-3{margin-left:.75rem}.xl\:ml-4{margin-left:1rem}.xl\:ml-20{margin-left:5rem}.xl\:px-4{padding-left:1rem;padding-right:1rem}.xl\:pb-4{padding-bottom:1rem}.xl\:w-1\/4{width:25%}.xl\:w-2\/5{width:40%}.xl\:w-3\/5{width:60%}.xl\:w-2\/12{width:16.666667%}.xl\:w-7\/12{width:58.333333%}}
1
+ /*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{-webkit-box-sizing:content-box;box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{-webkit-box-sizing:border-box;box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{-webkit-box-sizing:border-box;box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}[hidden],template{display:none}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}button{background-color:transparent;background-image:none}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}fieldset,ol,ul{margin:0;padding:0}ol,ul{list-style:none}html{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5}*,:after,:before{-webkit-box-sizing:border-box;box-sizing:border-box;border:0 solid #d2d6dc}hr{border-top-width:1px}img{border-style:solid}textarea{resize:vertical}input::-webkit-input-placeholder,textarea::-webkit-input-placeholder{color:#a0aec0}input::-moz-placeholder,textarea::-moz-placeholder{color:#a0aec0}input::-ms-input-placeholder,textarea::-ms-input-placeholder{color:#a0aec0}input::placeholder,textarea::placeholder{color:#a0aec0}[role=button],button{cursor:pointer}table{border-collapse:collapse}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}button,input,optgroup,select,textarea{padding:0;line-height:inherit;color:inherit}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}a{--text-opacity:1;color:#5850ec;color:rgba(88,80,236,var(--text-opacity))}img{border-width:0}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}.form-input{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#d2d6dc;border-width:1px;border-radius:.375rem;padding:.5rem .75rem;font-size:1rem;line-height:1.5}.form-input::-webkit-input-placeholder{color:#9fa6b2;opacity:1}.form-input::-moz-placeholder{color:#9fa6b2;opacity:1}.form-input::-ms-input-placeholder{color:#9fa6b2;opacity:1}.form-input::placeholder{color:#9fa6b2;opacity:1}.form-input:focus{outline:none;-webkit-box-shadow:0 0 0 3px rgba(164,202,254,.45);box-shadow:0 0 0 3px rgba(164,202,254,.45);border-color:#a4cafe}.form-textarea{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#d2d6dc;border-width:1px;border-radius:.375rem;padding:.5rem .75rem;font-size:1rem;line-height:1.5}.form-textarea::-webkit-input-placeholder{color:#9fa6b2;opacity:1}.form-textarea::-moz-placeholder{color:#9fa6b2;opacity:1}.form-textarea::-ms-input-placeholder{color:#9fa6b2;opacity:1}.form-textarea::placeholder{color:#9fa6b2;opacity:1}.form-textarea:focus{outline:none;-webkit-box-shadow:0 0 0 3px rgba(164,202,254,.45);box-shadow:0 0 0 3px rgba(164,202,254,.45);border-color:#a4cafe}.form-multiselect{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#d2d6dc;border-width:1px;border-radius:.375rem;padding:.5rem .75rem;font-size:1rem;line-height:1.5}.form-multiselect:focus{outline:none;-webkit-box-shadow:0 0 0 3px rgba(164,202,254,.45);box-shadow:0 0 0 3px rgba(164,202,254,.45);border-color:#a4cafe}.form-select{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M7 7l3-3 3 3m0 6l-3 3-3-3' stroke='%239fa6b2' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-print-color-adjust:exact;color-adjust:exact;background-repeat:no-repeat;background-color:#fff;border-color:#d2d6dc;border-width:1px;border-radius:.375rem;padding:.5rem 2.5rem .5rem .75rem;font-size:1rem;line-height:1.5;background-position:right .5rem center;background-size:1.5em 1.5em}.form-select::-ms-expand{color:#9fa6b2;border:none}@media not print{.form-select::-ms-expand{display:none}}@media print and (-ms-high-contrast:active),print and (-ms-high-contrast:none){.form-select{padding-right:.75rem}}.form-select:focus{outline:none;-webkit-box-shadow:0 0 0 3px rgba(164,202,254,.45);box-shadow:0 0 0 3px rgba(164,202,254,.45);border-color:#a4cafe}.form-checkbox{-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-print-color-adjust:exact;color-adjust:exact;display:inline-block;vertical-align:middle;background-origin:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-ms-flex-negative:0;flex-shrink:0;height:1rem;width:1rem;color:#3f83f8;background-color:#fff;border-color:#d2d6dc;border-width:1px;border-radius:.25rem}.form-checkbox:checked{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 16 16' fill='%23fff' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5.707 7.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4a1 1 0 00-1.414-1.414L7 8.586 5.707 7.293z'/%3E%3C/svg%3E");border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:50%;background-repeat:no-repeat}@media not print{.form-checkbox::-ms-check{border-width:1px;color:transparent;background:inherit;border-color:inherit;border-radius:inherit}}.form-checkbox:focus{outline:none;-webkit-box-shadow:0 0 0 3px rgba(164,202,254,.45);box-shadow:0 0 0 3px rgba(164,202,254,.45);border-color:#a4cafe}.form-checkbox:checked:focus{border-color:transparent}.form-radio{-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-print-color-adjust:exact;color-adjust:exact;display:inline-block;vertical-align:middle;background-origin:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-ms-flex-negative:0;flex-shrink:0;border-radius:100%;height:1rem;width:1rem;color:#3f83f8;background-color:#fff;border-color:#d2d6dc;border-width:1px}.form-radio:checked{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 16 16' fill='%23fff' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='8' cy='8' r='3'/%3E%3C/svg%3E");border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:50%;background-repeat:no-repeat}@media not print{.form-radio::-ms-check{border-width:1px;color:transparent;background:inherit;border-color:inherit;border-radius:inherit}}.form-radio:focus{outline:none;-webkit-box-shadow:0 0 0 3px rgba(164,202,254,.45);box-shadow:0 0 0 3px rgba(164,202,254,.45);border-color:#a4cafe}.form-radio:checked:focus{border-color:transparent}.ig-es-primary-button,.ig-es-send-queue-emails{border-color:transparent;padding:.5rem 1rem;background-color:#fff;background-color:rgba(255,255,255,var(--bg-opacity));color:#fff;color:rgba(255,255,255,var(--text-opacity));background-color:#5850ec;background-color:rgba(88,80,236,var(--bg-opacity))}.ig-es-primary-button,.ig-es-send-queue-emails,.ig-es-title-button,.wp-heading-inline+.page-title-action{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;border-radius:.375rem;border-width:1px;font-size:.875rem;line-height:1.25rem;font-weight:500;--text-opacity:1;--bg-opacity:1;-webkit-transition-property:background-color,border-color,color,fill,stroke,opacity,-webkit-box-shadow,-webkit-transform;transition-property:background-color,border-color,color,fill,stroke,opacity,-webkit-box-shadow,-webkit-transform;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,-webkit-box-shadow,-webkit-transform;-webkit-transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(.4,0,.2,1);-webkit-transition-duration:.15s;transition-duration:.15s}.ig-es-title-button,.wp-heading-inline+.page-title-action{--border-opacity:1;border-color:#d2d6dc;border-color:rgba(210,214,220,var(--border-opacity));color:#374151;color:rgba(55,65,81,var(--text-opacity));background-color:#fff;background-color:rgba(255,255,255,var(--bg-opacity));padding:.25rem .75rem}.wrap .wp-heading-inline+.page-title-action{margin-left:.5rem}.ig-es-title-button:hover,.wp-heading-inline+.page-title-action:hover{--bg-opacity:1;background-color:#f9fafb;background-color:rgba(249,250,251,var(--bg-opacity));--text-opacity:1;color:#374151;color:rgba(55,65,81,var(--text-opacity))}.ig-es-title-button:focus,.wp-heading-inline+.page-title-action:focus{outline:0;-webkit-box-shadow:0 0 0 3px rgba(118,169,250,.45);box-shadow:0 0 0 3px rgba(118,169,250,.45);--border-opacity:1;border-color:#a4cafe;border-color:rgba(164,202,254,var(--border-opacity))}.ig-es-primary-button:hover{--bg-opacity:1;background-color:#6875f5;background-color:rgba(104,117,245,var(--bg-opacity));--text-opacity:1;color:#fff;color:rgba(255,255,255,var(--text-opacity))}.ig-es-primary-button:focus{outline:0;-webkit-box-shadow:0 0 0 3px rgba(164,202,254,.45);box-shadow:0 0 0 3px rgba(164,202,254,.45)}.ig-es-imp-button{display:-webkit-inline-box!important;display:-ms-inline-flexbox!important;display:inline-flex!important;-webkit-box-pack:center!important;-ms-flex-pack:center!important;justify-content:center!important;border-radius:.375rem!important;border-width:1px!important;border-color:transparent!important;background-color:#fff!important;background-color:rgba(255,255,255,var(--bg-opacity))!important;font-size:.875rem!important;line-height:1.25rem!important;font-weight:500!important;background-color:#0e9f6e!important;background-color:rgba(14,159,110,var(--bg-opacity))!important;-webkit-transition-property:background-color,border-color,color,fill,stroke,opacity,-webkit-box-shadow,-webkit-transform!important;transition-property:background-color,border-color,color,fill,stroke,opacity,-webkit-box-shadow,-webkit-transform!important;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform!important;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,-webkit-box-shadow,-webkit-transform!important;-webkit-transition-timing-function:cubic-bezier(.4,0,.2,1)!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important;-webkit-transition-duration:.15s!important;transition-duration:.15s!important}.ig-es-imp-button,.ig-es-imp-button:hover{--text-opacity:1!important;color:#fff!important;color:rgba(255,255,255,var(--text-opacity))!important;--bg-opacity:1!important}.ig-es-imp-button:hover{background-color:#31c48d!important;background-color:rgba(49,196,141,var(--bg-opacity))!important}.ig-es-imp-button:focus{outline:0!important;-webkit-box-shadow:0 0 0 3px rgba(132,225,188,.45)!important;box-shadow:0 0 0 3px rgba(132,225,188,.45)!important}.ig-es-link-button{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;border-radius:.375rem;border-width:1px;border-color:transparent;background-color:#fff;background-color:rgba(255,255,255,var(--bg-opacity));font-size:.875rem;line-height:1.25rem;font-weight:500;background-color:#ff5a1f;background-color:rgba(255,90,31,var(--bg-opacity));-webkit-transition-property:background-color,border-color,color,fill,stroke,opacity,-webkit-box-shadow,-webkit-transform;transition-property:background-color,border-color,color,fill,stroke,opacity,-webkit-box-shadow,-webkit-transform;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,-webkit-box-shadow,-webkit-transform;-webkit-transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(.4,0,.2,1);-webkit-transition-duration:.15s;transition-duration:.15s}.ig-es-link-button,.ig-es-link-button:hover{--text-opacity:1;color:#fff;color:rgba(255,255,255,var(--text-opacity));--bg-opacity:1}.ig-es-link-button:hover{background-color:#ff8a4c;background-color:rgba(255,138,76,var(--bg-opacity))}.ig-es-link-button:focus{outline:0;-webkit-box-shadow:0 0 0 3px rgba(253,186,140,.45);box-shadow:0 0 0 3px rgba(253,186,140,.45)}.ig-es-action.js-open .ig-es-action__header{--bg-opacity:1;background-color:#5850ec;background-color:rgba(88,80,236,var(--bg-opacity));--text-opacity:1;color:#fff;color:rgba(255,255,255,var(--text-opacity))}.form-input{--bg-opacity:1!important;background-color:#fff!important;background-color:rgba(255,255,255,var(--bg-opacity))!important;border-width:1px!important;border-radius:.375rem!important;-webkit-box-shadow:0 1px 2px 0 rgba(0,0,0,.05)!important;box-shadow:0 1px 2px 0 rgba(0,0,0,.05)!important;--border-opacity:1!important;border-color:#d2d6dc!important;border-color:rgba(210,214,220,var(--border-opacity))!important}.form-input:focus{outline:0!important;-webkit-box-shadow:0 0 0 3px rgba(164,202,254,.45)!important;box-shadow:0 0 0 3px rgba(164,202,254,.45)!important}.form-checkbox{content:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 16 16' fill='%23fff' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5.707 7.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4a1 1 0 00-1.414-1.414L7 8.586 5.707 7.293z'/%3E%3C/svg%3E")}.form-radio{content:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 16 16' fill='%23fff' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='8' cy='8' r='3'/%3E%3C/svg%3E")}.form-checkbox:checked,.form-radio:checked{--text-opacity:1!important;color:#5850ec!important;color:rgba(88,80,236,var(--text-opacity))!important}.form-select{font-size:.875rem!important;--border-opacity:1!important;border-color:#9fa6b2!important;border-color:rgba(159,166,178,var(--border-opacity))!important;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M7 7l3-3 3 3m0 6l-3 3-3-3' stroke='%239fa6b2' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")!important}.form-select:focus,input[type=number]:focus{outline:0!important;-webkit-box-shadow:0 0 0 3px rgba(164,202,254,.45)!important;box-shadow:0 0 0 3px rgba(164,202,254,.45)!important;--border-opacity:1!important;border-color:#a4cafe!important;border-color:rgba(164,202,254,var(--border-opacity))!important}.es-check-toggle:checked~.es-mail-toggle-line{--bg-opacity:1;background-color:#5850ec;background-color:rgba(88,80,236,var(--bg-opacity))}.es-check-toggle:checked~.es-mail-toggle-dot{--transform-translate-x:0;--transform-translate-y:0;--transform-rotate:0;--transform-skew-x:0;--transform-skew-y:0;--transform-scale-x:1;--transform-scale-y:1;-webkit-transform:translateX(var(--transform-translate-x)) translateY(var(--transform-translate-y)) rotate(var(--transform-rotate)) skewX(var(--transform-skew-x)) skewY(var(--transform-skew-y)) scaleX(var(--transform-scale-x)) scaleY(var(--transform-scale-y));transform:translateX(var(--transform-translate-x)) translateY(var(--transform-translate-y)) rotate(var(--transform-rotate)) skewX(var(--transform-skew-x)) skewY(var(--transform-skew-y)) scaleX(var(--transform-scale-x)) scaleY(var(--transform-scale-y));--transform-translate-x:100%}.es-mail-toggle-line{width:2.25rem;height:1.25rem;background-color:#d2d6dc;background-color:rgba(210,214,220,var(--bg-opacity));-webkit-box-shadow:inset 0 2px 4px 0 rgba(0,0,0,.06);box-shadow:inset 0 2px 4px 0 rgba(0,0,0,.06)}.es-mail-toggle-dot,.es-mail-toggle-line{display:block;--bg-opacity:1;border-radius:9999px}.es-mail-toggle-dot{width:1rem;height:1rem;margin-top:.125rem;margin-left:.125rem;position:absolute;top:0;bottom:0;-webkit-transition-property:all;transition-property:all;-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(.4,0,.2,1);background-color:#fff;background-color:rgba(255,255,255,var(--bg-opacity));-webkit-box-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px 0 rgba(0,0,0,.06);box-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px 0 rgba(0,0,0,.06)}.es-mail-toggle-dot:focus-within{-webkit-box-shadow:0 0 0 3px rgba(118,169,250,.45);box-shadow:0 0 0 3px rgba(118,169,250,.45)}[type=radio]:checked+.es-mailer-logo{-webkit-transition-property:all;transition-property:all;-webkit-transition-duration:.1s;transition-duration:.1s;-webkit-transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(.4,0,.2,1);--transform-translate-x:0;--transform-translate-y:0;--transform-rotate:0;--transform-skew-x:0;--transform-skew-y:0;--transform-scale-x:1;--transform-scale-y:1;-webkit-transform:translateX(var(--transform-translate-x)) translateY(var(--transform-translate-y)) rotate(var(--transform-rotate)) skewX(var(--transform-skew-x)) skewY(var(--transform-skew-y)) scaleX(var(--transform-scale-x)) scaleY(var(--transform-scale-y));transform:translateX(var(--transform-translate-x)) translateY(var(--transform-translate-y)) rotate(var(--transform-rotate)) skewX(var(--transform-skew-x)) skewY(var(--transform-skew-y)) scaleX(var(--transform-scale-x)) scaleY(var(--transform-scale-y));--transform-scale-x:1.1;--transform-scale-y:1.1;-webkit-box-shadow:0 0 3px 1px #5a67d8;box-shadow:0 0 3px 1px #5a67d8}[type=radio]:checked+.es-mailer-logo:hover{border-width:1px;--border-opacity:1;border-color:#e5e7eb;border-color:rgba(229,231,235,var(--border-opacity))}.wp-core-ui .button,.wp-core-ui .button-secondary{--border-opacity:1;border-color:#5850ec;border-color:rgba(88,80,236,var(--border-opacity));color:#5850ec;color:rgba(88,80,236,var(--text-opacity))}.wp-core-ui .button,.wp-core-ui .button-primary,.wp-core-ui .button-secondary{font-size:.875rem;border-radius:.375rem;border-width:1px;line-height:1.25rem;font-weight:500;--text-opacity:1}.wp-core-ui .button-primary{--bg-opacity:1;background-color:#5850ec;background-color:rgba(88,80,236,var(--bg-opacity));color:#fff;color:rgba(255,255,255,var(--text-opacity));-webkit-transition-property:background-color,border-color,color,fill,stroke,opacity,-webkit-box-shadow,-webkit-transform;transition-property:background-color,border-color,color,fill,stroke,opacity,-webkit-box-shadow,-webkit-transform;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,-webkit-box-shadow,-webkit-transform;-webkit-transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(.4,0,.2,1);-webkit-transition-duration:.15s;transition-duration:.15s}.wp-core-ui .button-primary:hover,.wp-core-ui .button:hover{--border-opacity:1;border-color:#5850ec;border-color:rgba(88,80,236,var(--border-opacity));--text-opacity:1;color:#6875f5;color:rgba(104,117,245,var(--text-opacity))}.wp-core-ui .search-box input[name=s],.wp-core-ui select{border-radius:.375rem}.wp-core-ui #bulk-action-selector-top,.wp-core-ui #doaction,.wp-core-ui #doaction2,.wp-core-ui #filter-by-date,.wp-core-ui #post-query-submit,.wp-core-ui #poststuff select,.wp-core-ui #search-submit{cursor:pointer;line-height:1.25rem;--text-opacity:1;color:#4b5563;color:rgba(75,85,99,var(--text-opacity));background-color:transparent;font-size:.875rem}.wp-core-ui #search-submit{margin-left:.375rem}.wp-core-ui #doaction2:hover .wp-core-ui #post-query-submit:hover,.wp-core-ui #doaction:hover,.wp-core-ui #search-submit:hover{--bg-opacity:1;background-color:#f4f5f7;background-color:rgba(244,245,247,var(--bg-opacity));--border-opacity:1;border-color:#6b7280;border-color:rgba(107,114,128,var(--border-opacity))}.wp-core-ui #doaction2:focus .wp-core-ui #post-query-submit:focus,.wp-core-ui #doaction:focus,.wp-core-ui #search-submit:focus{outline:0;-webkit-box-shadow:0 0 0 3px rgba(159,166,178,.45);box-shadow:0 0 0 3px rgba(159,166,178,.45)}.es-items-lists table.fixed,.post-type-es_template table.fixed{margin-top:1.5rem;margin-bottom:1rem;-webkit-box-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px 0 rgba(0,0,0,.06);box-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px 0 rgba(0,0,0,.06);border-radius:.5rem;overflow:hidden}.es-items-lists table.fixed tfoot td,.es-items-lists table.fixed tfoot th,.es-items-lists table.fixed thead td,.es-items-lists table.fixed thead th,.post-type-es_template table.fixed tfoot th,.post-type-es_template table.fixed thead td,.post-type-es_template table.fixed thead th{--bg-opacity:1;background-color:#f4f5f7;background-color:rgba(244,245,247,var(--bg-opacity));border-bottom-width:1px;--border-opacity:1;border-color:#e5e7eb;border-color:rgba(229,231,235,var(--border-opacity));--text-opacity:1;color:#6b7280;color:rgba(107,114,128,var(--text-opacity));font-weight:500;letter-spacing:.05em}.es-items-lists table.fixed tfoot th,.es-items-lists table.fixed thead th,.post-type-es_template table.fixed tfoot th,.post-type-es_template table.fixed thead th{padding-top:.5rem;padding-bottom:.5rem}.es-items-lists .widefat thead td input,.post-type-es_template .widefat thead td input{margin-right:1.5rem}.post-type-es_template .wrap{padding-top:.75rem;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.post-type-es_template .wrap>h1{padding-top:0;line-height:2.25rem}.es-items-lists .striped>tbody tr,.post-type-es_template .striped>tbody tr{border-bottom-width:1px;--border-opacity:1;border-color:#e5e7eb;border-color:rgba(229,231,235,var(--border-opacity));padding-top:.5rem;padding-bottom:.5rem}.es-items-lists .striped>tbody>:nth-child(odd),.post-type-es_template .striped>tbody>:nth-child(odd){--bg-opacity:1;background-color:#fff;background-color:rgba(255,255,255,var(--bg-opacity))}.es_onboard_email{padding:.25rem .75rem!important}.es_reports_table_header{border-bottom-width:1px;--border-opacity:1;border-color:#e5e7eb;border-color:rgba(229,231,235,var(--border-opacity));--bg-opacity:1;background-color:#f4f5f7;background-color:rgba(244,245,247,var(--bg-opacity));text-align:left;font-size:.875rem;line-height:1rem;font-weight:500;--text-opacity:1;color:#6b7280;color:rgba(107,114,128,var(--text-opacity));letter-spacing:.05em}.space-y-1>:not(template)~:not(template){--space-y-reverse:0;margin-top:calc(0.25rem*(1 - var(--space-y-reverse)));margin-bottom:calc(0.25rem*var(--space-y-reverse))}.space-y-2>:not(template)~:not(template){--space-y-reverse:0;margin-top:calc(0.5rem*(1 - var(--space-y-reverse)));margin-bottom:calc(0.5rem*var(--space-y-reverse))}.space-y-3>:not(template)~:not(template){--space-y-reverse:0;margin-top:calc(0.75rem*(1 - var(--space-y-reverse)));margin-bottom:calc(0.75rem*var(--space-y-reverse))}.space-x-3>:not(template)~:not(template){--space-x-reverse:0;margin-right:calc(0.75rem*var(--space-x-reverse));margin-left:calc(0.75rem*(1 - var(--space-x-reverse)))}.space-y-4>:not(template)~:not(template){--space-y-reverse:0;margin-top:calc(1rem*(1 - var(--space-y-reverse)));margin-bottom:calc(1rem*var(--space-y-reverse))}.space-y-5>:not(template)~:not(template){--space-y-reverse:0;margin-top:calc(1.25rem*(1 - var(--space-y-reverse)));margin-bottom:calc(1.25rem*var(--space-y-reverse))}.bg-white{--bg-opacity:1;background-color:#fff;background-color:rgba(255,255,255,var(--bg-opacity))}.bg-gray-50{--bg-opacity:1;background-color:#f9fafb;background-color:rgba(249,250,251,var(--bg-opacity))}.bg-gray-100{--bg-opacity:1;background-color:#f4f5f7;background-color:rgba(244,245,247,var(--bg-opacity))}.bg-gray-200{--bg-opacity:1;background-color:#e5e7eb;background-color:rgba(229,231,235,var(--bg-opacity))}.bg-gray-300{--bg-opacity:1;background-color:#d2d6dc;background-color:rgba(210,214,220,var(--bg-opacity))}.bg-red-50{--bg-opacity:1;background-color:#fdf2f2;background-color:rgba(253,242,242,var(--bg-opacity))}.bg-red-100{--bg-opacity:1;background-color:#fde8e8;background-color:rgba(253,232,232,var(--bg-opacity))}.bg-green-100{--bg-opacity:1;background-color:#def7ec;background-color:rgba(222,247,236,var(--bg-opacity))}.bg-green-300{--bg-opacity:1;background-color:#84e1bc;background-color:rgba(132,225,188,var(--bg-opacity))}.bg-green-600{--bg-opacity:1;background-color:#057a55;background-color:rgba(5,122,85,var(--bg-opacity))}.bg-teal-50{--bg-opacity:1;background-color:#edfafa;background-color:rgba(237,250,250,var(--bg-opacity))}.bg-teal-100{--bg-opacity:1;background-color:#d5f5f6;background-color:rgba(213,245,246,var(--bg-opacity))}.bg-blue-50{--bg-opacity:1;background-color:#ebf5ff;background-color:rgba(235,245,255,var(--bg-opacity))}.bg-blue-300{--bg-opacity:1;background-color:#a4cafe;background-color:rgba(164,202,254,var(--bg-opacity))}.bg-indigo-200{--bg-opacity:1;background-color:#cddbfe;background-color:rgba(205,219,254,var(--bg-opacity))}.bg-indigo-500{--bg-opacity:1;background-color:#6875f5;background-color:rgba(104,117,245,var(--bg-opacity))}.bg-indigo-600{--bg-opacity:1;background-color:#5850ec;background-color:rgba(88,80,236,var(--bg-opacity))}.bg-indigo-700{--bg-opacity:1;background-color:#5145cd;background-color:rgba(81,69,205,var(--bg-opacity))}.bg-indigo-800{--bg-opacity:1;background-color:#42389d;background-color:rgba(66,56,157,var(--bg-opacity))}.bg-pink-200{--bg-opacity:1;background-color:#fad1e8;background-color:rgba(250,209,232,var(--bg-opacity))}.group:focus .group-focus\:bg-gray-400,.group:hover .group-hover\:bg-gray-400{--bg-opacity:1;background-color:#9fa6b2;background-color:rgba(159,166,178,var(--bg-opacity))}.hover\:bg-gray-50:hover{--bg-opacity:1;background-color:#f9fafb;background-color:rgba(249,250,251,var(--bg-opacity))}.hover\:bg-gray-100:hover{--bg-opacity:1;background-color:#f4f5f7;background-color:rgba(244,245,247,var(--bg-opacity))}.hover\:bg-green-500:hover{--bg-opacity:1;background-color:#0e9f6e;background-color:rgba(14,159,110,var(--bg-opacity))}.hover\:bg-indigo-500:hover{--bg-opacity:1;background-color:#6875f5;background-color:rgba(104,117,245,var(--bg-opacity))}.hover\:bg-indigo-600:hover{--bg-opacity:1;background-color:#5850ec;background-color:rgba(88,80,236,var(--bg-opacity))}.focus\:bg-gray-50:focus{--bg-opacity:1;background-color:#f9fafb;background-color:rgba(249,250,251,var(--bg-opacity))}.focus\:bg-gray-100:focus{--bg-opacity:1;background-color:#f4f5f7;background-color:rgba(244,245,247,var(--bg-opacity))}.border-collapse{border-collapse:collapse}.border-transparent{border-color:transparent}.border-gray-100{--border-opacity:1;border-color:#f4f5f7;border-color:rgba(244,245,247,var(--border-opacity))}.border-gray-200{--border-opacity:1;border-color:#e5e7eb;border-color:rgba(229,231,235,var(--border-opacity))}.border-gray-300{--border-opacity:1;border-color:#d2d6dc;border-color:rgba(210,214,220,var(--border-opacity))}.border-gray-400{--border-opacity:1;border-color:#9fa6b2;border-color:rgba(159,166,178,var(--border-opacity))}.border-indigo-500{--border-opacity:1;border-color:#6875f5;border-color:rgba(104,117,245,var(--border-opacity))}.border-indigo-600{--border-opacity:1;border-color:#5850ec;border-color:rgba(88,80,236,var(--border-opacity))}.hover\:border-gray-200:hover{--border-opacity:1;border-color:#e5e7eb;border-color:rgba(229,231,235,var(--border-opacity))}.hover\:border-gray-500:hover{--border-opacity:1;border-color:#6b7280;border-color:rgba(107,114,128,var(--border-opacity))}.hover\:border-red-400:hover{--border-opacity:1;border-color:#f98080;border-color:rgba(249,128,128,var(--border-opacity))}.hover\:border-indigo-600:hover{--border-opacity:1;border-color:#5850ec;border-color:rgba(88,80,236,var(--border-opacity))}.focus\:border-blue-300:focus{--border-opacity:1;border-color:#a4cafe;border-color:rgba(164,202,254,var(--border-opacity))}.rounded{border-radius:.25rem}.rounded-md{border-radius:.375rem}.rounded-lg{border-radius:.5rem}.rounded-full{border-radius:9999px}.rounded-r-lg{border-top-right-radius:.5rem;border-bottom-right-radius:.5rem}.rounded-l-lg{border-top-left-radius:.5rem;border-bottom-left-radius:.5rem}.border-dashed{border-style:dashed}.border-0{border-width:0}.border{border-width:1px}.border-t{border-top-width:1px}.border-r{border-right-width:1px}.border-b{border-bottom-width:1px}.cursor-auto{cursor:auto}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:-webkit-box;display:-ms-flexbox;display:flex}.inline-flex{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex}.table{display:table}.table-cell{display:table-cell}.grid{display:grid}.hidden{display:none}.flex-row{-webkit-box-orient:horizontal;-ms-flex-direction:row;flex-direction:row}.flex-col,.flex-row{-webkit-box-direction:normal}.flex-col{-webkit-box-orient:vertical;-ms-flex-direction:column;flex-direction:column}.flex-wrap{-ms-flex-wrap:wrap;flex-wrap:wrap}.items-start{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.items-center{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.self-start{-ms-flex-item-align:start;align-self:flex-start}.justify-start{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.justify-center{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.justify-between{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.flex-1{-webkit-box-flex:1;-ms-flex:1 1 0%;flex:1 1 0%}.flex-auto{-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto}.flex-none{-webkit-box-flex:0;-ms-flex:none;flex:none}.flex-shrink-0{-ms-flex-negative:0;flex-shrink:0}.float-right{float:right}.float-left{float:left}.font-sans{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.font-mono{font-family:Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.font-thin{font-weight:200}.font-normal{font-weight:400}.font-medium{font-weight:500}.font-semibold{font-weight:600}.font-bold{font-weight:700}.h-0{height:0}.h-2{height:.5rem}.h-3{height:.75rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-10{height:2.5rem}.h-12{height:3rem}.h-15{height:3.75rem}.h-20{height:5rem}.h-48{height:12rem}.h-auto{height:auto}.h-full{height:100%}.text-xs{font-size:.75rem}.text-sm{font-size:.875rem}.text-base{font-size:1rem}.text-lg{font-size:1.125rem}.text-xl{font-size:1.25rem}.text-2xl{font-size:1.5rem}.text-3xl{font-size:1.875rem}.text-4xl{font-size:2.25rem}.leading-4{line-height:1rem}.leading-5{line-height:1.25rem}.leading-6{line-height:1.5rem}.leading-7{line-height:1.75rem}.leading-9{line-height:2.25rem}.leading-none{line-height:1}.leading-snug{line-height:1.375}.leading-normal{line-height:1.5}.leading-relaxed{line-height:1.625}.list-none{list-style-type:none}.list-disc{list-style-type:disc}.list-decimal{list-style-type:decimal}.m-4{margin:1rem}.my-1{margin-top:.25rem;margin-bottom:.25rem}.mx-1{margin-left:.25rem;margin-right:.25rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.my-3{margin-top:.75rem;margin-bottom:.75rem}.my-4{margin-top:1rem;margin-bottom:1rem}.mx-4{margin-left:1rem;margin-right:1rem}.my-6{margin-top:1.5rem;margin-bottom:1.5rem}.mx-6{margin-left:1.5rem;margin-right:1.5rem}.my-8{margin-top:2rem;margin-bottom:2rem}.mx-8{margin-left:2rem;margin-right:2rem}.my-12{margin-top:3rem;margin-bottom:3rem}.mx-auto{margin-left:auto;margin-right:auto}.mt-0{margin-top:0}.mb-0{margin-bottom:0}.mt-1{margin-top:.25rem}.mr-1{margin-right:.25rem}.mb-1{margin-bottom:.25rem}.ml-1{margin-left:.25rem}.mt-2{margin-top:.5rem}.mr-2{margin-right:.5rem}.mb-2{margin-bottom:.5rem}.ml-2{margin-left:.5rem}.mt-3{margin-top:.75rem}.mr-3{margin-right:.75rem}.mb-3{margin-bottom:.75rem}.ml-3{margin-left:.75rem}.mt-4{margin-top:1rem}.mr-4{margin-right:1rem}.mb-4{margin-bottom:1rem}.ml-4{margin-left:1rem}.ml-5{margin-left:1.25rem}.mt-6{margin-top:1.5rem}.mr-6{margin-right:1.5rem}.mb-6{margin-bottom:1.5rem}.ml-6{margin-left:1.5rem}.mt-7{margin-top:1.75rem}.mb-7{margin-bottom:1.75rem}.ml-7{margin-left:1.75rem}.mt-8{margin-top:2rem}.mr-8{margin-right:2rem}.mr-10{margin-right:2.5rem}.mt-12{margin-top:3rem}.ml-12{margin-left:3rem}.mt-16{margin-top:4rem}.mr-16{margin-right:4rem}.ml-16{margin-left:4rem}.mt-1\.5{margin-top:.375rem}.mr-1\.5{margin-right:.375rem}.mt-3\.5{margin-top:.875rem}.mb-3\.5{margin-bottom:.875rem}.-mt-1{margin-top:-.25rem}.-mr-1{margin-right:-.25rem}.-mb-1{margin-bottom:-.25rem}.-mb-2{margin-bottom:-.5rem}.-mt-5{margin-top:-1.25rem}.-mb-0\.5{margin-bottom:-.125rem}.-mt-1\.5{margin-top:-.375rem}.max-h-full{max-height:100%}.max-w-7xl{max-width:80rem}.max-w-full{max-width:100%}.min-h-screen{min-height:100vh}.min-w-0{min-width:0}.min-w-full{min-width:100%}.object-cover{-o-object-fit:cover;object-fit:cover}.opacity-0{opacity:0}.opacity-100{opacity:1}.focus\:outline-none:focus{outline:0}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.px-1{padding-left:.25rem;padding-right:.25rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.px-2{padding-left:.5rem;padding-right:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.px-3{padding-left:.75rem;padding-right:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.px-4{padding-left:1rem;padding-right:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.py-12{padding-top:3rem;padding-bottom:3rem}.px-12{padding-left:3rem;padding-right:3rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.pt-1{padding-top:.25rem}.pr-1{padding-right:.25rem}.pb-1{padding-bottom:.25rem}.pl-1{padding-left:.25rem}.pt-2{padding-top:.5rem}.pr-2{padding-right:.5rem}.pb-2{padding-bottom:.5rem}.pl-2{padding-left:.5rem}.pt-3{padding-top:.75rem}.pb-3{padding-bottom:.75rem}.pl-3{padding-left:.75rem}.pt-4{padding-top:1rem}.pr-4{padding-right:1rem}.pb-4{padding-bottom:1rem}.pl-4{padding-left:1rem}.pt-5{padding-top:1.25rem}.pl-5{padding-left:1.25rem}.pt-6{padding-top:1.5rem}.pr-6{padding-right:1.5rem}.pb-6{padding-bottom:1.5rem}.pl-6{padding-left:1.5rem}.pt-7{padding-top:1.75rem}.pt-8{padding-top:2rem}.pb-8{padding-bottom:2rem}.pl-8{padding-left:2rem}.pt-10{padding-top:2.5rem}.pl-10{padding-left:2.5rem}.pr-12{padding-right:3rem}.pb-12{padding-bottom:3rem}.pl-16{padding-left:4rem}.pl-0\.5{padding-left:.125rem}.pt-1\.5{padding-top:.375rem}.pointer-events-none{pointer-events:none}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:-webkit-sticky;position:sticky}.inset-0{right:0;left:0}.inset-0,.inset-y-0{top:0;bottom:0}.top-0{top:0}.right-0{right:0}.left-0{left:0}.bottom-2{bottom:.5rem}.top-8{top:2rem}.shadow-xs{-webkit-box-shadow:0 0 0 1px rgba(0,0,0,.05);box-shadow:0 0 0 1px rgba(0,0,0,.05)}.shadow-sm{-webkit-box-shadow:0 1px 2px 0 rgba(0,0,0,.05);box-shadow:0 1px 2px 0 rgba(0,0,0,.05)}.shadow{-webkit-box-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px 0 rgba(0,0,0,.06);box-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px 0 rgba(0,0,0,.06)}.shadow-md{-webkit-box-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -1px rgba(0,0,0,.06);box-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -1px rgba(0,0,0,.06)}.shadow-lg{-webkit-box-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -2px rgba(0,0,0,.05);box-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -2px rgba(0,0,0,.05)}.shadow-xl{-webkit-box-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 10px 10px -5px rgba(0,0,0,.04);box-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 10px 10px -5px rgba(0,0,0,.04)}.shadow-inner{-webkit-box-shadow:inset 0 2px 4px 0 rgba(0,0,0,.06);box-shadow:inset 0 2px 4px 0 rgba(0,0,0,.06)}.hover\:shadow-md:hover{-webkit-box-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -1px rgba(0,0,0,.06);box-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -1px rgba(0,0,0,.06)}.focus\:shadow-lg:focus{-webkit-box-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -2px rgba(0,0,0,.05);box-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -2px rgba(0,0,0,.05)}.focus\:shadow-outline:focus{-webkit-box-shadow:0 0 0 3px rgba(118,169,250,.45);box-shadow:0 0 0 3px rgba(118,169,250,.45)}.focus\:shadow-outline-blue:focus{-webkit-box-shadow:0 0 0 3px rgba(164,202,254,.45);box-shadow:0 0 0 3px rgba(164,202,254,.45)}.focus\:shadow-outline-red:focus{-webkit-box-shadow:0 0 0 3px rgba(248,180,180,.45);box-shadow:0 0 0 3px rgba(248,180,180,.45)}.focus\:shadow-outline-indigo:focus{-webkit-box-shadow:0 0 0 3px rgba(180,198,252,.45);box-shadow:0 0 0 3px rgba(180,198,252,.45)}.table-fixed{table-layout:fixed}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.text-white{--text-opacity:1;color:#fff;color:rgba(255,255,255,var(--text-opacity))}.text-black{--text-opacity:1;color:#000;color:rgba(0,0,0,var(--text-opacity))}.text-gray-400{--text-opacity:1;color:#9fa6b2;color:rgba(159,166,178,var(--text-opacity))}.text-gray-500{--text-opacity:1;color:#6b7280;color:rgba(107,114,128,var(--text-opacity))}.text-gray-600{--text-opacity:1;color:#4b5563;color:rgba(75,85,99,var(--text-opacity))}.text-gray-700{--text-opacity:1;color:#374151;color:rgba(55,65,81,var(--text-opacity))}.text-gray-800{--text-opacity:1;color:#252f3f;color:rgba(37,47,63,var(--text-opacity))}.text-gray-900{--text-opacity:1;color:#161e2e;color:rgba(22,30,46,var(--text-opacity))}.text-red-600{--text-opacity:1;color:#e02424;color:rgba(224,36,36,var(--text-opacity))}.text-red-800{--text-opacity:1;color:#9b1c1c;color:rgba(155,28,28,var(--text-opacity))}.text-orange-400{--text-opacity:1;color:#ff8a4c;color:rgba(255,138,76,var(--text-opacity))}.text-orange-500{--text-opacity:1;color:#ff5a1f;color:rgba(255,90,31,var(--text-opacity))}.text-yellow-400{--text-opacity:1;color:#e3a008;color:rgba(227,160,8,var(--text-opacity))}.text-green-400{--text-opacity:1;color:#31c48d;color:rgba(49,196,141,var(--text-opacity))}.text-green-600{--text-opacity:1;color:#057a55;color:rgba(5,122,85,var(--text-opacity))}.text-green-800{--text-opacity:1;color:#03543f;color:rgba(3,84,63,var(--text-opacity))}.text-teal-400{--text-opacity:1;color:#16bdca;color:rgba(22,189,202,var(--text-opacity))}.text-teal-500{--text-opacity:1;color:#0694a2;color:rgba(6,148,162,var(--text-opacity))}.text-teal-700{--text-opacity:1;color:#036672;color:rgba(3,102,114,var(--text-opacity))}.text-blue-400{--text-opacity:1;color:#76a9fa;color:rgba(118,169,250,var(--text-opacity))}.text-blue-500{--text-opacity:1;color:#3f83f8;color:rgba(63,131,248,var(--text-opacity))}.text-blue-700{--text-opacity:1;color:#1a56db;color:rgba(26,86,219,var(--text-opacity))}.text-blue-800{--text-opacity:1;color:#1e429f;color:rgba(30,66,159,var(--text-opacity))}.text-indigo-100{--text-opacity:1;color:#e5edff;color:rgba(229,237,255,var(--text-opacity))}.text-indigo-400{--text-opacity:1;color:#8da2fb;color:rgba(141,162,251,var(--text-opacity))}.text-indigo-500{--text-opacity:1;color:#6875f5;color:rgba(104,117,245,var(--text-opacity))}.text-indigo-600{--text-opacity:1;color:#5850ec;color:rgba(88,80,236,var(--text-opacity))}.text-indigo-800{--text-opacity:1;color:#42389d;color:rgba(66,56,157,var(--text-opacity))}.hover\:text-white:hover{--text-opacity:1;color:#fff;color:rgba(255,255,255,var(--text-opacity))}.hover\:text-gray-800:hover{--text-opacity:1;color:#252f3f;color:rgba(37,47,63,var(--text-opacity))}.hover\:text-gray-900:hover{--text-opacity:1;color:#161e2e;color:rgba(22,30,46,var(--text-opacity))}.hover\:text-blue-700:hover{--text-opacity:1;color:#1a56db;color:rgba(26,86,219,var(--text-opacity))}.hover\:text-indigo-500:hover{--text-opacity:1;color:#6875f5;color:rgba(104,117,245,var(--text-opacity))}.focus\:text-gray-900:focus{--text-opacity:1;color:#161e2e;color:rgba(22,30,46,var(--text-opacity))}.active\:text-indigo-600:active{--text-opacity:1;color:#5850ec;color:rgba(88,80,236,var(--text-opacity))}.text-opacity-75{--text-opacity:0.75}.italic{font-style:italic}.not-italic{font-style:normal}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.underline{text-decoration:underline}.no-underline{text-decoration:none}.hover\:underline:hover{text-decoration:underline}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.select-none{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.align-middle{vertical-align:middle}.align-bottom{vertical-align:bottom}.whitespace-no-wrap{white-space:nowrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.w-0{width:0}.w-2{width:.5rem}.w-3{width:.75rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-7{width:1.75rem}.w-8{width:2rem}.w-12{width:3rem}.w-40{width:10rem}.w-56{width:14rem}.w-auto{width:auto}.w-1\/2{width:50%}.w-1\/3{width:33.333333%}.w-2\/3{width:66.666667%}.w-1\/4{width:25%}.w-2\/4{width:50%}.w-3\/4{width:75%}.w-1\/5{width:20%}.w-2\/5{width:40%}.w-3\/5{width:60%}.w-4\/5{width:80%}.w-3\/6{width:50%}.w-4\/6{width:66.666667%}.w-5\/6{width:83.333333%}.w-1\/12{width:8.333333%}.w-2\/12{width:16.666667%}.w-3\/12{width:25%}.w-4\/12{width:33.333333%}.w-9\/12{width:75%}.w-11\/12{width:91.666667%}.w-full{width:100%}.z-20{z-index:20}.z-40{z-index:40}.z-50{z-index:50}.gap-8{grid-gap:2rem;gap:2rem}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.transform{--transform-translate-x:0;--transform-translate-y:0;--transform-rotate:0;--transform-skew-x:0;--transform-skew-y:0;--transform-scale-x:1;--transform-scale-y:1;-webkit-transform:translateX(var(--transform-translate-x)) translateY(var(--transform-translate-y)) rotate(var(--transform-rotate)) skewX(var(--transform-skew-x)) skewY(var(--transform-skew-y)) scaleX(var(--transform-scale-x)) scaleY(var(--transform-scale-y));transform:translateX(var(--transform-translate-x)) translateY(var(--transform-translate-y)) rotate(var(--transform-rotate)) skewX(var(--transform-skew-x)) skewY(var(--transform-skew-y)) scaleX(var(--transform-scale-x)) scaleY(var(--transform-scale-y))}.origin-top-right{-webkit-transform-origin:top right;transform-origin:top right}.scale-95{--transform-scale-x:.95;--transform-scale-y:.95}.scale-100{--transform-scale-x:1;--transform-scale-y:1}.transition-all{-webkit-transition-property:all;transition-property:all}.transition{-webkit-transition-property:background-color,border-color,color,fill,stroke,opacity,-webkit-box-shadow,-webkit-transform;transition-property:background-color,border-color,color,fill,stroke,opacity,-webkit-box-shadow,-webkit-transform;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,-webkit-box-shadow,-webkit-transform}.ease-in{-webkit-transition-timing-function:cubic-bezier(.4,0,1,1);transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-out{-webkit-transition-timing-function:cubic-bezier(0,0,.2,1);transition-timing-function:cubic-bezier(0,0,.2,1)}.ease-in-out{-webkit-transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-75{-webkit-transition-duration:75ms;transition-duration:75ms}.duration-100{-webkit-transition-duration:.1s;transition-duration:.1s}.duration-150{-webkit-transition-duration:.15s;transition-duration:.15s}.duration-300{-webkit-transition-duration:.3s;transition-duration:.3s}@-webkit-keyframes spin{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes spin{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes ping{75%,to{-webkit-transform:scale(2);transform:scale(2);opacity:0}}@keyframes pulse{50%{opacity:.5}}@keyframes bounce{0%,to{-webkit-transform:translateY(-25%);transform:translateY(-25%);-webkit-animation-timing-function:cubic-bezier(.8,0,1,1);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{-webkit-transform:none;transform:none;-webkit-animation-timing-function:cubic-bezier(0,0,.2,1);animation-timing-function:cubic-bezier(0,0,.2,1)}}.animate-ping{-webkit-animation:ping 1s cubic-bezier(0,0,.2,1) infinite;animation:ping 1s cubic-bezier(0,0,.2,1) infinite}.animate-pulse{-webkit-animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite;animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@media (min-width:640px){.sm\:space-y-0>:not(template)~:not(template){--space-y-reverse:0;margin-top:calc(0px*(1 - var(--space-y-reverse)));margin-bottom:calc(0px*var(--space-y-reverse))}.sm\:space-y-3>:not(template)~:not(template){--space-y-reverse:0;margin-top:calc(0.75rem*(1 - var(--space-y-reverse)));margin-bottom:calc(0.75rem*var(--space-y-reverse))}.sm\:space-x-4>:not(template)~:not(template){--space-x-reverse:0;margin-right:calc(1rem*var(--space-x-reverse));margin-left:calc(1rem*(1 - var(--space-x-reverse)))}.sm\:rounded-md{border-radius:.375rem}.sm\:rounded-lg{border-radius:.5rem}.sm\:flex{display:-webkit-box;display:-ms-flexbox;display:flex}.sm\:grid{display:grid}.sm\:flex-row-reverse{-webkit-box-orient:horizontal;-webkit-box-direction:reverse;-ms-flex-direction:row-reverse;flex-direction:row-reverse}.sm\:items-start{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.sm\:items-center{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.sm\:justify-start{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.sm\:h-10{height:2.5rem}.sm\:text-sm{font-size:.875rem}.sm\:text-2xl{font-size:1.5rem}.sm\:text-3xl{font-size:1.875rem}.sm\:leading-5{line-height:1.25rem}.sm\:leading-9{line-height:2.25rem}.sm\:my-0{margin-top:0;margin-bottom:0}.sm\:mx-0{margin-left:0;margin-right:0}.sm\:my-7{margin-top:1.75rem;margin-bottom:1.75rem}.sm\:my-8{margin-top:2rem;margin-bottom:2rem}.sm\:my-12{margin-top:3rem;margin-bottom:3rem}.sm\:mt-0{margin-top:0}.sm\:ml-3{margin-left:.75rem}.sm\:ml-4{margin-left:1rem}.sm\:mt-5{margin-top:1.25rem}.sm\:max-w-lg{max-width:32rem}.sm\:p-6{padding:1.5rem}.sm\:px-0{padding-left:0;padding-right:0}.sm\:px-2{padding-left:.5rem;padding-right:.5rem}.sm\:px-4{padding-left:1rem;padding-right:1rem}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:pb-4{padding-bottom:1rem}.sm\:text-left{text-align:left}.sm\:align-middle{vertical-align:middle}.sm\:truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sm\:w-10{width:2.5rem}.sm\:w-32{width:8rem}.sm\:w-auto{width:auto}.sm\:w-1\/2{width:50%}.sm\:w-1\/3{width:33.333333%}.sm\:w-2\/3{width:66.666667%}.sm\:w-full{width:100%}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (min-width:768px){.md\:rounded-lg{border-radius:.5rem}.md\:flex{display:-webkit-box;display:-ms-flexbox;display:flex}.md\:items-start{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.md\:items-center{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.md\:justify-end{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.md\:justify-between{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.md\:text-base{font-size:1rem}.md\:mx-0{margin-left:0;margin-right:0}.md\:my-2{margin-top:.5rem;margin-bottom:.5rem}.md\:mx-auto{margin-left:auto;margin-right:auto}.md\:mt-0{margin-top:0}.md\:ml-2{margin-left:.5rem}.md\:ml-4{margin-left:1rem}.md\:ml-8{margin-left:2rem}.md\:-mr-8{margin-right:-2rem}.md\:max-w-xl{max-width:36rem}.md\:max-w-5xl{max-width:64rem}.md\:p-2{padding:.5rem}.md\:p-6{padding:1.5rem}.md\:py-0{padding-top:0;padding-bottom:0}.md\:px-1{padding-left:.25rem;padding-right:.25rem}.md\:px-2{padding-left:.5rem;padding-right:.5rem}.md\:py-5{padding-top:1.25rem;padding-bottom:1.25rem}.md\:px-8{padding-left:2rem;padding-right:2rem}.md\:pb-2{padding-bottom:.5rem}.md\:pr-4{padding-right:1rem}.md\:pt-6{padding-top:1.5rem}.md\:shadow-xl{-webkit-box-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 10px 10px -5px rgba(0,0,0,.04);box-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 10px 10px -5px rgba(0,0,0,.04)}.md\:w-3\/5{width:60%}}@media (min-width:1024px){.lg\:bg-transparent{background-color:transparent}.lg\:border-transparent{border-color:transparent}.lg\:rounded-full{border-radius:9999px}.lg\:block{display:block}.lg\:flex{display:-webkit-box;display:-ms-flexbox;display:flex}.lg\:inline-flex{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex}.lg\:grid{display:grid}.lg\:text-sm{font-size:.875rem}.lg\:text-lg{font-size:1.125rem}.lg\:my-0{margin-top:0;margin-bottom:0}.lg\:mx-5{margin-left:1.25rem;margin-right:1.25rem}.lg\:my-24{margin-top:6rem;margin-bottom:6rem}.lg\:mx-auto{margin-left:auto;margin-right:auto}.lg\:ml-16{margin-left:4rem}.lg\:-mr-16{margin-right:-4rem}.lg\:max-w-3xl{max-width:48rem}.lg\:p-6{padding:1.5rem}.lg\:p-8{padding:2rem}.lg\:px-3{padding-left:.75rem;padding-right:.75rem}.lg\:px-4{padding-left:1rem;padding-right:1rem}.lg\:px-8{padding-left:2rem;padding-right:2rem}.lg\:pt-2{padding-top:.5rem}.lg\:pb-2{padding-bottom:.5rem}.lg\:pl-2{padding-left:.5rem}.lg\:top-1\/2{top:50%}.lg\:shadow-none{-webkit-box-shadow:none;box-shadow:none}.lg\:w-40{width:10rem}.lg\:w-48{width:12rem}.lg\:w-1\/2{width:50%}.lg\:w-3\/5{width:60%}.lg\:w-3\/12{width:25%}.lg\:w-7\/12{width:58.333333%}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (min-width:1280px){.xl\:mx-7{margin-left:1.75rem;margin-right:1.75rem}.xl\:mr-0{margin-right:0}.xl\:ml-3{margin-left:.75rem}.xl\:ml-4{margin-left:1rem}.xl\:ml-20{margin-left:5rem}.xl\:max-w-4xl{max-width:56rem}.xl\:px-4{padding-left:1rem;padding-right:1rem}.xl\:pb-4{padding-bottom:1rem}.xl\:top-1\/3{top:33.333333%}.xl\:w-1\/4{width:25%}.xl\:w-2\/5{width:40%}.xl\:w-3\/5{width:60%}.xl\:w-2\/12{width:16.666667%}.xl\:w-7\/12{width:58.333333%}}
lite/admin/images/anne-email-suggestion.svg ADDED
@@ -0,0 +1 @@
 
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 476.15 1051.77"><defs><style>.a,.b,.c,.d,.e{fill:#fff}.b,.c,.d,.e{stroke:#000;stroke-linecap:round;stroke-miterlimit:10}.b{stroke-width:5px}.c{stroke-width:4px}.d{stroke-width:4.5px}.e{stroke-width:3.5px}</style></defs><path d="M466.16 41.59C459 39.87 394.68-5.47 387.78 2.91l-67.63 38.68a14 14 0 0 0-7 12.9v86a12 12 0 0 0 12 12h136a12 12 0 0 0 12-12v-86a14 14 0 0 0-6.99-12.9z"/><path d="M461.15 155.49h-136a15 15 0 0 1-15-15V53.64A16.91 16.91 0 0 1 318.66 39c94.46-52 54.57-52 149 0a16.9 16.9 0 0 1 8.5 14.65v86.85a15 15 0 0 1-15.01 14.99zm-68-151a7.88 7.88 0 0 0-3.88 1L321.63 44.2c-11.12.72-3.27 89.85-5.48 96.29a9 9 0 0 0 9 9h136a9 9 0 0 0 9-9V53.64a10.9 10.9 0 0 0-5.48-9.44L397 5.52a7.89 7.89 0 0 0-3.85-1.03z"/><path class="a" d="M451.15 122.49c-151.41-7.18-126.28 36.33-128-98a12 12 0 0 1 12-12c151.42 7.18 126.29-36.34 128 98a12 12 0 0 1-12 12z"/><path d="M451.15 125.49c-151-7.19-130.2 36.68-131-101a15 15 0 0 1 15-15c151 7.18 130.21-36.69 131 101a15 15 0 0 1-15 15zm-116-110a9 9 0 0 0-9 9v86a9 9 0 0 0 9 9h116a9 9 0 0 0 9-9v-86a9 9 0 0 0-9-9z"/><path d="M443.15 45.49h-100a3 3 0 0 1 0-6h100c3.85-.06 3.92 6.06 0 6zm0 15h-100a3 3 0 0 1 0-6h100c3.85-.06 3.92 6.06 0 6zm0 15h-100a3 3 0 0 1 0-6h100c3.85-.06 3.92 6.06 0 6zm0 15h-100a3 3 0 0 1 0-6h100c3.85-.06 3.92 6.06 0 6z"/><path class="a" d="M466.16 70c-7.29 1.78-71.37 47-78.38 38.68L320.15 70a13.87 13.87 0 0 1-7-12v82.54a12 12 0 0 0 12 12c175.14-7.31 145.9 36.22 148-94.54a13.88 13.88 0 0 1-6.99 12z"/><path d="M461.15 155.49h-136a15 15 0 0 1-15-15V58c0-3.88 6-3.91 6 0a10.93 10.93 0 0 0 5.48 9.45c4.19.68 72.38 45.87 75.41 38.67l67.63-38.72a10.93 10.93 0 0 0 5.48-9.4c-.1-3.88 6.09-3.91 6 0v82.54a15 15 0 0 1-15 14.95zm-145-84.64v69.64a9 9 0 0 0 9 9h136a9 9 0 0 0 9-9V70.85c-99.53 54.85-54.6 54.71-154 0z"/><path class="a" d="M337.15 137.88c67.91-51.21 44.24-51 112 0"/><path d="M449.15 140.88C379.41 93.23 410 86.53 339 140.26c-3 2.41-6.8-2.43-3.65-4.76l46.89-36a18 18 0 0 1 21.86 0l46.9 36a3 3 0 0 1-1.85 5.38zM193 67c74.15-1.67 96.94 82 79 140.9-5.59 20.41-13.13 39.66-21.59 58.83-19.31 49.54 3.9 63.05 34 98.6 14.82 17.18 10.66 49.78-8.29 61.39C260 437.9 232 443.79 214.94 446c-9.19 13.26-25.26 20.61-37.94 30.79-16 12.23-30.35 25.64-53.23 26.94-49.69 3.81-90.39-47.6-85-94.86-40.5-30.25-53.64-101.43-18.21-140.73 13-15 30.31-26.11 44.26-40.47 8.43-8.25 16-19 22.39-29.68 9.06-12.29 7.53-28 11-42.22C109.59 110.55 138.8 68.62 193 67zM96.54 926.42c27.9-.65 28 40.9 27.69 56.65.16 13.52 1.67 68.7-28.09 68.7s-29.07-45.07-29.29-69.16c-.18-21.96.27-56.4 29.69-56.19z"/><path class="b" d="M94.84 880.38c22.54 1.59 21.18 14.91 20.91 34.48-.57 15.68.3 34.57.35 48.8.17 11.11 1.35 44.28-20.17 44.36s-21.09-24.87-21.33-44.6c-.18-17.22-.95-35.1-.28-51.62.48-15.8-.44-32.8 20.52-31.42z"/><path d="M195.82 929.6c26-3.17 30.92 26.19 37.29 44.3 5.92 19.26 21.9 57.38-3.14 69.67-29.75 12-44.83-32.31-51.68-52.71-7.17-20.95-13.54-56.37 17.53-61.26z"/><path class="b" d="M186.24 886.63c31.17-6.74 25.29 36.29 30.89 55.52 2.33 16.6 6.81 25.25 8.33 40.8.58 9.13-1.44 18.2-11.48 22-22.62 8.93-31.07-22.79-35.38-43.16-2.85-14.06-5-28.49-7-42.18-2.16-14.72-6.19-30.32 14.64-32.98z"/><path d="M168.6 516.47c46.34-3.85 52.22 27.2 51.21 58.57-.19 30-9.9 94.76-7.12 132.08 9.36 66.58 16.17 141.81 1.92 205.66-3.26 15.19-46.7 11.21-48-1.9.11-5.83-1.08-24.5-2.95-44.61-7.46-60.17-7.3-108.27-17.59-165.38-4.72-35.16-10.25-92.73-13.92-118.4-5.01-34.77-5.55-63.24 36.45-66.02z"/><path d="M108.34 516.71c-53.52-5.7-52.18 33.88-53 56.3-.71 25 8.87 107.59 8.58 133.45.15 59.12-4.45 146.45 7.17 199.72 4.37 16.13 47.91 11.29 48-.36 3.4-41.32 12.28-128.51 8.9-175.57.53-22.51 2.6-44.33 5-69.15 3-30.18 6.94-62 9.8-78.81 5.76-33.69 7.4-61.15-34.45-65.58z"/><path class="c" d="M205.64 259.93c37.09 27.85 83 75.63 101.12 124.42 8.62 19.36.3 78.11-29.44 56.78-8.78-7.3-14.34-14.16-15.93-25.73-5.06-11.84-15.42-20.65-23.34-30.7-16.92-19.63-36.15-41.09-55.29-55.71"/><path class="a" d="M229.43 523c11.85-6.72 22.74-19.35 31.07-30.19 3.74-6.66 5.75-14.77 9.23-18.82 10.6-14.46 46.49-49.1 19.51-63.08-25.91-6.58-34.41 43.93-57.82 48.87 14.86 12.05-8.73 29-17.78 36.56 3 8.59 8.91 20.05 15.79 26.66z"/><path d="M238.87 512.94c7.58-7.41 15.79-14.87 21.14-24.21 1.93-5.25 3.92-10.59 7.11-15.27 9.42-13.13 22.22-24.32 27.51-40 4.84-11-1.15-24.31-14.43-20.48-19.1 10.58-24 38-44.54 48 10 14.56-9.56 27.93-19.28 36.44a92 92 0 0 0 9.09 18.1c1.09 2 6.31 8 4.36 6.39-5.81-4.83-13.2-17.23-16.28-25.57 9.11-8.42 32.78-26.22 14.7-37.32 18.42-4.72 25.43-25.73 36.63-39.23 22.08-28.22 54.47-2.81 23 34.93-9 11.52-20.39 21.43-24.81 35.7-8.24 12.21-22.13 26.05-34.44 31.26-.38 0-.47 0-.25-.22 3.21-2.09 5.11-3.59 10.49-8.52z"/><path class="a" d="M242.9 508.16c-4.88 6.58-12.64 13.42-19.69 16.61-3.62 2.12-15.37 4.31-13-2.76 7.05-7.63 18.4-11 24.73-19.82"/><path d="M241.19 513.39c-7.11 7.4-17.06 16.34-28.28 14.36-2.54-.65-5.81-3.6-4.46-6.38 4.32-6.28 12.33-8.69 17.94-13.67 2.53-1.41 5.47-5.92 7.4-6.28-.31 1.64-1.66 3.46-3.11 5.28-3.89 4.76-9.09 8.41-14.08 12-13.82 10 3.07 7.2 9.21 3.12 4.69-1.14 25.41-20.19 15.38-8.43z"/><path class="a" d="M240.88 506a79.09 79.09 0 0 1-14.39 11.44c-8.93 5-17.45 9.43-27.21 9.44-4.28-1-2.4-5.24.65-7 10.76-6.9 24.21-11.06 33.48-20.52"/><path d="M237.9 511.51c-9.42 8-25.31 17.23-39 16.79-6.66-2-3.22-8.87 1.42-11 8.46-4.92 21.45-10.43 27.94-16.07 5.87-5.29 4.72-2.05-.86 3.13a70 70 0 0 1-13.23 9.33c-8.72 3.94-28.11 16.61-4 9.58 10.35-3.15 20.47-8.81 29.17-14.77 5.06-3.5 1.29.79-1.44 3.01z"/><path class="a" d="M237.89 501.15c-12.6 11.26-28.66 17.63-44.37 22.8-12.8 4.16-10.88-5.56-1.55-9.51 12.84-6.45 27.66-10.57 38.71-20.24"/><path d="M233.92 507c-5.27 4.38-53.23 31-51.33 14.29 2.76-9.13 17.34-11.74 25-15.81 8.51-2.35 33.43-21.41 15.9-5.94-10.43 9-26.65 11.86-36.87 21.45-2.35 4.24 8.15.72 9.84.19a190 190 0 0 0 42.28-18.86c.21-.07.36-.1.21.16-1.19 1.57-2.42 2.44-5.03 4.52z"/><path class="a" d="M234.73 495.07c-8.59 9.54-21.52 16.14-33.46 19.23-5.42 1.23-12.18 3.77-17.43 1.64-3.52-2.44 0-6.5 3-7.61 13.51-5.54 29.83-8.36 40.24-19.71"/><path d="M231.31 501.14c-12.53 10.33-29.23 17.1-46 17.56-7.23-.92-4.87-10.53.68-12.24 11-4.38 27.7-8.3 35.76-15.72 2.6-2.24 6-5.08 2.82-.72-7.73 10.37-24.52 14.87-36.93 20.07-9.19 4.84 1.95 5.17 6.21 4.11a101.92 101.92 0 0 0 19.35-5.37c6.93-2.27 17.9-9.47 22.38-12.69.19-.1.35-.14.21.14-.97 1.72-2.03 2.72-4.48 4.86z"/><path class="a" d="M235.59 459.82c-7.66-.39-16.13 1.37-23.55 3.14-17.25 4.42-14.07 17 3.84 10.16 8.06-.92 15.41 6 23.66 5.09 10.33-1.56 7-10.56 1-15.47-1.41-1.49-2.82-3.08-4.95-2.92z"/><path class="a" d="M233 476.32a39.61 39.61 0 0 0-25.06-1c-8.47 1.78-9.52-7.45-2.78-11 8.85-4.95 20.91-3.7 30.74-3.36"/><path d="M228.56 476.89c-7.16-3.08-15.73 0-23.31.15a6.93 6.93 0 0 1-3.78-12.28c6.15-6 16.72-5.93 24.45-6 16.21.32 8.42 1.95-1.87 2.51-5.31.27-26.54 3.72-20.41 12.31 10.81-.42 19.41-2.84 29.16 4-.38.7-2.44-.39-4.24-.69z"/><path class="d" d="M160.59 233.3c101.67 24.8 73.49 178.11 70.22 254.44-3.47 33.27-8.51 58.73-16.43 64.79-19.74 14.28-50.69 17.45-76.82 17.52-26.72-.24-58.19-6-77.27-22.8-8-14.69-5.83-40.43-6.66-62.56 1.89-52.27-1.77-110.38 7.66-162.57 10.19-49.5 44.2-101.33 99.3-88.82z"/><path class="c" d="M68.71 301.83c-11.56 30.22-18.42 67-14.79 101.14 2.74 38.83 36.71 68.1 74.45 50 18.08-8.54 33.54-23 44.47-39.19 8.24-10.61 11.5-20.41-.6-29.74-11.33-8.35-17.72-9.83-28.28-2.33-7.81 4.34-19.39 15-28.32 8.19-2.45-3-1.47-8.93-.28-11.44a168 168 0 0 1 6.11-29.46"/><path class="a" d="M233.92 357c-7.72 5-18.95 14.06-28.17 14.2-9.51 8.6-14.45 20.64-26.2 29.53-13.75 12.27-33.9-5.42-24.64-20.73 8.94-15.29 23.84-25.92 29.83-42.41 8.22 12.81 23.6 5.08 32-1.43A184.86 184.86 0 0 1 233.92 357z"/><path d="M227.23 364.45c-5.78 3.54-12.29 8.78-19.38 8.17-12.63 10.88-19.88 33-39 34.46-7.5-.13-14.66-6.46-17.38-13.29-5-16.19 11.66-27.07 19.83-38.58 3.27-4.82 6.93-10.12 9.89-14.93 1.27-2.36 1.68-5.18 2.5-7.72 7.78 15.88 22 9.21 32.82.73 5.49 5.61 16.73 19.17 17.63 22.44a190.34 190.34 0 0 0-17.35-19.5c-8.15 7.27-22.53 14.49-31.41 4-1.19 4.52-4.67 8-6.91 12.14-6.25 12.06-19.2 20.3-23.25 33.67-2 6.54 2.47 13.14 8.34 15.86 17.63 5.46 29.47-22.28 41.14-31.47v.06c7.64 1.81 45.9-22.42 22.53-6.04z"/><path class="a" d="M224.53 351.27c7.49-4.22 10.13-13.88 16.36-18.81 6.6-.78.85 12-.34 15.3a27.28 27.28 0 0 1-10.8 12.05"/><path d="M225.88 347.84c5.58-4.52 8.26-11.74 13.48-16.59 9.94-4.33 2.78 17.94.49 21.17-2.08 3.22-6.06 8.56-9.3 8.51 4.77-5.44 10.58-14.69 12.22-22.84 2.15-9.07-4.83-.81-6.63 2.21-2.3 3.23-5.8 7-8.23 8.36-2.55 1.72-6.4 2.34-2.03-.82z"/><path class="a" d="M220.78 347.72c9.77-6.09 14.46-19.42 22.57-26.22 12-4.74-1.91 15.47-3.3 19.22a42.45 42.45 0 0 1-13.77 15.35"/><path d="M222.87 343.58c6.7-5 12.28-17.72 19.54-23.66 4.89-3.76 9.1 2.42 6.22 6.89-4 7.13-7 15.06-11.55 21.7-2.5 3-6.9 8.55-10 8.65 1.07-1.67 5.75-6.65 7.65-9.72 4.26-7.23 10-16.28 12.19-24.77-2.88-1.31-5.66 3.38-7.44 5.16-5.18 6.76-11.51 16.85-19.43 18.69-.12-1.05 1.5-1.52 2.82-2.94z"/><path class="a" d="M216.61 343.85c10.89-8.66 15.56-22.76 25.33-32.28 6.12-6.33 13.64-2.31 6.77 5.56-9 11.36-14.76 25.64-26.23 34.79"/><path d="M219 339c8.39-5.81 22.16-43.44 34.45-29.13 1 6.37-6.08 10.6-8.8 15.7-4.27 6.07-8.19 13.81-12.52 19.24-2.77 3.28-5.54 6.85-8.64 8.4.66-2.23 6.53-8.55 8.67-12.58 3.88-6.08 7-12.42 11.6-19.28 1.86-3.37 5.6-6.83 5.72-10.81-4.28-1.23-8.07 4.45-10.75 7.18-6.91 8.37-13.39 21.17-22.82 24.94-.14-1.16 1.59-1.81 3.09-3.66z"/><path class="a" d="M210.93 340.43C222.4 332.77 227.35 319 234.6 308c4.3-7.22 12.66-5.26 8.16 3.79-6.33 13.37-13.45 28.36-26.11 36.82"/><path d="M213.52 335.86c9.37-8 13.57-21 20.85-30.76 2.26-3.21 7.85-4.56 10.82-1.36 4.18 6.59-9.05 22.88-11.93 29.74-2.17 6.47-24.94 26.21-10.52 10.22 2.84-1.92 25.52-39.58 17.32-38.21-10.8 9-15.56 29.57-29.83 33.76-.06-1.17 1.71-1.67 3.29-3.39z"/><path class="a" d="M184.71 341.74c-.75-7.58 5.76-39.41 17.14-30.54 1.19 1.85.64 3.93-.12 5.81-6.37 8.84-.88 19.29.26 29-.25 11.27-9.68 6.2-14.32.64-1.48-1.42-3.09-2.79-2.96-4.91z"/><path class="a" d="M185.84 342.09c-.51-9.69-.27-22.12 6-29.76 4.68-6 13.23-2.89 10.07 4.88a32.34 32.34 0 0 0-1.66 23.94"/><path d="M183.9 338.21c-.15-9.76.44-24.75 10.56-30.28 4.79-2.82 10.29 2.17 9.6 7.26-1.63 7.17-5.39 14.8-3 22 2 10.41-3.25-4.5-3.07-7.86-1.77-5.47 6.56-17.55 1.12-18.44-13.88-1.69-13.7 42.63-15.21 27.32z"/><path class="e" d="M160.54 235.2c34.7 8.2 24.13 42.85-7.49 38.87-32.61-4.63-28.63-50.43 7.49-38.87z"/><path class="e" d="M172.54 197c17.06 5.12 10.54 21.94 7.6 34.65-2.7 16.29-4.25 35.79-26.15 30.49-18.31-2.34-15.56-22-9.93-34.52 5.47-12.62 9.2-37.46 28.48-30.62z"/><path class="a" d="M232.89 177.15c20.74-17.29 20.89 11 10.84 24-3.92 5.56-9.36 12.16-15.9 11.72-6.63-1-7.21-6.24-6.27-10.75"/><path d="M235.94 171.12c31.11-16.69 14.49 46.42-8.61 44.74-6.67-.17-11.13-9-7.71-14.18.69 2.72 1 7.55 4.35 9 12.43 6.51 33.3-31.82 19.87-37.67-4.18-1.6-18.75 6.37-7.9-1.89z"/><path d="M241.54 189.26c1.82-8.14-5.57-3.14-7.75.62-1.82 1.91-1.83 5-3.41 5.73-3.33-8 14.69-25.06 13.71-8.84-.19 1.85-3.28 6.55-2.55 2.49z"/><path class="a" d="M135.8 151.37c-5-9.82-19.31-11.55-20.22 3.24-.36 6.95.46 16.91 6.24 21 5.51 3.15 9 .28 10.87-3.55"/><path d="M131.49 149.63c-19.31-18.9-15.78 36.69-1.19 21.91 3-.62-2.11 10.09-10.42 4.42-7.7-7.18-10.06-22.84-2.81-31.07 5.67-5.35 15.16-1.51 17 5.44.87 3.38-1.26 1.02-2.58-.7z"/><path d="M128.27 161.37c.64-2.9-.38-9.38-4.33-9.61-1.75.49-3.16 5.74-3.25.82a3.83 3.83 0 0 1 2.84-3.42c4.43-.84 8.12 4.19 7.69 8 .5 2.04-3.15 7.94-2.95 4.21z"/><path class="e" d="M186.19 77c60.16-3.07 70.74 76.13 44.79 117-26.93 54.23-101.07 59.12-103.33-11.87-2.11-41.05 8.51-100.32 58.54-105.13z"/><path d="M248.39 178.26c6.54-24 8.13-52.28-.59-76.23-9.47-22.63-32-41.42-56.93-37.76-45.9 2.81-63.34 40.25-70.1 80.94 36.46 8.4 82.15-5 90.73-47.08 5.44 23.97 8.38 70.79 36.89 80.13z"/><path d="M200.38 186.59c9.92 3.36 16.52-17.06 5.82-20.15-9.93-2.57-15.7 17.07-5.82 20.15zm-39.6-12.89c10 3.38 15.6-14.84 5-17.42-10.05-2.61-14.78 14.3-5 17.42zm58.9-18.56l-20-3.91c-4.32-.82 3.61-3.53 11-2.27s13.32 7.04 9 6.18z"/><path d="M214.28 176.44c-2.47-6.53-15.1-11.67-19.2-4.91-1.19-12.22 20.66-6.77 20.65 3.27.36 1.49-1.04 4.2-1.45 1.64zM172.92 164c-1.94-7-14.75-7-19.69-4.05 1.32-8.62 22.05-6.3 21.39 3.3-.13 1.61-2.07 3.19-1.7.75zm1.73-17.47l-20-3.92c-4.32-.83 3.45-2.74 10.88-1.48s13.47 6.23 9.12 5.4zm18.45 10.96c-5.83 10.67-4.08 23-5.24 34.66-2 6.39-10 9.8-15.88 7.15-4.89-2.34 1.13-1.1 3-1.22 4 .06 8.44-2.63 9.71-6.65.57-3.1 0-6 0-9.4-2.29-12.74 12.92-36.35 8.41-24.54zm-12.68 55.16c-7.59 7.06-22.61.54-22-9.39 11.81 16.04 27.51 3.94 22 9.39z"/></svg>
lite/admin/images/anne-welcome.svg ADDED
@@ -0,0 +1 @@
 
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 401.92 998.07"><defs><style>.a,.b,.c,.d,.e{fill:#fff}.a,.b,.d,.e{stroke:#000;stroke-linecap:round;stroke-miterlimit:10}.a{stroke-width:5px}.b{stroke-width:4px}.d{stroke-width:4.5px}.e{stroke-width:3.5px}</style></defs><path d="M166.06 10.32C101.8-26.38 43.45 42 37.64 103.21c-4.19 36 1.31 73 13.9 106.34 0-.05-.13-.45-.15-.51C79.8 275.16-5 274.36.23 326.21c4.48 33.64 46.54 45.22 72.3 52.12 7.26 14.73 21.93 25.61 34.33 36.6 15.29 13 30.31 25.29 52.51 28.3 48.29 8.65 93.57-37.91 92.4-83.48 42.34-26.1 60.13-90.26 36.12-136-14.75-27.49-68.66-72.19-71-75.27-5.11-8.29.65-16.48.82-25.7 2.22-43.35-7.28-86.38-51.65-112.46zm8.24 866.01c-25.53 5.07-20.69 42-17.69 57.18 1.9 12.68 8.32 64.79 37.71 60.33s22.33-46.83 18.92-69.59c-2.97-21.33-10.05-55.5-38.94-47.92z"/><path class="a" d="M165.63 833.32c-21 6.84-17.39 18.4-12.54 36.84 4.29 14.86 6.61 29.23 8.64 43.92 1.56 10.39 5.25 41.73 26.51 38.55s17.25-26.63 14.44-45.3a341.39 341.39 0 0 0-10-49.78c-4.01-14.65-7.06-30.67-27.05-24.23z"/><path d="M91.43 873.77c-26.39-2-31.16 36.84-33 52.41-.93 6.57-3.71 23.31-2.68 39s5.93 30.28 20.61 32.58c29.39 4.6 35.62-40.23 39-64.36 3.28-21.51 6.64-58.52-23.93-59.63z"/><path class="a" d="M96.11 828c-31.88-2.46-20.5 39.2-24.76 60.52.31 18.71-16.35 57.42 11.65 66.09 30.7 2.72 26-47.29 30.3-69.57C112 865.88 125.33 828 96.11 828z"/><path d="M84.5 483.37c-53.4-6.78-52.82 31.33-53.94 52.83-1.15 24.31 7.5 103.66 7.62 128.88-.35 18.48 1.13 38.49 5.12 56.67 7.62 39 15 75.68 22.13 116.06.88 5.25 1.73 10.42 3 15.41 5.87 12.64 29.09 12.45 40.65 8.67s6.67-15.41 8.64-24.78c1.89-24.6.13-63.91-2.32-82.82-2.19-23.74-11.5-48.44-12.64-72.62.68-39.51 9.23-102.52 15.15-134.94 6.16-32.02 8.34-58.11-33.41-63.36z"/><path d="M147.12 480.78c44.17 13.84 38.44 44.22 26.13 73-10.45 27-45.49 88.05-51.2 122.57-.55 3.59-1.13 7.24-.33 10.81 5.25 22 17 45.64 26.51 65.33 9.68 20.14 31.14 66.6 36.87 86.47 4.83 14.32-33.95 34.28-42 23.33-21.36-33.59-59.21-84.83-72.87-124.42-20.45-46.11-12.86-80.59-1.45-128.23 7.35-31.37 16-63.36 20-80.65 8.04-34.47 18.36-61.39 58.34-48.21z"/><path class="b" d="M177.81 198.72c28.28 21.48 55.54 50.86 77.94 80.63 2.88 3.28 5 7.6 7.37 11 6 2.11 10.87-6.23 15.31-8.89 10.34-9.89 18.44-15.78 31.79-5.88 13.33 10.18 14.41 17.87 6.5 32.16-13.72 26.6-46.4 68.82-80.41 50.26-10.88-7-17.94-18.68-25-29.83a330.11 330.11 0 0 0-51-54.5"/><path class="c" d="M382.75 227.24C357.09 259.15 350.24 242 325.63 283c-6.48 9.65-23.75 9-28.92-1.21-4.09-10.18 2.47-21.4 8.32-29.67 8.14-11.92 22-22.49 25.62-34.68 4.06-11.34 22.67-11.42 26-17.21 8.93 5.13 22.63 15.05 26.1 27.01z"/><path d="M373.81 240.79c-7.06 8-17.53 11.16-25.81 17.42-13.25 9.28-15.91 31.11-33.69 33.66-7.48.55-16.47-2-19.91-9.27-8-28.08 26.62-43.9 34.43-67.21 5-11.78 21.09-9.63 26.91-18.18 11.2 6.52 24.32 15.21 28.47 27.8.71 2.41.39 2.23-.73 0-5.32-10.63-16-18.35-26.66-24.13-6.64 7.43-20.92 6.47-24.7 17.17-3.69 18.52-52.14 50.88-27.41 68.29 3.58 1.59 7.83 2.35 11.59 1 11.72-5.45 15.36-19.78 24.81-28 9.33-9.43 23.68-11.83 32.66-21.44 16.37-15.96 10.23-7.56.04 2.89z"/><path class="c" d="M353.93 203.72c8-10 11.07-23.63 6.24-35.56.58-3.86 6.07-.06 7.72 1.55 10.9 11.48 2.18 29.51-6.1 40.18"/><path d="M355.19 198.33c6.25-8.92 6.24-20.72 3.52-31.46 3-3 8.39.35 10.81 2.63 10.1 10 4 26.74-2.68 36.7-11.26 15.81 8.62-15.38 4.36-26.76-.9-4.81-4.06-10.86-9.11-12-.44 3.58 2.47 7.75 2 11.75 1.96 11.59-17.27 32.63-8.9 19.14z"/><path class="c" d="M360.08 209.58c9.88-11.66 16.3-28 11.26-42.29 2.63-4 8.62 1.28 10.2 4.33 7.32 15.14-4.36 32.51-13.67 44.23"/><path d="M362.18 203.46c7.67-10.59 11.11-23.64 7.55-36.47 1.77-3.77 7.42-2 9.93 0 11 9.07 5.11 26.42-.6 36.29-3 4.69-6.82 11.75-10 13.29 3.53-6.73 11.51-19.5 12.7-28.95 1.42-7.31.2-18.35-8.19-20.71-.67.09-.52 1-.38 1.63 9.81 20.96-23.03 51.38-11.01 34.92z"/><path class="c" d="M365.4 215.62c13.55-10.69 17.9-28 17.18-43.7 4-5.36 9.4 3.3 9.88 7.53 3.16 16.63-8.21 33.15-20.31 43.54"/><path d="M368.23 210.11c11.22-11.85 11.89-22.71 12.7-38.77 3.18-4.85 9.85-1.85 11.66 2.64 6.07 12.6.07 27.29-7.23 37.66-3.62 4.54-8.54 11.22-12.13 12.24 5.12-6.31 14.53-18.53 16.71-28.48 5.32-13.15-5.54-31.48-5.87-20.32 4.34 27.78-29.49 48.41-15.84 35.03z"/><path class="c" d="M371.35 224.53c11.22-9.87 17-26.78 19.16-40.12 6.15-13.36 11.23 5.72 8.59 12.43-2.57 13.5-10.92 25.54-20.75 34.84"/><path d="M373.7 219.18c8.14-8 12.86-24.77 15.48-36.73 8.23-11.39 14.29 3.09 12.38 11.47-.84 12.61-10.73 27.9-17.23 34.54-14.22 14.86 9.66-14.23 10.76-22.82 2.25-7.25 4.78-16.67.32-23.56-1.21-1.54-2.12.32-2.59 1.48-2.52 14.06-10.21 33.91-22.34 39.9-.23-1.16 1.75-2.18 3.22-4.28z"/><path class="c" d="M348.36 222.66c-1.09-5.82-3.89-11.12-4.57-16.82-1.46-6.23 6.55-12 1.47-17.19-11.83-5.81-17.26 27.66-15.51 35.35 1.39 10.27 21.91 11.12 18.61-1.34z"/><path class="c" d="M330.53 219.27c0-8.33.89-20.74 5.45-27.34 3.29-6.13 12-5.51 11.36 2.24-3.48 9.46-3.09 18.34-.1 28.75"/><path d="M328.75 214c.64-8.87 1.31-22 10.09-27.38 4.48-2.56 9.7 2 10.16 6.57a11.32 11.32 0 0 1-.41 4.31c-3 6.71-2.23 14.37-.38 21.15 2.75 13.82-8.46-14.56-3.47-21.09 4.22-13.33-7.39-8.5-10 .07-2.49 3.06-6.26 32.12-5.99 16.37z"/><path class="d" d="M132.47 172c86.46 19.07 77.15 147.64 72.76 215.35-3.37 40.09-4.87 82.79-17.14 117.79-11.68 23.94-57 25.61-82.59 26.27-24-.17-72.92-8.33-80-33-5.16-35.17-1.55-76.52-.55-115.23 2.88-47.31-.25-92.9 13.73-138 12.61-41.71 45.87-84.55 93.79-73.18z"/><path class="b" d="M40.63 240.37c-11.56 30.22-18.43 67-14.79 101.14 2.73 38.82 36.7 68.09 74.44 50 18.08-8.53 33.54-23 44.47-39.18 8.25-10.61 11.51-20.41-.6-29.74-11.33-8.35-17.71-9.84-28.27-2.34-7.82 4.35-19.4 15-28.32 8.2-2.45-3-1.47-8.94-.28-11.44a167.08 167.08 0 0 1 6.1-29.42"/><path class="c" d="M205.83 295.5c-7.72 5-19 14.07-28.16 14.21-9.52 8.6-14.46 20.64-26.2 29.52-13.75 12.27-33.9-5.38-24.65-20.66 8.94-15.28 23.85-25.91 29.84-42.4 8.21 12.81 23.59 5.07 32-1.43a182.54 182.54 0 0 1 17.17 20.76z"/><path d="M199.15 303c-5.78 3.54-12.29 8.78-19.39 8.17-12.62 10.88-19.88 33-39 34.46-7.5-.14-14.67-6.46-17.39-13.29-5-16.19 11.66-27.08 19.84-38.58 3.26-4.82 6.92-10.13 9.89-14.94 1.26-2.35 1.67-5.18 2.5-7.71 7.78 15.88 22 9.21 32.82.72 5.48 5.62 16.72 19.18 17.63 22.45a188.54 188.54 0 0 0-17.36-19.5c-8.15 7.26-22.53 14.49-31.41 4-1.18 4.52-4.66 8-6.91 12.14-6.25 12.05-19.19 20.3-23.25 33.67-2 6.53 2.47 13.14 8.34 15.86 17.64 5.45 29.47-22.28 41.14-31.48v.07c7.66 1.79 45.92-22.43 22.55-6.04z"/><path class="c" d="M196.44 289.81c7.49-4.22 10.13-13.88 16.37-18.82 6.6-.77.85 12-.35 15.3a27.11 27.11 0 0 1-10.8 12"/><path d="M197.8 286.38c5.57-4.52 8.26-11.74 13.48-16.59 9.93-4.33 2.78 17.94.48 21.17-2.07 3.22-6.06 8.55-9.29 8.51 4.76-5.44 10.57-14.69 12.21-22.84 2.15-9.07-4.82-.81-6.62 2.21-2.3 3.23-5.81 7-8.24 8.36-2.55 1.72-6.4 2.35-2.02-.82z"/><path class="c" d="M192.69 286.25c9.78-6.08 14.46-19.41 22.57-26.22 12-4.73-1.91 15.47-3.29 19.23a42.56 42.56 0 0 1-13.78 15.35"/><path d="M194.78 282.11c6.7-5 12.29-17.72 19.54-23.65 6.72-4.24 8.9 4.22 5.27 8.85-4.09 6.93-6.64 14.94-11.7 21.15-2.35 2.51-6.29 7.37-8.84 7.23 1.06-1.66 5.75-6.65 7.65-9.71 4.26-7.25 9.94-16.22 12.18-24.77-2.87-1.31-5.66 3.38-7.44 5.16-5.17 6.76-11.51 16.84-19.43 18.69-.17-1.06 1.45-1.49 2.77-2.95z"/><path class="c" d="M188.53 282.39c10.89-8.66 15.56-22.76 25.33-32.28 6.12-6.34 13.63-2.32 6.76 5.56-9 11.35-14.76 25.63-26.22 34.79"/><path d="M190.88 277.56c8.39-5.82 22.17-43.45 34.45-29.13 1 6.37-6.08 10.59-8.8 15.7-4.27 6.06-8.18 13.81-12.52 19.23-2.77 3.29-5.53 6.86-8.64 8.4.66-2.22 6.54-8.54 8.67-12.58 3.88-6.07 7-12.41 11.6-19.28 1.87-3.36 5.61-6.82 5.73-10.8-4.28-1.24-8.08 4.45-10.75 7.18-6.91 8.37-13.4 21.16-22.82 24.94-.12-1.22 1.61-1.83 3.08-3.66z"/><path class="c" d="M182.84 279c11.47-7.67 16.43-21.47 23.67-32.4 4.31-7.22 12.66-5.26 8.16 3.79-6.32 13.36-13.45 28.35-26.11 36.82"/><path d="M185.43 274.39c9.38-7.95 13.58-21 20.85-30.76 2.26-3.2 7.86-4.56 10.82-1.35 4.18 6.59-9 22.88-11.93 29.74-2.16 6.47-24.93 26.21-10.51 10.22 2.83-1.92 25.51-39.58 17.31-38.21-10.79 9-15.55 29.56-29.83 33.75-.05-1.16 1.72-1.66 3.29-3.39z"/><path class="c" d="M156.62 280.28c-.74-7.58 5.77-39.41 17.15-30.54 1.19 1.84.63 3.93-.13 5.81-6.36 8.83-.87 19.28.26 29-.24 11.26-9.68 6.19-14.32.64-1.47-1.42-3.08-2.79-2.96-4.91z"/><path class="c" d="M157.75 280.62c-.51-9.68-.26-22.11 6.05-29.76 4.68-6 13.24-2.88 10.08 4.89a32.27 32.27 0 0 0-1.67 23.93"/><path d="M155.82 276.75c-.15-9.76.43-24.76 10.55-30.28 4.79-2.82 10.3 2.17 9.61 7.26-1.63 7.16-5.39 14.8-3 22 2 10.42-3.24-4.49-3.06-7.85-1.51-5.82 4.72-14 2.49-17.71-14.75-6.92-15.32 43.32-16.59 26.58z"/><path class="e" d="M126.1 174.43c-23.73-.89-34.15 23.38-14.65 35.68 32.94 17.23 67.06-37.21 14.65-35.68z"/><path class="e" d="M127.74 135.67c-17.64-2.32-18.52 14.11-19.5 26.49-.54 10.5-2.55 27.86 3 34.15 6.9 11 35.32 4 33.64-10.44.87-8.62-2.07-17.2-1.85-25.91-.36-10.96-.49-22.6-15.29-24.29z"/><path class="c" d="M83.24 91c-9.81-22-23.35-3.08-20.63 15.57-.23 13.23 12.47 30.2 19.09 11.43"/><path d="M83.19 84.63c-3.1-6.22-11.33-9.81-16.73-3.73-9.91 11.61-9.69 39.35 3.76 48 6.44 3 14.1-4.2 13.4-10.35-1.41 1.5-3.11 4.84-5.44 6-16.06 7-18.22-44-2.9-41.76 4.32.32 13.9 13.42 7.91 1.84z"/><path d="M70 97.16c2.31-7.73 6.32-.2 6.56 4.1.76 2.5-.64 5.23.44 6.57 7.15-7.27-2.74-28-8.22-13.27-.5 1.9.12 6.06 1.22 2.6z"/><path class="c" d="M181.23 113.05c12.35-8.57 23.88 2 14.28 16.32-3.69 8.47-20.4 15.15-21.06 2.65"/><path d="M185.85 113.48c22.22-7.85 3.93 32.6-8.26 21.12-2.11-7.55-5.35 6.51 6.75 5.33 10.22-1.78 19.28-13.71 16.49-24.06-2.34-7.85-12.76-8.56-17.55-2.94-2.35 2.67.57 1.55 2.57.55z"/><path d="M183.26 125.37c.7-2.91 4.75-7.91 8.31-6.3 1.29 1.29-.07 6.43 2.43 2.22a3.87 3.87 0 0 0-.87-4.46c-3.53-2.93-9.08.18-10.63 3.6-1.36 1.51-.72 8.23.76 4.94z"/><path class="e" d="M164.92 22.66C113.45.18 73.77 59.91 77.22 106.14c-.34 58.43 46.78 92.3 90.78 44.56 28-34.46 46.93-103.76-3.08-128.04z"/><path d="M68.91 85C73.73 63.26 83.07 39.44 99 23c17.68-17 44.08-24.82 65.81-13.62C210 28.72 210.52 73 197.4 114.41c-34.07-9-70.26-41.15-63.34-81.56C119.58 54.48 99.75 89.43 68.91 85z"/><path d="M107.74 113.89c-10.85-2.1-6.11-22.41 4-19.94 10.16 2.27 6.13 21.76-4 19.94zm41.04 7.11c-10.67-1.74-6.68-20 3.54-17.48 10.09 2.23 6.62 19.34-3.54 17.48zm-44.12-42.42l19.68 5.35c5 .33-6.09-6.39-8.91-6.66-2.62-1.34-15.35-1.08-10.77 1.31z"/><path d="M100.15 98.74c5.26-4.36 18.56-3.08 19.28 4.59 6.49-10-15.41-15-19.86-6.62-.98 1.12-.92 4.01.58 2.03zm42.36 8.32c4.81-5.27 16.42.73 19.32 5.6 2.81-8.28-16.62-15.84-20.5-7-.6 1.4.41 3.69 1.18 1.4zm6.35-16.26l19.68 5.34c4.88.43-6.3-5.9-9-6.2-2.63-1.28-15.25-1.4-10.68.86zm-21.33 1.41c.4 12-7.14 21.71-11.28 32.37-1.09 6.68 4.55 13.26 11.07 13.31 5.41 0-.62-1.42-2.25-2.35a10 10 0 0 1-5.69-10.17c.81-3 2.76-5.29 4.3-8.22 4-7.16 6.35-15.51 5.53-23.58-.46-5.02-1.7-6.29-1.68-1.36zm-13.36 54.46c4.06 9.41 20.42 8.72 24 0-18.17 9.78-26.73-7.28-24 0z"/></svg>
lite/admin/images/anne-working.svg ADDED
@@ -0,0 +1 @@
 
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 439.82 589.47"><defs><style>.a,.b,.c,.d,.e{fill:#fff}.a,.b,.d,.e{stroke:#000;stroke-linecap:round;stroke-miterlimit:10}.a{stroke-width:5px}.b{stroke-width:4px}.d{stroke-width:4.5px}.e{stroke-width:3.5px}</style></defs><path d="M188.32 17.1c-58.87 47-46.26 109.83-5.14 158.09 7.52 11.69 15.44 21.42 14.86 34.35-6.36 19.81-42.2 20.68-59 18.52-18 46.79 17.37 79.31 59.3 87.31 20.53 64.05 164.83 82.47 178.7 5.09-.57.69 28.53-8.32 36.64-16.45 25.61-31.08 33.73-79.23 18.44-117-16.18-42.91-49.38-52.41-80-80.31-20.6-17-29-54.57-50.26-75.38C272.18.26 227-13.35 188.32 17.1zM298.36 515c-4.15 6-6 12.19-9.24 17.3.51 19.83 38.69 57.57 60.47 57.21 18.69 0 31.28-23.92 20.53-39.49-12.4-20.02-51.19-65.28-71.76-35.02z"/><path class="a" d="M265.79 503.18c.48 25.09 8.27 18.71 23.48 28.95 12.83 12.89 31.49 45.32 53.12 26.44 19.82-21.66-10.66-37-21-52.76-11.81-15.42-56.02-35.23-55.6-2.63z"/><path d="M263.3 443.12c-9-6.76-18.36-10.44-27.13-14.53-11.51-5.56-15.9-9.28-27-6.53-14.14 3.11-19.73 4.48-37.73 7.63-28.43 4.62-65.12 6.24-94.12 2.66-3.2 10.1-5.42 22.07-10.72 31 2 9.56.2 21.84-.13 32.62A1918.41 1918.41 0 0 1 279 533c14.17-2.06 41.54-27.17 24.44-41.32-28.74-18.52-82.27-34.76-110.94-42-40.66-9.35-83.19-12.5-124.11-19.41a33.92 33.92 0 0 0-10.12 1.07c-29.92 7.51-33.42 49.43-5.69 62.1 33.26 11.63 70.64 15.76 105.15 18.84 40 1.32 76.53 5.17 106.59-21.24 14.99-13.22 17.14-36.52-1.02-47.92z"/><path d="M134.1 498.28c-5.27-10.31-15.4-8.24-24-6.08-10.69 2.32-23.39 14.14-28.45 18.8-11.36 9.42-42.85 37.75-25 58 21.94 29.93 74.07-19.93 84.45-40.79a26.8 26.8 0 0 0 2.4-10.15c-3.34-6.38-5.3-13.17-9.4-19.78z"/><path class="a" d="M170.13 504.34c15.43-21.49-11.38-32.72-30.27-28.77-12.56 1.9-21.39 10.63-29.46 19.52-10.4 11.07-16.71 13.62-26.25 27.16-4.35 7-6.27 15.36.68 23.57 13.87 16.42 29.77 2.36 42.37-9.34 6.83-6.3 12.63-12 18.39-18.11 1.9-2.18 4.75-1.56 7.24-1.55 7.95.09 12.37-4.91 17.3-12.48z"/><path d="M258.43 458.6c8.49-10 21.44-15.43 29.05-25.36.25-1.39 1.35-1.46 3.39-1.69 24.23-.53 54.65-.79 80.83-5.72 5.24 10 10.66 24.71 18.55 30.32-4.56 7.81-3.45 23.5-3.92 34.28-71.44-.33-152.83 28.75-224.09 26.35-16.23-1.31-19.89-44.95-8.58-47.23 48.57-13.61 118.67-34 168.91-38.16 17.16-2.26 47.26-11 67.56-11.19a39.74 39.74 0 0 1 13.45 2.8c26.2 10.18 30 46.75 7.18 62.75-26.95 17.41-95.91 36.87-126.23 35-38.37-2.75-61.53-31.5-26.1-62.15z"/><path class="b" d="M227 195.54c-52.45 43.75-41.68 105-55.76 163.56a.16.16 0 0 1 .12 0 4.31 4.31 0 0 1-.61 2.93c-15.23 12.46-41.32 3.76-42.46 29.43-.78 7.46.87 17.13 7.42 20.91 11.46 5.1 28.65 6.14 43.09 4.2 20.39-2.25 41.82-15.64 49.35-36 18.17-35.38 11.36-81.29 29.37-115"/><path class="c" d="M57.79 374.49c7.64-2.44 24.28-.46 33.39 1.74 4.7 1.73 8.43 5.51 13.45 5.72 10.44.52 21-4.3 31.66-4.36 18-2 24.56 23.61 8.38 31.05-15.66 8.74-35.71 3.09-50.9 11.44 1.39-17.61-20.85-15.35-32.29-15.26-1.63-4.97-4.61-22.96-3.69-30.33z"/><path d="M69.92 376c7.67.61 15.72.78 23 3.46a24 24 0 0 0 20.38 4.41c7.89-1 15.68-3.88 23.74-3.77 11.65-1.43 19.73 12.79 12.32 21.88-14.19 13.85-36.56 7.38-53.71 14.25-2.13-15.3-21.18-14.23-32.86-13.94-2-6.82-3.78-21.17-3.63-25.38 0-2.76-.11-3.28-.33-1.8-1.09 7.29.5 21.34 2.61 29.81 12.09.23 35.34-.25 30.81 18 16.16-10.47 39.24-2.07 55.69-13.48 7.51-4.67 9.47-14.92 6.46-23-7.3-18.74-30-8.61-44.26-6.43-7.33 2.1-13.06-2.67-19.47-4.88-10.45-1.45-22.79-3-32.56.88-.31.21-.33.32 0 .32a56.43 56.43 0 0 1 11.81-.33z"/><path class="c" d="M74.71 376.94a41.75 41.75 0 0 0-22.85.44c-4.72.73-14.93 9.08-6.47 11.38 8.94-.39 18.13-4.45 27.18-2.12"/><path d="M71.19 374.1c-9.54-1.38-32.53 0-29.25 14.32 1.9 5.15 14.78-.25 19.32-.17a47.92 47.92 0 0 1 10.53.06c1.73-1.7-8.3-3.19-10.41-2.92-4-.58-16.48 3.31-18.13.46 2.39-11.98 43.33-8.78 27.94-11.75z"/><path class="c" d="M74.48 379.9a54.42 54.42 0 0 0-28.7 5.1c-4.74 2.2-16 9.86-9.28 13.5 11.77-2.61 23.78-10.19 36.5-8.68"/><path d="M70 377.67c-12.77.41-30 3.79-36.47 16.48-1.55 4.76 2.58 7.51 6.77 5.48 7.1-2.65 14.93-6.15 22.26-7.25 3.18-.65 7.53-.59 10.22-1-1-1.83-8.83-1.69-12.3-1.3-3.64-1.19-27.27 10.21-24.53 5C43 380 88 378.43 70 377.67z"/><path class="c" d="M74.93 385.52c-13.78-.13-28.21 4.44-38.83 13.17-2.8 2.14-10.38 10.48-3.78 11.3 13.08-5.48 26.43-15 41.48-14.52"/><path d="M69.63 383.69c-13.43 1.38-27.2 6.19-37 16.11-3 2.66-7.36 10.56-1.18 12.05 7.69-1.26 13.92-7.4 21.32-9.7 6.72-4.12 33-5.6 13.66-6-12.79-.12-23.55 8.62-35.15 12 1-6.43 9-10.62 14.06-13.93 8-5 21.51-8.26 29.54-10.05.16-.07.27-.15 0-.25-1.44-.53-2.57-.42-5.25-.23z"/><path class="c" d="M75.91 392.16a45 45 0 0 0-36.17 11.65c-2.85 2.29-10.66 11.88-3.57 12.36 11.68-6.33 23.75-16.26 38.14-14.14"/><path d="M70.78 389.76a47.33 47.33 0 0 0-32.65 13.34c-4.43 3.07-10.93 16.6-.58 14.48 10.75-6.65 22.92-15 35.91-13.8 2.76-1.71-11-2.11-12.67-1.18-7.9 1.29-15.73 6.37-22.5 10.74-8.23 4.54.12-6.84 2.59-8.5a46.83 46.83 0 0 1 11.48-7.93c6.19-3.52 17.72-5.51 23.58-6.14.18-.06.28-.14.07-.25a13.84 13.84 0 0 0-5.23-.76z"/><path class="c" d="M96.38 417.05C92 423 85 427.64 78.58 431.19c-4.74 4.13-17.43 3.82-12.3-4.52 16.73-9 11.45-12.33 21.29-25.34 7.51-6.53 10.06 4.19 9.83 10.13.13 2.01.42 4.08-1.02 5.59z"/><path class="c" d="M84.66 407.21a33.65 33.65 0 0 1-16.08 17.32c-6.56 3.77-3 11.89 4.27 10.13 9.56-2.06 17.22-11.16 23-18.62"/><path d="M81.53 409.84c-3.6 7.9-9.82 9.76-15.75 15.07-3.73 4-1.92 11.81 4.18 11.86 8.28.46 15.79-6.64 21-12 6.26-6.89 8.3-11.32-.48-2.59-3.52 3.9-23.18 18-23.87 6.4 7.84-6.46 15.45-11.27 17.3-22.15-.74-.22-1.38 1.99-2.38 3.41z"/><path class="d" d="M271.77 170.29c-80.8 10.76-82 92.35-76 154.47.37 9.17-.76 18.27-2.15 27.32-2.87 27.68-15.32 67.1 14.11 83.88 42.79 24.49 94.93-4.09 140-3 11 2.1 24.69-63.35 26-74 8.84-74.24.04-199.15-101.96-188.67z"/><path class="b" d="M341.35 194.67C383.7 233 432.52 377 370.2 415.27c-13.33 7.84-30.9 10.78-45.35 10.4-14.77-1.53-25.05 1-32.37-9.15-5-9.24-1.66-24.86 7.21-30.28 8.42-5.29 41.79-5.8 41-22.24-.1-33.77-11.54-71.45-27.23-98.72"/><path class="c" d="M246.33 394c-9.37 1.75-11.85 12.61-18.72 17.34-4.2 2.58-7.55 3.3-9.33 6.95a4.33 4.33 0 0 0 4.66 5.87c8.74-.66 18.53-9.61 27.51-10.81 7.62-4.03 7.19-22.54-4.12-19.35z"/><path class="c" d="M246.77 395.14c-7.11 1.39-11.5 8.11-16.31 12.62-3.15 2.92-8.48 4.85-10.66 7.55-6.55 9.21 5.52 11.41 12.54 6.4 4.72-2.07 10.26-7.57 15.21-9"/><path d="M240.57 395.63c-4.4 2.68-7.23 6.92-10.94 10.36-3.39 3.21-8.29 4.45-11.21 8.26-2.5 2.93-2.34 9.13 1.3 11.23 9.33 3.77 18.89-6 26.06-10.07 2-.94 3.36-1.62.77-1.73-6.83 1.66-13.73 8-21.32 8.88-5.57 1.07-8.18-3-3.39-6.74 4.83-3.52 10.1-6.65 13.25-11.87a31.9 31.9 0 0 1 11.32-10.12c-.75-.96-4.5 1-5.84 1.8z"/><path class="c" d="M217.54 384.25c23.13-3.18 44.22 11.47 65.61 7.5 9.26-1.27 18.85-4.94 28.31-3.37 9.46.63 16.31 14.39 12 22.72-3.76 7.2-12.35 10.06-19.88 11.89-10.54 2.78-24.75 2.84-33.88.33-5.77-1.17-10.31-2.16-13.95-.73-11.83 4.59-16.72-6.5-22.7-6.53-9.98-.06-12.25-20.33-15.51-31.81z"/><path d="M232.35 387c13 1 25.94 6.79 39.11 8 14.15 1.25 28-7 42-3.62 7.27 2.08 11.16 12.17 7.82 18.73-10.87 13.67-33 13.75-49 11.25-16.73-5.51-20.16 4.23-30.37-3.29a21.85 21.85 0 0 0-11.22-5.07c-7.58-5.89-7.73-18.77-10.57-26.74a15.43 15.43 0 0 0-.84-2.39c-.31 2.26 1.61 11.35 2.55 16.13 1.51 6.37 4 16.63 12.39 16.83 6.89 3.88 13.77 11.24 22.53 6.95 10.59-1.05 21.07 4.84 32 3.59 13.28-1.28 31.32-2.65 37.41-16.6 2.58-8-1.2-17.75-8.15-22.29-15.76-8.05-32.84 4.67-49.31 2.46-16.18-2.32-34.75-9.07-50.62-5 1.86 1.06 7.76-.18 14.27 1.06z"/><path class="c" d="M225.08 386.31c-10.79-.26-22.22 3.23-30.5 9.9-4.9 2.63-11.78 15.47-2.07 13.77 9.34-5.35 20.09-14.15 32-13.7"/><path d="M219.25 384.5c-10.48.94-29.1 7.36-33.09 20.15-1.07 3.61 2.68 8.45 6.57 7.16 9.19-4.39 17.58-12.29 27.85-13.26 1.89-.49 3.64.06 3.83-.9-8.57-2.74-19.73 2.51-27.77 7.87-17.27 10.88-1.4-10.63 5.41-12.58 6.16-4 17.21-6.81 22.89-8 .14 0 .33-.17 0-.25-1.63-.49-2.87-.39-5.69-.19z"/><path class="c" d="M226.08 391.24c-12.29.92-26.51 6.84-34.65 15.32-4.42 4.18-12.09 16.53-3.44 16.5 11.28-9 22.83-20.77 38.34-21.82"/><path d="M219.24 390.2c-13.51 2.79-28.73 10.43-35.2 23.57-2.33 3.75-2 11.5 3.85 11.16 5.09-1.71 8.05-6.6 12.29-9.65a55.13 55.13 0 0 1 25.55-12.14c2.18-1-3.11-1.06-7.3-.24-10.43 1.86-20.12 8.68-27.92 16.16-8.14 7.44-3.94-4.34-.93-7.68a44.85 44.85 0 0 1 10.1-9.82c6.79-5.37 19.61-9.74 26.13-11.68.16-.07.33-.2 0-.26-1.94-.26-3.33.01-6.57.58z"/><path class="c" d="M230.26 399.15c-12-1.71-25.15 2.93-33.17 11.78-4.31 4.38-10.48 15.82-2.4 15.84 9.83-7.92 19.92-19.81 34.22-17.77"/><path d="M223.88 396.84c-27.42-.61-45.48 34.26-27.4 31 7.57-6.69 18-17.13 28.05-16.94 2.05-.41 3.84.35 4.15-.59-10.88-4.18-23.1 3.68-30.8 11.71-4.37 4.58-7.13 4.57-4.55-2.32 2.3-5.48 6.93-10.37 11.48-13.59 6.48-5.25 18.92-8 25.4-8.39.17 0 .39-.13.06-.25-1.82-.64-3.21-.68-6.39-.63z"/><path class="c" d="M233 403.46c-10.37.73-22.37 5.17-29.41 12.22-4.32 3.94-10.3 13.91-2.53 14.76 9.81-6.4 19.36-16.33 32.2-17"/><path d="M227.16 402.2c-11.77 2.22-26.21 8.78-30.82 21.14-1.89 4 1.6 10.5 6.37 8.32 7.76-5.47 17.7-14.29 26.55-15.53 1.91-.68 3.78-.3 3.92-1.29-8.35-1.93-20.35 4.13-27.22 10.06-15.73 13-2.28-10.53 4.73-13.09 4.63-4.94 33.48-12.17 16.47-9.61z"/><path class="e" d="M258.24 170c-18.29 6.5-24.54 25.35-8.37 35.45 34.42 17.9 63.44-58 8.37-35.45z"/><path class="e" d="M246.46 134.81c-21.35 6.55-9.75 24.74-5.92 41 2.73 9.63 6.68 16.53 11.65 19.6 8.49 5.57 21.58-3.37 26.12-10.62 4.61-8.44.14-15.53-4.58-24-6.35-11.28-9.52-31.58-27.27-25.98z"/><path class="c" d="M188.64 112.48c-17.62-15.36-22.41 6.79-13.25 21 6.15 13.77 23 19.19 21.91 2.75"/><path d="M186.21 107.06c-5.06-3.85-13.57-4.45-16.51 2.52-5.56 14 5.51 37.68 20.78 40.12 6.71.35 11.63-8.35 8.78-13.75-.79 1.82-1.25 5.33-3 7.12-12.06 11.73-32.95-30.48-18.1-34.63 3.96-1.35 17.98 6.29 8.05-1.38z"/><path d="M178.83 122.77c-.9-7.51 5.82-2.52 7.59 1 1.57 1.84 1.33 4.75 2.8 5.44 4-8.82-13.08-23-12.53-8.24.31 1.88 2.46 5.17 2.14 1.8z"/><path class="c" d="M287.43 94.28c8.41-13 22.91-6.9 19.5 9.5-.45 10.38-13.36 21.44-18.44 10.47"/><path d="M291.85 92.87c17.53-16 16.26 28.75.48 22.61-4.68-6.25-2.65 8 8.28 2.45 8.89-5.53 12.63-20.26 6-28.76-5.19-6.27-15.07-2.72-17.29 4.2-1.17 3.36 1.09 1.18 2.53-.5z"/><path d="M294.07 104.77c-.43-2.92 1.35-9.14 5.22-9 1.68.65 2.58 5.89 3.14 1.07a3.94 3.94 0 0 0-2.57-3.74c-4.34-1.3-8.33 3.67-8.34 7.4-.72 1.92 2.48 7.88 2.55 4.27z"/><path class="e" d="M238.66 22c-55.55-7.31-71.55 65.7-49.88 105.72 22.68 52.65 76.8 62.73 100.51 6.13C303.7 91.7 291.56 28.14 238.66 22z"/><path d="M173.15 112.79c-4.66-25-5.32-56.66 9.4-79C193.63 16.17 214.68 2 235.4 9.93c45.52 13.48 62.33 31.36 67.45 79.24-33.33 4.43-80.75-7-90-47.95-5.04 24.41-9.62 64.4-39.7 71.57z"/><path d="M219.91 123c-10.34 2.51-14.28-17.18-3.79-18.85 10.2-1.87 13.88 16.72 3.79 18.85zm40.64-9.09c-10.32 2.53-13.88-15.3-3.41-17 10.19-1.91 13.54 14.84 3.41 17zm-56.97-20.35l20.17-3c4.35-.63-3.35-3.36-10.79-2.37s-13.73 5.99-9.38 5.37z"/><path d="M207.2 112.78c3.3-5.76 15.76-9.8 19.53-3.34 2-11.38-19.94-7-20.83 1.8-.49 1.38.68 3.76 1.3 1.54zm42.25-8.88c2.49-6.54 15.35-5.7 20-2.45-.37-8.5-21.54-7.58-21.61 1.61-.02 1.53 1.78 3.16 1.61.84zM249 87.1l20.18-3c4.34-.63-3.3-2.93-10.74-1.94s-13.82 5.57-9.44 4.94zm-19.08 9.51c5.05 10.32 1.8 21.71 1.82 32.61 1.52 6.83 9.86 10.12 15.82 7.47 3.62-1.72-2.29-.77-3.63-1-4.57-.1-9.88-4.15-9-9.21 2.15-10.56 2.27-25-5.76-32.95-.65.47.36 1.7.75 3.08zm7.73 52.85c7 6.91 22.12.57 22.33-8.59-13.1 15.13-27.56 3.18-22.33 8.59z"/><path class="c" d="M320 436.85H190a5 5 0 0 1-5-5c-6.61-11 133.58-2.45 135-5 6.43-.09 6.49 10.08 0 10z"/><path d="M320 439.85H190a8 8 0 0 1 0-16h130c10.32-.15 10.39 16.15 0 16zm-130-10c-2.54 0-2.61 4 0 4h130a2 2 0 0 0 0-4z"/><path class="c" d="M201.13 436.85h-160a7 7 0 0 1-6.34-5l-31.62-118c-.73-2.75.91-5 3.66-5h160a7 7 0 0 1 6.34 5l31.62 118c.74 2.75-.91 5-3.66 5z"/><path d="M201.13 439.85h-160a10.05 10.05 0 0 1-9.24-7.23l-31.61-118a7 7 0 0 1 1.08-6.19 6.81 6.81 0 0 1 5.47-2.58h160a10 10 0 0 1 9.24 7.22l31.62 118a6.75 6.75 0 0 1-6.56 8.78zm-194.3-128c-3.09.07 31.58 118 30.86 119.22a4.06 4.06 0 0 0 3.44 2.78c.93-.47 160 .61 160.71-.24.7-1.07-31.63-117.89-31.56-119a4.09 4.09 0 0 0-3.45-2.77z"/><path d="M116.08 371.85c4.74 25.73-30.31 19-34.19 0-4.74-25.74 30.31-19.05 34.19 0z"/></svg>
lite/admin/images/icegram_logo.svg ADDED
@@ -0,0 +1 @@
 
1
+ <svg image-rendering="optimizeQuality" shape-rendering="geometricPrecision" viewBox="0 0 140 42" xmlns="http://www.w3.org/2000/svg"><path d="M59.1 13.8c0-1.2-1-2.1-2.3-2.1-1.2 0-2.2 1-2.2 2.1s1 2.1 2.2 2.1 2.3-.9 2.3-2.1m-.2 17.4V17.8h-4.1v13.4zm12-.7l-1.3-3c-.4.3-1.1.5-1.8.5-1.4 0-2.5-1.4-2.5-3.6 0-2.3 1-3.6 2.5-3.6.7 0 1.3.2 1.8.5l1.3-2.9c-.9-.6-1.9-.9-3.7-.9-3.3 0-6.1 2.3-6.1 7s2.8 7 6.1 7c1.8 0 2.8-.4 3.7-1m13.3-6.7c0-3.7-2.1-6.3-6-6.3-4 0-6.4 2.9-6.4 7 0 4 2.3 7 6.9 7 2 0 4-.4 5.2-1l-1.1-3c-1 .5-2.4.8-3.8.8-1.7 0-2.9-.7-3.3-2.2L84 25c.2-.4.2-.8.2-1.2m-3.9-.8l-4.7.6c0-2.2 1.1-3.2 2.6-3.2 1.3 0 2.1.9 2.1 2.6m16.8 8.2V18.5c-1-.6-2.6-.9-4.2-.9-3.7 0-6.4 2.1-6.4 6.8 0 4.1 2.4 6.4 5.7 6.4 1 0 2.2-.3 2.9-.6v1.1c0 2.4-1.2 3.8-3.6 3.8-1.4 0-2.8-.4-3.7-.9l-.6 1.6c1 .5 2.7 1 4.5 1 3.4 0 5.4-2.1 5.4-5.6m-2-2.7c-.6.3-1.6.5-2.5.5-2.3 0-4-1.6-4-4.8 0-3.6 1.9-5 4.2-5 .9 0 1.8.2 2.3.4zm11.8-10.9c-.4-.1-.8-.1-1.3-.1-1.8 0-3.7.4-4.9.9v12.7h2.1V19.7c.6-.3 1.6-.4 2.5-.4.4 0 .8 0 1.2.1zM118 30.5v-8.6c0-3.2-2-4.4-5-4.4-1.7 0-3.4.5-4.4.9l.5 1.4c.9-.4 2.4-.8 3.7-.8 1.9 0 3.2.6 3.2 2.6v1c-4 .2-8.2.8-8.2 4.6 0 2.5 1.8 4.1 5.5 4.1 1.8.1 3.7-.3 4.7-.8m-2-1c-.5.2-1.7.4-2.7.4-2.3 0-3.5-1-3.5-2.6 0-2.8 3.2-3 6.2-3.1zm22.7 1.7v-9.4c0-2.6-1.8-4.3-4.6-4.3-1.9 0-3.5.8-4.4 1.5-.7-.8-2.2-1.5-4.3-1.5-1.7 0-3.3.4-4.6.9v12.7h2.1V19.7c.7-.3 1.6-.5 2.7-.5 1.9 0 3.1.9 3.1 2.4v9.5h2.1V20.4c.7-.7 1.7-1.1 2.9-1.1 1.7 0 2.9 1 2.9 2.8v9.2z" fill="#373435"/><path clip-rule="evenodd" d="M21.3 1c-11.1 0-20 9-20 20s9 20 20 20 20-9 20-20-8.9-20-20-20m0 6.3C13.8 7.3 7.7 13.4 7.7 21c0 2.6.7 4.9 1.9 7l-1.3 5.8c-.1.4.4.8.7.8l6-1.4c1.9 1 4.1 1.6 6.4 1.6C28.9 34.7 35 28.6 35 21S28.9 7.3 21.3 7.3m-5.6 7.5H27c.5 0 .9.4.9.9s-.4.9-.9.9H15.7c-.5 0-.9-.4-.9-.9s.4-.9.9-.9m0 5.4H27c.5 0 .9.4.9.9s-.4.9-.9.9H15.7c-.5 0-.9-.4-.9-.9s.4-.9.9-.9m0 5.4H27c.5 0 .9.4.9.9s-.4.9-.9.9H15.7c-.5 0-.9-.4-.9-.9s.4-.9.9-.9" fill="#32009d" fill-rule="evenodd"/></svg>
lite/admin/js/es-onboarding.js CHANGED
@@ -1,67 +1,528 @@
1
  jQuery(document).ready(function() {
2
- jQuery('.sp').first().addClass('active');
3
- jQuery('.sp').hide();
4
- jQuery('.active').show();
5
 
6
  if (jQuery('.es-send-email-screen').hasClass('active')) {
7
  jQuery('#button-send').addClass('es-send-email');
8
  }
9
 
10
- jQuery(document).on('click', '.es-send-email', function() {
11
- if (jQuery("#es-send-email-form")[0].checkValidity()) {
12
- jQuery('.es-send-email-screen .es-loader').show();
13
- var emails = [];
14
- jQuery(".es_email").each(function() {
15
- if ((jQuery.trim(jQuery(this).val()).length > 0)) {
16
- emails.push(jQuery(this).val());
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
  }
18
- });
19
- var es_from_name = jQuery('.es_from_name').val();
20
- var es_from_email = jQuery('.es_from_email').val();
21
- var params = {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
  type: 'POST',
23
  url: ajaxurl,
24
  data: {
25
- action: 'send_test_email',
26
- emails: emails,
27
- es_from_name: es_from_name,
28
- es_from_email: es_from_email,
29
  security: ig_es_js_data.security
30
  },
31
  dataType: 'json',
32
  success: function(data, status, xhr) {
 
 
 
 
 
 
33
 
34
- jQuery('.es-send-email-screen .es-loader').find('img').hide();
35
- jQuery('.active').fadeOut('fast').removeClass('active');
36
- jQuery('#button-send').hide();
37
- if (data.status == 'SUCCESS') {
38
- jQuery('.sp.es-success').addClass('active').fadeIn('slow');
39
- } else if (data.status == 'ERROR') {
40
- jQuery('.sp.es-error').find('.es-email-sending-error').html('<i class="dashicons dashicons-es dashicons-no-alt" style="color: #e66060"></i>' + data.message);
41
- jQuery('.sp.es-error').addClass('active').fadeIn('slow');
42
- jQuery('#button-send').hide();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
43
  }
 
44
  },
45
- error: function(data, status, xhr) {}
 
 
46
  };
47
 
48
  jQuery.ajax(params);
49
- } else {
50
- jQuery(".es_email").addClass('error');
51
- jQuery("#es-send-email-form")[0].reportValidity();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
52
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
53
 
 
 
 
 
 
 
 
 
54
  });
55
 
56
- jQuery(document).on('click', '.es-receive-success-btn', function() {
 
57
  jQuery('.active').fadeOut('fast').removeClass('active');
58
- jQuery('.sp.es-receive-success').fadeIn('slow').addClass('active');
 
59
 
 
 
 
 
 
 
 
 
60
  });
61
 
62
- jQuery(document).on('click', '.es-receive-error-btn', function() {
 
63
  jQuery('.active').fadeOut('fast').removeClass('active');
64
- jQuery('.sp.es-receive-error').fadeIn('slow').addClass('active');
65
  });
66
 
67
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  jQuery(document).ready(function() {
 
 
 
2
 
3
  if (jQuery('.es-send-email-screen').hasClass('active')) {
4
  jQuery('#button-send').addClass('es-send-email');
5
  }
6
 
7
+ // Variable used to delay the onboarding tasks progress animations.
8
+ let time_increament = 0;
9
+
10
+ // Wrapper objects for onboarding functions.
11
+ let onboarding_functions = {
12
+ perform_configuration_tasks: function() {
13
+ if (jQuery("#es-send-email-form")[0].checkValidity()) {
14
+ let emails = [];
15
+ jQuery(".es_email").each(function() {
16
+ if ((jQuery.trim(jQuery(this).val()).length > 0)) {
17
+ emails.push(jQuery(this).val());
18
+ }
19
+ });
20
+ let es_from_name = jQuery('.es_from_name').val();
21
+ let es_from_email = jQuery('.es_from_email').val();
22
+ let create_post_notification = jQuery('#es_post_notification_preference').is(':checked') ? 'yes': 'no';
23
+ let add_gdpr_consent = jQuery('#ig_es_add_gdpr_consent').is(':checked') ? 'yes': 'no';
24
+ let enable_double_optin = jQuery('#ig_es_enable_double_optin').is(':checked') ? 'yes': 'no';
25
+
26
+ let is_trial = '';
27
+ if (jQuery('#es_free_trial_preference').length > 0) {
28
+ is_trial = jQuery('#es_free_trial_preference').is(':checked') ? 'yes': 'no';
29
  }
30
+
31
+ jQuery('#es_onboarding_emails_list').text(emails.join(", "));
32
+
33
+ let params = {
34
+ type: 'POST',
35
+ url: ajaxurl,
36
+ data: {
37
+ action: 'ig_es_handle_request',
38
+ request: 'perform_configuration_tasks',
39
+ emails: emails,
40
+ es_from_name: es_from_name,
41
+ es_from_email: es_from_email,
42
+ create_post_notification: create_post_notification,
43
+ is_trial: is_trial,
44
+ add_gdpr_consent: add_gdpr_consent,
45
+ enable_double_optin: enable_double_optin,
46
+ security: ig_es_js_data.security
47
+ },
48
+ dataType: 'json',
49
+ success: function(data, status, xhr) {
50
+ let tasks = data.tasks;
51
+
52
+ if( ! jQuery.isEmptyObject( tasks ) ) {
53
+ for( let task_name in tasks ) {
54
+ if( tasks.hasOwnProperty( task_name ) ) {
55
+ time_increament += 500;
56
+ setTimeout(function(){
57
+ ig_es_change_onboard_task_status( 'ig-es-onboard-' + task_name, 'in-progress' );
58
+ },time_increament);
59
+
60
+ let task_data = tasks[ task_name ];
61
+ let task_status = task_data.status;
62
+ let task_message = task_data.message;
63
+ time_increament += 1000;
64
+ setTimeout(function(){
65
+ ig_es_change_onboard_task_status( 'ig-es-onboard-' + task_name, task_status, task_message );
66
+ },time_increament);
67
+ }
68
+ }
69
+ }
70
+
71
+ jQuery(document).trigger('ig_es_perform_configuration_tasks_success');
72
+ },
73
+ error: function(data, status, xhr) {
74
+ ig_es_handle_onboard_task_error( 'perform_configuration_tasks', data, status, xhr );
75
+ }
76
+ };
77
+
78
+ jQuery('.active').fadeOut('fast').removeClass('active');
79
+ jQuery('.sp.es-delivery-check').addClass('active').fadeIn('slow');
80
+
81
+ jQuery.ajax(params);
82
+
83
+ } else {
84
+ jQuery(".es_email").addClass('error');
85
+ jQuery("#es-send-email-form")[0].reportValidity();
86
+ }
87
+ },
88
+ queue_default_broadcast_newsletter: function() {
89
+
90
+ time_increament += 100;
91
+ setTimeout(function(){
92
+ ig_es_change_onboard_task_status('ig-es-onboard-test-email-delivery', 'in-progress');
93
+ }, time_increament);
94
+ time_increament += 300;
95
+ setTimeout(function(){
96
+ ig_es_change_onboard_task_status('ig-es-onboard-queue_default_broadcast_newsletter', 'in-progress');
97
+ }, time_increament);
98
+ var params = {
99
  type: 'POST',
100
  url: ajaxurl,
101
  data: {
102
+ action: 'ig_es_handle_request',
103
+ request: 'queue_default_broadcast_newsletter',
 
 
104
  security: ig_es_js_data.security
105
  },
106
  dataType: 'json',
107
  success: function(data, status, xhr) {
108
+ ig_es_handle_onboard_task_response( 'queue_default_broadcast_newsletter', data, 'inline' );
109
+ },
110
+ error: function(data, status, xhr) {
111
+ ig_es_handle_onboard_task_error( 'queue_default_broadcast_newsletter', data, status, xhr );
112
+ }
113
+ };
114
 
115
+ jQuery.ajax(params);
116
+ },
117
+ dispatch_emails_from_server: function() {
118
+ let task = 'dispatch_emails_from_server';
119
+ let task_html_elem = 'ig-es-onboard-' + task;
120
+ setTimeout(function(){
121
+ ig_es_change_onboard_task_status( task_html_elem, 'in-progress' );
122
+ }, time_increament);
123
+ var params = {
124
+ type: 'POST',
125
+ url: ajaxurl,
126
+ data: {
127
+ action: 'ig_es_handle_request',
128
+ request: 'dispatch_emails_from_server',
129
+ security: ig_es_js_data.security
130
+ },
131
+ dataType: 'json',
132
+ success: function(data, status, xhr) {
133
+ let tasks = data.tasks;
134
+ if( tasks.hasOwnProperty( 'dispatch_emails_from_server' ) ) {
135
+ let task_data = tasks[ task ];
136
+ let form_source = '';
137
+ if( 'error' === task_data.status ) {
138
+ form_source = 'es_email_send_error';
139
+ } else {
140
+ form_source = 'es_email_send_success';
141
+ }
142
+ jQuery('#ig-es-onboarding-final-steps-form #sign-up-form-source').val(form_source);
143
  }
144
+ ig_es_handle_onboard_task_response( 'dispatch_emails_from_server', data, 'popup' );
145
  },
146
+ error: function(data, status, xhr) {
147
+ ig_es_handle_onboard_task_error( 'dispatch_emails_from_server', data, status, xhr );
148
+ }
149
  };
150
 
151
  jQuery.ajax(params);
152
+ },
153
+ check_test_email_on_server: function() {
154
+ setTimeout(function(){
155
+ ig_es_change_onboard_task_status( 'ig-es-onboard-check_test_email_on_server', 'in-progress' );
156
+ }, time_increament);
157
+
158
+ // Add 10s delay while checking for arrival of test email on our server since from some hosts, some delay may happen in receiveing the test email.
159
+ setTimeout(function(){
160
+ var params = {
161
+ type: 'POST',
162
+ url: ajaxurl,
163
+ data: {
164
+ action: 'ig_es_handle_request',
165
+ request: 'check_test_email_on_server',
166
+ security: ig_es_js_data.security
167
+ },
168
+ dataType: 'json',
169
+ success: function(data, status, xhr) {
170
+ ig_es_handle_onboard_task_response( 'check_test_email_on_server', data, 'popup' );
171
+ },
172
+ error: function(data, status, xhr) {
173
+ ig_es_handle_onboard_task_error( 'check_test_email_on_server', data, status, xhr );
174
+ }
175
+ };
176
+
177
+ jQuery.ajax(params);
178
+ }, 10000);
179
+ },
180
+ evaluate_email_delivery: function() {
181
+ setTimeout(function(){
182
+ ig_es_change_onboard_task_status( 'ig-es-onboard-evaluate_email_delivery', 'in-progress' );
183
+ }, time_increament);
184
+ var params = {
185
+ type: 'POST',
186
+ url: ajaxurl,
187
+ data: {
188
+ action: 'ig_es_handle_request',
189
+ request: 'evaluate_email_delivery',
190
+ security: ig_es_js_data.security
191
+ },
192
+ dataType: 'json',
193
+ success: function(data, status, xhr) {
194
+ ig_es_handle_onboard_task_response( 'evaluate_email_delivery', data, 'popup' );
195
+ },
196
+ error: function(data, status, xhr) {
197
+ ig_es_handle_onboard_task_error( 'evaluate_email_delivery', data, status, xhr );
198
+ }
199
+ };
200
+
201
+ jQuery.ajax(params);
202
+ },
203
+ updating_email_delivery_main_task_status: function() {
204
+ setTimeout(function() {
205
+ let unsuccessful_tasks = jQuery('#ig-es-onboard-test-email-delivery-tasks-list li[data-status="error"]');
206
+ // Check if there are any unsuccessfull tasks related to email delivery i.e. having any errors.
207
+ if ( 0 === unsuccessful_tasks.length ) {
208
+ ig_es_change_onboard_task_status( 'ig-es-onboard-test-email-delivery', 'success');
209
+ }
210
+ }, time_increament);
211
+ },
212
+ finishing_onboarding: function() {
213
+ let name = jQuery('#ig-es-onboarding-final-steps-form #ig-es-sign-up-name').val();
214
+ let email = jQuery('#ig-es-onboarding-final-steps-form #ig-es-sign-up-email').val();
215
+ if ( '' !== name || '' !== email ) {
216
+ if ( ! jQuery("#ig-es-onboarding-final-steps-form")[0].checkValidity()) {
217
+ jQuery("#ig-es-onboarding-final-steps-form")[0].reportValidity();
218
+ return;
219
+ }
220
+ }
221
+ let list = jQuery('#ig-es-onboarding-final-steps-form #sign-up-list').val();
222
+ let form_source = jQuery('#ig-es-onboarding-final-steps-form #sign-up-form-source').val();
223
+ let is_trial = '';
224
+ if (jQuery('#ig-es-onboarding-final-steps-form #es_free_trial_preference').length > 0) {
225
+ is_trial = jQuery('#ig-es-onboarding-final-steps-form #es_free_trial_preference').is(':checked') ? 'yes': 'no';
226
+ }
227
+ var params = {
228
+ type: 'POST',
229
+ url: ajaxurl,
230
+ data: {
231
+ action: 'ig_es_handle_request',
232
+ request: 'finishing_onboarding',
233
+ name: name,
234
+ email: email,
235
+ list: list,
236
+ form_source: form_source,
237
+ is_trial: is_trial,
238
+ security: ig_es_js_data.security
239
+ },
240
+ dataType: 'json',
241
+ success: function(data, status, xhr) {
242
+ let redirect_url = '';
243
+ if( 'undefined' !== typeof data.redirect_url && '' !== data.redirect_url ) {
244
+ redirect_url = data.redirect_url;
245
+ } else {
246
+ redirect_url = window.location.href;
247
+ }
248
+ if( '' !== redirect_url ) {
249
+ window.location = redirect_url;
250
+ }
251
+ },
252
+ error: function(data, status, xhr) {
253
+ ig_es_handle_onboard_task_error( '', data, status, xhr );
254
+ }
255
+ };
256
+
257
+ jQuery.ajax(params);
258
+ },
259
+ update_onboarding_step: function( step = 1 ) {
260
+ var params = {
261
+ type: 'POST',
262
+ url: ajaxurl,
263
+ data: {
264
+ action: 'ig_es_handle_request',
265
+ request: 'update_onboarding_step',
266
+ step: step,
267
+ security: ig_es_js_data.security
268
+ },
269
+ dataType: 'json',
270
+ success: function(data, status, xhr) {},
271
+ error: function(data, status, xhr) {
272
+ ig_es_handle_onboard_task_error( '', data, status, xhr );
273
+ }
274
+ };
275
+
276
+ jQuery.ajax(params);
277
+ },
278
+ handle_functions_error_event: function() {
279
+ setTimeout(function(){
280
+ let email_delivery_error_text = jQuery('#es_delivery_check_processed').data('error-text');
281
+ jQuery('#es_delivery_check_processed').text(email_delivery_error_text);
282
+ }, time_increament)
283
  }
284
+ };
285
+
286
+ jQuery('#es-button-send').on( 'click', function() {
287
+ ig_es_start_processing_tasks_queue( 'perform_configuration_tasks' );
288
+ });
289
+ jQuery('#ig-es-finish-onboarding-process').on( 'click', onboarding_functions.finishing_onboarding );
290
+
291
+ // Variable to hold order of onboarding tasks to be performed.
292
+ let onboarding_functions_queue = [
293
+ 'perform_configuration_tasks',
294
+ 'queue_default_broadcast_newsletter',
295
+ 'dispatch_emails_from_server',
296
+ 'check_test_email_on_server',
297
+ 'evaluate_email_delivery',
298
+ ];
299
 
300
+ jQuery('#es_create_post_notification').show();
301
+ jQuery('#es_free_trial_option').hide();
302
+ jQuery('#es_post_notification_preference').click(function() {
303
+ if( jQuery(this).is(':checked')) {
304
+ jQuery('#ig-es-onboard-create_default_post_notification').show();
305
+ } else {
306
+ jQuery('#ig-es-onboard-create_default_post_notification').hide();
307
+ }
308
  });
309
 
310
+ jQuery(document).on('click', '#es-delivery-error-button', function() {
311
+ //jQuery('body').css({'overflow':''});
312
  jQuery('.active').fadeOut('fast').removeClass('active');
313
+ jQuery('.sp.es-delivery-check').addClass('active');
314
+ });
315
 
316
+ jQuery('#es_free_trial_preference').click(function() {
317
+ if( jQuery(this).is(':checked')) {
318
+ /*jQuery('#es_free_trial_option').hide();*/
319
+ jQuery('#ig-es-onboard-check_test_email_on_server,#ig-es-onboard-evaluate_email_delivery').show();
320
+ } else {
321
+ /*jQuery('#es_free_trial_option').show();*/
322
+ jQuery('#ig-es-onboard-check_test_email_on_server,#ig-es-onboard-evaluate_email_delivery').hide();
323
+ }
324
  });
325
 
326
+ jQuery(document).on('click', '#es_delivery_check_processed', function() {
327
+ onboarding_functions.update_onboarding_step(3);
328
  jQuery('.active').fadeOut('fast').removeClass('active');
329
+ jQuery('.sp.es-onboard-success').fadeIn('slow').addClass('active');
330
  });
331
 
332
+ let ig_es_change_onboard_task_status = function(id, status, message = '') {
333
+
334
+ let task_icon = jQuery('#'+id + ' div:first');
335
+ let task_list_message = jQuery('#'+id + ' p:first');
336
+
337
+ jQuery('#' + id).attr('data-status', status);
338
+ if ( 'in-progress' === status) {
339
+ task_icon.replaceWith('<div class="relative pt-1 flex items-center justify-center flex-shrink-0 w-5 h-5"><span class="animate-ping absolute w-4 h-4 bg-indigo-200 rounded-full"></span><span class="relative block w-2 h-2 bg-indigo-700 rounded-full"></span></div>');
340
+ task_list_message.removeClass().addClass('text-indigo-800 text-sm');
341
+ }
342
+
343
+ if( 'success' === status ) {
344
+ task_icon.replaceWith('<div class="relative flex items-center justify-center flex-shrink-0 w-5 h-5"><svg class="mt-1 w-full h-full text-indigo-700 transition duration-150 ease-in-out group-hover:text-indigo-800 group-focus:text-indigo-800" viewBox="0 0 20 20" fill="currentColor" ><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clip-rule="evenodd" ></path> </svg></div>');
345
+ task_list_message.removeClass().addClass('text-gray-800 text-sm');
346
+ }
347
+
348
+ if( 'error' === status ) {
349
+ task_icon.replaceWith('<div class="relative flex items-center justify-center flex-shrink-0 w-5 h-5"><svg class="mt-1 w-6 h-6 text-red-500" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg></div>');
350
+ if( '' === message ){
351
+ task_list_message.removeClass().addClass('text-gray-700 font-normal text-sm');
352
+ }
353
+ }
354
+
355
+ let text_css_class = '';
356
+ if( '' !== message ){
357
+ if( 'error' === status ){
358
+ text_css_class = 'text-gray-700 font-normal';
359
+ }
360
+ else{
361
+ text_css_class = 'text-gray-800 ';
362
+ }
363
+ task_list_message.replaceWith('<p class="text-sm ' + text_css_class +'">' + message + '</p>');
364
+ }
365
+ }
366
+
367
+ let ig_es_show_onboarding_error_popup = function( error_message = '', additional_message = '' ) {
368
+ if ( '' === error_message ) {
369
+ return;
370
+ }
371
+
372
+ jQuery('#ig-es-email-delivery-error-message').text( additional_message );
373
+ jQuery('.active').removeClass('active');
374
+ jQuery('.es-receive-error .ig-es-onboarding-error').html(error_message);
375
+ jQuery('.sp.es-receive-error').fadeIn('slow').addClass('active');
376
+ //jQuery('body').css({'overflow':'hidden','height':'100%'});
377
+ }
378
+
379
+ let ig_es_handle_onboard_task_response = function( task, response, show_error_as = 'inline' ) {
380
+ let task_html_elem = 'ig-es-onboard-' + task;
381
+ let tasks = response.tasks;
382
+ if( ! jQuery.isEmptyObject( tasks ) && tasks.hasOwnProperty( task ) ) {
383
+ if( tasks.hasOwnProperty( task ) ) {
384
+ let task_data = tasks[ task ];
385
+ let task_status = task_data.status;
386
+ let error_message = '';
387
+ let additional_message = '';
388
+ if( 'undefined' !== typeof task_data.additional_message ){
389
+ additional_message = task_data.additional_message;
390
+ }
391
+ if( 'error' === task_data.status ) {
392
+ // Get task specific error messages if found.
393
+ if( 'undefined' !== typeof task_data.message ) {
394
+ if( Array.isArray( task_data.message ) ) {
395
+ jQuery(task_data.message).each(function(index, message) {
396
+ error_message += message;
397
+ })
398
+ } else {
399
+ error_message += task_data.message;
400
+ }
401
+ } else {
402
+ // Get generic error message if there is not any specific error message.
403
+ error_message = ig_es_onboarding_data.error_message;
404
+ }
405
+ }
406
+
407
+ time_increament += 1000;
408
+ setTimeout(function(){
409
+ ig_es_change_onboard_task_status( task_html_elem, task_status );
410
+ if( '' !== error_message ) {
411
+ if( 'popup' === show_error_as ) {
412
+ ig_es_show_onboarding_error_popup( error_message, additional_message );
413
+ }
414
+ }
415
+ },time_increament);
416
+
417
+ jQuery(document).trigger( 'ig_es_' + task + '_' + task_status );
418
+ }
419
+ }
420
+
421
+ }
422
+
423
+ let ig_es_handle_onboard_task_error = function( task_name = '', data, status, xhr) {
424
+ if( 'error' === status ) {
425
+ setTimeout(function(){
426
+ alert( ig_es_onboarding_data.error_message );
427
+ if( '' !== task_name ) {
428
+ let task_html_elem_id = 'ig-es-onboard-' + task_name;
429
+ ig_es_change_onboard_task_status(task_html_elem_id, 'error');
430
+ }
431
+ }, time_increament)
432
+ }
433
+ }
434
+
435
+ let onboarding_tasks_done = ig_es_onboarding_data.ig_es_onboarding_tasks_done;
436
+ let onboarding_tasks_failed = ig_es_onboarding_data.ig_es_onboarding_tasks_failed;
437
+ let successful_email_tasks_count = 0;
438
+ if( ! jQuery.isEmptyObject( onboarding_tasks_done ) ) {
439
+ for( let task_group in onboarding_tasks_done ) {
440
+ jQuery(onboarding_tasks_done[task_group]).each(function(index, task_name){
441
+ if( 'email_delivery_check_tasks' === task_group ) {
442
+ successful_email_tasks_count++;
443
+ }
444
+ ig_es_change_onboard_task_status( 'ig-es-onboard-' + task_name, 'success' );
445
+ });
446
+ }
447
+ }
448
+
449
+ let unsuccessful_email_tasks_count = 0;
450
+ if( ! jQuery.isEmptyObject( onboarding_tasks_failed ) ) {
451
+ for( let task_group in onboarding_tasks_failed ) {
452
+ jQuery(onboarding_tasks_failed[task_group]).each(function(index, task_name){
453
+ if( 'email_delivery_check_tasks' === task_group ) {
454
+ unsuccessful_email_tasks_count++;
455
+ }
456
+ ig_es_change_onboard_task_status( 'ig-es-onboard-' + task_name, 'error' );
457
+ });
458
+ }
459
+ }
460
+ if( successful_email_tasks_count > 0 ) {
461
+ // If there aren't any failed tasks for email test tasks them make main tasks as successful.
462
+ if( unsuccessful_email_tasks_count <= 0 ) {
463
+ ig_es_change_onboard_task_status( 'ig-es-onboard-test-email-delivery', 'success');
464
+ } else {
465
+ ig_es_change_onboard_task_status( 'ig-es-onboard-test-email-delivery', 'in-progress');
466
+ }
467
+ }
468
+
469
+ let ig_es_start_processing_tasks_queue = function( current_task = '' ) {
470
+ if ( '' === current_task ) {
471
+ return;
472
+ }
473
+
474
+ // Return if it is not in the onboarding functions list.
475
+ if( ! onboarding_functions.hasOwnProperty( current_task ) || 'function' !== typeof onboarding_functions[current_task] ) {
476
+ return;
477
+ }
478
+ let is_trial = '';
479
+ if (jQuery('#es_free_trial_preference').length > 0) {
480
+ is_trial = jQuery('#es_free_trial_preference').is(':checked') ? 'yes': 'no';
481
+ // Remove check_test_email_on_server and evaluate_email_delivery task if has not opted for trial
482
+ if( 'no' === is_trial ) {
483
+ let check_test_email_on_server_task_index = onboarding_functions_queue.indexOf( 'check_test_email_on_server' );
484
+ if( check_test_email_on_server_task_index > -1 ) {
485
+ onboarding_functions_queue.splice( check_test_email_on_server_task_index, 1 );
486
+ }
487
+
488
+ let evaluate_email_delivery_task_index = onboarding_functions_queue.indexOf( 'evaluate_email_delivery' );
489
+ if( evaluate_email_delivery_task_index > -1 ) {
490
+ onboarding_functions_queue.splice( evaluate_email_delivery_task_index, 1 );
491
+ }
492
+ }
493
+ }
494
+ let current_task_index = onboarding_functions_queue.indexOf(current_task);
495
+ if( current_task_index > -1 ) {
496
+ // Remove current task from queue since we are going to call it straight away. Others tasks will be bind to success event of previous task.
497
+ onboarding_functions_queue.splice(current_task_index, 1);
498
+ }
499
+ jQuery(onboarding_functions_queue).each(function(index, onboarding_function){
500
+ if( index < current_task_index ) {
501
+ return false;
502
+ }
503
+ if( onboarding_functions.hasOwnProperty( onboarding_function ) && 'function' === typeof onboarding_functions[onboarding_function] ) {
504
+ if( 0 === index ) {
505
+ jQuery(document).on( 'ig_es_' + current_task + '_success', onboarding_functions[onboarding_function]);
506
+ } else {
507
+ // Other functions will be triggered only if previous one has been done.
508
+ jQuery(document).on( 'ig_es_' + onboarding_functions_queue[index - 1] + '_success', onboarding_functions[onboarding_function]);
509
+
510
+ // Bind a function which will handle error on the queue processing.
511
+ jQuery(document).on( 'ig_es_' + onboarding_functions_queue[index - 1] + '_error', onboarding_functions.handle_functions_error_event);
512
+ }
513
+ }
514
+ // Attach the function to change status of main email delivery task to the success event of last onboarding function.
515
+ if( index === (onboarding_functions_queue.length - 1) ) {
516
+ jQuery(document).on( 'ig_es_' + onboarding_function + '_success', onboarding_functions.updating_email_delivery_main_task_status );
517
+ }
518
+ });
519
+ if( onboarding_functions.hasOwnProperty( current_task ) && 'function' === typeof onboarding_functions[current_task] ) {
520
+ onboarding_functions[current_task]();
521
+ }
522
+ }
523
+
524
+ let next_task = ig_es_onboarding_data.next_task;
525
+ if( '' !== next_task ) {
526
+ ig_es_start_processing_tasks_queue( next_task );
527
+ }
528
+ });
lite/admin/partials/onboarding.php CHANGED
@@ -1,180 +1,560 @@
1
- <div id="slider-wrapper">
 
 
 
 
 
 
2
  <div id="slider">
3
- <div class="sp es-send-email-screen" >
4
- <?php $from_name = get_option( 'ig_es_from_name'); ?>
5
- <?php $from_email = get_option( 'ig_es_from_email'); ?>
6
- <h1> 👍 <?php echo esc_html__( '80% done!', 'email-subscribers' ); ?></h1>
7
- <p><?php echo esc_html__( 'We have automatically :', 'email-subscribers' ); ?></p>
8
- <ol>
9
- <li>
10
- <?php
11
- /* translators: 1: Starting anchor tag with list URL 2: Closing anchor tag */
12
- echo sprintf( esc_html__( 'Created two Lists - %1$sMain%2$s and %1$sTest%2$s', 'email-subscribers'), '<a href="' . esc_url( admin_url( 'admin.php?page=es_lists' ) ) . '" target="_blank">', '</a>' );
13
- ?>
14
- </li>
15
- <li><?php echo esc_html__( 'Added you', 'email-subscribers'); ?> <strong style="font-weight: 700;color: #4a5568;" >(<?php echo esc_html( get_option('admin_email') ); ?>)</strong> <?php echo esc_html__( 'to both lists', 'email-subscribers' ); ?>
16
- </li>
17
- <li>
18
- <?php
19
- /* translators: 1: Starting anchor tag with forms URL 2: Closing anchor tag */
20
- echo sprintf( esc_html__( 'Created a %1$s subscription / lead collection optin form%2$s', 'email-subscribers'), '<a href="' . esc_url( admin_url( 'admin.php?page=es_forms') ) . '" target="_blank">', '</a>' );
21
- ?>
22
- </li>
23
- <li>
24
- <?php
25
- /* translators: 1: Starting anchor tag with widgets URL 2: Closing anchor tag */
26
- echo sprintf( esc_html__( 'Added optin form to %1$sdefault widget area%2$s to show it on your site', 'email-subscribers' ), '<a href="' . esc_url( admin_url('widgets.php') ) . '" target="_blank">', '</a>' );
27
- ?>
28
- </li>
29
- </ol>
30
- <div class="es-form-wrapper">
31
- <div class="es-form-next" style="padding: 0.5em 0.8em; border-radius: 1.5rem;color: #737373;">
32
- <?php
33
- /* translators: 1: Starting strong tag 2: Closing strong tag 3: Line break tag */
34
- echo sprintf( esc_html__(' We will create "%1$sNewsletter Broadcast%2$s" and "%1$sNew Post Notification%2$s" campaigns. Next step is to test everything by %1$ssending test campaigns%2$s.%3$sWe\'ve already added you, but recommend adding another email to test.', 'email-subscribers'), '<strong style="font-weight: 647;color: hsl(0, 0%, 30%);" >', '</strong>', '<br />');
35
- ?>
36
- <br/>
37
- <?php
38
- /* translators: 1: Starting strong tag 2: Closing strong tag */
39
- echo sprintf( esc_html__('But before test %1$sverify your sender details%2$s', 'email-subscribers'), '<strong style="font-weight: 647;color: hsl(0, 0%, 30%);" >', '</strong>' );
40
- ?>
41
  </div>
42
- <form id="es-send-email-form" style="padding: 0.5em 0.8em;">
43
- <label><strong style="font-weight: 700;color: #4a5568;" ><?php echo esc_html__('Sender', 'email-subscribers'); ?></strong></label><br/>
44
- <input type="text" name="es_from_name" class="es_from_name" value="<?php echo esc_attr( $from_name ); ?>" required style="padding: 0.5em 0.5em; border: 1px solid #dcdcdc; "/>
45
- <input type="email" name="es_from_email" class="es_from_email" value="<?php echo esc_attr( $from_email ); ?>" required style="padding: 0.5em 0.5em; border: 1px solid #dcdcdc; "/><br/>
46
- <p style="margin: 1em 0 0.8em 0;"><label><strong style="font-weight: 700;color: #4a5568;" ><?php echo esc_html__('Add an email to send a test to:', 'email-subscribers'); ?></strong></label><br/>
47
- <input type="email" placeholder="abc@gmail.com" name="es_test_email[]" class="es_email" required style="padding: 0.5em 0.5em; border: 1px solid #dcdcdc; margin-top: 0.4em; "/>
48
- <a id="button-send" class="button-send"><?php echo esc_html__('Create and Send test campaigns', 'email-subscribers'); ?></a>
49
- <img class="es-loader" src="<?php echo esc_url( ES_PLUGIN_URL . 'lite/public/images/spinner.gif' ); ?>" style="display:none;margin-top:0.5rem"/>
50
- </p>
51
- </form>
52
- </div>
53
- </div>
54
- <div class="sp es-success" >
55
- <h1 style="color: #38a169;"><?php echo esc_html__('Test emails sent, check your inbox'); ?></h1>
56
- <div class="es-sent-success">
57
- <div class="es-gray" style="padding: 1rem 0 0 0;">
58
- <?php
59
- /* translators: %s: Site admin email */
60
- echo sprintf( esc_html__( 'We have sent two campaigns to %s and the email you have added.', 'email-subscribers' ), '<strong style="font-weight: 700;color: #4a5568;" >' . esc_html( get_option( 'admin_email' ) ) . '</strong>' );
61
- ?>
62
-
63
- </div>
64
- <div class="es-gray"><?php echo esc_html__( 'They may take a few minutes to arrive. But do confirm you received them.', 'email-subscribers' ); ?></div>
65
- </div>
66
- <div class="emoji" style="text-align: center; font-size: 10em; opacity: 0.45;padding: 0.5rem 0 0 0;"> 📨 </div>
67
- <div class="es-actions">
68
- <div class="button button-hero es-receive-success-btn" style="width: 100%; text-align: center;padding: 0;"><?php echo esc_html__('Yes, I received the test emails', 'email-subscribers'); ?></div>
69
- <div style="margin-top: 0.7em;"><a href="#" class="es-secondary es-receive-error-btn"><u><?php echo esc_html__('No, I haven\'t received them yet', 'email-subscribers'); ?></u></a></div>
70
- </div>
71
- </div>
72
- <div class="sp es-receive-success">
73
- <h1> 👍 <?php echo esc_html__('We\'re done!'); ?></h1>
74
- <div>
75
- <div class="" style="color: #737373; line-height: 1.75;padding: 1rem 0 0 0;"><?php echo esc_html__('Everything is setup now. It\'s a perfect time to get better at email marketing now.', 'email-subscribers'); ?>
76
- <br/><span style="font-weight: 500;"><?php echo esc_html__('Sign up ', 'email-subscribers'); ?></span><?php echo esc_html__('below to get our highly acclaimed course for free.', 'email-subscribers'); ?>
77
- </div>
78
- <form name="klawoo_subscribe" action="#" method="POST" accept-charset="utf-8" class="es-onboarding" style="margin-right: 0; margin-top: 1em; /* text-align: center; */ ">
79
- <input class="es-ltr" type="text" name="name" id="name" placeholder="Your Name"/> <br />
80
- <input class="es-ltr" type="text" name="email" id="email" placeholder="Your Email" required/> <br />
81
- <input type="hidden" name="list" value="hN8OkYzujUlKgDgfCTEcIA"/>
82
- <input type="hidden" name="form-source" value="es_email_send_success"/>
83
- <div style="margin-top: 0.5rem;">
84
- <input type="checkbox" name="es-gdpr-agree" id ="es-gdpr-agree" value="1" required="required">
85
- <label for="es-gdpr-agree" style="font-size: 0.9em; color: #777777; ">
86
- <?php
87
- /* translators: %s: Icegram Privacy Policy text with anchor tag */
88
- echo sprintf( esc_html__( 'I have read and agreed to your %s.', 'email-subscribers' ), '<a href="https://www.icegram.com/privacy-policy/" target="_blank" style="font-weight:500">' . esc_html__( 'Privacy Policy', 'email-subscribers' ) . '</a>' );
89
  ?>
90
- </label>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
91
  </div>
92
- <input type="submit" name="submit" id="submit" class="button button-hero" style="padding: 0; width: 320px;margin-top: 0.5rem;" value="<?php echo esc_html__( 'Signup and send me the course for free', 'email-subscribers' ); ?>">
93
- <div style="text-align: center; width: 56%; margin-top: 0.5em;"><a class="es-skip" href="<?php echo esc_url( admin_url( 'admin.php?page=es_dashboard&es_skip=1&option_name=email_send_success') ); ?>"><u><?php echo esc_html__('Skip and goto Dashboard', 'email-subscribers'); ?></u></a></div>
94
- <br>
95
- <p id="klawoo_response"></p>
96
- </form>
97
- </div>
 
 
 
 
 
 
 
98
  </div>
99
- <div class="sp es-receive-error">
100
- <h1><?php echo esc_html__('Check these few things below'); ?></h1>
101
- <ul style="padding: 1rem 0 0 0;">
102
- <li>
103
- <?php
104
- /* translators: 1: Starting bold tag 2: Closing bold tag */
105
- echo sprintf( esc_html__( '1. Check your %1$sspam%2$s or %1$sjunk%2$s folder', 'email-subscribers'), '<b style="color:#737373;font-weight:500">', '</b>' );
106
- ?>
107
- </li>
108
- <li>
109
- <?php
110
- /* translators: 1: Starting anchor tag 2: Closing anchor tag */
111
- echo sprintf( esc_html__('2. %1$sSend another test email%2$s with different email address ', 'email-subscribers'), '<a href="' . esc_url( admin_url('admin.php?page=es_settings#tabs-email_sending') ) . '" target="_blank">', '</a>');
112
- ?>
113
- </li>
114
- <li>
115
- <?php
116
- /* translators: 1: Starting strong tag 2: Closing strong tag */
117
- echo sprintf( esc_html__( '3. Is %1$s' . get_option('admin_email') . '%2$s email free/disposable?', 'email-subscribers' ), '<strong style="color: #4a5568;">', '</strong>' );
118
- ?>
119
- </li>
120
- <li style="margin-top: 1rem"><a href="https://www.icegram.com/documentation/reasons-why-you-havent-received-the-test-email/?utm_source=es&utm_medium=es_onboarding&utm_campaign=view_docs_help_page" target="_blank" style="font-weight: 600; font-size:1.06em;"> <?php echo esc_html__('Explore more', 'email-subscribers'); ?></a></li>
121
- </ul>
122
- <div class="">
123
- <div class="es-gray"><?php echo esc_html__('Also, it\'s a perfect time to get better at email marketing now.', 'email-subscribers'); ?>
124
- <br/><span style="font-weight: 500;"><?php echo esc_html__('Sign up ', 'email-subscribers'); ?></span><?php echo esc_html__('below to get our highly acclaimed course for free.', 'email-subscribers'); ?>
125
  </div>
126
- <form name="klawoo_subscribe" action="#" method="POST" accept-charset="utf-8" class="es-onboarding" style="margin-top: 1em;">
127
- <input class="es-ltr" type="text" name="name" id="name" placeholder="Your Name"/> <br />
128
- <input class="es-ltr" type="text" name="email" id="email" placeholder="Your Email" required/> <br />
129
- <input type="hidden" name="list" value="hN8OkYzujUlKgDgfCTEcIA"/>
130
- <input type="hidden" name="form-source" value="es_email_receive_error"/>
131
- <div style="margin-top: 0.5rem;">
132
- <input type="checkbox" name="es-gdpr-agree" id ="es-gdpr-agree" value="1" required="required">
133
- <label for="es-gdpr-agree" style="font-size: 0.9em; color: #777777;">
134
- <?php
135
- /* translators: %s: Icegram Privacy Policy text with anchor tag */
136
- echo sprintf(esc_html__( 'I have read and agreed to your %s.', 'email-subscribers' ), '<a href="https://www.icegram.com/privacy-policy/" target="_blank" style="font-weight:500">' . esc_html__( 'Privacy Policy', 'email-subscribers' ) . '</a>' );
 
 
 
137
  ?>
138
- </label>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
139
  </div>
140
- <input type="submit" name="submit" id="submit" class="button button-hero" style="margin-top: 0.5em;" value="<?php echo esc_html__('Signup and send me the course for free', 'email-subscribers' ); ?>">
141
- <div style="text-align: center; width: 56%; margin-top: 0.5em;"><a class="es-skip" href="<?php echo esc_url( admin_url('admin.php?page=es_dashboard&es_skip=1&option_name=email_receive_error') ); ?>" ><u><?php echo esc_html__('Skip and goto Dashboard', 'email-subscribers'); ?></u></a></div>
142
- <br>
143
- <p id="klawoo_response"></p>
144
- </form>
 
 
 
 
 
 
145
  </div>
 
146
  </div>
147
- <div class="sp es-error" >
148
- <h1 style=" color: #e53e3e;">⚠️ <?php echo esc_html__('Problem sending emails - fix this first.'); ?></h1>
149
- <p style="font-weight: 500"><?php echo esc_html__('We faced some problems sending Test Campaigns.'); ?></p>
150
- <div class="es-email-sending-error"></div>
151
- <div style="margin-top: 1rem;"><a href="https://www.icegram.com/documentation/common-email-sending-problems/?utm_source=es&utm_medium=es_onboarding&utm_campaign=view_docs_help_page" target="_blank" style="font-weight: 600;font-size: 1.06em;line-height: 2em; "> <?php echo esc_html__('Explore more about problems', 'email-subscribers'); ?></a></div>
152
- <div class="es-gray"><?php echo esc_html__('Please solve these problems, without that email sending won\'t work.'); ?></div>
153
- <div style="margin-top: 1em;">
154
- <div class="es-gray"><?php echo esc_html__('Also, it\'s a perfect time to get better at email marketing now.', 'email-subscribers'); ?>
155
- <br/><span style="font-weight: 500;"><?php echo esc_html__('Sign up ', 'email-subscribers'); ?></span><?php echo esc_html__('below to get our highly acclaimed course for free.', 'email-subscribers'); ?>
156
- </div>
157
- <form name="klawoo_subscribe" action="#" method="POST" accept-charset="utf-8" class="es-onboarding">
158
- <input class="es-ltr" type="text" name="name" id="name" placeholder="Your Name"/> <br />
159
- <input class="es-ltr" type="text" name="email" id="email" placeholder="Your Email" required/> <br />
160
- <input type="hidden" name="list" value="hN8OkYzujUlKgDgfCTEcIA"/>
161
- <input type="hidden" name="form-source" value="es_email_send_error"/>
162
- <div style="margin-top: 0.5rem;">
163
- <input type="checkbox" name="es-gdpr-agree" id ="es-gdpr-agree" value="1" required="required">
164
- <label for="es-gdpr-agree" style="font-size: 0.9em; color: #777777; ">
165
- <?php
166
- /* translators: %s: Icegram Privacy Policy text with anchor tag */
167
- echo sprintf(esc_html__( 'I have read and agreed to your %s.', 'email-subscribers' ), '<a href="https://www.icegram.com/privacy-policy/" target="_blank" style="font-weight:500">' . esc_html__( 'Privacy Policy', 'email-subscribers' ) . '</a>' );
168
- ?>
169
- </label>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
170
  </div>
171
- <input type="submit" name="submit" id="submit" class="button button-hero" style="margin-top: 0.5rem;" value="<?php echo esc_html__( 'Signup and send me the course for free', 'email-subscribers' ); ?>">
172
- <div style="text-align: center; width: 56%; margin-top: 0.5em;"><a class="es-skip" href="<?php echo esc_url( admin_url('admin.php?page=es_dashboard&es_skip=1&option_name=email_send_error') ); ?>"><u><?php echo esc_html__('Skip and goto Dashboard', 'email-subscribers'); ?></u></a></div>
173
- <br>
174
- <p id="klawoo_response"></p>
175
  </form>
 
 
 
 
 
 
 
 
176
  </div>
177
- </div>
178
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
179
  </div>
180
  </div>
1
+ <?php
2
+ $onboarding_step = IG_ES_Onboarding::get_onboarding_step();
3
+ ?>
4
+ <div class="mx-auto mt-6 sm:mt-5">
5
+ <img src="<?php echo esc_url( ES_PLUGIN_URL . 'lite/admin/images/icegram_logo.svg' ); ?>" class="mx-auto h-7" alt="Icegram" />
6
+ </div>
7
+ <div id="slider-wrapper font-sans">
8
  <div id="slider">
9
+ <div class="sp es-send-email-screen<?php echo esc_attr( 1 === $onboarding_step ? ' active' : '' ); ?>" style="<?php echo esc_attr( 1 === $onboarding_step ? '' : 'display:none' ); ?>">
10
+ <?php $from_name = get_option( 'ig_es_from_name' ); ?>
11
+ <?php $from_email = get_option( 'ig_es_from_email' ); ?>
12
+
13
+ <section class="mx-auto my-6 sm:my-7">
14
+ <div
15
+ class="w-full h-full overflow-hidden bg-white lg:flex md:rounded-lg md:shadow-xl md:mx-auto lg:max-w-3xl xl:max-w-4xl"
16
+ >
17
+ <div class="relative hidden w-1/4 overflow-hidden bg-blue-300 lg:block">
18
+ <svg
19
+ class="absolute object-cover w-full top-8"
20
+ viewBox="0 0 128 172"
21
+ xmlns="http://www.w3.org/2000/svg"
22
+ >
23
+ <g fill="none" stroke="#fff" stroke-width="20">
24
+ <circle cx="64" cy="84" opacity=".15" r="70"></circle>
25
+ <circle cx="64" cy="84" opacity=".15" r="35"></circle>
26
+ </g>
27
+ </svg>
28
+ <img
29
+ src="<?php echo esc_url( ES_PLUGIN_URL . 'lite/admin/images/anne-email-suggestion.svg' ); ?>"
30
+ class="absolute object-cover w-full px-3 bottom-2"
31
+ />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32
  </div>
33
+
34
+ <div class="flex-1">
35
+ <div class="p-4 md:px-8 md:py-5">
36
+ <span class="text-xs text-gray-400"><?php echo esc_html__( 'STEP 1 of 3', 'email-subscribers'); ?> </span>
37
+ <h3
38
+ class="mb-1 text-2xl font-bold leading-snug text-gray-800 sm:text-3xl"
39
+ >
40
+ <?php echo esc_html__( 'Welcome!', 'email-subscribers'); ?>
41
+ </h3>
42
+ <form id="es-send-email-form">
43
+ <div class="space-y-5 text-gray-800">
44
+ <p class="text-base -mb-2">
45
+ <?php
46
+ echo esc_html__( 'We\'ve simplified and automated email marketing, so you can get
47
+ results quickly.', 'email-subscribers');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
48
  ?>
49
+ </p>
50
+
51
+ <div class="space-y-1">
52
+ <h3 class="text-base font-medium text-gray-900"><?php echo esc_html__( 'Essentials:', 'email-subscribers'); ?></h3>
53
+
54
+ <div
55
+ class="space-y-2 text-sm sm:space-y-0 sm:space-x-4 sm:flex sm:items-center"
56
+ >
57
+
58
+ <div class="w-full sm:w-1/2">
59
+ <label for="es_from_name"><?php echo esc_html__( '"From" name for emails: ', 'email-subscribers'); ?></label>
60
+ <input
61
+ id="es_from_name" name="es_from_name" value="<?php echo esc_attr( $from_name ); ?>" required
62
+ class="es_from_name block w-full mt-1 text-sm transition duration-150 ease-in-out rounded-md shadow-sm form-input sm:leading-5"
63
+ placeholder="Name"
64
+ />
65
+ </div>
66
+
67
+ <div class="w-full sm:w-1/2">
68
+ <label for="es_from_email"><?php echo esc_html__( '"From" email: ', 'email-subscribers'); ?></label>
69
+ <input type="email"
70
+ id="es_from_email" name="es_from_email" value="<?php echo esc_attr( $from_email ); ?>" required
71
+ class="es_from_email es_onboard_email block w-full mt-1 text-sm transition duration-150 ease-in-out rounded-md shadow-sm form-input sm:leading-5"
72
+ placeholder="name@domain.com"
73
+ />
74
+ </div>
75
+ </div>
76
+ </div>
77
+ <div class="">
78
+ <h3 class="text-base font-medium text-gray-900">
79
+ <?php echo esc_html__( 'Email delivery testing:', 'email-subscribers'); ?>
80
+ </h3>
81
+
82
+ <p class="text-sm leading-6 pt-1">
83
+ <?php
84
+ echo esc_html__( 'Add a couple of your own email addresses below. We will add
85
+ them to your audience lists.', 'email-subscribers');
86
+ ?>
87
+ </p>
88
+ <div
89
+ class="my-2 space-y-2 sm:my-0 sm:space-y-0 sm:space-x-4 sm:flex sm:items-center"
90
+ >
91
+ <div class="w-full sm:w-1/2">
92
+ <input type="email"
93
+ name="es_test_email[]"
94
+ required
95
+ class="es_email es_onboard_email block w-full text-sm transition duration-150 ease-in-out rounded-md shadow-sm form-input sm:leading-5"
96
+ placeholder="name@domain.com"
97
+ />
98
+ </div>
99
+ <div class="w-full sm:w-1/2">
100
+ <input type="email"
101
+ name="es_test_email[]"
102
+ class="es_email es_onboard_email block w-full text-sm transition duration-150 ease-in-out rounded-md shadow-sm form-input sm:leading-5"
103
+ placeholder="name@domain.com"
104
+ />
105
+ </div>
106
+ </div>
107
+ </div>
108
+
109
+ <div class="space-y-1 leading-5">
110
+ <h3 class="text-base font-medium text-gray-900 -mb-0.5"><?php echo esc_html__( 'Your preferences:', 'email-subscribers'); ?></h3>
111
+ <?php if ( ! ES()->is_premium() ) { ?>
112
+ <div class="flex pt-1">
113
+ <div class="pt-1">
114
+ <input
115
+ id="es_free_trial_preference"
116
+ type="checkbox"
117
+ checked="checked"
118
+ class="w-4 h-4 transition duration-150 ease-in-out form-checkbox"
119
+ />
120
+ </div>
121
+ <div class="pl-3">
122
+ <label for="es_free_trial_preference" class="text-sm">
123
+ <?php
124
+ echo esc_html__( 'Test Email Delivery', 'email-subscribers');
125
+ ?>
126
+ </label>
127
+ </div>
128
+ </div>
129
+ <?php } ?>
130
+ <div class="flex">
131
+ <div class="pt-1">
132
+ <input
133
+ id="es_post_notification_preference"
134
+ type="checkbox"
135
+ checked="checked"
136
+ class="w-4 h-4 transition duration-150 ease-in-out form-checkbox"
137
+ />
138
+ </div>
139
+ <div class="pl-3">
140
+ <label for="es_post_notification_preference" class="text-sm">
141
+ <?php
142
+ echo esc_html__( 'I want to send email notifications when new blog posts are
143
+ published', 'email-subscribers');
144
+ ?>
145
+ </label>
146
+ </div>
147
+ </div>
148
+ <div class="flex">
149
+ <div class="pt-1">
150
+ <input
151
+ id="ig_es_enable_double_optin"
152
+ type="checkbox"
153
+ checked="checked"
154
+ class="w-4 h-4 transition duration-150 ease-in-out form-checkbox"
155
+ />
156
+ </div>
157
+ <div class="pl-3">
158
+ <label for="ig_es_enable_double_optin" class="text-sm">
159
+ <?php
160
+ echo esc_html__( 'Enable double opt-in (people have to click a confirmation
161
+ link in email before they\'re subscribed)', 'email-subscribers');
162
+ ?>
163
+ </label>
164
+ </div>
165
+ </div>
166
+ <div class="flex">
167
+ <div class="pt-1">
168
+ <input
169
+ id="ig_es_add_gdpr_consent"
170
+ type="checkbox"
171
+ class="w-4 h-4 transition duration-150 ease-in-out form-checkbox"
172
+ />
173
+ </div>
174
+ <div class="pl-3">
175
+ <label for="ig_es_add_gdpr_consent" class="text-sm">
176
+ <?php echo esc_html__( 'Add GDPR consent in subscription forms', 'email-subscribers'); ?>
177
+ </label>
178
+ </div>
179
+ </div>
180
+ </div>
181
  </div>
182
+ </form>
183
+ </div>
184
+ <div class="px-4 py-3 text-right bg-gray-50 md:px-8 -mt-5">
185
+ <button
186
+ type="button" id="es-button-send"
187
+ class="es-button-send relative inline-flex items-center px-4 py-2 text-base font-medium leading-5 text-white bg-indigo-800 border border-transparent rounded-md hover:bg-indigo-600 focus:outline-none focus:shadow-outline"
188
+ >
189
+ <?php echo esc_html__( 'Ok, set it up for me →', 'email-subscribers'); ?>
190
+ </button>
191
+ </div>
192
+ </div>
193
+ </div>
194
+ </section>
195
  </div>
196
+ <div class="sp es-delivery-check<?php echo esc_attr( 2 === $onboarding_step ? ' active' : '' ); ?>" style="<?php echo esc_attr( 2 === $onboarding_step ? '' : 'display:none' ); ?>">
197
+ <section class="mx-auto my-6 sm:my-7">
198
+ <div
199
+ class="w-full h-full overflow-hidden bg-white lg:flex md:rounded-lg md:shadow-xl md:mx-auto lg:max-w-3xl xl:max-w-4xl">
200
+ <div class="relative hidden w-1/4 overflow-hidden bg-pink-200 lg:block">
201
+ <svg
202
+ class="absolute object-cover w-full animate animate-pulse top-8"
203
+ viewBox="0 0 128 172"
204
+ xmlns="http://www.w3.org/2000/svg"
205
+ >
206
+ <g fill="none" stroke="#fff" stroke-width="20">
207
+ <circle cx="64" cy="84" opacity=".25" r="70"></circle>
208
+ <circle cx="64" cy="84" opacity=".15" r="35"></circle>
209
+ </g>
210
+ </svg>
211
+ <img
212
+ src="<?php echo esc_url( ES_PLUGIN_URL . 'lite/admin/images/anne-working.svg' ); ?>"
213
+ class="absolute object-cover w-full px-3 bottom-2"
214
+ />
 
 
 
 
 
 
 
215
  </div>
216
+
217
+ <div class="flex-1">
218
+ <div style="height:33.2rem" class="p-4 md:px-8 md:py-5">
219
+ <span class="text-xs text-gray-400"><?php echo esc_html__( 'STEP 2 of 3', 'email-subscribers'); ?> </span>
220
+ <h3
221
+ class="mb-2 text-2xl font-bold leading-snug text-gray-800 sm:text-3xl"
222
+ >
223
+ <?php echo esc_html__( 'Hold on, personalizing for you...', 'email-subscribers'); ?>
224
+ </h3>
225
+ <div class="space-y-4 text-gray-800">
226
+ <p class="text-base">
227
+ <?php
228
+ echo esc_html__( 'We\'ll create audience lists, campaigns and a subscription form.
229
+ And then try to send a test email to make sure everything works.', 'email-subscribers');
230
  ?>
231
+ </p>
232
+ <ul class="space-y-4 text-sm font-medium leading-5 text-gray-400">
233
+ <li id="ig-es-onboard-create_default_lists" class="flex items-start space-x-3 group">
234
+ <div class="relative pt-1 flex items-center justify-center flex-shrink-0 w-5 h-5">
235
+ <span class="animate-ping absolute w-4 h-4 bg-indigo-200 rounded-full"></span>
236
+ <span class="relative block w-2 h-2 bg-indigo-700 rounded-full"></span>
237
+ </div>
238
+ <p class="text-sm text-indigo-800">
239
+ <?php
240
+ /* translators: 1: Main List 2: Test List */
241
+ echo sprintf( esc_html__('Creating audience lists - %1$s &amp; %2$s', 'email-subscribers'), esc_html( IG_MAIN_LIST ), esc_html( IG_DEFAULT_LIST ) );
242
+ ?>
243
+ </p>
244
+ </li>
245
+
246
+ <li id="ig-es-onboard-create_contacts_and_add_to_list" class="flex items-start space-x-3 group">
247
+ <div
248
+ class="relative pt-1 flex items-center justify-center flex-shrink-0 w-5 h-5"
249
+ >
250
+ <span
251
+ class="block w-2 h-2 transition duration-150 ease-in-out bg-gray-300 rounded-full group-hover:bg-gray-400 group-focus:bg-gray-400"
252
+ ></span>
253
+ </div>
254
+ <p class="text-sm">
255
+ <?php echo esc_html__('Subscribing you and ', 'email-subscribers'); ?>
256
+ <span id="es_onboarding_emails_list"></span>
257
+ <?php echo esc_html__(' to these lists', 'email-subscribers'); ?>
258
+ </p>
259
+ </li>
260
+
261
+ <li id="ig-es-onboard-create_default_newsletter_broadcast" class="flex items-start space-x-3 group">
262
+ <div
263
+ class="relative pt-1 flex items-center justify-center flex-shrink-0 w-5 h-5"
264
+ >
265
+ <span
266
+ class="block w-2 h-2 transition duration-150 ease-in-out bg-gray-300 rounded-full group-hover:bg-gray-400 group-focus:bg-gray-400"
267
+ ></span>
268
+ </div>
269
+ <p class="text-sm"><?php echo esc_html__('Creating a campaign - newsletter broadcast test', 'email-subscribers'); ?></p>
270
+ </li>
271
+
272
+ <li id="ig-es-onboard-create_default_post_notification" class="flex items-start space-x-3 group" id="es_create_post_notification">
273
+ <div
274
+ class="relative pt-1 flex items-center justify-center flex-shrink-0 w-5 h-5"
275
+ >
276
+ <span
277
+ class="block w-2 h-2 transition duration-150 ease-in-out bg-gray-300 rounded-full group-hover:bg-gray-400 group-focus:bg-gray-400"
278
+ ></span>
279
+ </div>
280
+ <p class="text-sm"><?php echo esc_html__('Creating a campaign - new post notification test', 'email-subscribers'); ?></p>
281
+ </li>
282
+
283
+ <li id="ig-es-onboard-create_default_subscription_form" class="flex items-start space-x-3 group">
284
+ <div
285
+ class="relative pt-1 flex items-center justify-center flex-shrink-0 w-5 h-5"
286
+ >
287
+ <span
288
+ class="block w-2 h-2 transition duration-150 ease-in-out bg-gray-300 rounded-full group-hover:bg-gray-400 group-focus:bg-gray-400"
289
+ ></span>
290
+ </div>
291
+ <p class="text-sm"><?php echo esc_html__('Creating a subscription opt-in form for the Main list', 'email-subscribers'); ?></p>
292
+ </li>
293
+
294
+ <li id="ig-es-onboard-add_widget_to_sidebar" class="flex items-start space-x-3 group">
295
+ <div
296
+ class="relative pt-1 flex items-center justify-center flex-shrink-0 w-5 h-5"
297
+ >
298
+ <span
299
+ class="block w-2 h-2 transition duration-150 ease-in-out bg-gray-300 rounded-full group-hover:bg-gray-400 group-focus:bg-gray-400"
300
+ ></span>
301
+ </div>
302
+ <p class="text-sm">
303
+ <?php
304
+ echo esc_html__('Adding the form to an active sidebar, so you can show it on
305
+ the site', 'email-subscribers');
306
+ ?>
307
+ </p>
308
+ </li>
309
+
310
+ <li id="ig-es-onboard-test-email-delivery" class="flex items-start space-x-3 group">
311
+ <div
312
+ class="relative pt-1 flex items-center justify-center flex-shrink-0 w-5 h-5"
313
+ >
314
+ <span
315
+ class="block w-2 h-2 transition duration-150 ease-in-out bg-gray-300 rounded-full group-hover:bg-gray-400 group-focus:bg-gray-400"
316
+ ></span>
317
+ </div>
318
+ <div>
319
+ <p class="text-sm"><?php echo esc_html__('Testing email delivery...', 'email-subscribers'); ?></p>
320
+ <ul class="mt-3 space-y-2 font-normal sm:space-y-3" id="ig-es-onboard-test-email-delivery-tasks-list">
321
+ <li id="ig-es-onboard-queue_default_broadcast_newsletter" class="flex items-start space-x-3 group">
322
+ <div
323
+ class="relative pt-1 flex items-center justify-center flex-shrink-0 w-5 h-5"
324
+ >
325
+ <span
326
+ class="block w-2 h-2 transition duration-150 ease-in-out bg-gray-300 rounded-full group-hover:bg-gray-400 group-focus:bg-gray-400"
327
+ ></span>
328
+ </div>
329
+ <p class="text-sm"><?php echo esc_html__('Queuing up campaign - newsletter broadcast test', 'email-subscribers'); ?></p>
330
+ </li>
331
+ <li id="ig-es-onboard-dispatch_emails_from_server" class="flex items-start space-x-3 group">
332
+ <div
333
+ class="relative pt-1 flex items-center justify-center flex-shrink-0 w-5 h-5"
334
+ >
335
+ <span
336
+ class="block w-2 h-2 transition duration-150 ease-in-out bg-gray-300 rounded-full group-hover:bg-gray-400 group-focus:bg-gray-400"
337
+ ></span>
338
+ </div>
339
+ <p class="text-sm"><?php echo esc_html__('Dispatching emails from your server', 'email-subscribers'); ?></p>
340
+ </li>
341
+ <li id="ig-es-onboard-check_test_email_on_server" class="flex items-start space-x-3 group">
342
+ <div
343
+ class="relative pt-1 flex items-center justify-center flex-shrink-0 w-5 h-5"
344
+ >
345
+ <span
346
+ class="block w-2 h-2 transition duration-150 ease-in-out bg-gray-300 rounded-full group-hover:bg-gray-400 group-focus:bg-gray-400"
347
+ ></span>
348
+ </div>
349
+ <p class="text-sm">
350
+ <?php echo esc_html__('Waiting for test email to arrive on destination server', 'email-subscribers'); ?>
351
+ </p>
352
+ </li>
353
+ <li id="ig-es-onboard-evaluate_email_delivery" class="flex items-start space-x-3 group">
354
+ <div
355
+ class="relative pt-1 flex items-center justify-center flex-shrink-0 w-5 h-5"
356
+ >
357
+ <span
358
+ class="block w-2 h-2 transition duration-150 ease-in-out bg-gray-300 rounded-full group-hover:bg-gray-400 group-focus:bg-gray-400"
359
+ ></span>
360
+ </div>
361
+ <p class="text-sm"><?php echo esc_html__('Excellent! Email delivery setup is working well!', 'email-subscribers'); ?></p>
362
+ </li>
363
+ </ul>
364
+ </div>
365
+ </li>
366
+ </ul>
367
  </div>
368
+ </div>
369
+ <div class="px-4 py-3 text-right bg-gray-50 md:px-8">
370
+ <button
371
+ type="button"
372
+ id="es_delivery_check_processed"
373
+ class="relative inline-flex items-center px-4 py-2 text-base font-medium leading-5 text-white bg-indigo-800 border border-transparent rounded-md hover:bg-indigo-600 focus:outline-none focus:shadow-outline"
374
+ data-error-text="<?php echo esc_attr( 'Continue anyway →', 'email-subscribers' ); ?>"
375
+ >
376
+ <?php echo esc_html__('All good, let\'s finish up →', 'email-subscribers'); ?>
377
+ </button>
378
+ </div>
379
  </div>
380
+ </section>
381
  </div>
382
+ <div class="sp es-onboard-success<?php echo esc_attr( 3 === $onboarding_step ? ' active' : '' ); ?>" style="<?php echo esc_attr( 3 === $onboarding_step ? '' : 'display:none' ); ?>">
383
+ <section class="mx-auto my-6 sm:my-7" >
384
+ <div class="w-full overflow-hidden bg-white lg:flex md:rounded-lg md:shadow-xl md:mx-auto lg:max-w-3xl xl:max-w-4xl">
385
+ <div class="relative hidden w-1/4 overflow-hidden bg-green-300 lg:block">
386
+ <svg
387
+ class="absolute object-cover w-full text-white top-8"
388
+ fill="none"
389
+ stroke="currentColor"
390
+ viewBox="0 0 24 24"
391
+ xmlns="http://www.w3.org/2000/svg"
392
+ >
393
+ <path
394
+ stroke-linecap="round"
395
+ stroke-linejoin="round"
396
+ stroke-width="2.5"
397
+ d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"
398
+ opacity="0.25"
399
+ ></path>
400
+ </svg>
401
+
402
+ <img
403
+ src="<?php echo esc_url( ES_PLUGIN_URL . 'lite/admin/images/anne-welcome.svg' ); ?>"
404
+ class="absolute object-cover w-full px-3 lg:top-1/2 xl:top-1/3"
405
+ />
406
+ </div>
407
+
408
+ <div class="flex-1">
409
+ <form id="ig-es-onboarding-final-steps-form">
410
+ <div style="height:33.2rem" class="p-4 md:px-8 md:py-5">
411
+ <span class="text-xs text-gray-400"><?php echo esc_html__('STEP 3 of 3', 'email-subscribers'); ?> </span>
412
+ <h3
413
+ class="mb-2 text-2xl font-bold leading-snug text-gray-800 sm:text-3xl"
414
+ >
415
+ <?php echo esc_html__('Done! Now speed up your success!', 'email-subscribers'); ?>
416
+ </h3>
417
+ <input type="hidden" id="sign-up-list" name="list" value="hN8OkYzujUlKgDgfCTEcIA"/>
418
+ <input type="hidden" id="sign-up-form-source" name="form-source" value=""/>
419
+ <div class="space-y-3 text-gray-800">
420
+
421
+ <div class="space-y-5 text-gray-800">
422
+ <p class="text-base -mb-1"><?php echo esc_html__('Setup is complete. Couple of things to support you...', 'email-subscribers'); ?>
423
+ </p>
424
+ <div class="">
425
+ <h3 class="text-base font-medium text-gray-900">
426
+ <?php echo esc_html__('Free course: WordPress Email Marketing Masterclass 2020', 'email-subscribers'); ?>
427
+ </h3>
428
+ <p class="pt-2 text-sm leading-6">
429
+ <?php
430
+ echo esc_html__('How to build your list, make sure your email reach your
431
+ audience and influence your audience.', 'email-subscribers');
432
+ ?>
433
+ </p>
434
+ <div
435
+ class="pt-1 space-y-2 text-sm sm:space-y-0 sm:space-x-4 sm:flex sm:items-center"
436
+ >
437
+ <div class="w-full sm:w-1/2">
438
+ <input
439
+ id="ig-es-sign-up-name"
440
+ class="block w-full mt-1 text-sm transition duration-150 ease-in-out rounded-md shadow-sm form-input sm:leading-5"
441
+ placeholder="Your name"
442
+ />
443
+ </div>
444
+
445
+ <div class="w-full sm:w-1/2">
446
+ <input
447
+ type="email"
448
+ id="ig-es-sign-up-email"
449
+ class="es_onboard_email block w-full mt-1 text-sm transition duration-150 ease-in-out rounded-md shadow-sm form-input sm:leading-5"
450
+ placeholder="Your email"
451
+ />
452
+ </div>
453
+ </div>
454
+ </div>
455
+
456
+ <div class="space-y-1">
457
+ <h3 class="text-base font-medium text-gray-900 pt-2">
458
+ <?php echo esc_html__('Recommended next steps:', 'email-subscribers'); ?>
459
+ </h3>
460
+ <ul class="ml-4 space-y-2 text-sm list-disc pt-1.5">
461
+ <li><?php echo esc_html__('Review "Settings" and make adjustments if needed', 'email-subscribers'); ?></li>
462
+ <li><?php echo esc_html__('Import your contacts, create new campaigns and test', 'email-subscribers'); ?></li>
463
+ <li>
464
+ <?php echo esc_html__('Review', 'email-subscribers'); ?>
465
+ <a
466
+ class="text-indigo-800 hover:underline"
467
+ href="https://www.icegram.com/knowledgebase_category/email-subscribers/"
468
+ ><?php echo esc_html__('documentation', 'email-subscribers'); ?></a
469
+ >
470
+ <?php echo esc_html__('if you need any help', 'email-subscribers'); ?>
471
+ </li>
472
+ </ul>
473
+ </div>
474
+ </div>
475
+ </div>
476
  </div>
 
 
 
 
477
  </form>
478
+ <div class="px-4 py-3 text-right bg-gray-50 md:px-8">
479
+ <button
480
+ type="button" id="ig-es-finish-onboarding-process"
481
+ class="relative inline-flex items-center px-4 py-2 text-base font-medium leading-5 text-white bg-indigo-800 border border-transparent rounded-md hover:bg-indigo-600 focus:outline-none focus:shadow-outline"
482
+ >
483
+ <?php echo esc_html__('Complete setup &amp; take me to "Settings" →', 'email-subscribers'); ?>
484
+ </button>
485
+ </div>
486
  </div>
487
+ </div>
488
+ </section>
489
+ </div>
490
+
491
+ <div class="sp es-receive-error" style="display:none">
492
+ <div class="fixed flex inset-0 overflow-x-hidden overflow-y-auto z-50 flex justify-center w-full h-full" style="background-color: rgba(0,0,0,.5);">
493
+ <section class="absolute flex justify-center mx-auto md:mx-auto lg:mx-auto my-12 sm:my-12 lg:my-24">
494
+ <div
495
+ class="inline-block overflow-hidden text-left align-bottom transition-all transform bg-white rounded-lg shadow-xl sm:my-8 sm:align-middle sm:max-w-lg sm:w-full"
496
+ role="dialog"
497
+ aria-modal="true"
498
+ aria-labelledby="modal-headline"
499
+ >
500
+ <div class="px-4 pt-5 pb-4 bg-white sm:p-6 sm:pb-4">
501
+ <div class="sm:flex sm:items-start">
502
+ <div class="flex items-center justify-center flex-shrink-0 w-12 h-12 mx-auto bg-red-100 rounded-full sm:mx-0 sm:h-10 sm:w-10">
503
+ <svg
504
+ class="w-6 h-6 text-red-600"
505
+ fill="none"
506
+ viewBox="0 0 24 24"
507
+ stroke="currentColor"
508
+ >
509
+ <path
510
+ stroke-linecap="round"
511
+ stroke-linejoin="round"
512
+ stroke-width="2"
513
+ d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"
514
+ ></path>
515
+ </svg>
516
+ </div>
517
+ <div class="mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left">
518
+ <h3 class="text-lg font-medium leading-6 text-gray-900" id="modal-headline">
519
+ <?php echo esc_html__('Email sending did not work', 'email-subscribers'); ?>
520
+ </h3>
521
+ <div class="mt-2 space-y-4 leading-5 text-gray-800">
522
+ <div>
523
+ <p class="font-medium text-sm text-gray-900">
524
+ <?php echo esc_html__('Here\'s the error we encountered:', 'email-subscribers'); ?>
525
+ </p>
526
+ <div class="bg-red-50 px-1 py-0.5 text-sm font-mono ig-es-onboarding-error">
527
+ [error-message]
528
+ </div>
529
+ </div>
530
+ <p id="ig-es-email-delivery-error-message" class="text-sm">
531
+
532
+ </p>
533
+ <p class="font-medium text-sm">
534
+ <?php
535
+ echo esc_html__('We recommend you solve this problem quickly after completing
536
+ the setup. Do make sure emails are getting delivered before
537
+ you send any real campaigns.', 'email-subscribers');
538
+ ?>
539
+ </p>
540
+ </div>
541
+ </div>
542
+ </div>
543
+ </div>
544
+ <div class="px-4 py-3 bg-gray-50 sm:px-6 sm:flex sm:flex-row-reverse">
545
+ <span class="flex w-full rounded-md shadow-sm sm:ml-3 sm:w-auto">
546
+ <button
547
+ type="button"
548
+ id="es-delivery-error-button"
549
+ class="es-delivery-error-button relative inline-flex items-center px-4 py-2 text-base font-medium leading-5 text-white bg-indigo-800 border border-transparent rounded-md hover:bg-indigo-600 focus:outline-none focus:shadow-outline"
550
+ >
551
+ <?php echo esc_html__(' Understood, continue for now →', 'email-subscribers'); ?>
552
+ </button>
553
+ </span>
554
+ </div>
555
+ </div>
556
+ </section>
557
+ </div>
558
+ </div>
559
  </div>
560
  </div>
lite/includes/class-email-subscribers-activator.php CHANGED
@@ -43,8 +43,8 @@ class Email_Subscribers_Activator {
43
  $labels = array(
44
  'name' => __( 'Templates', 'email-subscribers' ),
45
  'singular_name' => __( 'Templates', 'email-subscribers' ),
46
- 'add_new' => __( 'Add new Template', 'email-subscribers' ),
47
- 'add_new_item' => __( 'Add new Template', 'email-subscribers' ),
48
  'edit_item' => __( 'Edit Templates', 'email-subscribers' ),
49
  'new_item' => __( 'New Templates', 'email-subscribers' ),
50
  'all_items' => __( 'Templates', 'email-subscribers' ),
43
  $labels = array(
44
  'name' => __( 'Templates', 'email-subscribers' ),
45
  'singular_name' => __( 'Templates', 'email-subscribers' ),
46
+ 'add_new' => __( 'Add New Template', 'email-subscribers' ),
47
+ 'add_new_item' => __( 'Add New Template', 'email-subscribers' ),
48
  'edit_item' => __( 'Edit Templates', 'email-subscribers' ),
49
  'new_item' => __( 'New Templates', 'email-subscribers' ),
50
  'all_items' => __( 'Templates', 'email-subscribers' ),
lite/includes/class-email-subscribers.php CHANGED
@@ -616,6 +616,7 @@ if ( ! class_exists( 'Email_Subscribers' ) ) {
616
  // Admin Notices
617
  'lite/includes/notices/class-es-admin-notices.php',
618
 
 
619
  // Database class files
620
  'lite/includes/db/class-es-db.php',
621
  'lite/includes/db/class-es-db-queue.php',
@@ -640,7 +641,13 @@ if ( ! class_exists( 'Email_Subscribers' ) ) {
640
  // Common Class
641
  'lite/includes/class-es-common.php',
642
 
 
 
 
 
 
643
  // Classes
 
644
  'lite/includes/classes/class-es-cache.php',
645
  'lite/includes/classes/class-es-mailer.php',
646
  'lite/includes/classes/class-es-message.php',
@@ -680,6 +687,9 @@ if ( ! class_exists( 'Email_Subscribers' ) ) {
680
  // Install/ Update
681
  'lite/includes/upgrade/es-update-functions.php',
682
  'lite/includes/class-es-install.php',
 
 
 
683
 
684
  // Public Classes
685
  'lite/public/class-email-subscribers-public.php',
@@ -931,6 +941,22 @@ if ( ! class_exists( 'Email_Subscribers' ) ) {
931
  return $this->version;
932
  }
933
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
934
  /**
935
  * Is ES PRO?
936
  *
616
  // Admin Notices
617
  'lite/includes/notices/class-es-admin-notices.php',
618
 
619
+
620
  // Database class files
621
  'lite/includes/db/class-es-db.php',
622
  'lite/includes/db/class-es-db-queue.php',
641
  // Common Class
642
  'lite/includes/class-es-common.php',
643
 
644
+ // Services
645
+ 'lite/includes/services/class-es-services.php',
646
+ 'lite/includes/services/class-es-email-delivery-check.php',
647
+ 'lite/includes/services/class-es-send-test-email.php',
648
+
649
  // Classes
650
+ 'lite/includes/classes/class-es-list-table.php',
651
  'lite/includes/classes/class-es-cache.php',
652
  'lite/includes/classes/class-es-mailer.php',
653
  'lite/includes/classes/class-es-message.php',
687
  // Install/ Update
688
  'lite/includes/upgrade/es-update-functions.php',
689
  'lite/includes/class-es-install.php',
690
+
691
+ // Onboarding process handler class.
692
+ 'lite/admin/class-ig-es-onboarding.php',
693
 
694
  // Public Classes
695
  'lite/public/class-email-subscribers-public.php',
941
  return $this->version;
942
  }
943
 
944
+ /**
945
+ * Method to get if user has opted for trial or not.
946
+ *
947
+ * @return bool
948
+ *
949
+ * @since 4.6.0
950
+ */
951
+ public function is_trial() {
952
+ $is_trial = get_option( 'ig_es_is_trial', '' );
953
+ if ( 'yes' === $is_trial ) {
954
+ return true;
955
+ } else {
956
+ return false;
957
+ }
958
+ }
959
+
960
  /**
961
  * Is ES PRO?
962
  *
lite/includes/class-es-common.php CHANGED
@@ -75,11 +75,11 @@ class ES_Common {
75
 
76
  /**
77
  * Method to handle oembed content
78
- *
79
  * @param string @content Content.
80
- *
81
- * @return string $content
82
- *
83
  * @since 4.4.9
84
  */
85
  public static function handle_oembed_content( $content = '' ) {
@@ -96,19 +96,19 @@ class ES_Common {
96
 
97
  /**
98
  * Method to handle link in email content
99
- *
100
  * URL from {{POSTLINK-ONLY}} was being converted to oembed html if it is not wrapped inside <a> tag's href attribute and is on a seperate line in ES template content
101
  * resulting in a link html for {{POSTLINK-ONLY}} instead of plain text link.
102
- *
103
  * Most email clients like GMail, Outlook do not support videos in the email. To handle it, we are replacing the WordPress's oembed generated HTML for video links to their respective thubmnail images which are then linked the original video URL.
104
- *
105
  * @param string $html HTML for current URL.
106
  * @param string $url Current URL.
107
  * @param array $attr Shortcode attribute.
108
  * @param int $post_ID Current post id.
109
- *
110
  * @return string $html HTML for current URL.
111
- *
112
  * @since 4.4.9
113
  */
114
  public static function handle_link_in_email_content( $html, $url, $attr, $post_ID ) {
@@ -120,12 +120,12 @@ class ES_Common {
120
  $html = $url;
121
  } else {
122
  if ( ! class_exists( 'WP_oEmbed' ) ) {
123
- require_once ABSPATH . 'wp-includes/class-wp-oembed.php' ;
124
  }
125
 
126
  $oembed = new WP_oEmbed();
127
  $provider = $oembed->discover( $url );
128
-
129
  if ( ! empty( $provider ) ) {
130
  $oembed_response = $oembed->fetch( $provider, $url, $attr );
131
  if ( is_object( $oembed_response ) && ! empty( $oembed_response->type ) && 'video' === $oembed_response->type ) {
@@ -139,7 +139,7 @@ class ES_Common {
139
  case 'YouTube':
140
  $play_icon_url = ES_PLUGIN_URL . 'lite/public/images/youtube-play-button.png';
141
  break;
142
-
143
  case 'Vimeo':
144
  $play_icon_url = ES_PLUGIN_URL . 'lite/public/images/vimeo-play-button.png';
145
  break;
@@ -155,13 +155,13 @@ class ES_Common {
155
  ?>
156
  <table style="margin-bottom: 1em;">
157
  <tbody>
158
- <tr>
159
- <td style="background-image: url('<?php echo esc_url( $thumbnail_url ); ?>');height:<?php echo esc_attr( $thumbnail_height ); ?>;width:<?php echo esc_attr( $thumbnail_width ); ?>;background-size: 100% 100%;background-repeat: no-repeat;text-align:center;">
160
- <a href="<?php echo esc_url( $url ); ?>" title="<?php echo esc_attr( $title ); ?>" target="_blank">
161
- <img src="<?php echo esc_url( $play_icon_url ); ?>" style="height: 75px; margin: auto;">
162
- </a>
163
- </td>
164
- </tr>
165
  </tbody>
166
  </table>
167
  <?php
@@ -254,7 +254,7 @@ class ES_Common {
254
  if ( is_string( $selected ) && strpos( $selected, ',' ) > 0 ) {
255
  $selected = explode( ',', $selected );
256
  }
257
-
258
  foreach ( $lists as $key => $list ) {
259
 
260
  $dropdown .= '<option value="' . esc_attr( $key ) . '" ';
@@ -349,7 +349,7 @@ class ES_Common {
349
 
350
  $default_template_option = array( $default_template_option );
351
 
352
- $templates = self::get_templates( $type );
353
  $allowedtags = ig_es_allowed_html_tags_in_esc();
354
  if ( is_array( $templates ) ) {
355
  $templates = array_merge( $default_template_option, $templates );
@@ -358,7 +358,7 @@ class ES_Common {
358
 
359
  $dropdown = '';
360
  foreach ( $templates as $key => $template ) {
361
- $es_templ_thumbnail = ( ! empty( $template->ID ) ) ? get_the_post_thumbnail_url( $template->ID, array( '200', '200' ) ) : ES_PLUGIN_URL . 'images/envelope.png';
362
  $dropdown .= "<option data-img-url='" . $es_templ_thumbnail . "' value='" . $template->ID . "'";
363
 
364
  if ( absint( $selected ) === absint( $template->ID ) ) {
@@ -1010,10 +1010,10 @@ class ES_Common {
1010
  ?>
1011
 
1012
  <a href="<?php echo esc_url( $url ); ?>" class="ig-es-title-button ml-2
1013
- <?php
1014
  if ( $is_imp ) {
1015
  echo esc_attr( ' ig-es-imp-button' );
1016
- }
1017
  ?>
1018
  "><?php echo esc_html( $action_label ); ?>
1019
  <?php if ( $show_indicator ) { ?>
@@ -1023,7 +1023,7 @@ class ES_Common {
1023
 
1024
  <?php } ?>
1025
  </a>
1026
- <?php
1027
  }
1028
  }
1029
 
@@ -1170,7 +1170,7 @@ class ES_Common {
1170
  global $wpdb;
1171
 
1172
  $option_name_like = 'ig_es_%';
1173
- $results = $wpdb->get_results( $wpdb->prepare( "SELECT option_name, option_value FROM {$wpdb->prefix}options WHERE option_name LIKE %s AND option_name != %s", $option_name_like, 'ig_es_managed_blocked_domains' ), ARRAY_A );
1174
 
1175
  $options_name_value_map = array();
1176
  if ( count( $results ) > 0 ) {
@@ -1254,7 +1254,7 @@ class ES_Common {
1254
  $total_emails_sent = $email_sent_data[ $current_date ][ $current_hour ];
1255
  }
1256
 
1257
- $total_emails_sent++;
1258
  // We want to store only current hour data.
1259
  $data[ $current_date ][ $current_hour ] = $total_emails_sent;
1260
 
@@ -1675,4 +1675,60 @@ class ES_Common {
1675
  return gmdate( "$convert_date_format $convert_time_format", $timestamp );
1676
  }
1677
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1678
  }
75
 
76
  /**
77
  * Method to handle oembed content
78
+ *
79
  * @param string @content Content.
80
+ *
81
+ * @return string $content
82
+ *
83
  * @since 4.4.9
84
  */
85
  public static function handle_oembed_content( $content = '' ) {
96
 
97
  /**
98
  * Method to handle link in email content
99
+ *
100
  * URL from {{POSTLINK-ONLY}} was being converted to oembed html if it is not wrapped inside <a> tag's href attribute and is on a seperate line in ES template content
101
  * resulting in a link html for {{POSTLINK-ONLY}} instead of plain text link.
102
+ *
103
  * Most email clients like GMail, Outlook do not support videos in the email. To handle it, we are replacing the WordPress's oembed generated HTML for video links to their respective thubmnail images which are then linked the original video URL.
104
+ *
105
  * @param string $html HTML for current URL.
106
  * @param string $url Current URL.
107
  * @param array $attr Shortcode attribute.
108
  * @param int $post_ID Current post id.
109
+ *
110
  * @return string $html HTML for current URL.
111
+ *
112
  * @since 4.4.9
113
  */
114
  public static function handle_link_in_email_content( $html, $url, $attr, $post_ID ) {
120
  $html = $url;
121
  } else {
122
  if ( ! class_exists( 'WP_oEmbed' ) ) {
123
+ require_once ABSPATH . 'wp-includes/class-wp-oembed.php';
124
  }
125
 
126
  $oembed = new WP_oEmbed();
127
  $provider = $oembed->discover( $url );
128
+
129
  if ( ! empty( $provider ) ) {
130
  $oembed_response = $oembed->fetch( $provider, $url, $attr );
131
  if ( is_object( $oembed_response ) && ! empty( $oembed_response->type ) && 'video' === $oembed_response->type ) {
139
  case 'YouTube':
140
  $play_icon_url = ES_PLUGIN_URL . 'lite/public/images/youtube-play-button.png';
141
  break;
142
+
143
  case 'Vimeo':
144
  $play_icon_url = ES_PLUGIN_URL . 'lite/public/images/vimeo-play-button.png';
145
  break;
155
  ?>
156
  <table style="margin-bottom: 1em;">
157
  <tbody>
158
+ <tr>
159
+ <td style="background-image: url('<?php echo esc_url( $thumbnail_url ); ?>');height:<?php echo esc_attr( $thumbnail_height ); ?>;width:<?php echo esc_attr( $thumbnail_width ); ?>;background-size: 100% 100%;background-repeat: no-repeat;text-align:center;">
160
+ <a href="<?php echo esc_url( $url ); ?>" title="<?php echo esc_attr( $title ); ?>" target="_blank">
161
+ <img src="<?php echo esc_url( $play_icon_url ); ?>" style="height: 75px; margin: auto;">
162
+ </a>
163
+ </td>
164
+ </tr>
165
  </tbody>
166
  </table>
167
  <?php
254
  if ( is_string( $selected ) && strpos( $selected, ',' ) > 0 ) {
255
  $selected = explode( ',', $selected );
256
  }
257
+
258
  foreach ( $lists as $key => $list ) {
259
 
260
  $dropdown .= '<option value="' . esc_attr( $key ) . '" ';
349
 
350
  $default_template_option = array( $default_template_option );
351
 
352
+ $templates = self::get_templates( $type );
353
  $allowedtags = ig_es_allowed_html_tags_in_esc();
354
  if ( is_array( $templates ) ) {
355
  $templates = array_merge( $default_template_option, $templates );
358
 
359
  $dropdown = '';
360
  foreach ( $templates as $key => $template ) {
361
+ $es_templ_thumbnail = ( ! empty( $template->ID ) ) ? get_the_post_thumbnail_url( $template->ID, array( '200', '200' ) ) : ES_PLUGIN_URL . 'images/envelope.png';
362
  $dropdown .= "<option data-img-url='" . $es_templ_thumbnail . "' value='" . $template->ID . "'";
363
 
364
  if ( absint( $selected ) === absint( $template->ID ) ) {
1010
  ?>
1011
 
1012
  <a href="<?php echo esc_url( $url ); ?>" class="ig-es-title-button ml-2
1013
+ <?php
1014
  if ( $is_imp ) {
1015
  echo esc_attr( ' ig-es-imp-button' );
1016
+ }
1017
  ?>
1018
  "><?php echo esc_html( $action_label ); ?>
1019
  <?php if ( $show_indicator ) { ?>
1023
 
1024
  <?php } ?>
1025
  </a>
1026
+ <?php
1027
  }
1028
  }
1029
 
1170
  global $wpdb;
1171
 
1172
  $option_name_like = 'ig_es_%';
1173
+ $results = $wpdb->get_results( $wpdb->prepare( "SELECT option_name, option_value FROM {$wpdb->prefix}options WHERE option_name LIKE %s AND option_name != %s", $option_name_like, 'ig_es_managed_blocked_domains' ), ARRAY_A );
1174
 
1175
  $options_name_value_map = array();
1176
  if ( count( $results ) > 0 ) {
1254
  $total_emails_sent = $email_sent_data[ $current_date ][ $current_hour ];
1255
  }
1256
 
1257
+ $total_emails_sent ++;
1258
  // We want to store only current hour data.
1259
  $data[ $current_date ][ $current_hour ] = $total_emails_sent;
1260
 
1675
  return gmdate( "$convert_date_format $convert_time_format", $timestamp );
1676
  }
1677
 
1678
+ /**
1679
+ * Generate test mailbox user
1680
+ *
1681
+ * @return string
1682
+ *
1683
+ * @since 4.6.0
1684
+ */
1685
+ public static function generate_test_mailbox_user() {
1686
+
1687
+ $admin_email = get_bloginfo( 'admin_email' );
1688
+
1689
+ $parts = explode( '@', $admin_email );
1690
+
1691
+ if ( count( $parts ) > 0 ) {
1692
+ $user = $parts[0];
1693
+ } else {
1694
+ $user = 'test';
1695
+ }
1696
+
1697
+ $blog_url = get_bloginfo( 'url' );
1698
+
1699
+ // If URI is like, eg. www.way2tutorial.com/
1700
+ $blog_url = trim($blog_url, '/');
1701
+
1702
+ // If not have http:// or https:// then prepend it
1703
+ if (!preg_match('#^http(s)?://#', $blog_url)) {
1704
+ $blog_url = 'http://' . $blog_url;
1705
+ }
1706
+
1707
+ $url_parts = parse_url($blog_url);
1708
+
1709
+ // Remove www.
1710
+ $domain = preg_replace('/^www\./', '', $url_parts['host']);
1711
+
1712
+ $hash = self::generate_hash( 5 );
1713
+
1714
+ return $hash . '_' . $user . '_' . $domain;
1715
+ }
1716
+
1717
+ /**
1718
+ * Get mailbox name
1719
+ *
1720
+ * @return string
1721
+ *
1722
+ * @since 4.6.0
1723
+ */
1724
+ public static function get_test_email() {
1725
+ $mailbox_user = get_option('ig_es_test_mailbox_user', '');
1726
+
1727
+ if (empty($mailbox_user)) {
1728
+ $mailbox_user = self::generate_test_mailbox_user();
1729
+ update_option('ig_es_test_mailbox_user', $mailbox_user);
1730
+ }
1731
+
1732
+ return $mailbox_user . '@box.icegram.com';
1733
+ }
1734
  }
lite/includes/class-es-install.php CHANGED
@@ -214,10 +214,16 @@ if ( ! class_exists( 'ES_Install' ) ) {
214
  'ig_es_update_4410_db_version'
215
  ),
216
 
217
- '4.5.0' => array(
218
  'ig_es_update_450_alter_actions_table',
219
  'ig_es_update_450_db_version'
220
- )
 
 
 
 
 
 
221
 
222
  );
223
 
@@ -336,15 +342,6 @@ if ( ! class_exists( 'ES_Install' ) ) {
336
 
337
  self::$logger->info( 'Create Options.', self::$logger_context );
338
 
339
- // Create Default List and contact
340
- self::create_default_list_contact();
341
-
342
- self::$logger->info( 'Create default list.', self::$logger_context );
343
-
344
- self::create_default_form();
345
-
346
- self::$logger->info( 'Create default form.', self::$logger_context );
347
-
348
  self::load_templates();
349
 
350
  self::$logger->info( 'Load readymade template', self::$logger_context );
@@ -392,7 +389,7 @@ if ( ! class_exists( 'ES_Install' ) ) {
392
  * migration from ES 3.5.x
393
  *
394
  */
395
- return is_null( get_option( 'ig_es_db_version', null ) ) && is_null( get_option( 'current_sa_email_subscribers_db_version', null ) );
396
  }
397
 
398
  /**
@@ -541,7 +538,7 @@ if ( ! class_exists( 'ES_Install' ) ) {
541
  // We may require lots of memory
542
  // Add filter to increase memory limit
543
  add_filter( 'ig_es_memory_limit', 'ig_es_increase_memory_limit' );
544
-
545
  wp_raise_memory_limit( 'ig_es' );
546
 
547
  // Remove the added filter function so that it won't be called again if wp_raise_memory_limit called later on.
@@ -723,7 +720,7 @@ if ( ! class_exists( 'ES_Install' ) ) {
723
  $guid = ES_Common::generate_guid( 6 );
724
  $cronurl = $home_url . '?es=cron&guid=' . $guid;
725
 
726
- $report = '';
727
  $report .= "Hi Admin,\n\n";
728
  $report .= "Email has been sent successfully to {{COUNT}} email(s). Please find the details below:\n\n";
729
  $report .= "Unique ID: {{UNIQUE}}\n";
@@ -799,20 +796,21 @@ if ( ! class_exists( 'ES_Install' ) ) {
799
  'ig_es_user_roles' => array( 'default' => self::get_default_permissions(), 'old_option' => '' ),
800
  'ig_es_cron_interval' => array( 'default' => IG_ES_CRON_INTERVAL, 'old_option' => '' ),
801
  'ig_es_max_email_send_at_once' => array( 'default' => IG_ES_MAX_EMAIL_SEND_AT_ONCE, 'old_option' => '' ),
 
802
  );
803
 
804
  return $options;
805
  }
806
 
807
  /**
808
- * Create tables
809
- *
810
- * @param null $version
811
- *
812
- * @since 4.0.0
813
- *
814
- * @modify 4.4.9
815
- */
816
  public static function create_tables( $version = null ) {
817
 
818
  global $wpdb;
@@ -926,6 +924,7 @@ if ( ! class_exists( 'ES_Install' ) ) {
926
  `id` int(10) NOT NULL AUTO_INCREMENT,
927
  `slug` varchar(255) NOT NULL,
928
  `name` varchar(255) NOT NULL,
 
929
  `created_at` datetime DEFAULT NULL,
930
  `updated_at` datetime DEFAULT NULL,
931
  `deleted_at` datetime DEFAULT NULL,
@@ -984,14 +983,14 @@ if ( ! class_exists( 'ES_Install' ) ) {
984
  }
985
 
986
  /**
987
- * Create Contact Meta table
988
- *
989
- * @param string $collate
990
- *
991
- * @return string
992
- *
993
- * @since 4.2.0
994
- */
995
  public static function get_ig_es_420_schema( $collate = '' ) {
996
  global $wpdb;
997
 
@@ -1169,7 +1168,7 @@ if ( ! class_exists( 'ES_Install' ) ) {
1169
  */
1170
  private static function get_schema( $collate = '' ) {
1171
 
1172
- $tables = self::get_ig_es_400_schema( $collate );
1173
  $tables .= self::get_ig_es_420_schema( $collate );
1174
  $tables .= self::get_ig_es_421_schema( $collate );
1175
  $tables .= self::get_ig_es_424_schema( $collate );
@@ -1178,418 +1177,6 @@ if ( ! class_exists( 'ES_Install' ) ) {
1178
  return $tables;
1179
  }
1180
 
1181
- /**
1182
- * Create default list contact
1183
- *
1184
- * @since 4.0.0
1185
- */
1186
- private static function create_default_list_contact() {
1187
-
1188
- $list_name = IG_DEFAULT_LIST;
1189
-
1190
- $list_id = ES()->lists_db->add_list( $list_name );
1191
-
1192
- $contact_id = 0;
1193
-
1194
- if ( $list_id ) {
1195
-
1196
- $admin_email = get_option( 'admin_email' );
1197
- $admin_name = get_option( 'admin_email' );
1198
-
1199
- $user = get_user_by( 'email', $admin_email );
1200
-
1201
- $wp_user_id = 0;
1202
- if ( $user instanceof WP_User ) {
1203
- $wp_user_id = $user->ID;
1204
- }
1205
- $data = array(
1206
- 'wp_user_id' => $wp_user_id,
1207
- 'first_name' => $admin_name,
1208
- 'last_name' => '',
1209
- 'email' => $admin_email,
1210
- 'source' => 'admin',
1211
- 'form_id' => 0,
1212
- 'status' => 'verified',
1213
- 'unsubscribed' => 0,
1214
- 'hash' => ES_Common::generate_guid(),
1215
- 'created_at' => ig_get_current_date_time()
1216
- );
1217
-
1218
- $contact_id = ES()->contacts_db->insert( $data );
1219
-
1220
- if ( $contact_id ) {
1221
- $data = array(
1222
- 'contact_id' => $contact_id,
1223
- 'status' => 'subscribed',
1224
- 'optin_type' => IG_SINGLE_OPTIN,
1225
- 'subscribed_at' => ig_get_current_date_time(),
1226
- 'subscribed_ip' => null
1227
- );
1228
-
1229
- ES()->lists_contacts_db->add_contact_to_lists( $data, $list_id );
1230
- }
1231
-
1232
- }
1233
-
1234
- // Also Add Main List
1235
- $main_list_id = ES()->lists_db->add_list( IG_MAIN_LIST );
1236
- //add admin to main list
1237
- if ( $main_list_id && $contact_id ) {
1238
- $data = array(
1239
- 'list_id' => array( $main_list_id ),
1240
- 'contact_id' => $contact_id,
1241
- 'status' => 'subscribed',
1242
- 'optin_type' => IG_SINGLE_OPTIN,
1243
- 'subscribed_at' => ig_get_current_date_time(),
1244
- 'subscribed_ip' => null
1245
- );
1246
-
1247
- ES()->lists_contacts_db->add_contact_to_lists( $data, $main_list_id );
1248
- }
1249
- }
1250
-
1251
- /**
1252
- * Create and send default broadcast while onboarding
1253
- *
1254
- * @return array|mixed|void
1255
- *
1256
- * @since 4.0.0
1257
- */
1258
- public static function create_and_send_default_broadcast() {
1259
- /**
1260
- * - Create Default Template
1261
- * - Create Broadcast Campaign
1262
- * - Send Email.
1263
- */
1264
- $from_name = ES_Common::get_ig_option( 'from_name' );
1265
- $from_email = ES_Common::get_ig_option( 'from_email' );
1266
-
1267
- // Create Default Template
1268
- $sample = '<strong style="color: #990000">What can you achieve using Email Subscribers?</strong><p>Add subscription forms on website, send HTML newsletters & automatically notify subscribers about new blog posts once it is published.';
1269
- $sample .= ' You can also Import or Export subscribers from any list to Email Subscribers.</p>';
1270
- $sample .= ' <strong style="color: #990000">Plugin Features</strong><ol>';
1271
- $sample .= ' <li>Send notification emails to subscribers when new blog posts are published.</li>';
1272
- $sample .= ' <li>Subscribe form available with 3 options to setup.</li>';
1273
- $sample .= ' <li>Double Opt-In and Single Opt-In support.</li>';
1274
- $sample .= ' <li>Email notification to admin when a new user signs up (Optional).</li>';
1275
- $sample .= ' <li>Automatic welcome email to subscriber.</li>';
1276
- $sample .= ' <li>Auto add unsubscribe link in the email.</li>';
1277
- $sample .= ' <li>Import/Export subscriber emails to migrate to any lists.</li>';
1278
- $sample .= ' <li>Default WordPress editor to create emails.</li>';
1279
- $sample .= ' </ol>';
1280
- $sample .= ' <strong>Thanks & Regards,</strong><br>Admin';
1281
-
1282
- $title = 'Welcome To Email Subscribers';
1283
- $es_post = array(
1284
- 'post_title' => $title,
1285
- 'post_content' => $sample,
1286
- 'post_status' => 'publish',
1287
- 'post_type' => 'es_template',
1288
- 'meta_input' => array(
1289
- 'es_template_type' => 'newsletter'
1290
- )
1291
- );
1292
-
1293
- // Insert the post into the database
1294
- $post_id = wp_insert_post( $es_post );
1295
-
1296
- // Create Broadcast Campaign
1297
-
1298
- $default_list = ES()->lists_db->get_list_by_name( IG_DEFAULT_LIST );
1299
-
1300
- if ( ! empty( $default_list ) ) {
1301
- $list_id = $default_list['id'];
1302
-
1303
- if ( ! empty( $post_id ) ) {
1304
-
1305
- $data['slug'] = sanitize_title( $title );
1306
- $data['name'] = $title;
1307
- $data['type'] = 'newsletter';
1308
- $data['from_email'] = $from_email;
1309
- $data['reply_to_email'] = $from_email;
1310
- $data['from_name'] = $from_name;
1311
- $data['reply_to_name'] = $from_name;
1312
- $data['list_ids'] = $list_id;
1313
- $data['base_template_id'] = $post_id;
1314
- $data['status'] = 1;
1315
-
1316
- $campaign_id = ES()->campaigns_db->save_campaign( $data );
1317
-
1318
- $subscribers = ES()->contacts_db->get_active_contacts_by_list_id( $list_id );
1319
- if ( ! empty( $subscribers ) && count( $subscribers ) > 0 ) {
1320
- $guid = ES_Common::generate_guid( 6 );
1321
- $now = ig_get_current_date_time();
1322
- $data = array(
1323
- 'hash' => $guid,
1324
- 'campaign_id' => $campaign_id,
1325
- 'subject' => $title,
1326
- 'body' => $sample,
1327
- 'count' => count( $subscribers ),
1328
- 'status' => 'In Queue',
1329
- 'start_at' => $now,
1330
- 'finish_at' => $now,
1331
- 'created_at' => $now,
1332
- 'updated_at' => $now
1333
- );
1334
-
1335
- $last_report_id = ES_DB_Mailing_Queue::add_notification( $data );
1336
-
1337
- $delivery_data = array();
1338
- $delivery_data['hash'] = $guid;
1339
- $delivery_data['subscribers'] = $subscribers;
1340
- $delivery_data['campaign_id'] = $campaign_id;
1341
- $delivery_data['mailing_queue_id'] = $last_report_id;
1342
- $delivery_data['status'] = 'In Queue';
1343
- ES_DB_Sending_Queue::do_batch_insert( $delivery_data );
1344
-
1345
- $email_created = time();
1346
-
1347
- // Newsletter Send
1348
- $email_template = ES_Common::convert_es_templates( $sample, $from_name, $from_email, $email_created );
1349
-
1350
- $merge_tags = array(
1351
- 'message_id' => $last_report_id,
1352
- 'campaign_id' => $campaign_id
1353
- );
1354
-
1355
- $emails = array();
1356
- foreach ( $subscribers as $subscriber ) {
1357
- $emails[] = $subscriber['email'];
1358
- }
1359
-
1360
- ES_DB_Mailing_Queue::update_sent_status( $guid, 'Sending' );
1361
-
1362
- $response = ES()->mailer->send( $title, $email_template, $emails, $merge_tags );
1363
-
1364
- ES_DB_Mailing_Queue::update_sent_status( $guid, 'Sent' );
1365
-
1366
- return $response;
1367
- }
1368
-
1369
- }
1370
- }
1371
-
1372
- }
1373
-
1374
- /**
1375
- * Create and send default Post notification while on boarding
1376
- *
1377
- * @return array|int|mixed|void|WP_Error
1378
- *
1379
- * @since 4.0.0
1380
- */
1381
- public static function create_and_send_default_post_notification() {
1382
-
1383
- $from_name = ES_Common::get_ig_option( 'from_name' );
1384
- $from_email = ES_Common::get_ig_option( 'from_email' );
1385
-
1386
- $content = "Hello {{NAME}},\r\n\r\n";
1387
- $content .= "We have published a new blog article on our website : {{POSTTITLE}}\r\n";
1388
- $content .= "{{POSTIMAGE}}\r\n\r\n";
1389
- $content .= 'You can view it from this link : ';
1390
- $content .= "{{POSTLINK}}\r\n\r\n";
1391
- $content .= "Thanks & Regards,\r\n";
1392
- $content .= "Admin\r\n\r\n";
1393
- $content .= 'You received this email because in the past you have provided us your email address : {{EMAIL}} to receive notifications when new updates are posted.';
1394
-
1395
- $title = 'New Post Published - {{POSTTITLE}}';
1396
- // Create Post Notification object
1397
- $post = array(
1398
- 'post_title' => $title,
1399
- 'post_content' => $content,
1400
- 'post_status' => 'publish',
1401
- 'post_type' => 'es_template',
1402
- 'meta_input' => array(
1403
- 'es_template_type' => 'post_notification'
1404
- )
1405
- );
1406
- // Insert the post into the database
1407
- $post_id = wp_insert_post( $post );
1408
-
1409
- $default_list = ES()->lists_db->get_list_by_name( IG_DEFAULT_LIST );
1410
-
1411
- if ( ! empty( $post_id ) ) {
1412
- $list_id = $default_list['id'];
1413
-
1414
- $categories_objects = get_terms( array(
1415
- 'taxonomy' => 'category',
1416
- 'hide_empty' => false,
1417
- ) );
1418
-
1419
- $categories = array();
1420
- if ( count( $categories_objects ) > 0 ) {
1421
- foreach ( $categories_objects as $category ) {
1422
- if ( $category instanceof WP_Term ) {
1423
- $categories[] = $category->term_id;
1424
- }
1425
- }
1426
- }
1427
-
1428
- $categories_str = ES_Common::convert_categories_array_to_string( $categories );
1429
-
1430
- $data['slug'] = sanitize_title( $title );
1431
- $data['name'] = $title;
1432
- $data['type'] = 'post_notification';
1433
- $data['from_email'] = $from_name;
1434
- $data['reply_to_email'] = $from_name;
1435
- $data['from_name'] = $from_email;
1436
- $data['reply_to_name'] = $from_email;
1437
- $data['categories'] = $categories_str;
1438
- $data['list_ids'] = $list_id;
1439
- $data['base_template_id'] = $post_id;
1440
- $data['status'] = 1;
1441
-
1442
- $campaign_id = ES()->campaigns_db->save_campaign( $data );
1443
-
1444
- $subscribers = ES()->contacts_db->get_active_contacts_by_list_id( $list_id );
1445
- if ( ! empty( $subscribers ) && count( $subscribers ) > 0 ) {
1446
-
1447
- $args = array( 'posts_per_page' => 1 );
1448
- $posts = get_posts( $args );
1449
-
1450
- if ( count( $posts ) > 0 ) {
1451
- $recent_post = array_shift( $posts );
1452
-
1453
- $template = get_post( $post_id );
1454
- $content = ES_Handle_Post_Notification::prepare_body( $content, $recent_post->ID, $post_id );
1455
- $subject = ES_Handle_Post_Notification::prepare_subject( $recent_post, $template );
1456
- $guid = ES_Common::generate_guid( 6 );
1457
- $now = ig_get_current_date_time();
1458
- $data = array(
1459
- 'hash' => $guid,
1460
- 'campaign_id' => $campaign_id,
1461
- 'subject' => $subject,
1462
- 'body' => $content,
1463
- 'count' => count( $subscribers ),
1464
- 'status' => 'In Queue',
1465
- 'start_at' => $now,
1466
- 'finish_at' => $now,
1467
- 'created_at' => $now,
1468
- 'updated_at' => $now
1469
- );
1470
-
1471
- $last_report_id = ES_DB_Mailing_Queue::add_notification( $data );
1472
-
1473
- $delivery_data = array();
1474
- $delivery_data['hash'] = $guid;
1475
- $delivery_data['subscribers'] = $subscribers;
1476
- $delivery_data['campaign_id'] = $campaign_id;
1477
- $delivery_data['mailing_queue_id'] = $last_report_id;
1478
- $delivery_data['status'] = 'In Queue';
1479
- ES_DB_Sending_Queue::do_batch_insert( $delivery_data );
1480
-
1481
- $email_created = time();
1482
-
1483
- // Post Notification Send
1484
- $email_template = ES_Common::convert_es_templates( $content, $from_name, $from_email, $email_created );
1485
-
1486
- $merge_tags = array(
1487
- 'message_id' => $last_report_id,
1488
- 'campaign_id' => $campaign_id
1489
- );
1490
-
1491
- $emails = array();
1492
- foreach ( $subscribers as $subscriber ) {
1493
- $emails[] = $subscriber['email'];
1494
- }
1495
-
1496
- ES_DB_Mailing_Queue::update_sent_status( $guid, 'Sending' );
1497
-
1498
- $response = ES()->mailer->send( $title, $email_template, $emails, $merge_tags );
1499
-
1500
- ES_DB_Mailing_Queue::update_sent_status( $guid, 'Sent' );
1501
-
1502
- return $response;
1503
- }
1504
- }
1505
-
1506
- }
1507
-
1508
- return $post_id;
1509
- }
1510
-
1511
- /**
1512
- * Create default form
1513
- *
1514
- * @since 4.0.0
1515
- */
1516
- private static function create_default_form() {
1517
- $form_data = array();
1518
- $default_list = ES()->lists_db->get_list_by_name( IG_MAIN_LIST );
1519
- $list_id = $default_list['id'];
1520
- $body = array(
1521
- array(
1522
- 'type' => 'text',
1523
- 'name' => 'Name',
1524
- 'id' => 'name',
1525
- 'params' => array(
1526
- 'label' => 'Name',
1527
- 'show' => true,
1528
- 'required' => true
1529
- ),
1530
-
1531
- 'position' => 1
1532
- ),
1533
-
1534
- array(
1535
- 'type' => 'text',
1536
- 'name' => 'Email',
1537
- 'id' => 'email',
1538
- 'params' => array(
1539
- 'label' => 'Email',
1540
- 'show' => true,
1541
- 'required' => true
1542
- ),
1543
-
1544
- 'position' => 2
1545
- ),
1546
-
1547
- array(
1548
- 'type' => 'checkbox',
1549
- 'name' => 'Lists',
1550
- 'id' => 'lists',
1551
- 'params' => array(
1552
- 'label' => 'Lists',
1553
- 'show' => false,
1554
- 'required' => true,
1555
- 'values' => array( $list_id )
1556
- ),
1557
-
1558
- 'position' => 3
1559
- ),
1560
-
1561
- array(
1562
- 'type' => 'submit',
1563
- 'name' => 'submit',
1564
- 'id' => 'submit',
1565
- 'params' => array(
1566
- 'label' => 'Subscribe',
1567
- 'show' => true
1568
- ),
1569
-
1570
- 'position' => 4
1571
- ),
1572
-
1573
- );
1574
-
1575
- $settings = array(
1576
- 'lists' => array( $list_id ),
1577
- 'desc' => ''
1578
- );
1579
-
1580
- $form_data['name'] = 'First Form';
1581
- $form_data['body'] = maybe_serialize( $body );
1582
- $form_data['settings'] = maybe_serialize( $settings );
1583
- $form_data['styles'] = '';
1584
- $form_data['created_at'] = ig_get_current_date_time();
1585
- $form_data['updated_at'] = null;
1586
- $form_data['deleted_at'] = null;
1587
- $form_data['af_id'] = 0;
1588
-
1589
- // Add Form
1590
- ES()->forms_db->add_form( $form_data );
1591
- }
1592
-
1593
  /**
1594
  * Load readymade templates
1595
  *
@@ -1647,8 +1234,6 @@ if ( ! class_exists( 'ES_Install' ) ) {
1647
 
1648
  update_option( 'ig_es_templates_loaded_for', $plan );
1649
  }
1650
-
1651
-
1652
  }
1653
 
1654
  /**
@@ -1679,7 +1264,7 @@ if ( ! class_exists( 'ES_Install' ) ) {
1679
  'post_status' => 'inherit'
1680
  );
1681
  $attach_id = wp_insert_attachment( $attachment, $file, $post_id );
1682
- require_once ABSPATH . 'wp-admin/includes/image.php' ;
1683
  $attach_data = wp_generate_attachment_metadata( $attach_id, $file );
1684
  $res1 = wp_update_attachment_metadata( $attach_id, $attach_data );
1685
  $res2 = set_post_thumbnail( $post_id, $attach_id );
214
  'ig_es_update_4410_db_version'
215
  ),
216
 
217
+ '4.5.0' => array(
218
  'ig_es_update_450_alter_actions_table',
219
  'ig_es_update_450_db_version'
220
+ ),
221
+
222
+ '4.5.7' => array(
223
+ 'ig_es_update_457_alter_list_table',
224
+ 'ig_es_update_457_add_list_hash',
225
+ 'ig_es_update_457_db_version',
226
+ ),
227
 
228
  );
229
 
342
 
343
  self::$logger->info( 'Create Options.', self::$logger_context );
344
 
 
 
 
 
 
 
 
 
 
345
  self::load_templates();
346
 
347
  self::$logger->info( 'Load readymade template', self::$logger_context );
389
  * migration from ES 3.5.x
390
  *
391
  */
392
+ return is_null( get_option( 'ig_es_db_version', null ) ) && is_null( get_option( 'current_sa_email_subscribers_db_version', null ) ) && is_null( get_option( 'email-subscribers', null ) );
393
  }
394
 
395
  /**
538
  // We may require lots of memory
539
  // Add filter to increase memory limit
540
  add_filter( 'ig_es_memory_limit', 'ig_es_increase_memory_limit' );
541
+
542
  wp_raise_memory_limit( 'ig_es' );
543
 
544
  // Remove the added filter function so that it won't be called again if wp_raise_memory_limit called later on.
720
  $guid = ES_Common::generate_guid( 6 );
721
  $cronurl = $home_url . '?es=cron&guid=' . $guid;
722
 
723
+ $report = '';
724
  $report .= "Hi Admin,\n\n";
725
  $report .= "Email has been sent successfully to {{COUNT}} email(s). Please find the details below:\n\n";
726
  $report .= "Unique ID: {{UNIQUE}}\n";
796
  'ig_es_user_roles' => array( 'default' => self::get_default_permissions(), 'old_option' => '' ),
797
  'ig_es_cron_interval' => array( 'default' => IG_ES_CRON_INTERVAL, 'old_option' => '' ),
798
  'ig_es_max_email_send_at_once' => array( 'default' => IG_ES_MAX_EMAIL_SEND_AT_ONCE, 'old_option' => '' ),
799
+ 'ig_es_test_mailbox_user' => array( 'default' => ES_Common::generate_test_mailbox_user(), 'old_option' => '' ),
800
  );
801
 
802
  return $options;
803
  }
804
 
805
  /**
806
+ * Create tables
807
+ *
808
+ * @param null $version
809
+ *
810
+ * @since 4.0.0
811
+ *
812
+ * @modify 4.4.9
813
+ */
814
  public static function create_tables( $version = null ) {
815
 
816
  global $wpdb;
924
  `id` int(10) NOT NULL AUTO_INCREMENT,
925
  `slug` varchar(255) NOT NULL,
926
  `name` varchar(255) NOT NULL,
927
+ `hash` varchar(12) NOT NULL,
928
  `created_at` datetime DEFAULT NULL,
929
  `updated_at` datetime DEFAULT NULL,
930
  `deleted_at` datetime DEFAULT NULL,
983
  }
984
 
985
  /**
986
+ * Create Contact Meta table
987
+ *
988
+ * @param string $collate
989
+ *
990
+ * @return string
991
+ *
992
+ * @since 4.2.0
993
+ */
994
  public static function get_ig_es_420_schema( $collate = '' ) {
995
  global $wpdb;
996
 
1168
  */
1169
  private static function get_schema( $collate = '' ) {
1170
 
1171
+ $tables = self::get_ig_es_400_schema( $collate );
1172
  $tables .= self::get_ig_es_420_schema( $collate );
1173
  $tables .= self::get_ig_es_421_schema( $collate );
1174
  $tables .= self::get_ig_es_424_schema( $collate );
1177
  return $tables;
1178
  }
1179
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1180
  /**
1181
  * Load readymade templates
1182
  *
1234
 
1235
  update_option( 'ig_es_templates_loaded_for', $plan );
1236
  }
 
 
1237
  }
1238
 
1239
  /**
1264
  'post_status' => 'inherit'
1265
  );
1266
  $attach_id = wp_insert_attachment( $attachment, $file, $post_id );
1267
+ require_once ABSPATH . 'wp-admin/includes/image.php';
1268
  $attach_data = wp_generate_attachment_metadata( $attach_id, $file );
1269
  $res1 = wp_update_attachment_metadata( $attach_id, $attach_data );
1270
  $res2 = set_post_thumbnail( $post_id, $attach_id );
lite/includes/classes/class-es-admin-settings.php CHANGED
@@ -46,6 +46,7 @@ class ES_Admin_Settings {
46
  $options['ig_es_enable_welcome_email'] = isset( $options['ig_es_enable_welcome_email'] ) ? $options['ig_es_enable_welcome_email'] : 'no';
47
  $options['ig_es_notify_admin'] = isset( $options['ig_es_notify_admin'] ) ? $options['ig_es_notify_admin'] : 'no';
48
  $options['ig_es_enable_cron_admin_email'] = isset( $options['ig_es_enable_cron_admin_email'] ) ? $options['ig_es_enable_cron_admin_email'] : 'no';
 
49
 
50
  $text_fields_to_sanitize = array(
51
  'ig_es_from_name',
@@ -103,11 +104,12 @@ class ES_Admin_Settings {
103
 
104
  do_action( 'ig_es_after_settings_save', $options );
105
 
106
- $message = __( 'Settings have been saved successfully!' );
107
  $status = 'success';
108
  ES_Common::show_message( $message, $status );
109
  }
110
  }
 
111
 
112
  ?>
113
 
@@ -124,19 +126,19 @@ class ES_Admin_Settings {
124
  settings_fields( 'email_subscribers_settings' );
125
  $es_settings_tabs = array(
126
  'general' => array(
127
- 'icon' => 'admin-generic',
128
  'name' => __( 'General', 'email-subscribers' ),
129
  ),
130
  'signup_confirmation' => array(
131
- 'icon' => 'format-chat',
132
  'name' => __( 'Notifications', 'email-subscribers' ),
133
  ),
134
  'email_sending' => array(
135
- 'icon' => 'email-alt',
136
  'name' => __( 'Email Sending', 'email-subscribers' ),
137
  ),
138
  'security_settings' => array(
139
- 'icon' => 'lock',
140
  'name' => __( 'Security', 'email-subscribers' ),
141
  ),
142
  );
@@ -149,7 +151,7 @@ class ES_Admin_Settings {
149
  foreach ( $es_settings_tabs as $key => $value ) {
150
  ?>
151
  <li id="menu-content" class="h-10 py-1 mx-2 border border-transparent rounded settings-menu-change md:my-2 hover:rounded-lg hover:border-gray-200">
152
- <a href="#tabs-<?php echo esc_attr( $key ); ?>" id="menu-content-change" class="block px-4 pt-1 text-base font-medium text-gray-900 no-underline align-middle hover:text-gray-800"><i class="py-0.5 dashicons dashicons-<?php echo esc_attr( $value['icon'] ); ?>"></i>&nbsp;<?php echo esc_html( $value['name'] ); ?></a></li>
153
  <?php
154
  }
155
  ?>
@@ -204,7 +206,7 @@ class ES_Admin_Settings {
204
 
205
  'admin_email' => array(
206
  'id' => 'ig_es_admin_emails',
207
- 'name' => __( 'Email Addresses', 'email-subscribers' ),
208
  'type' => 'text',
209
  'desc' => __( 'Enter the admin email addresses that should receive notifications (separated by comma).', 'email-subscribers' ),
210
  'default' => '',
@@ -212,7 +214,7 @@ class ES_Admin_Settings {
212
 
213
  'ig_es_optin_type' => array(
214
  'id' => 'ig_es_optin_type',
215
- 'name' => __( 'Opt-in Type', 'email-subscribers' ),
216
  'desc' => '',
217
  'type' => 'select',
218
  'options' => ES_Common::get_optin_types(),
@@ -221,16 +223,16 @@ class ES_Admin_Settings {
221
 
222
  'ig_es_post_image_size' => array(
223
  'id' => 'ig_es_post_image_size',
224
- 'name' => __( 'Image Size', 'email-subscribers' ),
225
  'type' => 'select',
226
  'options' => ES_Common::get_image_sizes(),
227
- 'desc' => __( 'Select image size for {{POSTIMAGE}} to be shown in the Post Notification Emails.', 'email-subscribers' ),
228
  'default' => 'full',
229
  ),
230
 
231
  'ig_es_track_email_opens' => array(
232
  'id' => 'ig_es_track_email_opens',
233
- 'name' => __( 'Track Opens', 'email-subscribers' ),
234
  'type' => 'checkbox',
235
  'default' => 'yes',
236
  ),
@@ -252,13 +254,13 @@ class ES_Admin_Settings {
252
  'supplemental' => '',
253
  'default' => '',
254
  'id' => 'ig_es_unsubscribe_link_content',
255
- 'name' => __( 'Show Unsubscribe Message In Email Footer', 'email-subscribers' ),
256
  'desc' => __( 'Add text which you want your contact to see in footer to unsubscribe. Use {{UNSUBSCRIBE-LINK}} keyword to add unsubscribe link.', 'email-subscribers' ),
257
  ),
258
 
259
  'subscription_messages' => array(
260
  'id' => 'subscription_messages',
261
- 'name' => __( 'Subscription Success/ Error Messages', 'email-subscribers' ),
262
  'sub_fields' => array(
263
  'ig_es_subscription_success_message' => array(
264
  'type' => 'textarea',
@@ -268,7 +270,7 @@ class ES_Admin_Settings {
268
  'default' => __( 'You have been subscribed successfully!', 'email-subscribers' ),
269
  'id' => 'ig_es_subscription_success_message',
270
  'name' => __( 'Success Message', 'email-subscribers' ),
271
- 'desc' => __( 'Show this message if contact is successfully subscribed from Double Opt-In (Confirmation) Email', 'email-subscribers' ),
272
  ),
273
 
274
  'ig_es_subscription_error_messsage' => array(
@@ -279,7 +281,7 @@ class ES_Admin_Settings {
279
  'default' => __( 'Oops.. Your request couldn\'t be completed. This email address seems to be already subscribed / blocked.', 'email-subscribers' ),
280
  'id' => 'ig_es_subscription_error_messsage',
281
  'name' => __( 'Error Message', 'email-subscribers' ),
282
- 'desc' => __( 'Show this message if any error occured after clicking confirmation link from Double Opt-In (Confirmation) Email.', 'email-subscribers' ),
283
  ),
284
 
285
  ),
@@ -287,7 +289,7 @@ class ES_Admin_Settings {
287
 
288
  'unsubscription_messages' => array(
289
  'id' => 'unsubscription_messages',
290
- 'name' => __( 'Unsubscribe Success/ Error Messages', 'email-subscribers' ),
291
  'sub_fields' => array(
292
 
293
  'ig_es_unsubscribe_success_message' => array(
@@ -314,6 +316,14 @@ class ES_Admin_Settings {
314
  ),
315
  ),
316
 
 
 
 
 
 
 
 
 
317
  );
318
 
319
  $general_settings = apply_filters( 'ig_es_registered_general_settings', $general_settings );
@@ -358,7 +368,7 @@ class ES_Admin_Settings {
358
 
359
  'confirmation_notifications' => array(
360
  'id' => 'confirmation_notifications',
361
- 'name' => __( 'Confirmation Email', 'email-subscribers' ),
362
  'sub_fields' => array(
363
 
364
  'ig_es_confirmation_mail_subject' => array(
@@ -380,7 +390,7 @@ class ES_Admin_Settings {
380
  'default' => '',
381
  'id' => 'ig_es_confirmation_mail_content',
382
  'name' => __( 'Content', 'email-subscribers' ),
383
- 'desc' => __( 'If Double Optin is set, contact will receive confirmation email with above content. You can use {{FIRSTNAME}}, {{LASTNAME}}, {{NAME}}, {{EMAIL}}, {{SUBSCRIBE-LINK}} keywords', 'email-subscribers' ),
384
  ),
385
  ),
386
  ),
@@ -388,8 +398,8 @@ class ES_Admin_Settings {
388
  'admin_notifications' => array(
389
 
390
  'id' => 'admin_notifications',
391
- 'name' => __( 'Admin Notification On New Subscription', 'email-subscribers' ),
392
- 'info' => __( 'Notify admin(s) for new contact signup.', 'email-subscribers' ),
393
  'sub_fields' => array(
394
 
395
  'notify_admin' => array(
@@ -411,7 +421,7 @@ class ES_Admin_Settings {
411
  'id' => 'ig_es_admin_new_contact_email_content',
412
  'name' => __( 'Content', 'email-subscribers' ),
413
  'type' => 'textarea',
414
- 'desc' => __( 'Content for the admin email whenever a new subscriber signs up and is confirmed. Available Keywords: {{NAME}}, {{EMAIL}}, {{LIST}}', 'email-subscribers' ),
415
  'default' => '',
416
  ),
417
  ),
@@ -419,8 +429,8 @@ class ES_Admin_Settings {
419
 
420
  'ig_es_cron_report' => array(
421
  'id' => 'ig_es_cron_report',
422
- 'name' => __( 'Admin Notification On Every Campaign Sent', 'email-subscribers' ),
423
- 'info' => __( 'Notify admin(s) on every campaign sent.', 'email-subscribers' ),
424
  'sub_fields' => array(
425
 
426
  'ig_es_enable_cron_admin_email' => array(
@@ -450,7 +460,7 @@ class ES_Admin_Settings {
450
  'default' => '',
451
  'id' => 'ig_es_cron_admin_email',
452
  'name' => __( 'Content', 'email-subscribers' ),
453
- 'desc' => __( 'Send report to admin(s) whenever campaign is successfully sent to all contacts. Available Keywords: {{DATE}}, {{SUBJECT}}, {{COUNT}}', 'email-subscribers' ),
454
  ),
455
 
456
  ),
@@ -477,13 +487,13 @@ class ES_Admin_Settings {
477
  'supplemental' => '',
478
  'default' => 'no',
479
  'id' => 'ig_es_disable_wp_cron',
480
- 'name' => __( 'Disable WordPress Cron', 'email-subscribers' ),
481
  'info' => __( 'Check this if you do not want Email Subscribers to use WP Cron to send emails.', 'email-subscribers' ),
482
  ),
483
 
484
  'ig_es_cron_interval' => array(
485
  'id' => 'ig_es_cron_interval',
486
- 'name' => __( 'Send Emails At Most Every', 'email-subscribers' ),
487
  'type' => 'select',
488
  'options' => ES()->cron->cron_intervals(),
489
  'desc' => __( 'Optional if a real cron service is used', 'email-subscribers' ),
@@ -496,7 +506,7 @@ class ES_Admin_Settings {
496
  'supplemental' => '',
497
  'default' => 50,
498
  'id' => 'ig_es_hourly_email_send_limit',
499
- 'name' => __( 'Maximum Emails To Send In An Hour', 'email-subscribers' ),
500
  'desc' => __( 'Total emails your host can send in an hour.', 'email-subscribers' ),
501
  ),
502
 
@@ -506,7 +516,7 @@ class ES_Admin_Settings {
506
  'supplemental' => '',
507
  'default' => IG_ES_MAX_EMAIL_SEND_AT_ONCE,
508
  'id' => 'ig_es_max_email_send_at_once',
509
- 'name' => __( 'Maximum Emails To Send At once', 'email-subscribers' ),
510
  'desc' => __( 'Maximum emails you want to send on every cron request.', 'email-subscribers' ),
511
  ),
512
 
@@ -518,7 +528,7 @@ class ES_Admin_Settings {
518
  'supplemental' => '',
519
  'default' => '',
520
  'id' => 'ig_es_test_send_email',
521
- 'name' => __( 'Send Test Email', 'email-subscribers' ),
522
  'desc' => __( 'Enter email address to send test email.', 'email-subscribers' ),
523
  ),
524
 
@@ -565,7 +575,7 @@ class ES_Admin_Settings {
565
  $security_settings = array(
566
  'blocked_domains' => array(
567
  'id' => 'ig_es_blocked_domains',
568
- 'name' => __( 'Blocked Domain(s)', 'email-subscribers' ),
569
  'type' => 'textarea',
570
  'info' => __( 'Seeing spam signups from particular domains? Enter domains names (one per line) that you want to block here.', 'email-subscribers' ),
571
  'default' => '',
@@ -659,8 +669,8 @@ class ES_Admin_Settings {
659
  }
660
 
661
  $field_html .= $placeholder . '</input>
662
- <span class="block w-10 h-6 bg-gray-300 rounded-full shadow-inner es-mail-toggle-line "></span>
663
- <span class="absolute inset-y-0 left-0 block w-4 h-4 mt-1 ml-1 transition-all duration-300 ease-in-out bg-white rounded-full shadow es-mail-toggle-dot focus-within:shadow-outline"></span>
664
  </span>
665
  </label>';
666
  break;
46
  $options['ig_es_enable_welcome_email'] = isset( $options['ig_es_enable_welcome_email'] ) ? $options['ig_es_enable_welcome_email'] : 'no';
47
  $options['ig_es_notify_admin'] = isset( $options['ig_es_notify_admin'] ) ? $options['ig_es_notify_admin'] : 'no';
48
  $options['ig_es_enable_cron_admin_email'] = isset( $options['ig_es_enable_cron_admin_email'] ) ? $options['ig_es_enable_cron_admin_email'] : 'no';
49
+ $options['ig_es_powered_by'] = isset( $options['ig_es_powered_by'] ) ? $options['ig_es_powered_by'] : 'no';
50
 
51
  $text_fields_to_sanitize = array(
52
  'ig_es_from_name',
104
 
105
  do_action( 'ig_es_after_settings_save', $options );
106
 
107
+ $message = __( 'Settings saved successfully!' );
108
  $status = 'success';
109
  ES_Common::show_message( $message, $status );
110
  }
111
  }
112
+ $allowedtags = ig_es_allowed_html_tags_in_esc();
113
 
114
  ?>
115
 
126
  settings_fields( 'email_subscribers_settings' );
127
  $es_settings_tabs = array(
128
  'general' => array(
129
+ 'icon' => '<svg class="w-6 h-6 inline -mt-1" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"></path><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"></path></svg>',
130
  'name' => __( 'General', 'email-subscribers' ),
131
  ),
132
  'signup_confirmation' => array(
133
+ 'icon' => '<svg class="w-6 h-6 inline -mt-1" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="3" d="M17 8h2a2 2 0 012 2v6a2 2 0 01-2 2h-2v4l-4-4H9a1.994 1.994 0 01-1.414-.586m0 0L11 14h4a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2v4l.586-.586z"></path></svg>',
134
  'name' => __( 'Notifications', 'email-subscribers' ),
135
  ),
136
  'email_sending' => array(
137
+ 'icon' => '<svg class="w-6 h-6 inline -mt-1" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"></path></svg>',
138
  'name' => __( 'Email Sending', 'email-subscribers' ),
139
  ),
140
  'security_settings' => array(
141
+ 'icon' => '<svg class="w-6 h-6 inline -mt-1.5" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"></path></svg>',
142
  'name' => __( 'Security', 'email-subscribers' ),
143
  ),
144
  );
151
  foreach ( $es_settings_tabs as $key => $value ) {
152
  ?>
153
  <li id="menu-content" class="h-10 py-1 mx-2 border border-transparent rounded settings-menu-change md:my-2 hover:rounded-lg hover:border-gray-200">
154
+ <a href="#tabs-<?php echo esc_attr( $key ); ?>" id="menu-content-change" class="block px-4 pt-1 text-base font-medium text-gray-700 no-underline align-middle hover:text-gray-800"><?php echo wp_kses( $value['icon'], $allowedtags ); ?>&nbsp;<span class="pl-0.5"><?php echo esc_html( $value['name'] ); ?></span></a></li>
155
  <?php
156
  }
157
  ?>
206
 
207
  'admin_email' => array(
208
  'id' => 'ig_es_admin_emails',
209
+ 'name' => __( 'Email addresses', 'email-subscribers' ),
210
  'type' => 'text',
211
  'desc' => __( 'Enter the admin email addresses that should receive notifications (separated by comma).', 'email-subscribers' ),
212
  'default' => '',
214
 
215
  'ig_es_optin_type' => array(
216
  'id' => 'ig_es_optin_type',
217
+ 'name' => __( 'Opt-in type', 'email-subscribers' ),
218
  'desc' => '',
219
  'type' => 'select',
220
  'options' => ES_Common::get_optin_types(),
223
 
224
  'ig_es_post_image_size' => array(
225
  'id' => 'ig_es_post_image_size',
226
+ 'name' => __( 'Image size', 'email-subscribers' ),
227
  'type' => 'select',
228
  'options' => ES_Common::get_image_sizes(),
229
+ 'desc' => __( 'Select image size for {{POSTIMAGE}} to be shown in the Post Notification emails.', 'email-subscribers' ),
230
  'default' => 'full',
231
  ),
232
 
233
  'ig_es_track_email_opens' => array(
234
  'id' => 'ig_es_track_email_opens',
235
+ 'name' => __( 'Track opens', 'email-subscribers' ),
236
  'type' => 'checkbox',
237
  'default' => 'yes',
238
  ),
254
  'supplemental' => '',
255
  'default' => '',
256
  'id' => 'ig_es_unsubscribe_link_content',
257
+ 'name' => __( 'Show unsubscribe message in email footer', 'email-subscribers' ),
258
  'desc' => __( 'Add text which you want your contact to see in footer to unsubscribe. Use {{UNSUBSCRIBE-LINK}} keyword to add unsubscribe link.', 'email-subscribers' ),
259
  ),
260
 
261
  'subscription_messages' => array(
262
  'id' => 'subscription_messages',
263
+ 'name' => __( 'Subscription success/ error messages', 'email-subscribers' ),
264
  'sub_fields' => array(
265
  'ig_es_subscription_success_message' => array(
266
  'type' => 'textarea',
270
  'default' => __( 'You have been subscribed successfully!', 'email-subscribers' ),
271
  'id' => 'ig_es_subscription_success_message',
272
  'name' => __( 'Success Message', 'email-subscribers' ),
273
+ 'desc' => __( 'Show this message if contact is successfully subscribed from double opt-in (confirmation) email', 'email-subscribers' ),
274
  ),
275
 
276
  'ig_es_subscription_error_messsage' => array(
281
  'default' => __( 'Oops.. Your request couldn\'t be completed. This email address seems to be already subscribed / blocked.', 'email-subscribers' ),
282
  'id' => 'ig_es_subscription_error_messsage',
283
  'name' => __( 'Error Message', 'email-subscribers' ),
284
+ 'desc' => __( 'Show this message if any error occured after clicking confirmation link from double opt-in (confirmation) email.', 'email-subscribers' ),
285
  ),
286
 
287
  ),
289
 
290
  'unsubscription_messages' => array(
291
  'id' => 'unsubscription_messages',
292
+ 'name' => __( 'Unsubscribe success/ error messages', 'email-subscribers' ),
293
  'sub_fields' => array(
294
 
295
  'ig_es_unsubscribe_success_message' => array(
316
  ),
317
  ),
318
 
319
+ 'ig_es_powered_by' => array(
320
+ 'id' => 'ig_es_powered_by',
321
+ 'name' => __( 'Share Icegram', 'email-subscribers' ),
322
+ 'info' => __('Show "Powered By" link'),
323
+ 'type' => 'checkbox',
324
+ 'default' => 'yes',
325
+ ),
326
+
327
  );
328
 
329
  $general_settings = apply_filters( 'ig_es_registered_general_settings', $general_settings );
368
 
369
  'confirmation_notifications' => array(
370
  'id' => 'confirmation_notifications',
371
+ 'name' => __( 'Confirmation email', 'email-subscribers' ),
372
  'sub_fields' => array(
373
 
374
  'ig_es_confirmation_mail_subject' => array(
390
  'default' => '',
391
  'id' => 'ig_es_confirmation_mail_content',
392
  'name' => __( 'Content', 'email-subscribers' ),
393
+ 'desc' => __( 'If double opt-in is set, contact will receive confirmation email with above content. You can use {{FIRSTNAME}}, {{LASTNAME}}, {{NAME}}, {{EMAIL}}, {{SUBSCRIBE-LINK}} keywords', 'email-subscribers' ),
394
  ),
395
  ),
396
  ),
398
  'admin_notifications' => array(
399
 
400
  'id' => 'admin_notifications',
401
+ 'name' => __( 'Admin notification on new subscription', 'email-subscribers' ),
402
+ 'info' => __( 'Notify admin(s) everytime a new contact signups.', 'email-subscribers' ),
403
  'sub_fields' => array(
404
 
405
  'notify_admin' => array(
421
  'id' => 'ig_es_admin_new_contact_email_content',
422
  'name' => __( 'Content', 'email-subscribers' ),
423
  'type' => 'textarea',
424
+ 'desc' => __( 'Content for the admin email whenever a new subscriber signs up and is confirmed. Available keywords: {{NAME}}, {{EMAIL}}, {{LIST}}', 'email-subscribers' ),
425
  'default' => '',
426
  ),
427
  ),
429
 
430
  'ig_es_cron_report' => array(
431
  'id' => 'ig_es_cron_report',
432
+ 'name' => __( 'Admin notification on every campaign sent', 'email-subscribers' ),
433
+ 'info' => __( 'Notify admin(s) everytime a campaign is sent.', 'email-subscribers' ),
434
  'sub_fields' => array(
435
 
436
  'ig_es_enable_cron_admin_email' => array(
460
  'default' => '',
461
  'id' => 'ig_es_cron_admin_email',
462
  'name' => __( 'Content', 'email-subscribers' ),
463
+ 'desc' => __( 'Send report to admin(s) whenever campaign is successfully sent to all contacts. Available keywords: {{DATE}}, {{SUBJECT}}, {{COUNT}}', 'email-subscribers' ),
464
  ),
465
 
466
  ),
487
  'supplemental' => '',
488
  'default' => 'no',
489
  'id' => 'ig_es_disable_wp_cron',
490
+ 'name' => __( 'Disable Wordpress Cron', 'email-subscribers' ),
491
  'info' => __( 'Check this if you do not want Email Subscribers to use WP Cron to send emails.', 'email-subscribers' ),
492
  ),
493
 
494
  'ig_es_cron_interval' => array(
495
  'id' => 'ig_es_cron_interval',
496
+ 'name' => __( 'Send emails at most every', 'email-subscribers' ),
497
  'type' => 'select',
498
  'options' => ES()->cron->cron_intervals(),
499
  'desc' => __( 'Optional if a real cron service is used', 'email-subscribers' ),
506
  'supplemental' => '',
507
  'default' => 50,
508
  'id' => 'ig_es_hourly_email_send_limit',
509
+ 'name' => __( 'Maximum emails to send in an hour', 'email-subscribers' ),
510
  'desc' => __( 'Total emails your host can send in an hour.', 'email-subscribers' ),
511
  ),
512
 
516
  'supplemental' => '',
517
  'default' => IG_ES_MAX_EMAIL_SEND_AT_ONCE,
518
  'id' => 'ig_es_max_email_send_at_once',
519
+ 'name' => __( 'Maximum emails to send at once', 'email-subscribers' ),
520
  'desc' => __( 'Maximum emails you want to send on every cron request.', 'email-subscribers' ),
521
  ),
522
 
528
  'supplemental' => '',
529
  'default' => '',
530
  'id' => 'ig_es_test_send_email',
531
+ 'name' => __( 'Send test email', 'email-subscribers' ),
532
  'desc' => __( 'Enter email address to send test email.', 'email-subscribers' ),
533
  ),
534
 
575
  $security_settings = array(
576
  'blocked_domains' => array(
577
  'id' => 'ig_es_blocked_domains',
578
+ 'name' => __( 'Blocked domain(s)', 'email-subscribers' ),
579
  'type' => 'textarea',
580
  'info' => __( 'Seeing spam signups from particular domains? Enter domains names (one per line) that you want to block here.', 'email-subscribers' ),
581
  'default' => '',
669
  }
670
 
671
  $field_html .= $placeholder . '</input>
672
+ <span class="es-mail-toggle-line"></span>
673
+ <span class="es-mail-toggle-dot"></span>
674
  </span>
675
  </label>';
676
  break;
lite/includes/classes/class-es-campaigns-table.php CHANGED
@@ -100,7 +100,7 @@ class ES_Campaigns_Table extends WP_List_Table {
100
  // Trigger feedback popup for broadcast creation.
101
  do_action( 'ig_es_broadcast_created' );
102
 
103
- $message = __( 'Broadcast has been created successfully.', 'email-subscribers' );
104
  ES_Common::show_message( $message, 'success' );
105
  }
106
  ?>
@@ -139,7 +139,13 @@ class ES_Campaigns_Table extends WP_List_Table {
139
  <form method="get">
140
  <input type="hidden" name="page" value="es_campaigns" />
141
  <?php
 
142
  $this->prepare_items();
 
 
 
 
 
143
  $this->display();
144
  ?>
145
  </form>
@@ -463,8 +469,8 @@ class ES_Campaigns_Table extends WP_List_Table {
463
  $campaign_status );
464
  ?>
465
  >
466
- <span class="es-mail-toggle-line inline-block w-10 h-6 bg-gray-300 rounded-full shadow-inner"></span>
467
- <span class="es-mail-toggle-dot absolute transition-all duration-300 ease-in-out block w-4 h-4 mt-1 ml-1 bg-white rounded-full shadow inset-y-0 left-0 focus-within:shadow-outline"></span>
468
  </span>
469
  </label>
470
  <?php
@@ -685,7 +691,7 @@ class ES_Campaigns_Table extends WP_List_Table {
685
  $campaign_id = ig_es_get_request_data( 'list' );
686
 
687
  $this->db->delete_campaigns( $campaign_id );
688
- $message = __( 'Campaign has been deleted successfully!', 'email-subscribers' );
689
  $status = 'success';
690
  }
691
 
@@ -703,11 +709,11 @@ class ES_Campaigns_Table extends WP_List_Table {
703
  // Delete multiple Campaigns
704
  $this->db->delete_campaigns( $ids );
705
 
706
- $message = __( 'Campaign(s) have been deleted successfully!', 'email-subscribers' );
707
  ES_Common::show_message( $message );
708
  } else {
709
 
710
- $message = __( 'Please check campaign(s) to delete.', 'email-subscribers' );
711
  ES_Common::show_message( $message, 'error' );
712
  }
713
  }
100
  // Trigger feedback popup for broadcast creation.
101
  do_action( 'ig_es_broadcast_created' );
102
 
103
+ $message = __( 'Broadcast created successfully.', 'email-subscribers' );
104
  ES_Common::show_message( $message, 'success' );
105
  }
106
  ?>
139
  <form method="get">
140
  <input type="hidden" name="page" value="es_campaigns" />
141
  <?php
142
+ // Display search field and other available filter fields.
143
  $this->prepare_items();
144
+ ?>
145
+ </form>
146
+ <form method="post">
147
+ <?php
148
+ // Display bulk action fields, pagination and list items.
149
  $this->display();
150
  ?>
151
  </form>
469
  $campaign_status );
470
  ?>
471
  >
472
+ <span class="es-mail-toggle-line"></span>
473
+ <span class="es-mail-toggle-dot"></span>
474
  </span>
475
  </label>
476
  <?php
691
  $campaign_id = ig_es_get_request_data( 'list' );
692
 
693
  $this->db->delete_campaigns( $campaign_id );
694
+ $message = __( 'Campaign deleted successfully!', 'email-subscribers' );
695
  $status = 'success';
696
  }
697
 
709
  // Delete multiple Campaigns
710
  $this->db->delete_campaigns( $ids );
711
 
712
+ $message = __( 'Campaign(s) deleted successfully!', 'email-subscribers' );
713
  ES_Common::show_message( $message );
714
  } else {
715
 
716
+ $message = __( 'Please select campaign(s) to delete.', 'email-subscribers' );
717
  ES_Common::show_message( $message, 'error' );
718
  }
719
  }
lite/includes/classes/class-es-contacts-table.php CHANGED
@@ -178,9 +178,8 @@ class ES_Contacts_Table extends WP_List_Table {
178
  * @since 4.2.1
179
  */
180
  public function render() {
181
-
182
  ?>
183
- <div class="wrap pt-3 font-sans">
184
 
185
  <?php
186
 
@@ -202,42 +201,52 @@ class ES_Contacts_Table extends WP_List_Table {
202
  $audience_tab_main_navigation = apply_filters( 'ig_es_audience_tab_main_navigation', $active_tab, $audience_tab_main_navigation );
203
 
204
  ?>
205
- <div class="flex">
206
- <div>
207
- <h2 class="wp-heading-inline text-3xl font-bold text-gray-700 sm:leading-9 sm:truncate pr-4">
208
  <?php
209
  echo esc_html__( 'Audience', 'email-subscribers' );
210
  ?>
211
- </h2>
212
- </div>
213
- <div class="mt-1">
214
  <?php
215
  ES_Common::prepare_main_header_navigation( $audience_tab_main_navigation );
216
  ?>
217
- </div>
218
- </div>
219
- <div>
220
- <hr class="wp-header-end">
221
- </div>
222
  <?php $this->get_contacts_reports(); ?>
223
 
224
- <div id="poststuff" class="es-audience-view es-items-lists">
225
- <div id="post-body" class="metabox-holder column-1">
226
- <div id="post-body-content">
227
- <div class="meta-box-sortables ui-sortable">
228
- <form method="get">
229
- <input type="hidden" name="page" value="es_subscribers"/>
230
  <?php
 
231
  $this->prepare_items();
 
 
 
 
 
 
 
 
 
232
  $this->display();
233
  ?>
234
- </form>
235
- </div>
236
- </div>
237
- </div>
238
- <br class="clear">
239
- </div>
240
- </div>
241
  <?php
242
  }
243
  }
@@ -281,60 +290,69 @@ class ES_Contacts_Table extends WP_List_Table {
281
  $es_total_contact = ES_Reports_Data::get_total_contacts();
282
  $es_total_subscribed_contacts = ES_Reports_Data::get_total_subscribed_contacts( 60 );
283
  $es_total_unsubscribed_contacts = ES_Reports_Data::get_total_unsubscribed_contacts( 60 );
 
284
  $es_total_contacts_opened_emails = ES_Reports_Data::get_total_contacts_opened_emails( 60 );
285
  ?>
286
- <div class="border-0 mt-8 mb-4">
287
- <table class="min-w-full overflow-hidden bg-white rounded-lg shadow font-sans">
288
- <tr>
289
- <td class="w-1/5 border-r lg:px-4">
290
- <div class="block pt-3 pb-2 pl-2"><span class="text-lg font-medium text-gray-400"><?php echo esc_html__( 'Total Contacts', 'email-subscribers' ); ?></span></div>
291
- <div class="flex pt-2 pb-2 h-20">
292
- <div class="lg:pl-2 ">
293
- <svg fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 24 24" class="w-8 h-8 text-gray-400 mt-1">
294
- <path d="M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z"></path>
295
- </svg>
296
- </div>
297
- <div>
298
- <span class="text-4xl font-bold leading-none text-indigo-600 pl-4"><?php echo esc_html( number_format( $es_total_contact ) ); ?></span>
299
-
300
- </div>
301
- </div>
302
- </td>
303
- <td class="w-4/5">
304
- <div class="block pt-4 pb-1"><span class="text-lg font-medium text-gray-400 pl-6"><?php echo esc_html__( 'Last 60 Days', 'email-subscribers' ); ?></span></div>
305
- <div class="flex">
306
- <div class="lg:w-3/12 xl:w-2/12 h-20 pl-6 pt-3 border-r border-gray-200">
307
- <div class="mb-1">
308
- <span class="text-2xl font-bold leading-none text-gray-700"><?php echo esc_html( number_format( $es_total_subscribed_contacts ) ); ?></span>
309
- </div>
310
- <div class="text-sm text-gray-400 tracking-wide">
311
  <?php echo esc_html__( 'Subscribed', 'email-subscribers' ); ?>
312
- </div>
313
- </div>
314
- <div class="lg:w-3/12 xl:w-2/12 h-20 pl-4 pt-3 mb-2 border-r border-gray-200">
315
- <div class=" mb-1">
316
- <span class="text-2xl font-bold leading-none text-gray-700"><?php echo esc_html( number_format( $es_total_unsubscribed_contacts ) ); ?></span>
317
- </div>
318
- <div class="text-sm text-gray-400 tracking-wide">
319
  <?php echo esc_html__( 'Unsubscribed', 'email-subscribers' ); ?>
320
- </div>
321
- </div>
322
- <div class="lg:w-3/12 xl:w-2/12 h-20 pl-4 pt-3 border-r border-gray-200">
323
- <div class="mb-1">
324
- <span class="text-2xl font-bold leading-none text-gray-700"><?php echo esc_html( number_format( $es_total_contacts_opened_emails ) ); ?></span>
325
- </div>
326
- <div class="text-sm text-gray-400 tracking-wide">
 
 
 
 
 
 
 
 
327
  <?php echo esc_html__( 'Opened', 'email-subscribers' ); ?>
328
- </div>
329
- </div>
330
- <div class="lg:w-3/12 xl:w-2/12 h-20 pl-4 pt-3">
331
  <?php do_action( 'ig_es_after_contacts_kpis' ); ?>
332
- </div>
333
- </div>
334
- </td>
335
- </tr>
336
- </table>
337
- </div>
338
  <?php
339
  }
340
 
@@ -481,24 +499,24 @@ class ES_Contacts_Table extends WP_List_Table {
481
  ES()->mailer->send_welcome_email( $contact['email'], $template_data );
482
  }
483
 
484
- $message = __( 'Contact has been added successfully!', 'email-subscribers' );
485
  } else {
486
- $message = __( 'Contact has been updated successfully!', 'email-subscribers' );
487
  }
488
 
489
  ES_Common::show_message( $message, 'success' );
490
  }
491
  }
492
  } else {
493
- $message = __( 'Please Enter First Name', 'email-subscribers' );
494
  ES_Common::show_message( $message, 'error' );
495
  }
496
  } else {
497
- $message = __( 'Please Select List', 'email-subscribers' );
498
  ES_Common::show_message( $message, 'error' );
499
  }
500
  } else {
501
- $message = __( 'Please Enter Valid Email Address', 'email-subscribers' );
502
  ES_Common::show_message( $message, 'error' );
503
  }
504
  }
@@ -515,41 +533,41 @@ class ES_Contacts_Table extends WP_List_Table {
515
 
516
  ?>
517
 
518
- <div class="max-w-full mt-1 font-sans">
519
- <header class="wp-heading-inline">
520
- <div class="md:flex md:items-center md:justify-between justify-center">
521
- <div class="flex-1 min-w-0">
522
- <h2 class="text-2xl leading-7 text-gray-900 sm:leading-9 sm:truncate">
523
  <span class="text-base font-normal leading-7 text-indigo-600 sm:leading-9 sm:truncate">
524
  <a href="admin.php?page=es_subscribers"><?php esc_html_e( 'Audience ', 'email-subscribers' ); ?></a></span>
525
- <svg class="w-6 h-6 mt-2 inline-block" fill="currentColor" viewBox="0 0 24 24">
526
- <path
527
- fill-rule="evenodd"
528
- d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z"
529
- clip-rule="evenodd"
530
- ></path>
531
- </svg>
532
  <?php echo esc_html( $title ); ?>
533
- </h2>
534
- </div>
535
 
536
- <div class="py-2 flex md:mt-0 pb-2">
537
- <div id="ig-es-create-button" class="relative inline-block text-left">
538
  <?php
539
  echo wp_kses_post( $title_action );
540
  ?>
541
- </div>
542
- </div>
543
- </div>
544
- </header>
545
- <div>
546
- <hr class="wp-header-end">
547
- </div>
548
- <div class="bg-white shadow-md rounded-lg">
549
  <?php echo wp_kses_post( $this->prepare_contact_form( $data, $is_new ) ); ?>
550
 
551
- </div>
552
- </div>
553
  <?php
554
 
555
  }
@@ -684,131 +702,133 @@ class ES_Contacts_Table extends WP_List_Table {
684
  ?>
685
 
686
 
687
- <form method="post" action="<?php echo esc_attr( $action ); ?>" class="ml-5 mr-4 text-left pt-8 flex-row mt-2 item-center ">
688
  <?php wp_nonce_field( 'ig-es-contact-nonce', 'ig_es_contact_nonce' ); ?>
689
- <div class="flex flex-row border-b border-gray-100">
690
- <div class="flex w-1/5">
691
- <div class="ml-4 pt-6">
692
- <label for="firstname"><span class="block ml-4 pt-1 pr-4 text-sm font-medium text-gray-600 pb-2"><?php esc_html_e( 'First Name', 'email-subscribers' ); ?></span></label>
693
-
694
- </div>
695
- </div>
696
- <div class="flex">
697
- <div class="ml-16 mb-4 h-10 mr-4 mt-4">
698
- <div class="h-10 relative">
699
- <div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
700
  <span class="inset-y-0 text-gray-400 sm:text-sm sm:leading-5">
701
  <span class="my-2 mr-10 dashicons dashicons-admin-users"></span>
702
  </span>
703
- </div>
704
- <input id="ig-es-contact-first-name" class="ig-es-contact-first-name form-input block border-gray-400 w-full pl-10 pr-12 shadow-sm focus:bg-gray-100 sm:text-sm sm:leading-5" placeholder="<?php esc_html_e( 'Enter First Name', 'email-subscribers' ); ?>" name="contact_data[first_name]"
705
- value="<?php echo esc_attr( $first_name ); ?>"/>
706
- </div>
707
- </div>
708
- </div>
709
- </div>
710
-
711
- <div class="flex flex-row border-b border-gray-100">
712
- <div class="flex w-1/5">
713
- <div class="ml-4 pt-6">
714
- <label for="lastname"><span class="block ml-4 pt-1 pr-4 text-sm font-medium text-gray-600 pb-2"><?php esc_html_e( 'Last Name', 'email-subscribers' ); ?></span></label>
715
- </div>
716
- </div>
717
- <div class="flex">
718
- <div class="ml-16 my-4 h-10 mr-4">
719
- <div class="h-10 relative">
720
- <div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
721
  <span class="inset-y-0 text-gray-400 sm:text-sm sm:leading-5">
722
  <span class="my-2 mr-10 dashicons dashicons-admin-users"></span>
723
  </span>
724
- </div>
725
- <input id="ig-es-contact-last-name" class="ig-es-contact-last-name form-input block border-gray-400 w-full pl-10 pr-12 shadow-sm focus:bg-gray-100 sm:text-sm sm:leading-5" placeholder="<?php esc_html_e( 'Enter Last Name', 'email-subscribers' ); ?>" name="contact_data[last_name]" value="<?php echo esc_attr( $last_name ); ?>"/>
726
- </div>
727
- </div>
728
- </div>
729
- </div>
730
-
731
- <div class="flex flex-row border-b border-gray-100">
732
- <div class="flex w-1/5">
733
- <div class="ml-4 pt-6">
734
- <label for="email"><span class="block ml-4 pt-1 pr-4 text-sm font-medium text-gray-600 pb-2"><?php esc_html_e( 'Email', 'email-subscribers' ); ?></span></label>
735
- </div>
736
- </div>
737
- <div class="flex">
738
- <div class="ml-16 my-4 mr-4">
739
- <div class="h-10 relative">
740
- <div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
741
- <span class="inset-y-0 text-gray-400 sm:text-sm sm:leading-5">
742
- <span class="my-2 mr-10 dashicons dashicons-email-alt"></span></span>
743
- </div>
744
- <input id="email" class="form-input block border-gray-400 w-full pl-10 pr-12 shadow-sm focus:bg-gray-100 sm:text-sm sm:leading-5" id="email" name="contact_data[email]" value="<?php echo esc_attr( $email ); ?>" placeholder="<?php esc_html_e( 'Enter Email', 'email-subscribers' ); ?>"/>
745
- </div>
746
- </div>
747
- </div>
748
- </div>
 
 
749
 
750
  <?php if ( $is_new ) { ?>
751
- <div class="flex flex-row border-b border-gray-100">
752
- <div class="flex w-1/5">
753
- <div class="ml-4 pt-4">
754
- <label for="send_email"><span class="block ml-4 pt-1 pr-4 text-sm font-medium text-gray-600 pb-2"><?php esc_html_e( 'Send Welcome Email?', 'email-subscribers' ); ?></span>
755
- </label>
756
- </div>
757
- </div>
758
- <div class="flex">
759
- <div class="ml-16 my-4 mr-4">
760
- <label for="send_email" class=" inline-flex items-center cursor-pointer">
761
  <span class="relative">
762
  <input id="send_email" type="checkbox" class="absolute es-check-toggle opacity-0 w-0 h-0"
763
- name="contact_data[send_welcome_email]"
764
  <?php
765
  if ( $send_welcome_email ) {
766
  echo "checked='checked'";
767
  }
768
  ?>
769
  />
770
- <span class="es-mail-toggle-line block w-10 h-6 bg-gray-300 rounded-full shadow-inner"></span>
771
- <span class="es-mail-toggle-dot absolute transition-all duration-300 ease-in-out block w-4 h-4 mt-1 ml-1 bg-white rounded-full shadow inset-y-0 left-0 focus-within:shadow-outline"></span>
772
  </span>
773
- </label>
774
- </div>
775
- </div>
776
- </div>
777
  <?php } ?>
778
 
779
- <div class="flex flex-row border-b border-gray-100">
780
- <div class="flex w-1/5">
781
- <div class="ml-4 pt-6">
782
- <label for="status">
783
- <span class="block ml-4 pt-1 pr-4 text-sm font-medium text-gray-600 pb-2"> <?php esc_html_e( 'List(s)', 'email-subscribers' ); ?></span></label>
784
- </div>
785
- </div>
786
- <div class="flex">
787
- <div class="ml-16 my-4 mr-4">
788
- <div class=" relative">
789
  <?php
790
  $allowedtags = ig_es_allowed_html_tags_in_esc();
791
  echo wp_kses( $list_html, $allowedtags );
792
  ?>
793
- </div>
794
- </div>
795
- </div>
796
- </div>
797
 
798
- <div class="flex border-b border-gray-100">
799
  <?php
800
  $submit_button_text = $is_new ? __( 'Save Contact', 'email-subscribers' ) : __( 'Save Changes', 'email-subscribers' );
801
  ?>
802
- <div class="ml-4 mb-4 pt-6">
803
- <input type="hidden" name="contact_data[created_at]" value="<?php echo esc_attr( $created ); ?>"/>
804
- <input type="hidden" name="contact_data[guid]" value="<?php echo esc_attr( $guid ); ?>"/>
805
- <input type="hidden" name="submitted" value="submitted"/>
806
- <input type="submit" name="submit" class="cursor-pointer align-middle px-4 my-2 py-2 mx-2 ig-es-primary-button hover:shadow-md" value="<?php echo esc_attr( $submit_button_text ); ?>"/>
807
- <a href="admin.php?page=es_subscribers" class="cursor-pointer align-middle rounded-md border border-indigo-600 hover:shadow-md focus:outline-none focus:shadow-outline-indigo text-sm leading-5 font-medium transition ease-in-out duration-150 px-4 my-2 py-2 mx-2 "><?php esc_html_e( 'Cancel', 'email-subscribers' ); ?></a>
808
- </div>
809
- </div>
810
- </form>
811
- </div>
812
  <?php
813
 
814
  }
@@ -1045,31 +1065,31 @@ class ES_Contacts_Table extends WP_List_Table {
1045
  public function search_box( $text = '', $input_id = '' ) {
1046
 
1047
  ?>
1048
- <p class="search-box box-ma10">
1049
- <label class="screen-reader-text" for="<?php echo esc_attr( $input_id ); ?>"><?php echo esc_attr( $text ); ?>:</label>
1050
- <input type="search" id="<?php echo esc_attr( $input_id ); ?>" name="s" value="<?php _admin_search_query(); ?>"/>
1051
  <?php submit_button( __( 'Search Contacts', 'email-subscribers' ), 'button', false, false, array( 'id' => 'search-submit' ) ); ?>
1052
- </p>
1053
- <p class="search-box search-group-box box-ma10">
1054
  <?php $filter_by_status = ig_es_get_request_data( 'filter_by_status' ); ?>
1055
- <select name="filter_by_status">
1056
  <?php
1057
  $allowedtags = ig_es_allowed_html_tags_in_esc();
1058
  add_filter( 'safe_style_css', 'ig_es_allowed_css_style' );
1059
  $status_types = ES_Common::prepare_statuses_dropdown_options( $filter_by_status, __( 'All Statuses', 'email-subscribers' ) );
1060
  echo wp_kses( $status_types, $allowedtags );
1061
  ?>
1062
- </select>
1063
- </p>
1064
- <p class="search-box search-group-box box-ma10">
1065
  <?php $filter_by_list_id = ig_es_get_request_data( 'filter_by_list_id' ); ?>
1066
- <select name="filter_by_list_id">
1067
  <?php
1068
  $lists_dropdown = ES_Common::prepare_list_dropdown_options( $filter_by_list_id, __( 'All Lists', 'email-subscribers' ) );
1069
  echo wp_kses( $lists_dropdown, $allowedtags );
1070
  ?>
1071
- </select>
1072
- </p>
1073
 
1074
  <?php
1075
  }
@@ -1099,8 +1119,6 @@ class ES_Contacts_Table extends WP_List_Table {
1099
  /** Process bulk action */
1100
  $this->process_bulk_action();
1101
  $this->search_box( ig_es_get_request_data( 's' ), 'subscriber-search-input' );
1102
- $this->prepare_lists_dropdown();
1103
- $this->prepare_statuses_dropdown();
1104
 
1105
  $per_page = $this->get_items_per_page( self::$option_per_page, 200 );
1106
  $current_page = $this->get_pagenum();
@@ -1177,7 +1195,7 @@ class ES_Contacts_Table extends WP_List_Table {
1177
  $subscriber_id = absint( ig_es_get_request_data( 'subscriber' ) );
1178
  $deleted = ES()->contacts_db->delete_contacts_by_ids( array( $subscriber_id ) );
1179
  if ( $deleted ) {
1180
- $message = __( 'Contact(s) have been deleted successfully!', 'email-subscribers' );
1181
  ES_Common::show_message( $message, 'success' );
1182
  }
1183
 
@@ -1202,7 +1220,7 @@ class ES_Contacts_Table extends WP_List_Table {
1202
  );
1203
 
1204
  if ( $resend ) {
1205
- $message = __( 'Confirmation email has been sent successfully!', 'email-subscribers' );
1206
  ES_Common::show_message( $message, 'success' );
1207
 
1208
  return;
@@ -1211,7 +1229,7 @@ class ES_Contacts_Table extends WP_List_Table {
1211
  $url = add_query_arg( 'resend', true );
1212
  // redirect to resend link and avoid resending email
1213
  ?>
1214
- <meta http-equiv="refresh" content="0; url=<?php echo esc_url( $url ); ?>"/>
1215
  <?php
1216
  }
1217
 
@@ -1240,7 +1258,7 @@ class ES_Contacts_Table extends WP_List_Table {
1240
  $deleted = ES()->contacts_db->delete_contacts_by_ids( $subscriber_ids );
1241
 
1242
  if ( $deleted ) {
1243
- $message = __( 'Contact(s) have been deleted successfully!', 'email-subscribers' );
1244
  ES_Common::show_message( $message, 'success' );
1245
  }
1246
 
@@ -1261,7 +1279,7 @@ class ES_Contacts_Table extends WP_List_Table {
1261
  $edited = ES()->lists_contacts_db->edit_subscriber_status( $subscriber_ids, $status );
1262
 
1263
  if ( $edited ) {
1264
- $message = __( 'Status has been changed successfully!', 'email-subscribers' );
1265
  ES_Common::show_message( $message, 'success' );
1266
  }
1267
 
@@ -1281,7 +1299,7 @@ class ES_Contacts_Table extends WP_List_Table {
1281
  $edited = ES()->lists_contacts_db->move_contacts_to_list( $subscriber_ids, $list_id );
1282
 
1283
  if ( $edited ) {
1284
- $message = __( 'Contact(s) have been moved to list successfully!', 'email-subscribers' );
1285
  ES_Common::show_message( $message, 'success' );
1286
  }
1287
 
@@ -1302,7 +1320,7 @@ class ES_Contacts_Table extends WP_List_Table {
1302
  $edited = ES()->lists_contacts_db->add_contacts_to_list( $subscriber_ids, $list_id );
1303
 
1304
  if ( $edited ) {
1305
- $message = __( 'Contact(s) have been added to list successfully!', 'email-subscribers' );
1306
  ES_Common::show_message( $message, 'success' );
1307
  }
1308
 
178
  * @since 4.2.1
179
  */
180
  public function render() {
 
181
  ?>
182
+ <div class="wrap pt-3 font-sans">
183
 
184
  <?php
185
 
201
  $audience_tab_main_navigation = apply_filters( 'ig_es_audience_tab_main_navigation', $active_tab, $audience_tab_main_navigation );
202
 
203
  ?>
204
+ <div class="flex">
205
+ <div>
206
+ <h2 class="wp-heading-inline text-3xl font-bold text-gray-700 sm:leading-9 sm:truncate pr-4">
207
  <?php
208
  echo esc_html__( 'Audience', 'email-subscribers' );
209
  ?>
210
+ </h2>
211
+ </div>
212
+ <div class="mt-1">
213
  <?php
214
  ES_Common::prepare_main_header_navigation( $audience_tab_main_navigation );
215
  ?>
216
+ </div>
217
+ </div>
218
+ <div>
219
+ <hr class="wp-header-end">
220
+ </div>
221
  <?php $this->get_contacts_reports(); ?>
222
 
223
+ <div id="poststuff" class="es-audience-view es-items-lists">
224
+ <div id="post-body" class="metabox-holder column-1">
225
+ <div id="post-body-content">
226
+ <div class="meta-box-sortables ui-sortable">
227
+ <form method="get">
228
+ <input type="hidden" name="page" value="es_subscribers"/>
229
  <?php
230
+ // Display search field and other available filter fields.
231
  $this->prepare_items();
232
+ ?>
233
+ </form>
234
+ <form method="post">
235
+ <?php
236
+ // Add hidden list dropdown and status dropdown fields. They will be displayed accordling to the chosen bulk action using JS.
237
+ $this->prepare_lists_dropdown();
238
+ $this->prepare_statuses_dropdown();
239
+
240
+ // Display bulk action fields, pagination and list items.
241
  $this->display();
242
  ?>
243
+ </form>
244
+ </div>
245
+ </div>
246
+ </div>
247
+ <br class="clear">
248
+ </div>
249
+ </div>
250
  <?php
251
  }
252
  }
290
  $es_total_contact = ES_Reports_Data::get_total_contacts();
291
  $es_total_subscribed_contacts = ES_Reports_Data::get_total_subscribed_contacts( 60 );
292
  $es_total_unsubscribed_contacts = ES_Reports_Data::get_total_unsubscribed_contacts( 60 );
293
+ $es_total_unconfirmed_contacts = ES_Reports_Data::get_total_unconfirmed_contacts( 60 );
294
  $es_total_contacts_opened_emails = ES_Reports_Data::get_total_contacts_opened_emails( 60 );
295
  ?>
296
+ <div class="border-0 mt-8 mb-4">
297
+ <table class="min-w-full overflow-hidden bg-white rounded-lg shadow font-sans">
298
+ <tr>
299
+ <td class="w-1/5 border-r lg:px-4">
300
+ <div class="block pt-3 pb-2 pl-2"><span class="text-lg font-medium text-gray-400"><?php echo esc_html__( 'Total Contacts', 'email-subscribers' ); ?></span></div>
301
+ <div class="flex pt-2 pb-2 h-20">
302
+ <div class="lg:pl-2 ">
303
+ <svg fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 24 24" class="w-8 h-8 text-gray-400 mt-1">
304
+ <path d="M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z"></path>
305
+ </svg>
306
+ </div>
307
+ <div>
308
+ <span class="text-4xl font-bold leading-none text-indigo-600 pl-4"><?php echo esc_html( number_format( $es_total_contact ) ); ?></span>
309
+
310
+ </div>
311
+ </div>
312
+ </td>
313
+ <td class="w-4/5">
314
+ <div class="block pt-4 pb-1"><span class="text-lg font-medium text-gray-400 pl-6"><?php echo esc_html__( 'Last 60 Days', 'email-subscribers' ); ?></span></div>
315
+ <div class="flex">
316
+ <div class="lg:w-3/12 xl:w-2/12 h-20 pl-6 pt-3 border-r border-gray-200">
317
+ <div class="mb-1">
318
+ <span class="text-2xl font-bold leading-none text-gray-700"><?php echo esc_html( number_format( $es_total_subscribed_contacts ) ); ?></span>
319
+ </div>
320
+ <div class="text-sm text-gray-400 tracking-wide">
321
  <?php echo esc_html__( 'Subscribed', 'email-subscribers' ); ?>
322
+ </div>
323
+ </div>
324
+ <div class="lg:w-3/12 xl:w-2/12 h-20 pl-4 pt-3 mb-2 border-r border-gray-200">
325
+ <div class=" mb-1">
326
+ <span class="text-2xl font-bold leading-none text-gray-700"><?php echo esc_html( number_format( $es_total_unsubscribed_contacts ) ); ?></span>
327
+ </div>
328
+ <div class="text-sm text-gray-400 tracking-wide">
329
  <?php echo esc_html__( 'Unsubscribed', 'email-subscribers' ); ?>
330
+ </div>
331
+ </div>
332
+ <div class="lg:w-3/12 xl:w-2/12 h-20 pl-4 pt-3 mb-2 border-r border-gray-200">
333
+ <div class=" mb-1">
334
+ <span class="text-2xl font-bold leading-none text-gray-700"><?php echo esc_html( number_format( $es_total_unconfirmed_contacts ) ); ?></span>
335
+ </div>
336
+ <div class="text-sm text-gray-400 tracking-wide">
337
+ <?php echo esc_html__( 'Unconfirmed', 'email-subscribers' ); ?>
338
+ </div>
339
+ </div>
340
+ <div class="lg:w-3/12 xl:w-2/12 h-20 pl-4 pt-3 border-r border-gray-200">
341
+ <div class="mb-1">
342
+ <span class="text-2xl font-bold leading-none text-gray-700"><?php echo esc_html( number_format( $es_total_contacts_opened_emails ) ); ?></span>
343
+ </div>
344
+ <div class="text-sm text-gray-400 tracking-wide">
345
  <?php echo esc_html__( 'Opened', 'email-subscribers' ); ?>
346
+ </div>
347
+ </div>
348
+ <div class="lg:w-3/12 xl:w-2/12 h-20 pl-4 pt-3">
349
  <?php do_action( 'ig_es_after_contacts_kpis' ); ?>
350
+ </div>
351
+ </div>
352
+ </td>
353
+ </tr>
354
+ </table>
355
+ </div>
356
  <?php
357
  }
358
 
499
  ES()->mailer->send_welcome_email( $contact['email'], $template_data );
500
  }
501
 
502
+ $message = __( 'Contact added successfully!', 'email-subscribers' );
503
  } else {
504
+ $message = __( 'Contact updated successfully!', 'email-subscribers' );
505
  }
506
 
507
  ES_Common::show_message( $message, 'success' );
508
  }
509
  }
510
  } else {
511
+ $message = __( 'Please enter first name', 'email-subscribers' );
512
  ES_Common::show_message( $message, 'error' );
513
  }
514
  } else {
515
+ $message = __( 'Please select list', 'email-subscribers' );
516
  ES_Common::show_message( $message, 'error' );
517
  }
518
  } else {
519
+ $message = __( 'Please enter valid email address', 'email-subscribers' );
520
  ES_Common::show_message( $message, 'error' );
521
  }
522
  }
533
 
534
  ?>
535
 
536
+ <div class="max-w-full mt-1 font-sans">
537
+ <header class="wp-heading-inline">
538
+ <div class="md:flex md:items-center md:justify-between justify-center">
539
+ <div class="flex-1 min-w-0">
540
+ <h2 class="text-2xl leading-7 text-gray-900 sm:leading-9 sm:truncate">
541
  <span class="text-base font-normal leading-7 text-indigo-600 sm:leading-9 sm:truncate">
542
  <a href="admin.php?page=es_subscribers"><?php esc_html_e( 'Audience ', 'email-subscribers' ); ?></a></span>
543
+ <svg class="w-6 h-6 mt-2 inline-block" fill="currentColor" viewBox="0 0 24 24">
544
+ <path
545
+ fill-rule="evenodd"
546
+ d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z"
547
+ clip-rule="evenodd"
548
+ ></path>
549
+ </svg>
550
  <?php echo esc_html( $title ); ?>
551
+ </h2>
552
+ </div>
553
 
554
+ <div class="py-2 flex md:mt-0 pb-2">
555
+ <div id="ig-es-create-button" class="relative inline-block text-left">
556
  <?php
557
  echo wp_kses_post( $title_action );
558
  ?>
559
+ </div>
560
+ </div>
561
+ </div>
562
+ </header>
563
+ <div>
564
+ <hr class="wp-header-end">
565
+ </div>
566
+ <div class="bg-white shadow-md rounded-lg">
567
  <?php echo wp_kses_post( $this->prepare_contact_form( $data, $is_new ) ); ?>
568
 
569
+ </div>
570
+ </div>
571
  <?php
572
 
573
  }
702
  ?>
703
 
704
 
705
+ <form method="post" action="<?php echo esc_attr( $action ); ?>" class="ml-5 mr-4 text-left pt-8 flex-row mt-2 item-center ">
706
  <?php wp_nonce_field( 'ig-es-contact-nonce', 'ig_es_contact_nonce' ); ?>
707
+ <div class="flex flex-row border-b border-gray-100">
708
+ <div class="flex w-1/5">
709
+ <div class="ml-4 pt-6">
710
+ <label for="firstname"><span class="block ml-4 pt-1 pr-4 text-sm font-medium text-gray-600 pb-2"><?php esc_html_e( 'First name', 'email-subscribers' ); ?></span></label>
711
+
712
+ </div>
713
+ </div>
714
+ <div class="flex">
715
+ <div class="ml-16 mb-4 h-10 mr-4 mt-4">
716
+ <div class="h-10 relative">
717
+ <div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
718
  <span class="inset-y-0 text-gray-400 sm:text-sm sm:leading-5">
719
  <span class="my-2 mr-10 dashicons dashicons-admin-users"></span>
720
  </span>
721
+ </div>
722
+ <input id="ig-es-contact-first-name" class="ig-es-contact-first-name form-input block border-gray-400 w-full pl-10 pr-12 shadow-sm focus:bg-gray-100 sm:text-sm sm:leading-5" placeholder="<?php esc_html_e( 'Enter first name', 'email-subscribers' ); ?>" name="contact_data[first_name]"
723
+ value="<?php echo esc_attr( $first_name ); ?>"/>
724
+ </div>
725
+ </div>
726
+ </div>
727
+ </div>
728
+
729
+ <div class="flex flex-row border-b border-gray-100">
730
+ <div class="flex w-1/5">
731
+ <div class="ml-4 pt-6">
732
+ <label for="lastname"><span class="block ml-4 pt-1 pr-4 text-sm font-medium text-gray-600 pb-2"><?php esc_html_e( 'Last name', 'email-subscribers' ); ?></span></label>
733
+ </div>
734
+ </div>
735
+ <div class="flex">
736
+ <div class="ml-16 my-4 h-10 mr-4">
737
+ <div class="h-10 relative">
738
+ <div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
739
  <span class="inset-y-0 text-gray-400 sm:text-sm sm:leading-5">
740
  <span class="my-2 mr-10 dashicons dashicons-admin-users"></span>
741
  </span>
742
+ </div>
743
+ <input id="ig-es-contact-last-name" class="ig-es-contact-last-name form-input block border-gray-400 w-full pl-10 pr-12 shadow-sm focus:bg-gray-100 sm:text-sm sm:leading-5" placeholder="<?php esc_html_e( 'Enter last name', 'email-subscribers' ); ?>" name="contact_data[last_name]" value="<?php echo esc_attr( $last_name ); ?>"/>
744
+ </div>
745
+ </div>
746
+ </div>
747
+ </div>
748
+
749
+ <div class="flex flex-row border-b border-gray-100">
750
+ <div class="flex w-1/5">
751
+ <div class="ml-4 pt-6">
752
+ <label for="email"><span class="block ml-4 pt-1 pr-4 text-sm font-medium text-gray-600 pb-2"><?php esc_html_e( 'Email', 'email-subscribers' ); ?></span></label>
753
+ </div>
754
+ </div>
755
+ <div class="flex">
756
+ <div class="ml-16 my-4 mr-4">
757
+ <div class="h-10 relative">
758
+ <div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
759
+ <svg class="h-5 w-5 text-gray-400" viewBox="0 0 20 20" fill="currentColor">
760
+ <path d="M2.003 5.884L10 9.882l7.997-3.998A2 2 0 0016 4H4a2 2 0 00-1.997 1.884z" />
761
+ <path d="M18 8.118l-8 4-8-4V14a2 2 0 002 2h12a2 2 0 002-2V8.118z" />
762
+ </svg>
763
+ </div>
764
+ <input id="email" class="form-input block border-gray-400 w-full pl-10 pr-12 shadow-sm focus:bg-gray-100 sm:text-sm sm:leading-5" id="email" name="contact_data[email]" value="<?php echo esc_attr( $email ); ?>" placeholder="<?php esc_html_e( 'Enter email', 'email-subscribers' ); ?>"/>
765
+ </div>
766
+ </div>
767
+ </div>
768
+ </div>
769
 
770
  <?php if ( $is_new ) { ?>
771
+ <div class="flex flex-row border-b border-gray-100">
772
+ <div class="flex w-1/5">
773
+ <div class="ml-4 pt-4">
774
+ <label for="send_email"><span class="block ml-4 pt-1 pr-4 text-sm font-medium text-gray-600 pb-2"><?php esc_html_e( 'Send Welcome email?', 'email-subscribers' ); ?></span>
775
+ </label>
776
+ </div>
777
+ </div>
778
+ <div class="flex">
779
+ <div class="ml-16 my-4 mr-4">
780
+ <label for="send_email" class=" inline-flex items-center cursor-pointer">
781
  <span class="relative">
782
  <input id="send_email" type="checkbox" class="absolute es-check-toggle opacity-0 w-0 h-0"
783
+ name="contact_data[send_welcome_email]"
784
  <?php
785
  if ( $send_welcome_email ) {
786
  echo "checked='checked'";
787
  }
788
  ?>
789
  />
790
+ <span class="es-mail-toggle-line"></span>
791
+ <span class="es-mail-toggle-dot"></span>
792
  </span>
793
+ </label>
794
+ </div>
795
+ </div>
796
+ </div>
797
  <?php } ?>
798
 
799
+ <div class="flex flex-row border-b border-gray-100">
800
+ <div class="flex w-1/5">
801
+ <div class="ml-4 pt-6">
802
+ <label for="status">
803
+ <span class="block ml-4 pt-1 pr-4 text-sm font-medium text-gray-600 pb-2"> <?php esc_html_e( 'List(s)', 'email-subscribers' ); ?></span></label>
804
+ </div>
805
+ </div>
806
+ <div class="flex">
807
+ <div class="ml-16 my-4 mr-4">
808
+ <div class=" relative">
809
  <?php
810
  $allowedtags = ig_es_allowed_html_tags_in_esc();
811
  echo wp_kses( $list_html, $allowedtags );
812
  ?>
813
+ </div>
814
+ </div>
815
+ </div>
816
+ </div>
817
 
818
+ <div class="flex border-b border-gray-100">
819
  <?php
820
  $submit_button_text = $is_new ? __( 'Save Contact', 'email-subscribers' ) : __( 'Save Changes', 'email-subscribers' );
821
  ?>
822
+ <div class="ml-4 mb-4 pt-6">
823
+ <input type="hidden" name="contact_data[created_at]" value="<?php echo esc_attr( $created ); ?>"/>
824
+ <input type="hidden" name="contact_data[guid]" value="<?php echo esc_attr( $guid ); ?>"/>
825
+ <input type="hidden" name="submitted" value="submitted"/>
826
+ <input type="submit" name="submit" class="cursor-pointer align-middle px-4 my-2 py-2 mx-2 ig-es-primary-button hover:shadow-md" value="<?php echo esc_attr( $submit_button_text ); ?>"/>
827
+ <a href="admin.php?page=es_subscribers" class="cursor-pointer align-middle rounded-md border border-indigo-600 hover:shadow-md focus:outline-none focus:shadow-outline-indigo text-sm leading-5 font-medium transition ease-in-out duration-150 px-4 my-2 py-2 mx-2 "><?php esc_html_e( 'Cancel', 'email-subscribers' ); ?></a>
828
+ </div>
829
+ </div>
830
+ </form>
831
+ </div>
832
  <?php
833
 
834
  }
1065
  public function search_box( $text = '', $input_id = '' ) {
1066
 
1067
  ?>
1068
+ <p class="search-box box-ma10">
1069
+ <label class="screen-reader-text" for="<?php echo esc_attr( $input_id ); ?>"><?php echo esc_attr( $text ); ?>:</label>
1070
+ <input type="search" id="<?php echo esc_attr( $input_id ); ?>" name="s" value="<?php _admin_search_query(); ?>"/>
1071
  <?php submit_button( __( 'Search Contacts', 'email-subscribers' ), 'button', false, false, array( 'id' => 'search-submit' ) ); ?>
1072
+ </p>
1073
+ <p class="search-box search-group-box box-ma10">
1074
  <?php $filter_by_status = ig_es_get_request_data( 'filter_by_status' ); ?>
1075
+ <select name="filter_by_status">
1076
  <?php
1077
  $allowedtags = ig_es_allowed_html_tags_in_esc();
1078
  add_filter( 'safe_style_css', 'ig_es_allowed_css_style' );
1079
  $status_types = ES_Common::prepare_statuses_dropdown_options( $filter_by_status, __( 'All Statuses', 'email-subscribers' ) );
1080
  echo wp_kses( $status_types, $allowedtags );
1081
  ?>
1082
+ </select>
1083
+ </p>
1084
+ <p class="search-box search-group-box box-ma10">
1085
  <?php $filter_by_list_id = ig_es_get_request_data( 'filter_by_list_id' ); ?>
1086
+ <select name="filter_by_list_id">
1087
  <?php
1088
  $lists_dropdown = ES_Common::prepare_list_dropdown_options( $filter_by_list_id, __( 'All Lists', 'email-subscribers' ) );
1089
  echo wp_kses( $lists_dropdown, $allowedtags );
1090
  ?>
1091
+ </select>
1092
+ </p>
1093
 
1094
  <?php
1095
  }
1119
  /** Process bulk action */
1120
  $this->process_bulk_action();
1121
  $this->search_box( ig_es_get_request_data( 's' ), 'subscriber-search-input' );
 
 
1122
 
1123
  $per_page = $this->get_items_per_page( self::$option_per_page, 200 );
1124
  $current_page = $this->get_pagenum();
1195
  $subscriber_id = absint( ig_es_get_request_data( 'subscriber' ) );
1196
  $deleted = ES()->contacts_db->delete_contacts_by_ids( array( $subscriber_id ) );
1197
  if ( $deleted ) {
1198
+ $message = __( 'Contact(s) deleted successfully!', 'email-subscribers' );
1199
  ES_Common::show_message( $message, 'success' );
1200
  }
1201
 
1220
  );
1221
 
1222
  if ( $resend ) {
1223
+ $message = __( 'Confirmation email sent successfully!', 'email-subscribers' );
1224
  ES_Common::show_message( $message, 'success' );
1225
 
1226
  return;
1229
  $url = add_query_arg( 'resend', true );
1230
  // redirect to resend link and avoid resending email
1231
  ?>
1232
+ <meta http-equiv="refresh" content="0; url=<?php echo esc_url( $url ); ?>"/>
1233
  <?php
1234
  }
1235
 
1258
  $deleted = ES()->contacts_db->delete_contacts_by_ids( $subscriber_ids );
1259
 
1260
  if ( $deleted ) {
1261
+ $message = __( 'Contact(s) deleted successfully!', 'email-subscribers' );
1262
  ES_Common::show_message( $message, 'success' );
1263
  }
1264
 
1279
  $edited = ES()->lists_contacts_db->edit_subscriber_status( $subscriber_ids, $status );
1280
 
1281
  if ( $edited ) {
1282
+ $message = __( 'Contact(s) status changed successfully!', 'email-subscribers' );
1283
  ES_Common::show_message( $message, 'success' );
1284
  }
1285
 
1299
  $edited = ES()->lists_contacts_db->move_contacts_to_list( $subscriber_ids, $list_id );
1300
 
1301
  if ( $edited ) {
1302
+ $message = __( 'Contact(s) moved to list successfully!', 'email-subscribers' );
1303
  ES_Common::show_message( $message, 'success' );
1304
  }
1305
 
1320
  $edited = ES()->lists_contacts_db->add_contacts_to_list( $subscriber_ids, $list_id );
1321
 
1322
  if ( $edited ) {
1323
+ $message = __( 'Contact(s) added to list successfully!', 'email-subscribers' );
1324
  ES_Common::show_message( $message, 'success' );
1325
  }
1326
 
lite/includes/classes/class-es-cron.php CHANGED
@@ -511,7 +511,7 @@ class ES_Cron {
511
  $cron_url = ES()->cron->url( true );
512
 
513
  if ( 'SUCCESS' === $status ) {
514
- $message = __( sprintf( 'Email(s) have been sent successfully!' ), 'email-subscribers' );
515
  } else {
516
  $message = $this->get_status_messages( $response['message'] );
517
  }
511
  $cron_url = ES()->cron->url( true );
512
 
513
  if ( 'SUCCESS' === $status ) {
514
+ $message = __( sprintf( 'Email(s) sent successfully!' ), 'email-subscribers' );
515
  } else {
516
  $message = $this->get_status_messages( $response['message'] );
517
  }
lite/includes/classes/class-es-export-subscribers.php CHANGED
@@ -33,7 +33,7 @@ class Export_Subscribers {
33
  $selected_list_id = ig_es_get_request_data( 'list_id', 0 );
34
 
35
  if ( 0 === $selected_list_id ) {
36
- $message = __( 'Please Select List', 'email-subscribers' );
37
  ES_Common::show_message( $message, 'error' );
38
  exit();
39
  }
33
  $selected_list_id = ig_es_get_request_data( 'list_id', 0 );
34
 
35
  if ( 0 === $selected_list_id ) {
36
+ $message = __( 'Please select list', 'email-subscribers' );
37
  ES_Common::show_message( $message, 'error' );
38
  exit();
39
  }
lite/includes/classes/class-es-forms-table.php CHANGED
@@ -53,19 +53,19 @@ class ES_Forms_Table extends WP_List_Table {
53
  */
54
  public static function screen_options() {
55
 
56
- $action = ig_es_get_request_data( 'action' );
57
 
58
- if( empty( $action ) ) {
59
 
60
- $option = 'per_page';
61
- $args = array(
62
- 'label' => __( 'Number of forms per page', 'email-subscribers' ),
63
- 'default' => 20,
64
- 'option' => self::$option_per_page,
65
- );
66
 
67
- add_screen_option( $option, $args );
68
- }
69
  }
70
 
71
 
@@ -102,10 +102,10 @@ class ES_Forms_Table extends WP_List_Table {
102
  <div><hr class="wp-header-end"></div>
103
  <?php
104
  if ( 'form_created' === $action ) {
105
- $message = __( 'Form has been added successfully!', 'email-subscribers' );
106
  ES_Common::show_message( $message, 'success' );
107
  } elseif ( 'form_updated' === $action ) {
108
- $message = __( 'Form has been updated successfully!', 'email-subscribers' );
109
  ES_Common::show_message( $message, 'success' );
110
  }
111
  ?>
@@ -116,8 +116,14 @@ class ES_Forms_Table extends WP_List_Table {
116
  <form method="get">
117
  <input type="hidden" name="page" value="es_forms" />
118
  <?php
 
119
  $this->prepare_items();
120
- $this->display();
 
 
 
 
 
121
  ?>
122
  </form>
123
  </div>
@@ -284,7 +290,7 @@ class ES_Forms_Table extends WP_List_Table {
284
  $form_data['button_label'] = ! empty( $data['button_label'] ) ? sanitize_text_field( $data['button_label'] ) : __( 'Subscribe', 'email-subscribers' );
285
  $form_data['list_visible'] = ! empty( $data['list_visible'] ) ? $data['list_visible'] : 'no';
286
  $form_data['gdpr_consent'] = ! empty( $data['gdpr_consent'] ) ? $data['gdpr_consent'] : 'no';
287
- $form_data['gdpr_consent_text'] = ! empty( $data['gdpr_consent_text'] ) ? $data['gdpr_consent_text'] : 'Please accept terms & condition';
288
  $form_data['lists'] = ! empty( $data['lists'] ) ? $data['lists'] : array();
289
  $form_data['af_id'] = ! empty( $data['af_id'] ) ? $data['af_id'] : 0;
290
  $form_data['desc'] = ! empty( $data['desc'] ) ? sanitize_text_field( $data['desc'] ) : '';
@@ -325,7 +331,7 @@ class ES_Forms_Table extends WP_List_Table {
325
  <div class="flex flex-row border-b border-gray-100">
326
  <div class="flex w-1/5">
327
  <div class="ml-4 pt-6">
328
- <label for="tag-link"><span class="block ml-4 pt-1 pr-4 text-sm font-medium text-gray-600 pb-2"><?php esc_html_e( 'Form Name', 'email-subscribers' ); ?></span></label>
329
  </div>
330
  </div>
331
  <div class="flex">
@@ -353,7 +359,7 @@ class ES_Forms_Table extends WP_List_Table {
353
  <div class="flex flex-row border-b border-gray-100">
354
  <div class="flex w-1/5">
355
  <div class="ml-4 pt-4 mb-2">
356
- <label for="tag-link"><span class="block ml-4 pr-4 text-sm font-medium text-gray-600 pb-2"><?php esc_html_e( 'Form Fields', 'email-subscribers' ); ?></span></label>
357
  </div>
358
  </div>
359
  <div class="flex ">
@@ -364,7 +370,7 @@ class ES_Forms_Table extends WP_List_Table {
364
  <td class="pr-6 pb-8"><b class=" font-medium text-gray-500 pb-2"><?php esc_html_e( 'Show?', 'email-subscribers' ); ?></b></td>
365
  <td class="pr-6 pb-8"><b class=" font-medium text-gray-500 pb-2"><?php esc_html_e( 'Required?', 'email-subscribers' ); ?></b></td>
366
  <td class="pr-6 pb-8"><b class=" font-medium text-gray-500 pb-2"><?php esc_html_e( 'Label', 'email-subscribers' ); ?></b></td>
367
- <td class="pr-6 pb-8"><b class="font-medium text-gray-500 pb-2"><?php esc_html_e( 'Place Holder', 'email-subscribers' ); ?></b></td>
368
  </tr>
369
  <tr class="form-field ">
370
  <td class="pr-6 pb-8"><b class="text-gray-500 text-sm font-normal pb-2"><?php esc_html_e( 'Email', 'email-subscribers' ); ?></b></td>
@@ -479,8 +485,8 @@ class ES_Forms_Table extends WP_List_Table {
479
  ?>
480
  />
481
 
482
- <span class="relative es-mail-toggle-line block w-10 h-6 bg-gray-300 rounded-full shadow-inner"></span>
483
- <span class="es-mail-toggle-dot absolute transition-all duration-300 ease-in-out block w-4 h-4 mt-1 ml-1 bg-white rounded-full shadow inset-y-0 left-0 focus-within:shadow-outline "></span>
484
  </span>
485
 
486
  </label>
@@ -515,8 +521,8 @@ class ES_Forms_Table extends WP_List_Table {
515
  ?>
516
  />
517
 
518
- <span class="relative es-mail-toggle-line block w-10 h-6 bg-gray-300 rounded-full shadow-inner"></span>
519
- <span class="es-mail-toggle-dot absolute transition-all duration-300 ease-in-out block w-4 h-4 mt-1 ml-1 bg-white rounded-full shadow inset-y-0 left-0 focus-within:shadow-outline "></span>
520
  </span>
521
  </label>
522
  </td>
@@ -967,7 +973,7 @@ class ES_Forms_Table extends WP_List_Table {
967
  $form = ig_es_get_request_data( 'form' );
968
 
969
  $this->db->delete_forms( array( $form ) );
970
- $message = __( 'Form has been deleted successfully!', 'email-subscribers' );
971
  ES_Common::show_message( $message, 'success' );
972
  }
973
  }
@@ -982,7 +988,7 @@ class ES_Forms_Table extends WP_List_Table {
982
  if ( ! empty( $forms ) > 0 ) {
983
  $this->db->delete_forms( $forms );
984
 
985
- $message = __( 'Form(s) have been deleted successfully!', 'email-subscribers' );
986
  ES_Common::show_message( $message, 'success' );
987
  } else {
988
  $message = __( 'Please select form(s) to delete.', 'email-subscribers' );
53
  */
54
  public static function screen_options() {
55
 
56
+ $action = ig_es_get_request_data( 'action' );
57
 
58
+ if ( empty( $action ) ) {
59
 
60
+ $option = 'per_page';
61
+ $args = array(
62
+ 'label' => __( 'Number of forms per page', 'email-subscribers' ),
63
+ 'default' => 20,
64
+ 'option' => self::$option_per_page,
65
+ );
66
 
67
+ add_screen_option( $option, $args );
68
+ }
69
  }
70
 
71
 
102
  <div><hr class="wp-header-end"></div>
103
  <?php
104
  if ( 'form_created' === $action ) {
105
+ $message = __( 'Form added successfully!', 'email-subscribers' );
106
  ES_Common::show_message( $message, 'success' );
107
  } elseif ( 'form_updated' === $action ) {
108
+ $message = __( 'Form updated successfully!', 'email-subscribers' );
109
  ES_Common::show_message( $message, 'success' );
110
  }
111
  ?>
116
  <form method="get">
117
  <input type="hidden" name="page" value="es_forms" />
118
  <?php
119
+ // Display search field and other available filter fields.
120
  $this->prepare_items();
121
+ ?>
122
+ </form>
123
+ <form method="post">
124
+ <?php
125
+ // Display bulk action fields, pagination and list items.
126
+ $this->display();
127
  ?>
128
  </form>
129
  </div>
290
  $form_data['button_label'] = ! empty( $data['button_label'] ) ? sanitize_text_field( $data['button_label'] ) : __( 'Subscribe', 'email-subscribers' );
291
  $form_data['list_visible'] = ! empty( $data['list_visible'] ) ? $data['list_visible'] : 'no';
292
  $form_data['gdpr_consent'] = ! empty( $data['gdpr_consent'] ) ? $data['gdpr_consent'] : 'no';
293
+ $form_data['gdpr_consent_text'] = ! empty( $data['gdpr_consent_text'] ) ? $data['gdpr_consent_text'] : __( 'Please accept terms & condition', 'email-subscribers' );
294
  $form_data['lists'] = ! empty( $data['lists'] ) ? $data['lists'] : array();
295
  $form_data['af_id'] = ! empty( $data['af_id'] ) ? $data['af_id'] : 0;
296
  $form_data['desc'] = ! empty( $data['desc'] ) ? sanitize_text_field( $data['desc'] ) : '';
331
  <div class="flex flex-row border-b border-gray-100">
332
  <div class="flex w-1/5">
333
  <div class="ml-4 pt-6">
334
+ <label for="tag-link"><span class="block ml-4 pt-1 pr-4 text-sm font-medium text-gray-600 pb-2"><?php esc_html_e( 'Form name', 'email-subscribers' ); ?></span></label>
335
  </div>
336
  </div>
337
  <div class="flex">
359
  <div class="flex flex-row border-b border-gray-100">
360
  <div class="flex w-1/5">
361
  <div class="ml-4 pt-4 mb-2">
362
+ <label for="tag-link"><span class="block ml-4 pr-4 text-sm font-medium text-gray-600 pb-2"><?php esc_html_e( 'Form fields', 'email-subscribers' ); ?></span></label>
363
  </div>
364
  </div>
365
  <div class="flex ">
370
  <td class="pr-6 pb-8"><b class=" font-medium text-gray-500 pb-2"><?php esc_html_e( 'Show?', 'email-subscribers' ); ?></b></td>
371
  <td class="pr-6 pb-8"><b class=" font-medium text-gray-500 pb-2"><?php esc_html_e( 'Required?', 'email-subscribers' ); ?></b></td>
372
  <td class="pr-6 pb-8"><b class=" font-medium text-gray-500 pb-2"><?php esc_html_e( 'Label', 'email-subscribers' ); ?></b></td>
373
+ <td class="pr-6 pb-8"><b class="font-medium text-gray-500 pb-2"><?php esc_html_e( 'Placeholder', 'email-subscribers' ); ?></b></td>
374
  </tr>
375
  <tr class="form-field ">
376
  <td class="pr-6 pb-8"><b class="text-gray-500 text-sm font-normal pb-2"><?php esc_html_e( 'Email', 'email-subscribers' ); ?></b></td>
485
  ?>
486
  />
487
 
488
+ <span class="es-mail-toggle-line"></span>
489
+ <span class="es-mail-toggle-dot"></span>
490
  </span>
491
 
492
  </label>
521
  ?>
522
  />
523
 
524
+ <span class="es-mail-toggle-line"></span>
525
+ <span class="es-mail-toggle-dot"></span>
526
  </span>
527
  </label>
528
  </td>
973
  $form = ig_es_get_request_data( 'form' );
974
 
975
  $this->db->delete_forms( array( $form ) );
976
+ $message = __( 'Form deleted successfully!', 'email-subscribers' );
977
  ES_Common::show_message( $message, 'success' );
978
  }
979
  }
988
  if ( ! empty( $forms ) > 0 ) {
989
  $this->db->delete_forms( $forms );
990
 
991
+ $message = __( 'Form(s) deleted successfully!', 'email-subscribers' );
992
  ES_Common::show_message( $message, 'success' );
993
  } else {
994
  $message = __( 'Please select form(s) to delete.', 'email-subscribers' );
lite/includes/classes/class-es-handle-subscription.php CHANGED
@@ -133,14 +133,20 @@ if ( ! class_exists( 'ES_Handle_Subscription' ) ) {
133
  }
134
 
135
  $this->from_rainmaker = $from_rainmaker;
 
 
136
  }
137
 
138
  /**
139
  * Process request
140
  *
 
 
141
  * @since 4.0.0
 
 
142
  */
143
- public function process_request() {
144
 
145
  $response = array(
146
  'status' => 'ERROR',
@@ -150,9 +156,16 @@ if ( ! class_exists( 'ES_Handle_Subscription' ) ) {
150
  $es = ! empty( $_POST['es'] ) ? sanitize_text_field( wp_unslash( $_POST['es'] ) ) : '';
151
  $es_subscribe = ! empty( $_POST['esfpx_es-subscribe'] ) ? sanitize_text_field( wp_unslash( $_POST['esfpx_es-subscribe'] ) ) : '';
152
 
153
- if ( 'subscribe' === $es && ! empty( $es_subscribe ) && wp_verify_nonce( $es_subscribe, 'es-subscribe' ) ) {
 
154
 
155
- $form_data = wp_unslash( $_POST );
 
 
 
 
 
 
156
  $validate_response = $this->validate_data( $form_data );
157
  if ( 'ERROR' === $validate_response['status'] ) {
158
 
@@ -265,6 +278,7 @@ if ( ! class_exists( 'ES_Handle_Subscription' ) ) {
265
  'last_name' => $this->last_name,
266
  'guid' => $this->guid,
267
  'list_name' => $list_name,
 
268
  );
269
 
270
  if ( $this->is_double_optin ) {
@@ -473,5 +487,37 @@ if ( ! class_exists( 'ES_Handle_Subscription' ) ) {
473
 
474
  return $messages;
475
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
476
  }
477
  }
133
  }
134
 
135
  $this->from_rainmaker = $from_rainmaker;
136
+
137
+ $this->handle_external_subscription();
138
  }
139
 
140
  /**
141
  * Process request
142
  *
143
+ * @param array $external_form_data data from external form/APIs.
144
+ *
145
  * @since 4.0.0
146
+ *
147
+ * @modified 4.5.7 Added $external_form_data parameter.
148
  */
149
+ public function process_request( $external_form_data = array() ) {
150
 
151
  $response = array(
152
  'status' => 'ERROR',
156
  $es = ! empty( $_POST['es'] ) ? sanitize_text_field( wp_unslash( $_POST['es'] ) ) : '';
157
  $es_subscribe = ! empty( $_POST['esfpx_es-subscribe'] ) ? sanitize_text_field( wp_unslash( $_POST['esfpx_es-subscribe'] ) ) : '';
158
 
159
+ // Verify nonce only if it is submitted through Email Subscribers' subscription form else check if we have form data in $external_form_data.
160
+ if ( ( 'subscribe' === $es && ! empty( $es_subscribe ) && wp_verify_nonce( $es_subscribe, 'es-subscribe' ) ) || ! empty( $external_form_data ) ) {
161
 
162
+ // Get form data from external source if passed.
163
+ if ( ! empty( $external_form_data ) ) {
164
+ $form_data = $external_form_data;
165
+ } else {
166
+ // If external form data is not passed then get form data from $_POST.
167
+ $form_data = wp_unslash( $_POST );
168
+ }
169
  $validate_response = $this->validate_data( $form_data );
170
  if ( 'ERROR' === $validate_response['status'] ) {
171
 
278
  'last_name' => $this->last_name,
279
  'guid' => $this->guid,
280
  'list_name' => $list_name,
281
+ 'list_ids' => $this->list_ids,
282
  );
283
 
284
  if ( $this->is_double_optin ) {
487
 
488
  return $messages;
489
  }
490
+
491
+ /**
492
+ * Method to handle external subscriptions.
493
+ *
494
+ * @since 4.4.7
495
+ **/
496
+ public function handle_external_subscription() {
497
+
498
+ $external_action = ig_es_get_request_data( 'ig_es_external_action' );
499
+ if ( ! empty( $external_action ) && 'subscribe' === $external_action ) {
500
+ $list_hash = ig_es_get_request_data( 'list' );
501
+ $list = ES()->lists_db->get_by( 'hash', $list_hash );
502
+ if ( ! empty( $list ) ) {
503
+ $list_id = $list['id'];
504
+ $name = ig_es_get_request_data( 'name' );
505
+ $email = ig_es_get_request_data( 'email' );
506
+ $hp_email = ig_es_get_request_data( 'es_hp_email' );
507
+
508
+ $form_data = array(
509
+ 'esfpx_name' => $name,
510
+ 'esfpx_email' => $email,
511
+ 'esfpx_es_hp_email' => $hp_email,
512
+ 'esfpx_lists' => array(
513
+ $list_id,
514
+ ),
515
+ 'form_type' => 'external',
516
+ );
517
+
518
+ $this->process_request( $form_data );
519
+ }
520
+ }
521
+ }
522
  }
523
  }
lite/includes/classes/class-es-ig-redirect.php CHANGED
@@ -53,7 +53,7 @@ if ( ! class_exists( 'ES_IG_Redirect' ) ) {
53
  exit;
54
  } else { ?>
55
  <div class="wrap font-sans pt-3" id="ig-es-container">
56
- <header class="wp-heading-inline max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 ">
57
  <div class="md:flex md:items-center md:justify-between">
58
  <div class="flex-1 min-w-0">
59
  <h2 class="text-3xl font-bold text-gray-700 sm:leading-9 sm:truncate pr-4 pb-1">
@@ -88,8 +88,8 @@ if ( ! class_exists( 'ES_IG_Redirect' ) ) {
88
  </div>
89
 
90
  </header>
91
-
92
- <main class="mt-8 max-w-7xl mx-auto sm:px-6 lg:px-8">
93
  <section class="md:flex md:items-start md:justify-between sm:px-4 py-2 my-4 sm:px-0 rounded-lg bg-white shadow sm:grid sm:grid-cols-3">
94
 
95
  <div class="flex min-w-0 mr-4 pl-1">
@@ -136,7 +136,7 @@ if ( ! class_exists( 'ES_IG_Redirect' ) ) {
136
  </section>
137
  </main>
138
 
139
- <main class="max-w-7xl mx-auto sm:px-6 lg:px-8 -py-4">
140
  <section class="md:flex md:items-start md:justify-between sm:px-4 py-2 my-8 sm:px-0 sm:grid sm:grid-cols-2">
141
  <div class="flex min-w-0 mr-2 pl-1 mx-8 my-4">
142
  <div class="relative">
53
  exit;
54
  } else { ?>
55
  <div class="wrap font-sans pt-3" id="ig-es-container">
56
+ <header class="wp-heading-inline max-w-7xl mx-auto">
57
  <div class="md:flex md:items-center md:justify-between">
58
  <div class="flex-1 min-w-0">
59
  <h2 class="text-3xl font-bold text-gray-700 sm:leading-9 sm:truncate pr-4 pb-1">
88
  </div>
89
 
90
  </header>
91
+ <div><hr class="wp-header-end"></div>
92
+ <main class="mt-8 max-w-7xl mx-auto">
93
  <section class="md:flex md:items-start md:justify-between sm:px-4 py-2 my-4 sm:px-0 rounded-lg bg-white shadow sm:grid sm:grid-cols-3">
94
 
95
  <div class="flex min-w-0 mr-4 pl-1">
136
  </section>
137
  </main>
138
 
139
+ <main class="max-w-7xl mx-auto -py-4">
140
  <section class="md:flex md:items-start md:justify-between sm:px-4 py-2 my-8 sm:px-0 sm:grid sm:grid-cols-2">
141
  <div class="flex min-w-0 mr-2 pl-1 mx-8 my-4">
142
  <div class="relative">
lite/includes/classes/class-es-import-subscribers.php CHANGED
@@ -186,14 +186,14 @@ class ES_Import_Subscribers {
186
  ES()->lists_contacts_db->do_import_contacts_into_list( $list_id, $contact_ids, $status, 1, $current_date_time );
187
  }
188
  /* translators: %s: Total imported contacts */
189
- $message = sprintf( __( 'Total %d contacts have been imported successfully!', 'email-subscribers' ), $imported_subscribers_count );
190
 
191
  }
192
 
193
  if ( $existing_contacts_count > 0 ) {
194
  $message .= ' ';
195
  /* translators: %s: Exisiting contacts count */
196
- $message .= sprintf( __( '%d contact(s) are already exists.', 'email-subscribers' ), $existing_contacts_count );
197
  }
198
 
199
  if ( $invalid_emails_count > 0 ) {
@@ -207,7 +207,7 @@ class ES_Import_Subscribers {
207
  ES_Common::show_message( $message, $response_status );
208
 
209
  } else {
210
- $message = __( 'Error: Please Select List', 'email-subscribers' );
211
  ES_Common::show_message( $message, 'error' );
212
  }
213
  } else {
@@ -220,7 +220,7 @@ class ES_Import_Subscribers {
220
  ES_Common::show_message( $message, 'error' );
221
  }
222
  } else {
223
- $message = __( 'Error: Please Upload only CSV File', 'email-subscribers' );
224
  ES_Common::show_message( $message, 'error' );
225
  }
226
  } else {
@@ -235,13 +235,13 @@ class ES_Import_Subscribers {
235
  break;
236
  }
237
  } else {
238
- $message = __( 'Error: Please Upload File', 'email-subscribers' );
239
  }
240
 
241
  ES_Common::show_message( $message, 'error' );
242
  }
243
  } else {
244
- $message = __( 'Error: Please Upload File', 'email-subscribers' );
245
  ES_Common::show_message( $message, 'error' );
246
  }
247
  }
@@ -289,7 +289,7 @@ class ES_Import_Subscribers {
289
  </label>
290
  </th>
291
  <td class="w-9/12 pb-3">
292
- <select class="relative form-select shadow-sm border border-gray-400 w-1/3 ml-12" name="es_email_status" id="es_email_status">
293
  <?php
294
  $statuses_dropdown = ES_Common::prepare_statuses_dropdown_options();
295
  echo wp_kses( $statuses_dropdown , $allowedtags );
@@ -304,7 +304,7 @@ class ES_Import_Subscribers {
304
  </label>
305
  </th>
306
  <td class="w-9/12 pb-3">
307
- <select name="list_id" id="list_id" class="relative form-select shadow-sm border border-gray-400 w-1/3 ml-12">
308
  <?php
309
  $lists_dropdown = ES_Common::prepare_list_dropdown_options();
310
  echo wp_kses( $lists_dropdown , $allowedtags );
186
  ES()->lists_contacts_db->do_import_contacts_into_list( $list_id, $contact_ids, $status, 1, $current_date_time );
187
  }
188
  /* translators: %s: Total imported contacts */
189
+ $message = sprintf( __( '%d contacts imported successfully!', 'email-subscribers' ), $imported_subscribers_count );
190
 
191
  }
192
 
193
  if ( $existing_contacts_count > 0 ) {
194
  $message .= ' ';
195
  /* translators: %s: Exisiting contacts count */
196
+ $message .= sprintf( __( '%d contact(s) already exists.', 'email-subscribers' ), $existing_contacts_count );
197
  }
198
 
199
  if ( $invalid_emails_count > 0 ) {
207
  ES_Common::show_message( $message, $response_status );
208
 
209
  } else {
210
+ $message = __( 'Error: Please select list', 'email-subscribers' );
211
  ES_Common::show_message( $message, 'error' );
212
  }
213
  } else {
220
  ES_Common::show_message( $message, 'error' );
221
  }
222
  } else {
223
+ $message = __( 'Error: Please upload only CSV file', 'email-subscribers' );
224
  ES_Common::show_message( $message, 'error' );
225
  }
226
  } else {
235
  break;
236
  }
237
  } else {
238
+ $message = __( 'Error: Please upload file', 'email-subscribers' );
239
  }
240
 
241
  ES_Common::show_message( $message, 'error' );
242
  }
243
  } else {
244
+ $message = __( 'Error: Please upload file', 'email-subscribers' );
245
  ES_Common::show_message( $message, 'error' );
246
  }
247
  }
289
  </label>
290
  </th>
291
  <td class="w-9/12 pb-3">
292
+ <select class="relative form-select shadow-sm border border-gray-400 sm:w-32 lg:w-48 ml-12" name="es_email_status" id="es_email_status">
293
  <?php
294
  $statuses_dropdown = ES_Common::prepare_statuses_dropdown_options();
295
  echo wp_kses( $statuses_dropdown , $allowedtags );
304
  </label>
305
  </th>
306
  <td class="w-9/12 pb-3">
307
+ <select name="list_id" id="list_id" class="relative form-select shadow-sm border border-gray-400 sm:w-32 lg:w-48 ml-12">
308
  <?php
309
  $lists_dropdown = ES_Common::prepare_list_dropdown_options();
310
  echo wp_kses( $lists_dropdown , $allowedtags );
lite/includes/classes/class-es-lists-table.php CHANGED
@@ -86,6 +86,7 @@ class ES_Lists_Table extends WP_List_Table {
86
  <div class="mt-1"> <a href="admin.php?page=es_lists&action=new" class="ig-es-title-button ml-2"><?php esc_html_e('Add New', 'email-subscribers'); ?></a>
87
  </div>
88
  </div>
 
89
  <div id="poststuff" class="es-items-lists es-lists-table">
90
  <div id="post-body" class="metabox-holder column-1">
91
  <div id="post-body-content">
@@ -93,8 +94,14 @@ class ES_Lists_Table extends WP_List_Table {
93
  <form method="get">
94
  <input type="hidden" name="page" value="es_lists" />
95
  <?php
96
- $this->prepare_items();
97
- $this->display();
 
 
 
 
 
 
98
  ?>
99
  </form>
100
  </div>
@@ -126,7 +133,7 @@ class ES_Lists_Table extends WP_List_Table {
126
  } elseif ( empty( $list_name ) ) {
127
  $message = __( 'Please add list name', 'email-subscribers' );
128
  } elseif ( $this->db->is_list_exists( $list_name ) ) {
129
- $message = __( 'List already exists. Please choose different name', 'email-subscribers' );
130
  } else {
131
  $status = 'success';
132
  }
@@ -171,7 +178,7 @@ class ES_Lists_Table extends WP_List_Table {
171
  $save = $this->save_list( null, $data );
172
 
173
  if ( $save ) {
174
- $message = __( 'List has been added successfully!', 'email-subscribers' );
175
  ES_Common::show_message( $message, 'success' );
176
  }
177
  }
@@ -218,7 +225,7 @@ class ES_Lists_Table extends WP_List_Table {
218
 
219
  $save = $this->save_list( $id, $data );
220
  if ( $save ) {
221
- $message = __( 'List has been updated successfully!', 'email-subscribers' );
222
  ES_Common::show_message( $message, 'success' );
223
  }
224
  } else {
@@ -612,8 +619,8 @@ class ES_Lists_Table extends WP_List_Table {
612
 
613
  $this->set_pagination_args(
614
  array(
615
- 'total_items' => $total_items, // WE have to calculate the total number of items
616
- 'per_page' => $per_page, // WE have to determine how many items to show on a page
617
  )
618
  );
619
 
@@ -633,7 +640,7 @@ class ES_Lists_Table extends WP_List_Table {
633
  ES_Common::show_message( $message, 'error' );
634
  } else {
635
  $this->edit_list( absint( ig_es_get_request_data( 'list' ) ) );
636
- $message = __( 'List has been updated successfully!', 'email-subscribers' );
637
  ES_Common::show_message( $message, 'success' );
638
  }
639
  }
@@ -651,7 +658,7 @@ class ES_Lists_Table extends WP_List_Table {
651
  if ( 1 != $list ) {
652
  $list = ig_es_get_request_data( 'list' );
653
  $this->db->delete_lists( array( $list ) );
654
- $message = __( 'List has been deleted successfully!', 'email-subscribers' );
655
  ES_Common::show_message( $message, 'success' );
656
  }
657
  }
@@ -666,7 +673,7 @@ class ES_Lists_Table extends WP_List_Table {
666
 
667
  if ( ! empty( $lists ) > 0 ) {
668
  $this->db->delete_lists( $lists );
669
- $message = __( 'List(s) have been deleted successfully', 'email-subscribers' );
670
  ES_Common::show_message( $message, 'success' );
671
  } else {
672
  $message = __( 'Please select list', 'email-subscribers' );
86
  <div class="mt-1"> <a href="admin.php?page=es_lists&action=new" class="ig-es-title-button ml-2"><?php esc_html_e('Add New', 'email-subscribers'); ?></a>
87
  </div>
88
  </div>
89
+ <div><hr class="wp-header-end"></div>
90
  <div id="poststuff" class="es-items-lists es-lists-table">
91
  <div id="post-body" class="metabox-holder column-1">
92
  <div id="post-body-content">
94
  <form method="get">
95
  <input type="hidden" name="page" value="es_lists" />
96
  <?php
97
+ // Display search field and other available filter fields.
98
+ $this->prepare_items();
99
+ ?>
100
+ </form>
101
+ <form method="post">
102
+ <?php
103
+ // Display bulk action fields, pagination and list items.
104
+ $this->display();
105
  ?>
106
  </form>
107
  </div>
133
  } elseif ( empty( $list_name ) ) {
134
  $message = __( 'Please add list name', 'email-subscribers' );
135
  } elseif ( $this->db->is_list_exists( $list_name ) ) {
136
+ $message = __( 'List already exists. Please choose a different name', 'email-subscribers' );
137
  } else {
138
  $status = 'success';
139
  }
178
  $save = $this->save_list( null, $data );
179
 
180
  if ( $save ) {
181
+ $message = __( 'List added successfully!', 'email-subscribers' );
182
  ES_Common::show_message( $message, 'success' );
183
  }
184
  }
225
 
226
  $save = $this->save_list( $id, $data );
227
  if ( $save ) {
228
+ $message = __( 'List updated successfully!', 'email-subscribers' );
229
  ES_Common::show_message( $message, 'success' );
230
  }
231
  } else {
619
 
620
  $this->set_pagination_args(
621
  array(
622
+ 'total_items' => $total_items, // WE have to calculate the total number of items.
623
+ 'per_page' => $per_page, // WE have to determine how many items to show on a page.
624
  )
625
  );
626
 
640
  ES_Common::show_message( $message, 'error' );
641
  } else {
642
  $this->edit_list( absint( ig_es_get_request_data( 'list' ) ) );
643
+ $message = __( 'List updated successfully!', 'email-subscribers' );
644
  ES_Common::show_message( $message, 'success' );
645
  }
646
  }
658
  if ( 1 != $list ) {
659
  $list = ig_es_get_request_data( 'list' );
660
  $this->db->delete_lists( array( $list ) );
661
+ $message = __( 'List deleted successfully!', 'email-subscribers' );
662
  ES_Common::show_message( $message, 'success' );
663
  }
664
  }
673
 
674
  if ( ! empty( $lists ) > 0 ) {
675
  $this->db->delete_lists( $lists );
676
+ $message = __( 'List(s) deleted successfully!', 'email-subscribers' );
677
  ES_Common::show_message( $message, 'success' );
678
  } else {
679
  $message = __( 'Please select list', 'email-subscribers' );
lite/includes/classes/class-es-mailer.php CHANGED
@@ -684,8 +684,9 @@ if ( ! class_exists( 'ES_Mailer' ) ) {
684
 
685
  $message = new ES_Message();
686
 
687
- $sender_name = '';
688
- $sender_email = '';
 
689
  // If sender data is passed .i.g. set in the campaign then use it.
690
  if ( ! empty( $sender_data ) ) {
691
  $sender_name = ! empty( $sender_data['from_name'] ) ? $sender_data['from_name'] : '';
@@ -703,7 +704,7 @@ if ( ! class_exists( 'ES_Mailer' ) ) {
703
  $sender_email = $this->get_from_email();
704
  }
705
 
706
- // If reply to email is not passed the fetch it from ES settings.
707
  if ( empty( $reply_to_email ) ) {
708
  $reply_to_email = $this->get_from_email();
709
  }
@@ -901,6 +902,7 @@ if ( ! class_exists( 'ES_Mailer' ) ) {
901
  $contact_id = ig_es_get_data( $merge_tags, 'contact_id', 0 );
902
  $campaign_id = ig_es_get_data( $merge_tags, 'campaign_id', 0 );
903
  $message_id = ig_es_get_data( $merge_tags, 'message_id', 0 );
 
904
 
905
  $link_data = array(
906
  'message_id' => $message_id,
@@ -908,6 +910,7 @@ if ( ! class_exists( 'ES_Mailer' ) ) {
908
  'contact_id' => $contact_id,
909
  'email' => $email,
910
  'guid' => $hash,
 
911
  );
912
 
913
  $this->link_data = $link_data;
684
 
685
  $message = new ES_Message();
686
 
687
+ $sender_name = '';
688
+ $sender_email = '';
689
+ $reply_to_email = '';
690
  // If sender data is passed .i.g. set in the campaign then use it.
691
  if ( ! empty( $sender_data ) ) {
692
  $sender_name = ! empty( $sender_data['from_name'] ) ? $sender_data['from_name'] : '';
704
  $sender_email = $this->get_from_email();
705
  }
706
 
707
+ // If reply to email is not passed then fetch it from ES settings.
708
  if ( empty( $reply_to_email ) ) {
709
  $reply_to_email = $this->get_from_email();
710
  }
902
  $contact_id = ig_es_get_data( $merge_tags, 'contact_id', 0 );
903
  $campaign_id = ig_es_get_data( $merge_tags, 'campaign_id', 0 );
904
  $message_id = ig_es_get_data( $merge_tags, 'message_id', 0 );
905
+ $list_ids = ig_es_get_data( $merge_tags, 'list_ids', '' );
906
 
907
  $link_data = array(
908
  'message_id' => $message_id,
910
  'contact_id' => $contact_id,
911
  'email' => $email,
912
  'guid' => $hash,
913
+ 'list_ids' => $list_ids,
914
  );
915
 
916
  $this->link_data = $link_data;
lite/includes/classes/class-es-newsletters.php CHANGED
@@ -424,7 +424,7 @@ class ES_Newsletters {
424
  <span><?php echo esc_html__( 'Preview', 'email-subscribers' ); ?></span>
425
  </button>
426
  <img class="es-loader inline-flex align-middle pl-2 h-5 w-7" src="<?php echo esc_url( ES_PLUGIN_URL ); ?>lite/admin/images/spinner-2x.gif" style="display:none;"/>
427
- <br/><span class="es-send-success es-icon" style="display:none;"><?php esc_html_e( 'Email Sent Successfully ', 'email-subscribers' ); ?></span>
428
  <br/><span class="es-send-error es-icon" style="display:none;"><?php esc_html_e( 'Something went wrong. Please try again later', 'email-subscribers' ); ?></span>
429
  </div>
430
  </div>
424
  <span><?php echo esc_html__( 'Preview', 'email-subscribers' ); ?></span>
425
  </button>
426
  <img class="es-loader inline-flex align-middle pl-2 h-5 w-7" src="<?php echo esc_url( ES_PLUGIN_URL ); ?>lite/admin/images/spinner-2x.gif" style="display:none;"/>
427
+ <br/><span class="es-send-success es-icon" style="display:none;"><?php esc_html_e( 'Email sent successfully ', 'email-subscribers' ); ?></span>
428
  <br/><span class="es-send-error es-icon" style="display:none;"><?php esc_html_e( 'Something went wrong. Please try again later', 'email-subscribers' ); ?></span>
429
  </div>
430
  </div>
lite/includes/classes/class-es-post-notifications.php CHANGED
@@ -87,7 +87,7 @@ class ES_Post_Notifications_Table {
87
  $this->save_list( $data );
88
  $type = ucwords( str_replace( '_', ' ', $data['type'] ) );
89
  /* translators: %s: Campaign Type */
90
- $message = sprintf( __( '%s has been added successfully!', 'email-subscribers' ), $type );
91
  ES_Common::show_message( $message, 'success' );
92
  } else {
93
  $message = __( 'Sorry, you are not allowed to add post notification.', 'email-subscribers' );
@@ -236,7 +236,7 @@ class ES_Post_Notifications_Table {
236
  $data['categories'] = ES_Common::convert_categories_string_to_array( $data['categories'], true );
237
  $type = ucwords( str_replace( '_', ' ', $data['type'] ) );
238
  /* translators: %s: Campaign type */
239
- $message = sprintf( __( '%s has been updated successfully!', 'email-subscribers' ), $type );
240
  ES_Common::show_message( $message, 'success' );
241
  } else {
242
  $message = __( 'Sorry, you are not allowed to update post notification.', 'email-subscribers' );
@@ -345,7 +345,7 @@ class ES_Post_Notifications_Table {
345
  <tr class="border-b border-gray-100">
346
  <th scope="row" class="w-3/12 pt-3 pb-8 text-left">
347
  <label for="tag-link"><span class="block ml-6 pr-4 text-sm font-medium text-gray-600 pb-2">
348
- <?php esc_html_e( 'Select template', 'email-subscribers' ); ?></span>
349
  <p class="italic text-xs font-normal text-gray-400 mt-2 ml-6 leading-snug"><?php esc_html_e( 'Content of the selected template will be sent out as post notification.', 'email-subscribers' ); ?></p>
350
  </label>
351
  </th>
@@ -374,8 +374,8 @@ class ES_Post_Notifications_Table {
374
  <input id="status" type="checkbox" class="absolute es-check-toggle opacity-0 w-0 h-0"
375
  name="status" value="1" <?php checked( $status, '1' ); ?> />
376
 
377
- <span class="es-mail-toggle-line inline-block w-10 h-6 bg-gray-300 rounded-full shadow-inner"></span>
378
- <span class="es-mail-toggle-dot absolute transition-all duration-300 ease-in-out block w-4 h-4 mt-1 ml-1 bg-white rounded-full shadow inset-y-0 left-0 focus-within:shadow-outline"></span>
379
  </span></label>
380
  </td>
381
  </tr>
87
  $this->save_list( $data );
88
  $type = ucwords( str_replace( '_', ' ', $data['type'] ) );
89
  /* translators: %s: Campaign Type */
90
+ $message = sprintf( __( '%s added successfully!', 'email-subscribers' ), $type );
91
  ES_Common::show_message( $message, 'success' );
92
  } else {
93
  $message = __( 'Sorry, you are not allowed to add post notification.', 'email-subscribers' );
236
  $data['categories'] = ES_Common::convert_categories_string_to_array( $data['categories'], true );
237
  $type = ucwords( str_replace( '_', ' ', $data['type'] ) );
238
  /* translators: %s: Campaign type */
239
+ $message = sprintf( __( '%s updated successfully!', 'email-subscribers' ), $type );
240
  ES_Common::show_message( $message, 'success' );
241
  } else {
242
  $message = __( 'Sorry, you are not allowed to update post notification.', 'email-subscribers' );
345
  <tr class="border-b border-gray-100">
346
  <th scope="row" class="w-3/12 pt-3 pb-8 text-left">
347
  <label for="tag-link"><span class="block ml-6 pr-4 text-sm font-medium text-gray-600 pb-2">
348
+ <?php esc_html_e( 'Select Template', 'email-subscribers' ); ?></span>
349
  <p class="italic text-xs font-normal text-gray-400 mt-2 ml-6 leading-snug"><?php esc_html_e( 'Content of the selected template will be sent out as post notification.', 'email-subscribers' ); ?></p>
350
  </label>
351
  </th>
374
  <input id="status" type="checkbox" class="absolute es-check-toggle opacity-0 w-0 h-0"
375
  name="status" value="1" <?php checked( $status, '1' ); ?> />
376
 
377
+ <span class="es-mail-toggle-line"></span>
378
+ <span class="es-mail-toggle-dot"></span>
379
  </span></label>
380
  </td>
381
  </tr>
lite/includes/classes/class-es-reports-data.php CHANGED
@@ -55,6 +55,19 @@ if ( ! class_exists( 'ES_Reports_Data' ) ) {
55
  return ES()->lists_contacts_db->get_unsubscribed_contacts_count( $days );
56
  }
57
 
 
 
 
 
 
 
 
 
 
 
 
 
 
58
  /**
59
  * Get total contacts have opened emails in last $days
60
  *
55
  return ES()->lists_contacts_db->get_unsubscribed_contacts_count( $days );
56
  }
57
 
58
+ /**
59
+ * Get total unconfiremed contacts in last $days
60
+ *
61
+ * @param int $days
62
+ *
63
+ * @return int
64
+ *
65
+ * @since 4.5.7
66
+ */
67
+ public static function get_total_unconfirmed_contacts( $days = 0 ) {
68
+ return ES()->lists_contacts_db->get_unconfirmed_contacts_count( $days );
69
+ }
70
+
71
  /**
72
  * Get total contacts have opened emails in last $days
73
  *
lite/includes/classes/class-es-reports-table.php CHANGED
@@ -85,7 +85,13 @@ class ES_Reports_Table extends WP_List_Table {
85
  <form method="get">
86
  <input type="hidden" name="page" value="es_reports" />
87
  <?php
 
88
  $this->prepare_items();
 
 
 
 
 
89
  $this->display();
90
  ?>
91
  </form>
@@ -117,12 +123,12 @@ class ES_Reports_Table extends WP_List_Table {
117
 
118
  ?>
119
  <tr>
120
- <th width="8%" class=" py-3 pl-4 border-b border-gray-200 bg-gray-200 text-left text-xs leading-4 font-medium text-gray-500 uppercase tracking-wider"><?php esc_html_e( 'Sr No', 'email-subscribers' ); ?></th>
121
- <th width="24%" class=" py-3 pl-4 border-b border-gray-200 bg-gray-200 text-left text-xs leading-4 font-medium text-gray-500 uppercase tracking-wider"><?php esc_html_e( 'Email', 'email-subscribers' ); ?></th>
122
- <th width="12%" class=" py-3 pl-6 border-b border-gray-200 bg-gray-200 text-left text-xs leading-4 font-medium text-gray-500 uppercase tracking-wider"><?php esc_html_e( 'Status', 'email-subscribers' ); ?></th>
123
- <th width="22%" class="py-3 pl-2 border-b border-gray-200 bg-gray-200 text-left text-xs leading-4 font-medium text-gray-500 uppercase tracking-wider"><?php esc_html_e( 'Sent Date', 'email-subscribers' ); ?></th>
124
- <th width="17%" class="py-3 pl-6 border-b border-gray-200 bg-gray-200 text-left text-xs leading-4 font-medium text-gray-500 uppercase tracking-wider"><?php esc_html_e( 'Viewed Status', 'email-subscribers' ); ?></th>
125
- <th width="22%" class=" py-3 pl-6 border-b border-gray-200 bg-gray-200 text-left text-xs leading-4 font-medium text-gray-500 uppercase tracking-wider"><?php esc_html_e( 'Viewed Date', 'email-subscribers' ); ?></th>
126
  </tr>
127
 
128
  <?php
@@ -144,7 +150,7 @@ class ES_Reports_Table extends WP_List_Table {
144
  <div class="wrap">
145
  <div class="mt-6 mb-2 max-w-7xl">
146
  <div class="pt-3">
147
- <span class="text-left text-lg font-medium leading-7 tracking-wide text-gray-600"><?php esc_html_e( 'View Activity ', 'email-subscribers' ); ?></span>
148
 
149
  <?php if ( ! ES()->is_pro() && ! $insight ) { ?>
150
  <a href="?page=es_reports&action=view&list=<?php echo esc_attr( $id ); ?>&_wpnonce=<?php echo esc_attr( $_wpnonce ); ?>&insight=true" class="float-right ig-es-title-button px-2 py-2 mx-2 ig-es-imp-button cursor-pointer"><?php esc_html_e( 'Campaign Analytics', 'email-subscribers' ); ?></a>
@@ -513,7 +519,7 @@ class ES_Reports_Table extends WP_List_Table {
513
  $notification_ids = absint( ig_es_get_request_data( 'list' ) );
514
  ES_DB_Mailing_Queue::delete_notifications( array( $notification_ids ) );
515
  ES_DB_Sending_Queue::delete_sending_queue_by_mailing_id( array( $notification_ids ) );
516
- $message = __( 'Report has been deleted successfully!', 'email-subscribers' );
517
  ES_Common::show_message( $message, 'success' );
518
  }
519
  } elseif ( 'preview' === $this->current_action() ) {
@@ -539,7 +545,7 @@ class ES_Reports_Table extends WP_List_Table {
539
  if ( count( $notification_ids ) > 0 ) {
540
  ES_DB_Mailing_Queue::delete_notifications( $notification_ids );
541
  ES_DB_Sending_Queue::delete_sending_queue_by_mailing_id( $notification_ids );
542
- $message = __( 'Reports have been deleted successfully!', 'email-subscribers' );
543
  ES_Common::show_message( $message, 'success' );
544
  }
545
  }
85
  <form method="get">
86
  <input type="hidden" name="page" value="es_reports" />
87
  <?php
88
+ // Display search field and other available filter fields.
89
  $this->prepare_items();
90
+ ?>
91
+ </form>
92
+ <form method="post">
93
+ <?php
94
+ // Display bulk action fields, pagination and list items.
95
  $this->display();
96
  ?>
97
  </form>
123
 
124
  ?>
125
  <tr>
126
+ <th width="8%" class="py-3 pl-4 es_reports_table_header"><?php esc_html_e( 'Sr No', 'email-subscribers' ); ?></th>
127
+ <th width="24%" class="py-3 pl-4 es_reports_table_header"><?php esc_html_e( 'Email', 'email-subscribers' ); ?></th>
128
+ <th width="12%" class=" py-3 pl-6 es_reports_table_header"><?php esc_html_e( 'Status', 'email-subscribers' ); ?></th>
129
+ <th width="22%" class="py-3 pl-2 es_reports_table_header"><?php esc_html_e( 'Sent Date', 'email-subscribers' ); ?></th>
130
+ <th width="17%" class="py-3 pl-6 es_reports_table_header"><?php esc_html_e( 'Viewed Status', 'email-subscribers' ); ?></th>
131
+ <th width="22%" class=" py-3 pl-6 es_reports_table_header"><?php esc_html_e( 'Viewed Date', 'email-subscribers' ); ?></th>
132
  </tr>
133
 
134
  <?php
150
  <div class="wrap">
151
  <div class="mt-6 mb-2 max-w-7xl">
152
  <div class="pt-3">
153
+ <span class="text-left text-lg font-medium leading-7 tracking-wide text-gray-600"><?php esc_html_e( 'View activity ', 'email-subscribers' ); ?></span>
154
 
155
  <?php if ( ! ES()->is_pro() && ! $insight ) { ?>
156
  <a href="?page=es_reports&action=view&list=<?php echo esc_attr( $id ); ?>&_wpnonce=<?php echo esc_attr( $_wpnonce ); ?>&insight=true" class="float-right ig-es-title-button px-2 py-2 mx-2 ig-es-imp-button cursor-pointer"><?php esc_html_e( 'Campaign Analytics', 'email-subscribers' ); ?></a>
519
  $notification_ids = absint( ig_es_get_request_data( 'list' ) );
520
  ES_DB_Mailing_Queue::delete_notifications( array( $notification_ids ) );
521
  ES_DB_Sending_Queue::delete_sending_queue_by_mailing_id( array( $notification_ids ) );
522
+ $message = __( 'Report deleted successfully!', 'email-subscribers' );
523
  ES_Common::show_message( $message, 'success' );
524
  }
525
  } elseif ( 'preview' === $this->current_action() ) {
545
  if ( count( $notification_ids ) > 0 ) {
546
  ES_DB_Mailing_Queue::delete_notifications( $notification_ids );
547
  ES_DB_Sending_Queue::delete_sending_queue_by_mailing_id( $notification_ids );
548
+ $message = __( 'Reports deleted successfully!', 'email-subscribers' );
549
  ES_Common::show_message( $message, 'success' );
550
  }
551
  }
lite/includes/classes/class-es-templates-table.php CHANGED
@@ -36,9 +36,9 @@ class ES_Templates_Table {
36
  );
37
  $template_type = apply_filters( 'es_template_type', $template_type );
38
  ?>
39
- <p>
40
- <label for="es_template_type"><strong><?php esc_html_e( 'Select your Email Template Type', 'email-subscirbers' ); ?></strong></label></br>
41
- <select name="es_template_type" id="es_template_type">
42
  <?php
43
  if ( ! empty( $template_type ) ) {
44
  foreach ( $template_type as $key => $value ) {
@@ -117,7 +117,7 @@ class ES_Templates_Table {
117
 
118
  <div class="misc-pub-section">
119
  <div id="" class="es_preview_button" style="display: block;">
120
- <a href="<?php echo esc_url( admin_url() ); ?>admin.php?page=es_template_preview&post=<?php echo esc_attr( $post_id ); ?>&preview=true&preview_id=<?php echo esc_attr( $post_id ); ?>" target="_blank" class="button button-primary es_preview"><?php esc_html_e( 'Preview Template', 'email-subscribers' ); ?></a>
121
  <div class="clear"></div>
122
  </div>
123
  </div>
@@ -131,7 +131,7 @@ class ES_Templates_Table {
131
  if ( 'es_template' == $screen->post_type ) {
132
  ?>
133
  <script type="text/javascript">
134
- jQuery('<a style="top:-3px;position: relative" href="admin.php?page=es_campaigns" class="ig-es-title-button ml-2 mb-4">Campaigns</a>').insertBefore(".wp-header-end");
135
  </script>
136
  <?php
137
  }
36
  );
37
  $template_type = apply_filters( 'es_template_type', $template_type );
38
  ?>
39
+ <p class="mt-3">
40
+ <label for="es_template_type"><span class="font-semibold text-sm text-gray-700"><?php esc_html_e( 'Select Template type', 'email-subscirbers' ); ?></span></label><br/>
41
+ <select style="margin: 0.20rem 0;" name="es_template_type" id="es_template_type">
42
  <?php
43
  if ( ! empty( $template_type ) ) {
44
  foreach ( $template_type as $key => $value ) {
117
 
118
  <div class="misc-pub-section">
119
  <div id="" class="es_preview_button" style="display: block;">
120
+ <a style="padding-top: 3px; margin-bottom: 0.2rem;" href="<?php echo esc_url( admin_url() ); ?>admin.php?page=es_template_preview&post=<?php echo esc_attr( $post_id ); ?>&preview=true&preview_id=<?php echo esc_attr( $post_id ); ?>" target="_blank" class="button button-primary es_preview"><?php esc_html_e( 'Preview Template', 'email-subscribers' ); ?></a>
121
  <div class="clear"></div>
122
  </div>
123
  </div>
131
  if ( 'es_template' == $screen->post_type ) {
132
  ?>
133
  <script type="text/javascript">
134
+ jQuery('<a style="top:-3px;position: relative" href="admin.php?page=es_campaigns" class="ig-es-title-button ml-2 mb-3">Campaigns</a>').insertBefore(".wp-header-end");
135
  </script>
136
  <?php
137
  }
lite/includes/db/class-es-db-campaigns.php CHANGED
@@ -286,56 +286,59 @@ class ES_DB_Campaigns extends ES_DB {
286
  */
287
  public function migrate_newsletters() {
288
  global $wpdb;
289
-
290
- $from_name = ES_Common::get_ig_option( 'from_name' );
291
- $from_email = ES_Common::get_ig_option( 'from_email' );
292
-
293
- $total = $wpdb->get_var( $wpdb->prepare( "SELECT count(*) as total FROM {$wpdb->prefix}es_sentdetails WHERE es_sent_source = %s", 'Newsletter' ) );
294
-
295
- if ( $total > 0 ) {
296
-
297
- $list_is_name_map = ES()->lists_db->get_list_id_name_map( '', true );
298
- $batch_size = IG_DEFAULT_BATCH_SIZE;
299
- $total_batches = ceil( $total / $batch_size );
300
-
301
- $values = array();
302
- $place_holders = array();
303
- $columns = $this->get_columns();
304
- unset( $columns['id'] );
305
- $fields = array_keys( $columns );
306
- for ( $i = 0; $i <= $total_batches; $i ++ ) {
307
- $batch_start = $i * $batch_size;
308
-
309
- $newsletters = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM {$wpdb->prefix}es_sentdetails WHERE es_sent_source = %s LIMIT %d, %d", 'Newsletter', $batch_start, $batch_size ), ARRAY_A );
310
-
311
- if ( count( $newsletters ) > 0 ) {
312
- $campaign_data = array();
313
- $values = array();
314
- $place_holders = array();
315
- foreach ( $newsletters as $key => $newsletter ) {
316
- $campaign_data['slug'] = sanitize_title( $newsletter['es_sent_subject'] );
317
- $campaign_data['name'] = $newsletter['es_sent_subject'];
318
- $campaign_data['type'] = IG_CAMPAIGN_TYPE_NEWSLETTER;
319
- $campaign_data['from_name'] = $from_name;
320
- $campaign_data['from_email'] = $from_email;
321
- $campaign_data['reply_to_name'] = $from_name; // We don't have this option avaialble. So, setting from_name as reply_to_name
322
- $campaign_data['reply_to_email'] = $from_email; // We don't have this option available. So, setting from_email as reply_to_email
323
- $campaign_data['list_ids'] = ( ! empty( $newsletter['es_note_group'] ) && ! empty( $list_is_name_map[ $newsletter['es_note_group'] ] ) ) ? $list_is_name_map[ $newsletter['es_note_group'] ] : 0;
324
- $campaign_data['status'] = 1;
325
- $campaign_data['created_at'] = $newsletter['es_sent_starttime'];
326
-
327
- $campaign_data = wp_parse_args( $campaign_data, $this->get_column_defaults() );
328
-
329
- $formats = array();
330
- foreach ( $columns as $column => $format ) {
331
- $values[] = $campaign_data[ $column ];
332
- $formats[] = $format;
 
 
 
 
 
333
  }
334
-
335
- $place_holders[] = '( ' . implode( ', ', $formats ) . ' )';
336
  }
337
-
338
- ES_DB::do_insert( IG_CAMPAIGNS_TABLE, $fields, $place_holders, $values );
339
  }
340
  }
341
  }
286
  */
287
  public function migrate_newsletters() {
288
  global $wpdb;
289
+
290
+ // Check if es_sentdetails table exists or not.
291
+ if ( $this->table_exists( $wpdb->prefix . 'es_sentdetails' ) ) {
292
+ $from_name = ES_Common::get_ig_option( 'from_name' );
293
+ $from_email = ES_Common::get_ig_option( 'from_email' );
294
+
295
+ $total = $wpdb->get_var( $wpdb->prepare( "SELECT count(*) as total FROM {$wpdb->prefix}es_sentdetails WHERE es_sent_source = %s", 'Newsletter' ) );
296
+
297
+ if ( $total > 0 ) {
298
+
299
+ $list_is_name_map = ES()->lists_db->get_list_id_name_map( '', true );
300
+ $batch_size = IG_DEFAULT_BATCH_SIZE;
301
+ $total_batches = ceil( $total / $batch_size );
302
+
303
+ $values = array();
304
+ $place_holders = array();
305
+ $columns = $this->get_columns();
306
+ unset( $columns['id'] );
307
+ $fields = array_keys( $columns );
308
+ for ( $i = 0; $i <= $total_batches; $i ++ ) {
309
+ $batch_start = $i * $batch_size;
310
+
311
+ $newsletters = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM {$wpdb->prefix}es_sentdetails WHERE es_sent_source = %s LIMIT %d, %d", 'Newsletter', $batch_start, $batch_size ), ARRAY_A );
312
+
313
+ if ( count( $newsletters ) > 0 ) {
314
+ $campaign_data = array();
315
+ $values = array();
316
+ $place_holders = array();
317
+ foreach ( $newsletters as $key => $newsletter ) {
318
+ $campaign_data['slug'] = sanitize_title( $newsletter['es_sent_subject'] );
319
+ $campaign_data['name'] = $newsletter['es_sent_subject'];
320
+ $campaign_data['type'] = IG_CAMPAIGN_TYPE_NEWSLETTER;
321
+ $campaign_data['from_name'] = $from_name;
322
+ $campaign_data['from_email'] = $from_email;
323
+ $campaign_data['reply_to_name'] = $from_name; // We don't have this option avaialble. So, setting from_name as reply_to_name
324
+ $campaign_data['reply_to_email'] = $from_email; // We don't have this option available. So, setting from_email as reply_to_email
325
+ $campaign_data['list_ids'] = ( ! empty( $newsletter['es_note_group'] ) && ! empty( $list_is_name_map[ $newsletter['es_note_group'] ] ) ) ? $list_is_name_map[ $newsletter['es_note_group'] ] : 0;
326
+ $campaign_data['status'] = 1;
327
+ $campaign_data['created_at'] = $newsletter['es_sent_starttime'];
328
+
329
+ $campaign_data = wp_parse_args( $campaign_data, $this->get_column_defaults() );
330
+
331
+ $formats = array();
332
+ foreach ( $columns as $column => $format ) {
333
+ $values[] = $campaign_data[ $column ];
334
+ $formats[] = $format;
335
+ }
336
+
337
+ $place_holders[] = '( ' . implode( ', ', $formats ) . ' )';
338
  }
339
+
340
+ ES_DB::do_insert( IG_CAMPAIGNS_TABLE, $fields, $place_holders, $values );
341
  }
 
 
342
  }
343
  }
344
  }
lite/includes/db/class-es-db-lists-contacts.php CHANGED
@@ -421,7 +421,7 @@ class ES_DB_Lists_Contacts extends ES_DB {
421
  continue;
422
  }
423
 
424
- $contact[ $key ]['contact_id'] = $email_id_map[ $contact['email'] ];
425
  $status = 'subscribed';
426
  $optin_type = IG_SINGLE_OPTIN;
427
  if ( 'Single Opt In' === $contact['status'] ) {
@@ -436,11 +436,11 @@ class ES_DB_Lists_Contacts extends ES_DB {
436
  $status = 'unsubscribed';
437
  }
438
 
439
- $contact[ $key ]['list_id'] = $list_id;
440
- $contact[ $key ]['contact_id'] = $email_id_map[ $contact['email'] ];
441
- $contact[ $key ]['status'] = $status;
442
- $contact[ $key ]['optin_type'] = $optin_type;
443
- $contact[ $key ]['subscribed_at'] = $contact['subscribed_at'];
444
  }
445
 
446
  return $this->bulk_insert( $contacts );
@@ -592,32 +592,52 @@ class ES_DB_Lists_Contacts extends ES_DB {
592
  * @since 4.1.14
593
  * @since 4.3.5 Removed static call
594
  */
595
- public function edit_subscriber_status( $ids = array(), $status = '' ) {
596
  global $wpdb;
597
 
598
  if ( ! is_array( $ids ) ) {
599
  $ids = array( $ids );
600
  }
 
 
 
601
 
602
  $ids = array_map( 'absint', $ids );
603
  $status = esc_sql( $status );
604
 
605
- $ids_str = implode( ',', $ids );
 
606
 
607
  $current_date = ig_get_current_date_time();
608
 
609
  $query = '';
610
  if ( 'subscribed' === $status ) {
611
- return $wpdb->query(
 
 
612
  $wpdb->prepare(
613
- "UPDATE {$wpdb->prefix}ig_lists_contacts SET status = %s, subscribed_at = %s WHERE FIND_IN_SET(contact_id, %s)",
614
  array(
615
  $status,
616
  $current_date,
617
- $ids_str
 
 
618
  )
619
- )
620
- );
 
 
 
 
 
 
 
 
 
 
 
 
621
  } elseif ( 'unsubscribed' === $status ) {
622
  return $wpdb->query(
623
  $wpdb->prepare(
@@ -628,7 +648,7 @@ class ES_DB_Lists_Contacts extends ES_DB {
628
  $ids_str
629
  )
630
  )
631
- );
632
  } elseif ( 'unconfirmed' === $status ) {
633
  return $wpdb->query(
634
  $wpdb->prepare(
@@ -762,7 +782,7 @@ class ES_DB_Lists_Contacts extends ES_DB {
762
  * @since 4.3.6
763
  */
764
  public function get_contacts( $status = 'all', $list_id = 0, $days = 0, $count_only = false, $distinct = true ) {
765
- global $wpbd;
766
 
767
  $expected_statuses = array( 'subscribed', 'unsubscribed', 'unconfirmed', 'confirmed', 'all' );
768
 
@@ -823,6 +843,9 @@ class ES_DB_Lists_Contacts extends ES_DB {
823
  } elseif ( 'subscribed' === $status ) {
824
  $where[] = 'subscribed_at >= DATE_SUB(NOW(), INTERVAL %d DAY)';
825
  $args[] = $days;
 
 
 
826
  }
827
  }
828
 
421
  continue;
422
  }
423
 
424
+ $contacts[ $key ]['contact_id'] = $email_id_map[ $contact['email'] ];
425
  $status = 'subscribed';
426
  $optin_type = IG_SINGLE_OPTIN;
427
  if ( 'Single Opt In' === $contact['status'] ) {
436
  $status = 'unsubscribed';
437
  }
438
 
439
+ $contacts[ $key ]['list_id'] = $list_id;
440
+ $contacts[ $key ]['contact_id'] = $email_id_map[ $contact['email'] ];
441
+ $contacts[ $key ]['status'] = $status;
442
+ $contacts[ $key ]['optin_type'] = $optin_type;
443
+ $contacts[ $key ]['subscribed_at'] = $contact['subscribed_at'];
444
  }
445
 
446
  return $this->bulk_insert( $contacts );
592
  * @since 4.1.14
593
  * @since 4.3.5 Removed static call
594
  */
595
+ public function edit_subscriber_status( $ids = array(), $status = '', $list_ids = array() ) {
596
  global $wpdb;
597
 
598
  if ( ! is_array( $ids ) ) {
599
  $ids = array( $ids );
600
  }
601
+ if ( ! is_array( $list_ids ) ) {
602
+ $list_ids = array( $list_ids );
603
+ }
604
 
605
  $ids = array_map( 'absint', $ids );
606
  $status = esc_sql( $status );
607
 
608
+ $ids_str = implode( ',', $ids );
609
+ $list_ids_str = implode( ',', $list_ids );
610
 
611
  $current_date = ig_get_current_date_time();
612
 
613
  $query = '';
614
  if ( 'subscribed' === $status ) {
615
+ if ( ! empty ( $list_ids ) ) {
616
+
617
+ $result = $wpdb->query(
618
  $wpdb->prepare(
619
+ "UPDATE {$wpdb->prefix}ig_lists_contacts SET status = %s, subscribed_at = %s WHERE FIND_IN_SET(contact_id, %s) AND FIND_IN_SET(list_id, %s)",
620
  array(
621
  $status,
622
  $current_date,
623
+ $ids_str,
624
+ $list_ids_str,
625
+ )
626
  )
627
+ );
628
+ } else {
629
+ $result = $wpdb->query(
630
+ $wpdb->prepare(
631
+ "UPDATE {$wpdb->prefix}ig_lists_contacts SET status = %s, subscribed_at = %s WHERE FIND_IN_SET(contact_id, %s)",
632
+ array(
633
+ $status,
634
+ $current_date,
635
+ $ids_str
636
+ )
637
+ )
638
+ );
639
+ }
640
+ return $result;
641
  } elseif ( 'unsubscribed' === $status ) {
642
  return $wpdb->query(
643
  $wpdb->prepare(
648
  $ids_str
649
  )
650
  )
651
+ );
652
  } elseif ( 'unconfirmed' === $status ) {
653
  return $wpdb->query(
654
  $wpdb->prepare(
782
  * @since 4.3.6
783
  */
784
  public function get_contacts( $status = 'all', $list_id = 0, $days = 0, $count_only = false, $distinct = true ) {
785
+ global $wpdb, $wpbd;
786
 
787
  $expected_statuses = array( 'subscribed', 'unsubscribed', 'unconfirmed', 'confirmed', 'all' );
788
 
843
  } elseif ( 'subscribed' === $status ) {
844
  $where[] = 'subscribed_at >= DATE_SUB(NOW(), INTERVAL %d DAY)';
845
  $args[] = $days;
846
+ } elseif ( 'unconfirmed' === $status ) {
847
+ $where[] = "contact_id IN( SELECT id FROM `{$wpdb->prefix}ig_contacts` WHERE status = 'verified' && created_at >= DATE_SUB(NOW(), INTERVAL %d DAY) )";
848
+ $args[] = $days;
849
  }
850
  }
851
 
lite/includes/db/class-es-db-lists.php CHANGED
@@ -64,9 +64,10 @@ class ES_DB_Lists extends ES_DB {
64
  'id' => '%d',
65
  'slug' => '%s',
66
  'name' => '%s',
 
67
  'created_at' => '%s',
68
  'updated_at' => '%s',
69
- 'deleted_at' => '%s'
70
  );
71
  }
72
 
@@ -79,9 +80,10 @@ class ES_DB_Lists extends ES_DB {
79
  return array(
80
  'slug' => null,
81
  'name' => null,
 
82
  'created_at' => ig_get_current_date_time(),
83
  'updated_at' => null,
84
- 'deleted_at' => null
85
  );
86
  }
87
 
@@ -282,7 +284,8 @@ class ES_DB_Lists extends ES_DB {
282
 
283
  $data = array(
284
  'slug' => ! empty( $slug ) ? $slug : sanitize_title( $list ),
285
- 'name' => $list
 
286
  );
287
 
288
  return $this->insert( $data );
64
  'id' => '%d',
65
  'slug' => '%s',
66
  'name' => '%s',
67
+ 'hash' => '%s',
68
  'created_at' => '%s',
69
  'updated_at' => '%s',
70
+ 'deleted_at' => '%s',
71
  );
72
  }
73
 
80
  return array(
81
  'slug' => null,
82
  'name' => null,
83
+ 'hash' => null,
84
  'created_at' => ig_get_current_date_time(),
85
  'updated_at' => null,
86
+ 'deleted_at' => null,
87
  );
88
  }
89
 
284
 
285
  $data = array(
286
  'slug' => ! empty( $slug ) ? $slug : sanitize_title( $list ),
287
+ 'name' => $list,
288
+ 'hash' => ES_Common::generate_hash( 12 ),
289
  );
290
 
291
  return $this->insert( $data );
lite/includes/es-core-functions.php CHANGED
@@ -21,6 +21,13 @@ if ( ! function_exists( 'get_ig_es_db_version' ) ) {
21
 
22
  $option = get_option( 'current_sa_email_subscribers_db_version', null );
23
 
 
 
 
 
 
 
 
24
  return $option;
25
 
26
  }
@@ -783,15 +790,17 @@ if ( ! function_exists( 'ig_es_allowed_html_tags_in_esc' ) ) {
783
  'viewbox' => true,
784
  'xmlns' => true,
785
  'class' => true,
786
- 'stroke-linecap' => true,
787
  'fill' => true,
 
788
  ),
789
  'path' => array(
790
  'd' => true,
791
  'fill' => true,
792
  'class' => true,
793
- 'fill-rule' => true,
794
- 'clip-rule' => true,
 
795
  ),
796
 
797
  'main' => array(
@@ -799,11 +808,7 @@ if ( ! function_exists( 'ig_es_allowed_html_tags_in_esc' ) ) {
799
  'dir' => true,
800
  'lang' => true,
801
  'xml:lang' => true,
802
- 'aria-describedby' => true,
803
- 'aria-details' => true,
804
- 'aria-label' => true,
805
- 'aria-labelledby' => true,
806
- 'aria-hidden' => true,
807
  'class' => true,
808
  'id' => true,
809
  'style' => true,
@@ -913,4 +918,60 @@ if ( ! function_exists( 'ig_es_covert_to_utf8_encoding' ) ) {
913
  }
914
  }
915
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
916
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
 
22
  $option = get_option( 'current_sa_email_subscribers_db_version', null );
23
 
24
+ if ( ! is_null( $option ) ) {
25
+ return $option;
26
+ }
27
+
28
+ // Prior to ES 3.2, 'email-subscribers' option was being used to decide db version.
29
+ $option = get_option( 'email-subscribers', null );
30
+
31
  return $option;
32
 
33
  }
790
  'viewbox' => true,
791
  'xmlns' => true,
792
  'class' => true,
793
+ 'stroke-*' => true,
794
  'fill' => true,
795
+ 'stroke' => true,
796
  ),
797
  'path' => array(
798
  'd' => true,
799
  'fill' => true,
800
  'class' => true,
801
+ 'fill-*' => true,
802
+ 'clip-*' => true,
803
+ 'stroke-*' => true,
804
  ),
805
 
806
  'main' => array(
808
  'dir' => true,
809
  'lang' => true,
810
  'xml:lang' => true,
811
+ 'aria-*' => true,
 
 
 
 
812
  'class' => true,
813
  'id' => true,
814
  'style' => true,
918
  }
919
  }
920
 
921
+ if ( ! function_exists( 'ig_es_insert_widget_in_sidebar' ) ) {
922
+ /**
923
+ * Insert a widget in a sidebar.
924
+ *
925
+ * @param string $widget_id ID of the widget (search, recent-posts, etc.)
926
+ * @param array $widget_data Widget settings.
927
+ * @param string $sidebar ID of the sidebar.
928
+ * @param string $allow_duplicate Flag to check whether we should add widget even if added to the sidebar already.
929
+ *
930
+ * @return boolean
931
+ *
932
+ * @since 4.6.0
933
+ */
934
+ function ig_es_insert_widget_in_sidebar( $widget_id, $widget_data, $sidebar, $allow_duplicate = false ) {
935
+ // Retrieve sidebars, widgets and their instances
936
+ $sidebars_widgets = get_option( 'sidebars_widgets', array() );
937
+ $widget_instances = get_option( 'widget_' . $widget_id, array() );
938
+
939
+ // Retrieve the key of the next widget instance
940
+ $numeric_keys = array_filter( array_keys( $widget_instances ), 'is_int' );
941
+
942
+ if ( ! isset( $sidebars_widgets[ $sidebar ] ) ) {
943
+ $sidebars_widgets[ $sidebar ] = array();
944
+ }
945
+
946
+ $widget_already_added = false;
947
+ if ( ! empty( $numeric_keys ) ) {
948
+ foreach ( $numeric_keys as $numeric_key ) {
949
+ $widget_index = array_search( $widget_id . '-' . $numeric_key, $sidebars_widgets[ $sidebar ] );
950
+ // Check if this sidebar has this widget in it.
951
+ if ( false !== $widget_index ) {
952
+ $widget_already_added = true;
953
+ break;
954
+ }
955
+ }
956
+ }
957
 
958
+ // Add new widget only if it already not added in the sidebar or duplicate widget is allowed.
959
+ if ( ! $widget_already_added || $allow_duplicate ) {
960
+ $next_key = $numeric_keys ? max( $numeric_keys ) + 1 : 1;
961
+
962
+ // Add this widget to the sidebar
963
+ $sidebars_widgets[ $sidebar ][] = $widget_id . '-' . $next_key;
964
+
965
+ // Add the new widget instance
966
+ $widget_instances[ $next_key ] = $widget_data;
967
+
968
+ // Store updated sidebars, widgets and their instances
969
+ update_option( 'sidebars_widgets', $sidebars_widgets );
970
+ update_option( 'widget_' . $widget_id, $widget_instances );
971
+
972
+ return true;
973
+ }
974
+
975
+ return false;
976
+ }
977
+ }
lite/includes/feedback/class-ig-feedback.php CHANGED
@@ -4,19 +4,21 @@ if ( ! defined( 'ABSPATH' ) ) {
4
  exit; // Exit if accessed directly.
5
  }
6
 
7
- if ( ! class_exists( 'IG_Feedback_V_1_2_3' ) ) {
8
  /**
9
  * IG Feedback
10
  *
11
  * The IG Feedback class adds functionality to get quick interactive feedback from users.
12
  * There are different types of feedabck widget like Stars, Emoji, Thubms Up/ Down, Number etc.
13
  *
14
- * @class IG_Feedback_V_1_2_3
15
  * @since 1.0.0
 
 
16
  * @author Icegram
17
  * @package feedback
18
  */
19
- class IG_Feedback_V_1_2_3 {
20
 
21
  /**
22
  * Version of Feedback Library
@@ -25,7 +27,7 @@ if ( ! class_exists( 'IG_Feedback_V_1_2_3' ) ) {
25
  * @var string
26
  *
27
  */
28
- public $version = '1.2.3';
29
  /**
30
  * The API URL where we will send feedback data.
31
  *
@@ -68,7 +70,6 @@ if ( ! class_exists( 'IG_Feedback_V_1_2_3' ) ) {
68
 
69
  /**
70
  * Enable/Disable Dev Mode
71
- *
72
  * @var bool
73
  */
74
  public $is_dev_mode = true;
@@ -81,7 +82,7 @@ if ( ! class_exists( 'IG_Feedback_V_1_2_3' ) ) {
81
  public $event_prefix;
82
 
83
  /**
84
- * Feedback Footer text
85
  */
86
  public $footer = '<span class="ig-powered-by">Made With&nbsp;💜&nbsp;by&nbsp;<a href="https://www.icegram.com/" target="_blank">Icegram</a></span>';
87
 
@@ -126,8 +127,7 @@ if ( ! class_exists( 'IG_Feedback_V_1_2_3' ) ) {
126
  * @since 1.0.12
127
  */
128
  public function show_review_notice() {
129
-
130
- $allowedtags = ig_es_allowed_html_tags_in_esc();
131
  if ( ! defined( 'DOING_AJAX' ) && is_admin() ) {
132
 
133
  $enable_review_notice = apply_filters( $this->plugin_abbr . '_enable_review_notice', true );
@@ -193,33 +193,31 @@ if ( ! class_exists( 'IG_Feedback_V_1_2_3' ) ) {
193
 
194
  if ( $can_ask_user_for_review ) {
195
 
196
- if ( isset( $_SERVER['HTTP_HOST'] ) && isset( $_SERVER['REQUEST_URI'] ) ) {
197
- $current_page_url = '//' . sanitize_text_field( $_SERVER['HTTP_HOST'] ) . sanitize_text_field( $_SERVER['REQUEST_URI'] );
198
- }
199
 
200
  $got_feedback = false;
201
  /************** Update Review Status ********************/
202
- $nonce = ! empty( $_GET['ig_feedback_nonce'] ) ? sanitize_text_field( wp_unslash( $_GET['ig_feedback_nonce'] ) ) : '';
203
  $nonce_verified = wp_verify_nonce( $nonce, 'review' );
204
 
205
  $action = '';
206
  if ( $nonce_verified ) {
207
- $action = ! empty( $_GET['ig_feedback_action'] ) ? sanitize_text_field( wp_unslash( $_GET['ig_feedback_action'] ) ) : '';
208
 
209
  if ( ! empty( $action ) && $this->is_valid_action( $action ) ) {
210
  update_user_meta( $current_user_id, $action, 1 );
211
- update_user_meta( $current_user_id, $action . '_time', time() );
212
 
213
  // Got the review request?
214
  // Redirect them to review page
215
  if ( $action === $review_done_option ) {
216
 
217
- $url = ! empty( $_GET['review_url'] ) ? sanitize_text_field( $_GET['review_url'] ) : '';
218
 
219
  if ( ! empty( $url ) ) {
220
  ?>
221
 
222
- <meta http-equiv="refresh" content="0; url=<?php echo esc_url( $url ); ?>"/>
223
 
224
  <?php
225
  }
@@ -234,8 +232,7 @@ if ( ! class_exists( 'IG_Feedback_V_1_2_3' ) ) {
234
 
235
  $review_url = "https://wordpress.org/support/plugin/{$this->plugin}/reviews/";
236
  $icon_url = plugin_dir_url( __FILE__ ) . 'assets/images/icon-64.png';
237
- /* translators: %s: Plugin name */
238
- $message = __( sprintf( '<span><p>We hope you\'re enjoying <b>%s</b> plugin! Could you please do us a BIG favor and give us a 5-star rating on WordPress to help us spread the word and boost our motivation?</p>', $this->name ), 'email-subscribers' );
239
 
240
  $message_data = array(
241
  'review_url' => $review_url,
@@ -258,43 +255,43 @@ if ( ! class_exists( 'IG_Feedback_V_1_2_3' ) ) {
258
 
259
  ?>
260
 
261
- <style type="text/css">
262
 
263
- .ig-feedback-notice-links li {
264
- display: inline-block;
265
- margin-right: 15px;
266
- }
267
 
268
- .ig-feedback-notice-links li a {
269
- display: inline-block;
270
- color: #10738b;
271
- text-decoration: none;
272
- padding-left: 26px;
273
- position: relative;
274
- }
275
 
276
- .ig-feedback-notice {
277
- display: flex;
278
- align-items: center;
279
- }
280
 
281
- .ig-feedback-plugin-icon {
282
- float: left;
283
- margin-right: 0.5em;
284
- }
285
 
286
- </style>
287
 
288
  <?php
289
 
290
  echo '<div class="notice notice-success ig-feedback-notice">';
291
- echo '<span class="ig-feedback-plugin-icon"> <img src="' . esc_url( $icon_url ) . '" alt="Logo"/></span>';
292
- echo wp_kses( $message, $allowedtags );
293
  echo "<ul class='ig-feedback-notice-links'>";
294
- echo sprintf( '<li><a href="%s" class="button-primary" target="_blank" data-rated="' . esc_attr__( 'Thank You :) ',
295
- 'email-subscribers' ) . '"><span class="dashicons dashicons-external"></span>&nbsp;&nbsp;Ok, you deserve it</a></li> <li><a href="%s"><span class="dashicons dashicons-calendar-alt"></span>&nbsp;&nbsp;Maybe later</a></li><li><a href="%s"><span class="dashicons dashicons-smiley"></span>&nbsp;&nbsp;I already did!</a></li><li><a href="%s"><span class="dashicons dashicons-no"></span>&nbsp;&nbsp;Don\'t ask me again</a></li>',
296
  esc_url( $review_url ), esc_url( $maybe_later_url ), esc_url( $already_did_url ), esc_url( $no_bug_url ) );
297
- echo '</ul></span>';
298
  echo '</div>';
299
  }
300
  }
@@ -355,7 +352,7 @@ if ( ! class_exists( 'IG_Feedback_V_1_2_3' ) ) {
355
  $can_load = apply_filters( $this->plugin_abbr . '_can_load_sweetalert_js', false );
356
 
357
  if ( $can_load ) {
358
- wp_enqueue_script( 'sweetalert', plugin_dir_url( __FILE__ ) . 'assets/js/sweetalert2.min.js', array( 'jquery' ), $this->version );
359
  }
360
  }
361
 
@@ -426,38 +423,38 @@ if ( ! class_exists( 'IG_Feedback_V_1_2_3' ) ) {
426
 
427
  $params = $this->prepare_widget_params( $params );
428
 
429
- $title = $params['title'];
430
- $slug = sanitize_title( $title );
431
- $event = $this->event_prefix . $params['event'];
432
- $html = ! empty( $params['html'] ) ? $params['html'] : '';
433
- $allowedtags = ig_es_allowed_html_tags_in_esc();
434
  ?>
435
 
436
- <script>
437
 
438
  function doSend(rating, details) {
439
 
440
  var data = {
441
- action: '<?php echo esc_js( $this->ajax_action ); ?>',
442
  feedback: {
443
- type: '<?php echo esc_js( $params['type'] ); ?>',
444
- slug: '<?php echo esc_js( $slug ); ?>',
445
  title: '<?php echo esc_js( $title ); ?>',
446
  value: rating,
447
  details: details
448
  },
449
 
450
- event: '<?php echo esc_js( $event ); ?>',
451
 
452
  // Add additional information
453
  misc: {
454
- plugin: '<?php echo esc_js( $this->plugin ); ?>',
455
- plugin_abbr: '<?php echo esc_js( $this->plugin_abbr ); ?>',
456
- is_dev_mode: '<?php echo esc_js( $this->is_dev_mode ); ?>',
457
- set_transient: '<?php echo esc_js( $params['set_transient'] ); ?>'
458
  //system_info: enable_system_info
459
  },
460
- security: ig_es_js_data.security
461
  };
462
 
463
  return jQuery.post(ajaxurl, data);
@@ -468,21 +465,21 @@ if ( ! class_exists( 'IG_Feedback_V_1_2_3' ) ) {
468
  setTimeout(function () {
469
 
470
  Swal.mixin({
471
- footer: '<?php echo wp_kses( $this->footer, $allowedtags ); ?>',
472
- position: '<?php echo esc_js( $params['position'] ); ?>',
473
- width: <?php echo esc_js( $params['width'] ); ?>,
474
  animation: false,
475
  focusConfirm: false,
476
- allowEscapeKey: '<?php echo esc_js( $params['allowEscapeKey'] ); ?>',
477
- showCloseButton: '<?php echo esc_js( $params['showCloseButton'] ); ?>',
478
- allowOutsideClick: '<?php echo esc_js( $params['allowOutsideClick'] ); ?>',
479
  showLoaderOnConfirm: true,
480
- confirmButtonText: '<?php echo wp_kses( $params['confirmButtonText'], $allowedtags ); ?>',
481
- backdrop: '<?php echo esc_js( (int) $params['backdrop'] ); ?>'
482
  }).queue([
483
  {
484
  title: '<p class="ig-feedback-title"><?php echo esc_js( $params['title'] ); ?></p>',
485
- html: '<?php echo wp_kses( $html, $allowedtags ); ?>',
486
  customClass: {
487
  popup: 'animated fadeInUpBig'
488
  },
@@ -528,10 +525,10 @@ if ( ! class_exists( 'IG_Feedback_V_1_2_3' ) ) {
528
 
529
  Swal.fire({
530
  type: 'success',
531
- width: <?php echo esc_js( $params['width'] ); ?>,
532
  title: "Thank You!",
533
  showConfirmButton: false,
534
- position: '<?php echo esc_js( $params['position'] ); ?>',
535
  timer: 1500,
536
  animation: false
537
  });
@@ -542,11 +539,11 @@ if ( ! class_exists( 'IG_Feedback_V_1_2_3' ) ) {
542
  }, delay * 1000);
543
  }
544
 
545
- var delay = <?php echo esc_js( $params['delay'] ); ?>;
546
  showWidget(delay);
547
 
548
 
549
- </script>
550
  <?php
551
  }
552
 
@@ -563,14 +560,14 @@ if ( ! class_exists( 'IG_Feedback_V_1_2_3' ) ) {
563
 
564
  ?>
565
 
566
- <div class="rating">
567
- <!--elements are in reversed order, to allow "previous sibling selectors" in CSS-->
568
- <input class="ratings" type="radio" name="rating" value="5" id="5"><label for="5">☆</label>
569
- <input class="ratings" type="radio" name="rating" value="4" id="4"><label for="4">☆</label>
570
- <input class="ratings" type="radio" name="rating" value="3" id="3"><label for="3">☆</label>
571
- <input class="ratings" type="radio" name="rating" value="2" id="2"><label for="2">☆</label>
572
- <input class="ratings" type="radio" name="rating" value="1" id="1"><label for="1">☆</label>
573
- </div>
574
 
575
  <?php
576
 
@@ -594,15 +591,15 @@ if ( ! class_exists( 'IG_Feedback_V_1_2_3' ) ) {
594
 
595
  ?>
596
 
597
- <div class="emoji">
598
- <!--elements are in reversed order, to allow "previous sibling selectors" in CSS-->
599
- <input class="emojis" type="radio" name="rating" value="love" id="5"/><label for="5" class="ig-emoji" data-reaction="Love">😍</label>
600
- <input class="emojis" type="radio" name="rating" value="smile" id="4"/><label for="4" class="ig-emoji" data-reaction="Smile">😊</label>
601
- <input class="emojis" type="radio" name="rating" value="neutral" id="3"/><label for="3" class="ig-emoji" data-reaction="Neutral">😐</label>
602
- <input class="emojis" type="radio" name="rating" value="sad" id="1"/><label for="2" class="ig-emoji" data-reaction="Sad">😠</label>
603
- <input class="emojis" type="radio" name="rating" value="angry" id="1"/><label for="1" class="ig-emoji" data-reaction="Angry">😡</label>
604
- </div>
605
- <div id="emoji-info"></div>
606
 
607
  <?php
608
 
@@ -621,33 +618,33 @@ if ( ! class_exists( 'IG_Feedback_V_1_2_3' ) ) {
621
  */
622
  public function render_general_feedback( $params = array() ) {
623
 
624
- $params = $this->prepare_widget_params( $params );
625
- $allowedtags = ig_es_allowed_html_tags_in_esc();
626
  ob_start();
627
 
628
  ?>
629
 
630
- <div class="ig-general-feedback" id="ig-general-feedback-<?php echo esc_html( $this->plugin ); ?>">
631
- <form class="ig-general-feedback" id="ig-general-feedback">
632
- <p class="ig-feedback-data-name">
633
- <label class="ig-label"><?php esc_html_e( 'Name', 'email-subscribers' ); ?></label><br/>
634
- <input type="text" name="feedback_data[name]" id="ig-feedback-data-name" value="<?php echo esc_html( $params['name'] ); ?>"/>
635
- </p>
636
- <p class="ig-feedback-data-email">
637
- <label class="ig-label"><?php esc_html_e( 'Email', 'email-subscribers' ); ?></label><br/>
638
- <input type="email" name="feedback_data[email]" id="ig-feedback-data-email" value="<?php echo esc_html( $params['email'] ); ?>"/>
639
- </p>
640
- <p class="ig-feedback-data-message">
641
- <label class="ig-label"><?php esc_html_e( 'Feedback', 'email-subscribers '); ?></label><br/>
642
- <textarea name="feedback_data[details]" id="ig-feedback-data-message"></textarea>
643
- </p>
644
- <?php if ( isset( $params['consent'] ) && true === $params['consent'] ) { ?>
645
- <p>
646
- <input type="checkbox" name="feedback_data[collect_system_info]" checked="checked" id="ig-feedback-data-consent"/><?php echo esc_html( $params['consent_text'] ); ?>
647
- </p>
648
  <?php } ?>
649
- </form>
650
- </div>
651
 
652
  <?php
653
 
@@ -663,33 +660,33 @@ if ( ! class_exists( 'IG_Feedback_V_1_2_3' ) ) {
663
  ob_start();
664
  ?>
665
 
666
- <script type="text/javascript">
667
 
668
  jQuery(document).ready(function ($) {
669
 
670
  function doSend(details, meta, system_info) {
671
 
672
  var data = {
673
- action: '<?php echo esc_js( $this->ajax_action ); ?>',
674
  feedback: {
675
- type: '<?php echo esc_js( $params['type'] ); ?>',
676
- slug: '<?php echo esc_js( $slug ); ?>',
677
  title: '<?php echo esc_js( $title ); ?>',
678
  details: details
679
  },
680
 
681
- event: '<?php echo esc_js( $event ); ?>',
682
 
683
  // Add additional information
684
  misc: {
685
- plugin: '<?php echo esc_js( $this->plugin ); ?>',
686
- plugin_abbr: '<?php echo esc_js( $this->plugin_abbr ); ?>',
687
- is_dev_mode: '<?php echo esc_js( $this->is_dev_mode ); ?>',
688
- set_transient: '<?php echo esc_js( $params['set_transient'] ); ?>',
689
  meta_info: meta,
690
  system_info: system_info
691
  },
692
- security: ig_es_js_data.security
693
  };
694
 
695
  return jQuery.post(ajaxurl, data);
@@ -704,27 +701,27 @@ if ( ! class_exists( 'IG_Feedback_V_1_2_3' ) ) {
704
  }
705
  }
706
 
707
- var feedbackButtonClass = 'ig-feedback-button-<?php echo esc_js( $this->plugin ); ?>';
708
 
709
  $('#wpwrap').append('<div class="ig-es-feedback-button ' + feedbackButtonClass + '">Feedback</div>');
710
 
711
  $('.' + feedbackButtonClass).on('click', function () {
712
  Swal.mixin({
713
- footer: '<?php echo wp_kses( $this->footer, $allowedtags ); ?>',
714
- position: '<?php echo esc_js( $params['position'] ); ?>',
715
- width: <?php echo esc_js( $params['width'] ); ?>,
716
  animation: false,
717
  focusConfirm: false,
718
  allowEscapeKey: true,
719
- showCloseButton: '<?php echo esc_js( $params['showCloseButton'] ); ?>',
720
- allowOutsideClick: '<?php echo esc_js( $params['allowOutsideClick'] ); ?>',
721
  showLoaderOnConfirm: true,
722
- confirmButtonText: '<?php echo wp_kses( $params['confirmButtonText'], $allowedtags ); ?>',
723
- backdrop: '<?php echo esc_js( (int) $params['backdrop'] ); ?>'
724
  }).queue([
725
  {
726
  title: '<p class="ig-feedback-title"><?php echo esc_js( $params['title'] ); ?></p>',
727
- html: '<?php echo wp_kses( $html, $allowedtags ); ?>',
728
  customClass: {
729
  popup: 'animated fadeInUpBig'
730
  },
@@ -733,7 +730,7 @@ if ( ! class_exists( 'IG_Feedback_V_1_2_3' ) ) {
733
 
734
  },
735
  preConfirm: () => {
736
- var $overlay = $('#ig-general-feedback-<?php echo esc_js( $this->plugin ); ?>');
737
  var $form = $overlay.find('form');
738
 
739
  var email = $form.find('#ig-feedback-data-email').val();
@@ -771,10 +768,10 @@ if ( ! class_exists( 'IG_Feedback_V_1_2_3' ) ) {
771
 
772
  Swal.fire({
773
  type: 'success',
774
- width: <?php echo esc_js( $params['width'] ); ?>,
775
  title: "Thank You!",
776
  showConfirmButton: false,
777
- position: '<?php echo esc_js( $params['position'] ); ?>',
778
  timer: 1500,
779
  animation: false
780
  });
@@ -786,7 +783,7 @@ if ( ! class_exists( 'IG_Feedback_V_1_2_3' ) ) {
786
  });
787
  });
788
 
789
- </script>
790
 
791
 
792
  <?php
@@ -802,48 +799,47 @@ if ( ! class_exists( 'IG_Feedback_V_1_2_3' ) ) {
802
 
803
  $params = $this->prepare_widget_params( $params );
804
 
805
- $title = $params['title'];
806
- $widget_tyoe = !empty($params['widget_tyoe']) ? $params['widget_tyoe'] : 'question';
807
- $slug = sanitize_title( $title );
808
- $event = $this->event_prefix . $params['event'];
809
- $html = ! empty( $params['html'] ) ? $params['html'] : '';
810
  $confirm_button_link = ! empty( $params['confirmButtonLink'] ) ? $params['confirmButtonLink'] : '';
811
- $cancel_button_link = ! empty( $params['cancelButtonLink'] ) ? $params['cancelButtonLink'] : '';
812
- $show_cancel_button = ! empty( $params['showCancelButton'] ) ? 'true' : 'false';
813
- $cancel_button_text = ! empty( $params['cancelButtonText'] ) ? $params['cancelButtonText'] : 'Cancel';
814
- $allowedtags = ig_es_allowed_html_tags_in_esc();
815
 
816
  ?>
817
 
818
- <script>
819
 
820
  Swal.mixin({
821
- type: '<?php echo esc_js( $widget_tyoe ); ?>',
822
- position: '<?php echo esc_js( $params['position'] ); ?>',
823
- width: <?php echo esc_js( $params['width'] ); ?>,
824
  animation: false,
825
  focusConfirm: true,
826
  allowEscapeKey: true,
827
- showCancelButton: <?php echo esc_js( $show_cancel_button ); ?>,
828
  confirmButtonColor: '#0e9f6e',
829
  cancelButtonColor: '#5850ec',
830
- cancelButtonText: '<?php echo wp_kses( $cancel_button_text, $allowedtags ); ?>',
831
- showCloseButton: '<?php echo esc_js( $params['showCloseButton'] ); ?>',
832
- allowOutsideClick: '<?php echo esc_js( $params['allowOutsideClick'] ); ?>',
833
  showLoaderOnConfirm: true,
834
- confirmButtonText: '<?php echo wp_kses( $params['confirmButtonText'], $allowedtags ); ?>',
835
- backdrop: '<?php echo esc_js( (int) $params['backdrop'] ); ?>'
836
  }).queue([
837
  {
838
  title: '<p class="ig-feedback-title"><?php echo esc_js( $params['title'] ); ?></p>',
839
- html: '<?php echo wp_kses( $html , $allowedtags ); ?>',
840
  customClass: {
841
  popup: 'animated fadeInUpBig'
842
  },
843
 
844
  preConfirm: () => {
845
  window.open(
846
- '<?php echo wp_kses( $confirm_button_link, $allowedtags ); ?>',
847
  '_blank' // <- This is what makes it open in a new window.
848
  );
849
  }
@@ -855,22 +851,22 @@ if ( ! class_exists( 'IG_Feedback_V_1_2_3' ) ) {
855
 
856
  Swal.fire({
857
  type: 'success',
858
- width: <?php echo esc_js( $params['width'] ); ?>,
859
  title: "Thank You!",
860
  showConfirmButton: false,
861
- position: '<?php echo esc_js( $params['position'] ); ?>',
862
  timer: 1500,
863
  animation: false
864
  });
865
- } else if( 'cancel' == response.dismiss ) {
866
  window.open(
867
- '<?php echo wp_kses( $cancel_button_link, $allowedtags ); ?>',
868
  '_blank' // <- This is what makes it open in a new window.
869
  );
870
- }
871
  });
872
 
873
- </script>
874
 
875
  <?php
876
  }
@@ -893,30 +889,29 @@ if ( ! class_exists( 'IG_Feedback_V_1_2_3' ) ) {
893
 
894
  $allow_multiple = ! empty( $params['allow_multiple'] ) ? $params['allow_multiple'] : false;
895
 
896
- $title = $params['title'];
897
- $slug = sanitize_title( $title );
898
- $event = $this->event_prefix . $params['event'];
899
- $desc = ! empty( $params['desc'] ) ? $params['desc'] : '';
900
- $allowedtags = ig_es_allowed_html_tags_in_esc();
901
 
902
  ob_start();
903
 
904
  ?>
905
 
906
- <div class="ig-general-feedback" id="ig-general-feedback-<?php echo esc_attr( $this->plugin ); ?>">
907
- <form class="ig-general-feedback" id="ig-general-feedback">
908
- <p><?php echo wp_kses( $desc, $allowedtags ); ?></p>
909
 
910
- <p class="ig-general-feedback mb-3">
911
  <?php foreach ( $poll_options as $value => $option ) { ?>
912
- <input type="radio" name="feedback_data[poll_options]" value="<?php echo esc_attr( $value ); ?>"><b style="color: <?php echo esc_attr( $option['color'] ); ?>"><?php echo wp_kses( $option['text'] , $allowedtags ); ?></b><br/>
913
  <?php } ?>
914
- </p>
915
- <p class="ig-feedback-data-poll-message mb-3" id="ig-feedback-data-poll-message">
916
- <textarea name="feedback_data[details]" id="ig-feedback-data-poll-additional-message" placeholder="Additional feedback"></textarea>
917
- </p>
918
- </form>
919
- </div>
920
 
921
  <?php
922
 
@@ -931,33 +926,33 @@ if ( ! class_exists( 'IG_Feedback_V_1_2_3' ) ) {
931
 
932
  ?>
933
 
934
- <script type="text/javascript">
935
 
936
  jQuery(document).ready(function ($) {
937
 
938
  function doSend(data, meta, system_info) {
939
 
940
  var data = {
941
- action: '<?php echo esc_js( $this->ajax_action ); ?>',
942
  feedback: {
943
- type: '<?php echo esc_js( $params['type'] ); ?>',
944
- slug: '<?php echo esc_js( $slug ); ?>',
945
  title: '<?php echo esc_js( $title ); ?>',
946
  data: data
947
  },
948
 
949
- event: '<?php echo esc_js( $event ); ?>',
950
 
951
  // Add additional information
952
  misc: {
953
- plugin: '<?php echo esc_js( $this->plugin ); ?>',
954
- plugin_abbr: '<?php echo esc_js( $this->plugin_abbr ); ?>',
955
- is_dev_mode: '<?php echo esc_js( $this->is_dev_mode ); ?>',
956
- set_transient: '<?php echo esc_js( $params['set_transient'] ); ?>',
957
  meta_info: meta,
958
  system_info: system_info
959
  },
960
- security: ig_es_js_data.security
961
  };
962
 
963
  return jQuery.post(ajaxurl, data);
@@ -965,20 +960,20 @@ if ( ! class_exists( 'IG_Feedback_V_1_2_3' ) ) {
965
 
966
  Swal.mixin({
967
  footer: '',
968
- position: '<?php echo esc_js( $params['position'] ); ?>',
969
- width: <?php echo esc_js( $params['width'] ); ?>,
970
  animation: false,
971
  focusConfirm: false,
972
  allowEscapeKey: true,
973
- showCloseButton: '<?php echo esc_js( $params['showCloseButton'] ); ?>',
974
- allowOutsideClick: '<?php echo esc_js( $params['allowOutsideClick'] ); ?>',
975
  showLoaderOnConfirm: true,
976
- confirmButtonText: '<?php echo wp_kses( $params['confirmButtonText'], $allowedtags ); ?>',
977
- backdrop: '<?php echo esc_js( (int) $params['backdrop'] ); ?>'
978
  }).queue([
979
  {
980
  title: '<p class="ig-feedback-title"><?php echo esc_js( $params['title'] ); ?></p>',
981
- html: '<?php echo wp_kses( $html, $allowedtags ); ?>',
982
  customClass: {
983
  popup: 'animated fadeInUpBig'
984
  },
@@ -987,7 +982,7 @@ if ( ! class_exists( 'IG_Feedback_V_1_2_3' ) ) {
987
  },
988
 
989
  preConfirm: () => {
990
- var $overlay = $('#ig-general-feedback-<?php echo esc_js( $this->plugin ); ?>');
991
  var $form = $overlay.find('form');
992
  var poll_options = $form.find("input[name='feedback_data[poll_options]']:checked").val();
993
  var message = $form.find("#ig-feedback-data-poll-additional-message").val();
@@ -1014,10 +1009,10 @@ if ( ! class_exists( 'IG_Feedback_V_1_2_3' ) ) {
1014
 
1015
  Swal.fire({
1016
  type: 'success',
1017
- width: <?php echo esc_js( $params['width'] ); ?>,
1018
  title: "Thank You!",
1019
  showConfirmButton: false,
1020
- position: '<?php echo esc_js( $params['position'] ); ?>',
1021
  timer: 1500,
1022
  animation: false
1023
  });
@@ -1028,7 +1023,7 @@ if ( ! class_exists( 'IG_Feedback_V_1_2_3' ) ) {
1028
 
1029
  });
1030
 
1031
- </script>
1032
 
1033
 
1034
  <?php
@@ -1069,13 +1064,13 @@ if ( ! class_exists( 'IG_Feedback_V_1_2_3' ) ) {
1069
  $event = $this->event_prefix . 'plugin.deactivation';
1070
 
1071
  ?>
1072
- <script type="text/javascript">
1073
  jQuery(function ($) {
1074
- var $deactivateLink = $('#the-list').find('[data-slug="<?php echo esc_js( $this->plugin ); ?>"] span.deactivate a'),
1075
- $overlay = $('#ig-deactivate-survey-<?php echo esc_js( $this->plugin ); ?>'),
1076
  $form = $overlay.find('form'),
1077
  formOpen = false,
1078
- consent = $('#ig-deactivate-survey-help-consent-<?php echo esc_js( $this->plugin ); ?>');
1079
 
1080
  function togglePersonalInfoFields(show) {
1081
 
@@ -1151,7 +1146,7 @@ if ( ! class_exists( 'IG_Feedback_V_1_2_3' ) ) {
1151
  event.preventDefault();
1152
  loader(true);
1153
  if (!$form.find('input[type=radio]:checked').val()) {
1154
- $form.find('.ig-deactivate-survey-footer').prepend('<span class="error"><?php echo esc_js( __( 'Please select an option', 'email-subscribers' ) ); ?></span>');
1155
  return;
1156
  }
1157
 
@@ -1175,27 +1170,27 @@ if ( ! class_exists( 'IG_Feedback_V_1_2_3' ) ) {
1175
  };
1176
 
1177
  var data = {
1178
- action: '<?php echo esc_js( $this->ajax_action ); ?>',
1179
  feedback: {
1180
  type: 'radio',
1181
- title: '<?php echo esc_js( $title ); ?>',
1182
- slug: '<?php echo esc_js( $slug ); ?>',
1183
  value: $form.find('.selected input[type=radio]').attr('data-option-slug'),
1184
  details: $form.find('.selected input[type=text]').val()
1185
  },
1186
 
1187
- event: '<?php echo esc_js( $event ); ?>',
1188
 
1189
  // Add additional information
1190
  misc: {
1191
- plugin: '<?php echo esc_js( $this->plugin ); ?>',
1192
- plugin_abbr: '<?php echo esc_js( $this->plugin_abbr ); ?>',
1193
- is_dev_mode: '<?php echo esc_js( $this->is_dev_mode ); ?>',
1194
  set_cookie: '',
1195
  meta_info: meta,
1196
  system_info: system_info
1197
  },
1198
- security: ig_es_js_data.security
1199
  };
1200
 
1201
  var submitSurvey = $.post(ajaxurl, data);
@@ -1212,7 +1207,7 @@ if ( ! class_exists( 'IG_Feedback_V_1_2_3' ) ) {
1212
  }
1213
  });
1214
  });
1215
- </script>
1216
  <?php
1217
  }
1218
 
@@ -1227,108 +1222,108 @@ if ( ! class_exists( 'IG_Feedback_V_1_2_3' ) ) {
1227
  return;
1228
  }
1229
  ?>
1230
- <style type="text/css">
1231
- .ig-deactivate-survey-modal {
1232
- display: none;
1233
- table-layout: fixed;
1234
- position: fixed;
1235
- z-index: 9999;
1236
- width: 100%;
1237
- height: 100%;
1238
- text-align: center;
1239
- font-size: 14px;
1240
- top: 0;
1241
- left: 0;
1242
- background: rgba(0, 0, 0, 0.8);
1243
- }
1244
-
1245
- .ig-deactivate-survey-wrap {
1246
- display: table-cell;
1247
- vertical-align: middle;
1248
- }
1249
-
1250
- .ig-deactivate-survey {
1251
- background-color: #fff;
1252
- max-width: 550px;
1253
- margin: 0 auto;
1254
- padding: 30px;
1255
- text-align: left;
1256
- }
1257
-
1258
- .ig-deactivate-survey .error {
1259
- display: block;
1260
- color: red;
1261
- margin: 0 0 10px 0;
1262
- }
1263
-
1264
- .ig-deactivate-survey-title {
1265
- display: block;
1266
- font-size: 18px;
1267
- font-weight: 700;
1268
- text-transform: uppercase;
1269
- border-bottom: 1px solid #ddd;
1270
- padding: 0 0 18px 0;
1271
- margin: 0 0 18px 0;
1272
- }
1273
-
1274
- .ig-deactivate-survey-options {
1275
- border-bottom: 1px solid #ddd;
1276
- padding: 0 0 18px 0;
1277
- margin: 0 0 18px 0;
1278
- }
1279
-
1280
- .ig-deactivate-survey-info-data {
1281
- padding: 0 0 18px 0;
1282
- margin: 10px 10px 10px 30px;
1283
- }
1284
-
1285
- .ig-deactivate-survey-info-name, .ig-deactivate-survey-info-email-address {
1286
- width: 230px;
1287
- margin: 10px;
1288
- }
1289
-
1290
- .ig-deactivate-survey-title span {
1291
- color: #999;
1292
- margin-right: 10px;
1293
- }
1294
-
1295
- .ig-deactivate-survey-desc {
1296
- display: block;
1297
- font-weight: 600;
1298
- margin: 0 0 18px 0;
1299
- }
1300
-
1301
- .ig-deactivate-survey-option {
1302
- margin: 0 0 10px 0;
1303
- }
1304
-
1305
- .ig-deactivate-survey-option-input {
1306
- margin-right: 10px !important;
1307
- }
1308
-
1309
- .ig-deactivate-survey-option-details {
1310
- display: none;
1311
- width: 90%;
1312
- margin: 10px 0 0 30px;
1313
- }
1314
-
1315
- .ig-deactivate-survey-footer {
1316
- margin-top: 18px;
1317
- }
1318
-
1319
- .ig-deactivate-survey-deactivate {
1320
- float: right;
1321
- font-size: 13px;
1322
- color: #ccc;
1323
- text-decoration: none;
1324
- padding-top: 7px;
1325
- }
1326
-
1327
- .ig-deactivate-survey-loader {
1328
- vertical-align: middle;
1329
- padding: 10px;
1330
- }
1331
- </style>
1332
  <?php
1333
  }
1334
 
@@ -1347,66 +1342,63 @@ if ( ! class_exists( 'IG_Feedback_V_1_2_3' ) ) {
1347
 
1348
  $options = array(
1349
  1 => array(
1350
- 'title' => esc_html__( 'I no longer need the plugin', 'email-subscribers' ),
1351
  'slug' => 'i-no-longer-need-the-plugin'
1352
  ),
1353
  2 => array(
1354
- 'title' => esc_html__( 'I\'m switching to a different plugin', 'email-subscribers' ),
1355
  'slug' => 'i-am-switching-to-a-different-plugin',
1356
- 'details' => esc_html__( 'Please share which plugin', 'email-subscribers' ),
1357
  ),
1358
  3 => array(
1359
- 'title' => esc_html__( 'I couldn\'t get the plugin to work', 'email-subscribers' ),
1360
  'slug' => 'i-could-not-get-the-plugin-to-work'
1361
  ),
1362
  4 => array(
1363
- 'title' => esc_html__( 'It\'s a temporary deactivation', 'email-subscribers' ),
1364
  'slug' => 'it-is-a-temporary-deactivation'
1365
  ),
1366
  5 => array(
1367
- 'title' => esc_html__( 'Other', 'email-subscribers' ),
1368
  'slug' => 'other',
1369
- 'details' => esc_html__( 'Please share the reason', 'email-subscribers' ),
1370
  ),
1371
  );
1372
  ?>
1373
- <div class="ig-deactivate-survey-modal" id="ig-deactivate-survey-<?php echo esc_attr( $this->plugin ); ?>">
1374
- <div class="ig-deactivate-survey-wrap">
1375
- <form class="ig-deactivate-survey" method="post">
1376
- <span class="ig-deactivate-survey-title"><span class="dashicons dashicons-testimonial"></span><?php echo ' ' . esc_html__( 'Quick Feedback', 'email-subscribers' ); ?></span>
1377
- <?php /* translators: %s: Plugin name */ ?>
1378
- <span class="ig-deactivate-survey-desc"><?php echo sprintf( esc_html__( 'If you have a moment, please share why you are deactivating %s:', 'email-subscribers' ), esc_html( $this->name ) ); ?></span>
1379
- <div class="ig-deactivate-survey-options">
1380
  <?php foreach ( $options as $id => $option ) : ?>
1381
- <div class="ig-deactivate-survey-option">
1382
- <label for="ig-deactivate-survey-option-<?php echo esc_attr( $this->plugin ); ?>-<?php echo esc_attr( $id ); ?>" class="ig-deactivate-survey-option-label">
1383
- <input id="ig-deactivate-survey-option-<?php echo esc_attr( $this->plugin ); ?>-<?php echo esc_attr( $id ); ?>" class="ig-deactivate-survey-option-input" type="radio" name="code" value="<?php echo esc_attr( $id ); ?>" data-option-slug="<?php echo esc_attr( $option['slug'] ); ?>"/>
1384
- <span class="ig-deactivate-survey-option-reason"><?php echo esc_html( $option['title'] ); ?></span>
1385
- </label>
1386
  <?php if ( ! empty( $option['details'] ) ) : ?>
1387
- <input class="ig-deactivate-survey-option-details" type="text" placeholder="<?php echo esc_attr( $option['details'] ); ?>"/>
1388
  <?php endif; ?>
1389
- </div>
1390
  <?php endforeach; ?>
1391
- </div>
1392
- <div class="ig-deactivate-survey-help-consent">
1393
- <input id="ig-deactivate-survey-help-consent-<?php echo esc_attr( $this->plugin ); ?>" class="ig-deactivate-survey-option-input" type="checkbox" name="code" data-option-slug="<?php echo esc_attr( $option['slug'] ); ?>"/><b><?php esc_html_e('Yes, I give my consent to track plugin usage and contact me back to make this plugin works!', 'email-subscribers'); ?></b>
1394
- </div>
1395
- <div class="ig-deactivate-survey-info-data">
1396
-
1397
- <input type="text" class="ig-deactivate-survey-info-name" id="ig-deactivate-survey-info-name" placeholder="Enter Name" name="ig-deactivate-survey-info-name" value=""/>
1398
- <input type="text" class="ig-deactivate-survey-info-email-address" id="ig-deactivate-survey-info-email-address" name="ig-deactivate-survey-info-email-address" value="<?php echo esc_html( $email ); ?>"/>
1399
- </div>
1400
- <div class="ig-deactivate-survey-footer">
1401
- <?php /* translators: %s: & sign */ ?>
1402
- <button type="submit" class="ig-deactivate-survey-submit button button-primary button-large"><?php echo sprintf( esc_html__( 'Submit %s Deactivate', 'email-subscribers'), '&amp;' ); ?></button>
1403
- <img class="ig-deactivate-survey-loader" id="ig-deactivate-survey-loader" src="<?php echo esc_url( plugin_dir_url( __FILE__ ) ); ?>/assets/images/loading.gif"/>
1404
- <?php /* translators: %s: & sign */ ?>
1405
- <a href="#" class="ig-deactivate-survey-deactivate"><?php echo sprintf( esc_html__( 'Skip %s Deactivate', 'email-subscribers' ), '&amp;' ); ?></a>
1406
- </div>
1407
- </form>
1408
- </div>
1409
- </div>
1410
  <?php
1411
  }
1412
 
@@ -1651,11 +1643,11 @@ if ( ! class_exists( 'IG_Feedback_V_1_2_3' ) ) {
1651
  *
1652
  * Send feedback to server
1653
  */
1654
- public function submit_feedback() {
1655
 
1656
- check_ajax_referer( 'ig-es-admin-ajax-nonce', 'security' );
1657
 
1658
- $data = wp_unslash( $_POST );
1659
 
1660
  $data['site'] = esc_url( home_url() );
1661
 
@@ -1663,7 +1655,7 @@ if ( ! class_exists( 'IG_Feedback_V_1_2_3' ) ) {
1663
  $plugin_abbr = ! empty( $data['misc']['plugin_abbr'] ) ? $data['misc']['plugin_abbr'] : 'ig_feedback';
1664
  $is_dev_mode = ! empty( $data['misc']['is_dev_mode'] ) ? $data['misc']['is_dev_mode'] : false;
1665
  $set_transient = ! empty( $data['misc']['set_transient'] ) ? $data['misc']['set_transient'] : false;
1666
- $system_info = ( isset( $data['misc']['system_info'] ) && 'true' === $data['misc']['system_info'] ) ? true : false;
1667
  $meta_info = ! empty( $data['misc']['meta_info'] ) ? $data['misc']['meta_info'] : array();
1668
 
1669
  unset( $data['misc'] );
4
  exit; // Exit if accessed directly.
5
  }
6
 
7
+ if ( ! class_exists( 'IG_Feedback_V_1_2_4' ) ) {
8
  /**
9
  * IG Feedback
10
  *
11
  * The IG Feedback class adds functionality to get quick interactive feedback from users.
12
  * There are different types of feedabck widget like Stars, Emoji, Thubms Up/ Down, Number etc.
13
  *
14
+ * @class IG_Feedback_V_1_2_4
15
  * @since 1.0.0
16
+ * @copyright Copyright (c) 2019, Icegram
17
+ * @license https://opensource.org/licenses/gpl-license GNU Public License
18
  * @author Icegram
19
  * @package feedback
20
  */
21
+ class IG_Feedback_V_1_2_4 {
22
 
23
  /**
24
  * Version of Feedback Library
27
  * @var string
28
  *
29
  */
30
+ public $version = '1.2.4';
31
  /**
32
  * The API URL where we will send feedback data.
33
  *
70
 
71
  /**
72
  * Enable/Disable Dev Mode
 
73
  * @var bool
74
  */
75
  public $is_dev_mode = true;
82
  public $event_prefix;
83
 
84
  /**
85
+ *
86
  */
87
  public $footer = '<span class="ig-powered-by">Made With&nbsp;💜&nbsp;by&nbsp;<a href="https://www.icegram.com/" target="_blank">Icegram</a></span>';
88
 
127
  * @since 1.0.12
128
  */
129
  public function show_review_notice() {
130
+
 
131
  if ( ! defined( 'DOING_AJAX' ) && is_admin() ) {
132
 
133
  $enable_review_notice = apply_filters( $this->plugin_abbr . '_enable_review_notice', true );
193
 
194
  if ( $can_ask_user_for_review ) {
195
 
196
+ $current_page_url = "//" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
 
 
197
 
198
  $got_feedback = false;
199
  /************** Update Review Status ********************/
200
+ $nonce = ! empty( $_GET['ig_feedback_nonce'] ) ? esc_attr( wp_unslash( $_GET['ig_feedback_nonce'] ) ) : '';
201
  $nonce_verified = wp_verify_nonce( $nonce, 'review' );
202
 
203
  $action = '';
204
  if ( $nonce_verified ) {
205
+ $action = ! empty( $_GET['ig_feedback_action'] ) ? esc_attr( wp_unslash( $_GET['ig_feedback_action'] ) ) : '';
206
 
207
  if ( ! empty( $action ) && $this->is_valid_action( $action ) ) {
208
  update_user_meta( $current_user_id, $action, 1 );
209
+ update_user_meta( $current_user_id, $action . "_time", time() );
210
 
211
  // Got the review request?
212
  // Redirect them to review page
213
  if ( $action === $review_done_option ) {
214
 
215
+ $url = ! empty( $_GET['review_url'] ) ? $_GET['review_url'] : '';
216
 
217
  if ( ! empty( $url ) ) {
218
  ?>
219
 
220
+ <meta http-equiv="refresh" content="0; url=<?php echo $url; ?>"/>
221
 
222
  <?php
223
  }
232
 
233
  $review_url = "https://wordpress.org/support/plugin/{$this->plugin}/reviews/";
234
  $icon_url = plugin_dir_url( __FILE__ ) . 'assets/images/icon-64.png';
235
+ $message = __( sprintf( "<span><p>We hope you're enjoying <b>%s</b> plugin! Could you please do us a BIG favor and give us a 5-star rating on WordPress to help us spread the word and boost our motivation?</p>", $this->name ), $this->plugin );
 
236
 
237
  $message_data = array(
238
  'review_url' => $review_url,
255
 
256
  ?>
257
 
258
+ <style type="text/css">
259
 
260
+ .ig-feedback-notice-links li {
261
+ display: inline-block;
262
+ margin-right: 15px;
263
+ }
264
 
265
+ .ig-feedback-notice-links li a {
266
+ display: inline-block;
267
+ color: #10738b;
268
+ text-decoration: none;
269
+ padding-left: 26px;
270
+ position: relative;
271
+ }
272
 
273
+ .ig-feedback-notice {
274
+ display: flex;
275
+ align-items: center;
276
+ }
277
 
278
+ .ig-feedback-plugin-icon {
279
+ float: left;
280
+ margin-right: 0.5em;
281
+ }
282
 
283
+ </style>
284
 
285
  <?php
286
 
287
  echo '<div class="notice notice-success ig-feedback-notice">';
288
+ echo '<span class="ig-feedback-plugin-icon"> <img src="' . $icon_url . '" alt="Logo"/></span>';
289
+ echo $message;
290
  echo "<ul class='ig-feedback-notice-links'>";
291
+ echo sprintf( '<li><a href="%s" class="button-primary" target="_blank" data-rated="' . esc_attr__( "Thank You :) ",
292
+ $this->plugin ) . '"><span class="dashicons dashicons-external"></span>&nbsp;&nbsp;Ok, you deserve it</a></li> <li><a href="%s"><span class="dashicons dashicons-calendar-alt"></span>&nbsp;&nbsp;Maybe later</a></li><li><a href="%s"><span class="dashicons dashicons-smiley"></span>&nbsp;&nbsp;I already did!</a></li><li><a href="%s"><span class="dashicons dashicons-no"></span>&nbsp;&nbsp;Don\'t ask me again</a></li>',
293
  esc_url( $review_url ), esc_url( $maybe_later_url ), esc_url( $already_did_url ), esc_url( $no_bug_url ) );
294
+ echo "</ul></span>";
295
  echo '</div>';
296
  }
297
  }
352
  $can_load = apply_filters( $this->plugin_abbr . '_can_load_sweetalert_js', false );
353
 
354
  if ( $can_load ) {
355
+ wp_enqueue_script( 'sweetalert', plugin_dir_url( __FILE__ ) . 'assets/js/sweetalert2.min.js', array( 'jquery' ) );
356
  }
357
  }
358
 
423
 
424
  $params = $this->prepare_widget_params( $params );
425
 
426
+ $title = $params['title'];
427
+ $slug = sanitize_title( $title );
428
+ $event = $this->event_prefix . $params['event'];
429
+ $html = ! empty( $params['html'] ) ? $params['html'] : '';
430
+
431
  ?>
432
 
433
+ <script>
434
 
435
  function doSend(rating, details) {
436
 
437
  var data = {
438
+ action: '<?php echo $this->ajax_action; ?>',
439
  feedback: {
440
+ type: '<?php echo $params['type']; ?>',
441
+ slug: '<?php echo $slug; ?>',
442
  title: '<?php echo esc_js( $title ); ?>',
443
  value: rating,
444
  details: details
445
  },
446
 
447
+ event: '<?php echo $event; ?>',
448
 
449
  // Add additional information
450
  misc: {
451
+ plugin: '<?php echo $this->plugin; ?>',
452
+ plugin_abbr: '<?php echo $this->plugin_abbr; ?>',
453
+ is_dev_mode: '<?php echo $this->is_dev_mode; ?>',
454
+ set_transient: '<?php echo $params['set_transient']; ?>'
455
  //system_info: enable_system_info
456
  },
457
+ security: '<?php echo esc_js( wp_create_nonce( $this->plugin_abbr . '-admin-ajax-nonce' ) ); ?>'
458
  };
459
 
460
  return jQuery.post(ajaxurl, data);
465
  setTimeout(function () {
466
 
467
  Swal.mixin({
468
+ footer: '<?php echo $this->footer; ?>',
469
+ position: '<?php echo $params['position']; ?>',
470
+ width: <?php echo $params['width']; ?>,
471
  animation: false,
472
  focusConfirm: false,
473
+ allowEscapeKey: '<?php echo $params['allowEscapeKey']; ?>',
474
+ showCloseButton: '<?php echo $params['showCloseButton']; ?>',
475
+ allowOutsideClick: '<?php echo $params['allowOutsideClick']; ?>',
476
  showLoaderOnConfirm: true,
477
+ confirmButtonText: '<?php echo $params['confirmButtonText']; ?>',
478
+ backdrop: '<?php echo (int) $params['backdrop']; ?>'
479
  }).queue([
480
  {
481
  title: '<p class="ig-feedback-title"><?php echo esc_js( $params['title'] ); ?></p>',
482
+ html: '<?php echo $html; ?>',
483
  customClass: {
484
  popup: 'animated fadeInUpBig'
485
  },
525
 
526
  Swal.fire({
527
  type: 'success',
528
+ width: <?php echo $params['width']; ?>,
529
  title: "Thank You!",
530
  showConfirmButton: false,
531
+ position: '<?php echo $params['position']; ?>',
532
  timer: 1500,
533
  animation: false
534
  });
539
  }, delay * 1000);
540
  }
541
 
542
+ var delay = <?php echo $params['delay']; ?>;
543
  showWidget(delay);
544
 
545
 
546
+ </script>
547
  <?php
548
  }
549
 
560
 
561
  ?>
562
 
563
+ <div class="rating">
564
+ <!--elements are in reversed order, to allow "previous sibling selectors" in CSS-->
565
+ <input class="ratings" type="radio" name="rating" value="5" id="5"><label for="5">☆</label>
566
+ <input class="ratings" type="radio" name="rating" value="4" id="4"><label for="4">☆</label>
567
+ <input class="ratings" type="radio" name="rating" value="3" id="3"><label for="3">☆</label>
568
+ <input class="ratings" type="radio" name="rating" value="2" id="2"><label for="2">☆</label>
569
+ <input class="ratings" type="radio" name="rating" value="1" id="1"><label for="1">☆</label>
570
+ </div>
571
 
572
  <?php
573
 
591
 
592
  ?>
593
 
594
+ <div class="emoji">
595
+ <!--elements are in reversed order, to allow "previous sibling selectors" in CSS-->
596
+ <input class="emojis" type="radio" name="rating" value="love" id="5"/><label for="5" class="ig-emoji" data-reaction="Love">😍</label>
597
+ <input class="emojis" type="radio" name="rating" value="smile" id="4"/><label for="4" class="ig-emoji" data-reaction="Smile">😊</label>
598
+ <input class="emojis" type="radio" name="rating" value="neutral" id="3"/><label for="3" class="ig-emoji" data-reaction="Neutral">😐</label>
599
+ <input class="emojis" type="radio" name="rating" value="sad" id="1"/><label for="2" class="ig-emoji" data-reaction="Sad">😠</label>
600
+ <input class="emojis" type="radio" name="rating" value="angry" id="1"/><label for="1" class="ig-emoji" data-reaction="Angry">😡</label>
601
+ </div>
602
+ <div id="emoji-info"></div>
603
 
604
  <?php
605
 
618
  */
619
  public function render_general_feedback( $params = array() ) {
620
 
621
+ $params = $this->prepare_widget_params( $params );
622
+
623
  ob_start();
624
 
625
  ?>
626
 
627
+ <div class="ig-general-feedback" id="ig-general-feedback-<?php echo $this->plugin; ?>">
628
+ <form class="ig-general-feedback" id="ig-general-feedback">
629
+ <p class="ig-feedback-data-name">
630
+ <label class="ig-label">Name</label><br/>
631
+ <input type="text" name="feedback_data[name]" id="ig-feedback-data-name" value="<?php echo $params['name']; ?>"/>
632
+ </p>
633
+ <p class="ig-feedback-data-email">
634
+ <label class="ig-label"">Email</label><br/>
635
+ <input type="email" name="feedback_data[email]" id="ig-feedback-data-email" value="<?php echo $params['email']; ?>"/>
636
+ </p>
637
+ <p class="ig-feedback-data-message">
638
+ <label class="ig-label"">Feedback</label><br/>
639
+ <textarea name="feedback_data[details]" id="ig-feedback-data-message"></textarea>
640
+ </p>
641
+ <?php if ( isset( $params['consent'] ) && $params['consent'] === true ) { ?>
642
+ <p>
643
+ <input type="checkbox" name="feedback_data[collect_system_info]" checked="checked" id="ig-feedback-data-consent"/><?php echo $params['consent_text']; ?>
644
+ </p>
645
  <?php } ?>
646
+ </form>
647
+ </div>
648
 
649
  <?php
650
 
660
  ob_start();
661
  ?>
662
 
663
+ <script type="text/javascript">
664
 
665
  jQuery(document).ready(function ($) {
666
 
667
  function doSend(details, meta, system_info) {
668
 
669
  var data = {
670
+ action: '<?php echo $this->ajax_action; ?>',
671
  feedback: {
672
+ type: '<?php echo $params['type']; ?>',
673
+ slug: '<?php echo $slug; ?>',
674
  title: '<?php echo esc_js( $title ); ?>',
675
  details: details
676
  },
677
 
678
+ event: '<?php echo $event; ?>',
679
 
680
  // Add additional information
681
  misc: {
682
+ plugin: '<?php echo $this->plugin; ?>',
683
+ plugin_abbr: '<?php echo $this->plugin_abbr; ?>',
684
+ is_dev_mode: '<?php echo $this->is_dev_mode; ?>',
685
+ set_transient: '<?php echo $params['set_transient']; ?>',
686
  meta_info: meta,
687
  system_info: system_info
688
  },
689
+ security: '<?php echo esc_js( wp_create_nonce( $this->plugin_abbr . '-admin-ajax-nonce' ) ); ?>'
690
  };
691
 
692
  return jQuery.post(ajaxurl, data);
701
  }
702
  }
703
 
704
+ var feedbackButtonClass = 'ig-feedback-button-<?php echo $this->plugin; ?>';
705
 
706
  $('#wpwrap').append('<div class="ig-es-feedback-button ' + feedbackButtonClass + '">Feedback</div>');
707
 
708
  $('.' + feedbackButtonClass).on('click', function () {
709
  Swal.mixin({
710
+ footer: '<?php echo $this->footer; ?>',
711
+ position: '<?php echo $params['position']; ?>',
712
+ width: <?php echo $params['width']; ?>,
713
  animation: false,
714
  focusConfirm: false,
715
  allowEscapeKey: true,
716
+ showCloseButton: '<?php echo $params['showCloseButton']; ?>',
717
+ allowOutsideClick: '<?php echo $params['allowOutsideClick']; ?>',
718
  showLoaderOnConfirm: true,
719
+ confirmButtonText: '<?php echo $params['confirmButtonText']; ?>',
720
+ backdrop: '<?php echo (int) $params['backdrop']; ?>'
721
  }).queue([
722
  {
723
  title: '<p class="ig-feedback-title"><?php echo esc_js( $params['title'] ); ?></p>',
724
+ html: '<?php echo $html; ?>',
725
  customClass: {
726
  popup: 'animated fadeInUpBig'
727
  },
730
 
731
  },
732
  preConfirm: () => {
733
+ var $overlay = $('#ig-general-feedback-<?php echo $this->plugin; ?>');
734
  var $form = $overlay.find('form');
735
 
736
  var email = $form.find('#ig-feedback-data-email').val();
768
 
769
  Swal.fire({
770
  type: 'success',
771
+ width: <?php echo $params['width']; ?>,
772
  title: "Thank You!",
773
  showConfirmButton: false,
774
+ position: '<?php echo $params['position']; ?>',
775
  timer: 1500,
776
  animation: false
777
  });
783
  });
784
  });
785
 
786
+ </script>
787
 
788
 
789
  <?php
799
 
800
  $params = $this->prepare_widget_params( $params );
801
 
802
+ $title = $params['title'];
803
+ $widget_tyoe = !empty($params['widget_tyoe']) ? $params['widget_tyoe'] : 'question';
804
+ $slug = sanitize_title( $title );
805
+ $event = $this->event_prefix . $params['event'];
806
+ $html = ! empty( $params['html'] ) ? $params['html'] : '';
807
  $confirm_button_link = ! empty( $params['confirmButtonLink'] ) ? $params['confirmButtonLink'] : '';
808
+ $cancel_button_link = ! empty( $params['cancelButtonLink'] ) ? $params['cancelButtonLink'] : '';
809
+ $show_cancel_button = ! empty( $params['showCancelButton'] ) ? 'true' : 'false';
810
+ $cancel_button_text = ! empty( $params['cancelButtonText'] ) ? $params['cancelButtonText'] : 'Cancel';
 
811
 
812
  ?>
813
 
814
+ <script>
815
 
816
  Swal.mixin({
817
+ type: '<?php echo $widget_tyoe; ?>',
818
+ position: '<?php echo $params['position']; ?>',
819
+ width: <?php echo $params['width']; ?>,
820
  animation: false,
821
  focusConfirm: true,
822
  allowEscapeKey: true,
823
+ showCancelButton: <?php echo $show_cancel_button; ?>,
824
  confirmButtonColor: '#0e9f6e',
825
  cancelButtonColor: '#5850ec',
826
+ cancelButtonText: '<?php echo $cancel_button_text; ?>',
827
+ showCloseButton: '<?php echo $params['showCloseButton']; ?>',
828
+ allowOutsideClick: '<?php echo $params['allowOutsideClick']; ?>',
829
  showLoaderOnConfirm: true,
830
+ confirmButtonText: '<?php echo $params['confirmButtonText']; ?>',
831
+ backdrop: '<?php echo (int) $params['backdrop']; ?>'
832
  }).queue([
833
  {
834
  title: '<p class="ig-feedback-title"><?php echo esc_js( $params['title'] ); ?></p>',
835
+ html: '<?php echo $html; ?>',
836
  customClass: {
837
  popup: 'animated fadeInUpBig'
838
  },
839
 
840
  preConfirm: () => {
841
  window.open(
842
+ '<?php echo $confirm_button_link; ?>',
843
  '_blank' // <- This is what makes it open in a new window.
844
  );
845
  }
851
 
852
  Swal.fire({
853
  type: 'success',
854
+ width: <?php echo $params['width']; ?>,
855
  title: "Thank You!",
856
  showConfirmButton: false,
857
+ position: '<?php echo $params['position']; ?>',
858
  timer: 1500,
859
  animation: false
860
  });
861
+ } else if(response.dismiss == 'cancel') {
862
  window.open(
863
+ '<?php echo $cancel_button_link; ?>',
864
  '_blank' // <- This is what makes it open in a new window.
865
  );
866
+ }
867
  });
868
 
869
+ </script>
870
 
871
  <?php
872
  }
889
 
890
  $allow_multiple = ! empty( $params['allow_multiple'] ) ? $params['allow_multiple'] : false;
891
 
892
+ $title = $params['title'];
893
+ $slug = sanitize_title( $title );
894
+ $event = $this->event_prefix . $params['event'];
895
+ $desc = ! empty( $params['desc'] ) ? $params['desc'] : '';
 
896
 
897
  ob_start();
898
 
899
  ?>
900
 
901
+ <div class="ig-general-feedback" id="ig-general-feedback-<?php echo $this->plugin; ?>">
902
+ <form class="ig-general-feedback" id="ig-general-feedback">
903
+ <p><?php echo $desc; ?></p>
904
 
905
+ <p class="ig-general-feedback mb-3">
906
  <?php foreach ( $poll_options as $value => $option ) { ?>
907
+ <input type="radio" name="feedback_data[poll_options]" value="<?php echo $value; ?>"><b style="color: <?php echo $option['color']; ?>"><?php echo $option['text']; ?></b><br/>
908
  <?php } ?>
909
+ </p>
910
+ <p class="ig-feedback-data-poll-message mb-3" id="ig-feedback-data-poll-message">
911
+ <textarea name="feedback_data[details]" id="ig-feedback-data-poll-additional-message" placeholder="Additional feedback"></textarea>
912
+ </p>
913
+ </form>
914
+ </div>
915
 
916
  <?php
917
 
926
 
927
  ?>
928
 
929
+ <script type="text/javascript">
930
 
931
  jQuery(document).ready(function ($) {
932
 
933
  function doSend(data, meta, system_info) {
934
 
935
  var data = {
936
+ action: '<?php echo $this->ajax_action; ?>',
937
  feedback: {
938
+ type: '<?php echo $params['type']; ?>',
939
+ slug: '<?php echo $slug; ?>',
940
  title: '<?php echo esc_js( $title ); ?>',
941
  data: data
942
  },
943
 
944
+ event: '<?php echo $event; ?>',
945
 
946
  // Add additional information
947
  misc: {
948
+ plugin: '<?php echo $this->plugin; ?>',
949
+ plugin_abbr: '<?php echo $this->plugin_abbr; ?>',
950
+ is_dev_mode: '<?php echo $this->is_dev_mode; ?>',
951
+ set_transient: '<?php echo $params['set_transient']; ?>',
952
  meta_info: meta,
953
  system_info: system_info
954
  },
955
+ security: '<?php echo esc_js( wp_create_nonce( $this->plugin_abbr . '-admin-ajax-nonce' ) ); ?>'
956
  };
957
 
958
  return jQuery.post(ajaxurl, data);
960
 
961
  Swal.mixin({
962
  footer: '',
963
+ position: '<?php echo $params['position']; ?>',
964
+ width: <?php echo $params['width']; ?>,
965
  animation: false,
966
  focusConfirm: false,
967
  allowEscapeKey: true,
968
+ showCloseButton: '<?php echo $params['showCloseButton']; ?>',
969
+ allowOutsideClick: '<?php echo $params['allowOutsideClick']; ?>',
970
  showLoaderOnConfirm: true,
971
+ confirmButtonText: '<?php echo $params['confirmButtonText']; ?>',
972
+ backdrop: '<?php echo (int) $params['backdrop']; ?>'
973
  }).queue([
974
  {
975
  title: '<p class="ig-feedback-title"><?php echo esc_js( $params['title'] ); ?></p>',
976
+ html: '<?php echo $html; ?>',
977
  customClass: {
978
  popup: 'animated fadeInUpBig'
979
  },
982
  },
983
 
984
  preConfirm: () => {
985
+ var $overlay = $('#ig-general-feedback-<?php echo $this->plugin; ?>');
986
  var $form = $overlay.find('form');
987
  var poll_options = $form.find("input[name='feedback_data[poll_options]']:checked").val();
988
  var message = $form.find("#ig-feedback-data-poll-additional-message").val();
1009
 
1010
  Swal.fire({
1011
  type: 'success',
1012
+ width: <?php echo $params['width']; ?>,
1013
  title: "Thank You!",
1014
  showConfirmButton: false,
1015
+ position: '<?php echo $params['position']; ?>',
1016
  timer: 1500,
1017
  animation: false
1018
  });
1023
 
1024
  });
1025
 
1026
+ </script>
1027
 
1028
 
1029
  <?php
1064
  $event = $this->event_prefix . 'plugin.deactivation';
1065
 
1066
  ?>
1067
+ <script type="text/javascript">
1068
  jQuery(function ($) {
1069
+ var $deactivateLink = $('#the-list').find('[data-slug="<?php echo $this->plugin; ?>"] span.deactivate a'),
1070
+ $overlay = $('#ig-deactivate-survey-<?php echo $this->plugin; ?>'),
1071
  $form = $overlay.find('form'),
1072
  formOpen = false,
1073
+ consent = $('#ig-deactivate-survey-help-consent-<?php echo $this->plugin; ?>');
1074
 
1075
  function togglePersonalInfoFields(show) {
1076
 
1146
  event.preventDefault();
1147
  loader(true);
1148
  if (!$form.find('input[type=radio]:checked').val()) {
1149
+ $form.find('.ig-deactivate-survey-footer').prepend('<span class="error"><?php echo esc_js( __( 'Please select an option', $this->plugin ) ); ?></span>');
1150
  return;
1151
  }
1152
 
1170
  };
1171
 
1172
  var data = {
1173
+ action: '<?php echo $this->ajax_action; ?>',
1174
  feedback: {
1175
  type: 'radio',
1176
+ title: '<?php echo $title; ?>',
1177
+ slug: '<?php echo $slug; ?>',
1178
  value: $form.find('.selected input[type=radio]').attr('data-option-slug'),
1179
  details: $form.find('.selected input[type=text]').val()
1180
  },
1181
 
1182
+ event: '<?php echo $event; ?>',
1183
 
1184
  // Add additional information
1185
  misc: {
1186
+ plugin: '<?php echo $this->plugin; ?>',
1187
+ plugin_abbr: '<?php echo $this->plugin_abbr; ?>',
1188
+ is_dev_mode: '<?php echo $this->is_dev_mode; ?>',
1189
  set_cookie: '',
1190
  meta_info: meta,
1191
  system_info: system_info
1192
  },
1193
+ security: '<?php echo esc_js( wp_create_nonce( $this->plugin_abbr . '-admin-ajax-nonce' ) ); ?>'
1194
  };
1195
 
1196
  var submitSurvey = $.post(ajaxurl, data);
1207
  }
1208
  });
1209
  });
1210
+ </script>
1211
  <?php
1212
  }
1213
 
1222
  return;
1223
  }
1224
  ?>
1225
+ <style type="text/css">
1226
+ .ig-deactivate-survey-modal {
1227
+ display: none;
1228
+ table-layout: fixed;
1229
+ position: fixed;
1230
+ z-index: 9999;
1231
+ width: 100%;
1232
+ height: 100%;
1233
+ text-align: center;
1234
+ font-size: 14px;
1235
+ top: 0;
1236
+ left: 0;
1237
+ background: rgba(0, 0, 0, 0.8);
1238
+ }
1239
+
1240
+ .ig-deactivate-survey-wrap {
1241
+ display: table-cell;
1242
+ vertical-align: middle;
1243
+ }
1244
+
1245
+ .ig-deactivate-survey {
1246
+ background-color: #fff;
1247
+ max-width: 550px;
1248
+ margin: 0 auto;
1249
+ padding: 30px;
1250
+ text-align: left;
1251
+ }
1252
+
1253
+ .ig-deactivate-survey .error {
1254
+ display: block;
1255
+ color: red;
1256
+ margin: 0 0 10px 0;
1257
+ }
1258
+
1259
+ .ig-deactivate-survey-title {
1260
+ display: block;
1261
+ font-size: 18px;
1262
+ font-weight: 700;
1263
+ text-transform: uppercase;
1264
+ border-bottom: 1px solid #ddd;
1265
+ padding: 0 0 18px 0;
1266
+ margin: 0 0 18px 0;
1267
+ }
1268
+
1269
+ .ig-deactivate-survey-options {
1270
+ border-bottom: 1px solid #ddd;
1271
+ padding: 0 0 18px 0;
1272
+ margin: 0 0 18px 0;
1273
+ }
1274
+
1275
+ .ig-deactivate-survey-info-data {
1276
+ padding: 0 0 18px 0;
1277
+ margin: 10px 10px 10px 30px;
1278
+ }
1279
+
1280
+ .ig-deactivate-survey-info-name, .ig-deactivate-survey-info-email-address {
1281
+ width: 230px;
1282
+ margin: 10px;
1283
+ }
1284
+
1285
+ .ig-deactivate-survey-title span {
1286
+ color: #999;
1287
+ margin-right: 10px;
1288
+ }
1289
+
1290
+ .ig-deactivate-survey-desc {
1291
+ display: block;
1292
+ font-weight: 600;
1293
+ margin: 0 0 18px 0;
1294
+ }
1295
+
1296
+ .ig-deactivate-survey-option {
1297
+ margin: 0 0 10px 0;
1298
+ }
1299
+
1300
+ .ig-deactivate-survey-option-input {
1301
+ margin-right: 10px !important;
1302
+ }
1303
+
1304
+ .ig-deactivate-survey-option-details {
1305
+ display: none;
1306
+ width: 90%;
1307
+ margin: 10px 0 0 30px;
1308
+ }
1309
+
1310
+ .ig-deactivate-survey-footer {
1311
+ margin-top: 18px;
1312
+ }
1313
+
1314
+ .ig-deactivate-survey-deactivate {
1315
+ float: right;
1316
+ font-size: 13px;
1317
+ color: #ccc;
1318
+ text-decoration: none;
1319
+ padding-top: 7px;
1320
+ }
1321
+
1322
+ .ig-deactivate-survey-loader {
1323
+ vertical-align: middle;
1324
+ padding: 10px;
1325
+ }
1326
+ </style>
1327
  <?php
1328
  }
1329
 
1342
 
1343
  $options = array(
1344
  1 => array(
1345
+ 'title' => esc_html__( 'I no longer need the plugin', $this->plugin ),
1346
  'slug' => 'i-no-longer-need-the-plugin'
1347
  ),
1348
  2 => array(
1349
+ 'title' => esc_html__( 'I\'m switching to a different plugin', $this->plugin ),
1350
  'slug' => 'i-am-switching-to-a-different-plugin',
1351
+ 'details' => esc_html__( 'Please share which plugin', $this->plugin ),
1352
  ),
1353
  3 => array(
1354
+ 'title' => esc_html__( 'I couldn\'t get the plugin to work', $this->plugin ),
1355
  'slug' => 'i-could-not-get-the-plugin-to-work'
1356
  ),
1357
  4 => array(
1358
+ 'title' => esc_html__( 'It\'s a temporary deactivation', $this->plugin ),
1359
  'slug' => 'it-is-a-temporary-deactivation'
1360
  ),
1361
  5 => array(
1362
+ 'title' => esc_html__( 'Other', $this->plugin ),
1363
  'slug' => 'other',
1364
+ 'details' => esc_html__( 'Please share the reason', $this->plugin ),
1365
  ),
1366
  );
1367
  ?>
1368
+ <div class="ig-deactivate-survey-modal" id="ig-deactivate-survey-<?php echo $this->plugin; ?>">
1369
+ <div class="ig-deactivate-survey-wrap">
1370
+ <form class="ig-deactivate-survey" method="post">
1371
+ <span class="ig-deactivate-survey-title"><span class="dashicons dashicons-testimonial"></span><?php echo ' ' . esc_html__( 'Quick Feedback', $this->plugin ); ?></span>
1372
+ <span class="ig-deactivate-survey-desc"><?php echo sprintf( esc_html__( 'If you have a moment, please share why you are deactivating %s:', $this->plugin ), $this->name ); ?></span>
1373
+ <div class="ig-deactivate-survey-options">
 
1374
  <?php foreach ( $options as $id => $option ) : ?>
1375
+ <div class="ig-deactivate-survey-option">
1376
+ <label for="ig-deactivate-survey-option-<?php echo $this->plugin; ?>-<?php echo $id; ?>" class="ig-deactivate-survey-option-label">
1377
+ <input id="ig-deactivate-survey-option-<?php echo $this->plugin; ?>-<?php echo $id; ?>" class="ig-deactivate-survey-option-input" type="radio" name="code" value="<?php echo $id; ?>" data-option-slug="<?php echo $option['slug']; ?>"/>
1378
+ <span class="ig-deactivate-survey-option-reason"><?php echo $option['title']; ?></span>
1379
+ </label>
1380
  <?php if ( ! empty( $option['details'] ) ) : ?>
1381
+ <input class="ig-deactivate-survey-option-details" type="text" placeholder="<?php echo $option['details']; ?>"/>
1382
  <?php endif; ?>
1383
+ </div>
1384
  <?php endforeach; ?>
1385
+ </div>
1386
+ <div class="ig-deactivate-survey-help-consent">
1387
+ <input id="ig-deactivate-survey-help-consent-<?php echo $this->plugin; ?>" class="ig-deactivate-survey-option-input" type="checkbox" name="code" data-option-slug="<?php echo $option['slug']; ?>"/><b>Yes, I give my consent to track plugin usage and contact me back to make this plugin works!</b>
1388
+ </div>
1389
+ <div class="ig-deactivate-survey-info-data">
1390
+
1391
+ <input type="text" class="ig-deactivate-survey-info-name" id="ig-deactivate-survey-info-name" placeholder="Enter Name" name="ig-deactivate-survey-info-name" value=""/>
1392
+ <input type="text" class="ig-deactivate-survey-info-email-address" id="ig-deactivate-survey-info-email-address" name="ig-deactivate-survey-info-email-address" value="<?php echo $email; ?>"/>
1393
+ </div>
1394
+ <div class="ig-deactivate-survey-footer">
1395
+ <button type="submit" class="ig-deactivate-survey-submit button button-primary button-large"><?php echo sprintf( esc_html__( 'Submit %s Deactivate', $this->plugin ), '&amp;' ); ?></button>
1396
+ <img class="ig-deactivate-survey-loader" id="ig-deactivate-survey-loader" src="<?php echo plugin_dir_url( __FILE__ ); ?>/assets/images/loading.gif"/>
1397
+ <a href="#" class="ig-deactivate-survey-deactivate"><?php echo sprintf( esc_html__( 'Skip %s Deactivate', $this->plugin ), '&amp;' ); ?></a>
1398
+ </div>
1399
+ </form>
1400
+ </div>
1401
+ </div>
 
 
1402
  <?php
1403
  }
1404
 
1643
  *
1644
  * Send feedback to server
1645
  */
1646
+ function submit_feedback() {
1647
 
1648
+ check_ajax_referer( $this->plugin_abbr . '-admin-ajax-nonce', 'security' );
1649
 
1650
+ $data = ! empty( $_POST ) ? $_POST : array();
1651
 
1652
  $data['site'] = esc_url( home_url() );
1653
 
1655
  $plugin_abbr = ! empty( $data['misc']['plugin_abbr'] ) ? $data['misc']['plugin_abbr'] : 'ig_feedback';
1656
  $is_dev_mode = ! empty( $data['misc']['is_dev_mode'] ) ? $data['misc']['is_dev_mode'] : false;
1657
  $set_transient = ! empty( $data['misc']['set_transient'] ) ? $data['misc']['set_transient'] : false;
1658
+ $system_info = ( isset( $data['misc']['system_info'] ) && $data['misc']['system_info'] === 'true' ) ? true : false;
1659
  $meta_info = ! empty( $data['misc']['meta_info'] ) ? $data['misc']['meta_info'] : array();
1660
 
1661
  unset( $data['misc'] );
lite/includes/feedback/class-ig-tracker.php CHANGED
@@ -4,21 +4,21 @@ if ( ! defined( 'ABSPATH' ) ) {
4
  exit; // Exit if accessed directly.
5
  }
6
 
7
- if ( ! class_exists( 'IG_Tracker_V_1_2_3' ) ) {
8
 
9
  /**
10
- * Class IG_Tracker_V_1_2_2
11
  *
12
  * Icegram tracker handler class is responsible for sending anonymous plugin
13
  * data to Icegram servers for users that actively allowed data tracking.
14
  *
15
- * @class IG_Tracker_V_1_2_3
16
  * @since 1.0.0
17
  *
18
  * @author Icegram
19
  * @package feedback
20
  */
21
- class IG_Tracker_V_1_2_3 {
22
 
23
  /**
24
  * Get Active, Inactive or all plugins info
4
  exit; // Exit if accessed directly.
5
  }
6
 
7
+ if ( ! class_exists( 'IG_Tracker_V_1_2_4' ) ) {
8
 
9
  /**
10
+ * Class IG_Tracker_V_1_2_4
11
  *
12
  * Icegram tracker handler class is responsible for sending anonymous plugin
13
  * data to Icegram servers for users that actively allowed data tracking.
14
  *
15
+ * @class IG_Tracker_V_1_2_4
16
  * @since 1.0.0
17
  *
18
  * @author Icegram
19
  * @package feedback
20
  */
21
+ class IG_Tracker_V_1_2_4 {
22
 
23
  /**
24
  * Get Active, Inactive or all plugins info
lite/includes/pro-features.php CHANGED
@@ -143,7 +143,7 @@ function render_user_permissions_settings_fields_premium() {
143
  function ig_es_add_settings_tabs( $es_settings_tabs ) {
144
 
145
  if ( ! ES()->is_premium() ) {
146
- $es_settings_tabs['user_roles'] = array( 'icon' => 'groups', 'name' => __( 'User Roles', 'email-subscribers' ) );
147
  }
148
 
149
  return $es_settings_tabs;
@@ -658,8 +658,8 @@ function ig_es_add_captcha_option( $form_data ) {
658
  <div class="ml-16 mb-4 mr-4 mt-12">
659
  <label for="captcha" class=" inline-flex items-center cursor-pointer">
660
  <span class="relative">
661
- <span class="relative es-mail-toggle-line block w-10 h-6 bg-gray-300 rounded-full shadow-inner"></span>
662
- <span class="es-mail-toggle-dot absolute transition-all duration-300 ease-in-out block w-4 h-4 mt-1 ml-1 bg-white rounded-full shadow inset-y-0 left-0 focus-within:shadow-outline "></span>
663
  </span>
664
  </label>
665
  </div>
143
  function ig_es_add_settings_tabs( $es_settings_tabs ) {
144
 
145
  if ( ! ES()->is_premium() ) {
146
+ $es_settings_tabs['user_roles'] = array( 'icon' => '<svg class="w-6 h-6 inline -mt-1.5" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z"></path></svg>', 'name' => __( 'User Roles', 'email-subscribers' ) );
147
  }
148
 
149
  return $es_settings_tabs;
658
  <div class="ml-16 mb-4 mr-4 mt-12">
659
  <label for="captcha" class=" inline-flex items-center cursor-pointer">
660
  <span class="relative">
661
+ <span class="es-mail-toggle-line"></span>
662
+ <span class="es-mail-toggle-dot"></span>
663
  </span>
664
  </label>
665
  </div>
lite/includes/services/class-es-email-delivery-check.php ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class ES_Email_Delivery_Check extends ES_Services {
4
+
5
+ /**
6
+ * @var string
7
+ *
8
+ * @sinc 4.6.0
9
+ */
10
+ public $cmd = '/email/delivery/:mailbox';
11
+
12
+ /**
13
+ * ES_Delivery_Check constructor.
14
+ *
15
+ * @since 4.6.0
16
+ */
17
+ public function __construct() {
18
+ parent::__construct();
19
+ }
20
+
21
+ /**
22
+ * Test Email Delivery
23
+ *
24
+ * @return mixed
25
+ *
26
+ * @since 4.6.0
27
+ */
28
+ public function test_email_delivery() {
29
+
30
+ $mailbox = ES_Common::get_test_email();
31
+
32
+ $this->cmd = str_replace( ':mailbox', $mailbox, $this->cmd );
33
+
34
+ $response = $this->send_request( array(), 'GET' );
35
+
36
+ $res = array();
37
+ if ( is_wp_error( $response ) ) {
38
+ $res['status'] = 'error';
39
+ } else {
40
+
41
+ if ( 'success' === $response['status'] && true == $response['meta']['emailDelivered'] ) {
42
+ $res['status'] = 'success';
43
+ } else {
44
+ $res['additional_message'] = __( ' The test email did not reach our test server. Did you get any test emails on your email? This could be a temporary problem, but it can also mean that emails are getting stuck on your server, or getting rejected by recipients.', 'email-subscribers' );
45
+ $res['status'] = 'error';
46
+ }
47
+
48
+ }
49
+
50
+ return $res;
51
+ }
52
+
53
+ }
lite/includes/services/class-es-send-test-email.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Class ES_Send_Test_Email
5
+ */
6
+ class ES_Send_Test_Email {
7
+ /**
8
+ * ES_Send_Test_Email constructor.
9
+ *
10
+ * @since 4.6.0
11
+ */
12
+ public function __construct() {
13
+
14
+ }
15
+
16
+ /**
17
+ * Send Test Email
18
+ *
19
+ * @since 4.6.0
20
+ */
21
+ public function send_test_email() {
22
+
23
+ $email = ES_Common::get_test_email();
24
+
25
+ $response = array( 'status' => 'ERROR' );
26
+
27
+ if ( ! empty( $email ) ) {
28
+ $subject = ES()->mailer->get_test_email_subject( $email );
29
+
30
+ $content = ES()->mailer->get_test_email_content();
31
+
32
+ $response = ES()->mailer->send_test_email( $email, $subject, $content );
33
+ }
34
+
35
+ return $response;
36
+ }
37
+ }
lite/includes/services/class-es-services.php ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class ES_Services {
4
+ /**
5
+ * @since 4.6.0
6
+ * @var string
7
+ *
8
+ */
9
+ public $api_url = "https://api.icegram.com";
10
+
11
+ /**
12
+ * @var string
13
+ *
14
+ * @sinc 4.6.0
15
+ */
16
+ public $cmd = '';
17
+
18
+ /**
19
+ * ES_Services constructor.
20
+ *
21
+ * @since 4.6.0
22
+ */
23
+ public function __construct() {
24
+
25
+ }
26
+
27
+ /**
28
+ * Send Request
29
+ *
30
+ * @param array $options
31
+ * @param string $method
32
+ *
33
+ * @since 4.6.0
34
+ */
35
+ public function send_request( $options = array(), $method = 'POST' ) {
36
+
37
+ $data = new WP_Error( '404', 'Unknown Error' );
38
+
39
+ if ( empty( $this->cmd ) ) {
40
+ return new WP_Error( '404', 'Command Not Found' );
41
+ }
42
+
43
+ $url = $this->api_url . $this->cmd;
44
+
45
+ if ( 'POST' === $method ) {
46
+ $response = wp_remote_post( $url, $options );
47
+ } else {
48
+ $response = wp_remote_get( $url, $options );
49
+ }
50
+
51
+ if ( ! is_wp_error( $response ) ) {
52
+
53
+ if ( 200 === wp_remote_retrieve_response_code( $response ) ) {
54
+
55
+ $response_data = $response['body'];
56
+
57
+ if ( 'error' != $response_data ) {
58
+ return json_decode( $response_data, true );
59
+ }
60
+ }
61
+
62
+ }
63
+
64
+ return $response;
65
+
66
+ }
67
+ }
lite/includes/upgrade/es-update-functions.php CHANGED
@@ -1219,3 +1219,48 @@ function ig_es_update_450_db_version() {
1219
  ES_Install::update_db_version( '4.5.0' );
1220
  }
1221
  /* --------------------- ES 4.5.0(End)--------------------------- */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1219
  ES_Install::update_db_version( '4.5.0' );
1220
  }
1221
  /* --------------------- ES 4.5.0(End)--------------------------- */
1222
+
1223
+ /* --------------------- ES 4.5.7(Start)--------------------------- */
1224
+ function ig_es_update_457_alter_list_table() {
1225
+ global $wpdb;
1226
+
1227
+ $cols = $wpdb->get_col( "SHOW COLUMNS FROM {$wpdb->prefix}ig_lists" );
1228
+
1229
+ if ( ! in_array( 'hash', $cols, true ) ) {
1230
+ $wpdb->query(
1231
+ "ALTER TABLE {$wpdb->prefix}ig_lists
1232
+ ADD COLUMN `hash` varchar(12) NULL AFTER `name`"
1233
+ );
1234
+ }
1235
+ }
1236
+
1237
+ /**
1238
+ * Add hash string in existing list items.
1239
+ *
1240
+ * @since 4.5.7
1241
+ */
1242
+ function ig_es_update_457_add_list_hash() {
1243
+ global $wpdb;
1244
+
1245
+ $lists = $wpdb->get_results( "SELECT * FROM {$wpdb->prefix}ig_lists", ARRAY_A );
1246
+
1247
+ if ( ! empty( $lists ) ) {
1248
+ foreach ( $lists as $list ) {
1249
+ $list_id = $list['id'];
1250
+ if ( ! empty( $list_id ) ) {
1251
+ $list_hash = ES_Common::generate_hash( 12 );
1252
+ $wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->prefix}ig_lists SET hash = %s WHERE id = %d AND ( hash = '' OR hash IS NULL )", array( $list_hash, $list_id ) ) );
1253
+ }
1254
+ }
1255
+ }
1256
+ }
1257
+
1258
+ /**
1259
+ * Update DB version
1260
+ *
1261
+ * @since 4.5.7
1262
+ */
1263
+ function ig_es_update_457_db_version() {
1264
+ ES_Install::update_db_version( '4.5.7' );
1265
+ }
1266
+ /* --------------------- ES 4.5.7(End)--------------------------- */
lite/includes/workflows/admin/class-es-workflow-admin-edit.php CHANGED
@@ -179,7 +179,7 @@ class ES_Workflow_Admin_Edit {
179
 
180
  $action = ig_es_get_request_data( 'action' );
181
  if ( 'new' === $action ) {
182
- $title = __( ' Add New Workflow', 'email-subscribers' );
183
  } else {
184
  $title = __( ' Edit Workflow', 'email-subscribers' );
185
  }
179
 
180
  $action = ig_es_get_request_data( 'action' );
181
  if ( 'new' === $action ) {
182
+ $title = __( ' Add a new Workflow', 'email-subscribers' );
183
  } else {
184
  $title = __( ' Edit Workflow', 'email-subscribers' );
185
  }
lite/includes/workflows/admin/views/meta-box-actions.php CHANGED
@@ -65,7 +65,7 @@ if ( ! defined( 'ABSPATH' ) ) {
65
  <p>
66
  <?php
67
  /* translators: 1: Starting strong tag 2: Closing strong tag */
68
- echo sprintf( esc_html__( 'No actions found. Click the %1$s+ Add Action%2$s to create an action.', 'email-subscribers' ), '<strong>', '</strong>' );
69
  ?>
70
  </p>
71
  </div>
@@ -74,5 +74,5 @@ if ( ! defined( 'ABSPATH' ) ) {
74
  </div>
75
 
76
  <div class="ig-es-metabox-footer">
77
- <button type="button" class="js-ig-es-add-action inline-flex justify-center rounded-md border border-transparent px-4 py-1.5 bg-white text-sm leading-5 font-medium text-white bg-indigo-600 hover:bg-indigo-500 focus:outline-none focus:shadow-outline-blue transition ease-in-out duration-150"><?php echo esc_html__( '+ Add Action', 'email-subscribers' ); ?></button>
78
  </div>
65
  <p>
66
  <?php
67
  /* translators: 1: Starting strong tag 2: Closing strong tag */
68
+ echo sprintf( esc_html__( 'No actions found. Click the %1$s+ Add action%2$s to create an action.', 'email-subscribers' ), '<strong>', '</strong>' );
69
  ?>
70
  </p>
71
  </div>
74
  </div>
75
 
76
  <div class="ig-es-metabox-footer">
77
+ <button type="button" class="js-ig-es-add-action inline-flex justify-center rounded-md border border-transparent px-4 py-1.5 bg-white text-sm leading-5 font-medium text-white bg-indigo-600 hover:bg-indigo-500 focus:outline-none focus:shadow-outline-blue transition ease-in-out duration-150"><?php echo esc_html__( '+ Add action', 'email-subscribers' ); ?></button>
78
  </div>
lite/includes/workflows/class-es-workflows-table.php CHANGED
@@ -171,8 +171,14 @@ class ES_Workflows_Table extends WP_List_Table {
171
  <form method="get">
172
  <input type="hidden" name="page" value="es_workflows" />
173
  <?php
174
- $this->prepare_items();
175
- $this->display();
 
 
 
 
 
 
176
  ?>
177
  </form>
178
  </div>
@@ -404,7 +410,7 @@ class ES_Workflows_Table extends WP_List_Table {
404
  $workflow_id = ig_es_get_request_data( 'id' );
405
 
406
  $this->db->delete_workflows( $workflow_id );
407
- $message = __( 'Workflow has been deleted successfully!', 'email-subscribers' );
408
  $status = 'success';
409
  }
410
 
@@ -421,11 +427,11 @@ class ES_Workflows_Table extends WP_List_Table {
421
  // Delete multiple Workflows.
422
  $this->db->delete_workflows( $ids );
423
 
424
- $message = __( 'Workflow(s) have been deleted successfully!', 'email-subscribers' );
425
  ES_Common::show_message( $message );
426
  } else {
427
 
428
- $message = __( 'Please check workflow(s) to delete.', 'email-subscribers' );
429
  ES_Common::show_message( $message, 'error' );
430
  }
431
  } elseif ( 'bulk_activate' === $action || 'bulk_deactivate' === $action ) {
@@ -442,7 +448,7 @@ class ES_Workflows_Table extends WP_List_Table {
442
  $workflow_action = 'bulk_activate' === $action ? __( 'activated', 'email-subscribers' ) : __( 'deactivated', 'email-subscribers' );
443
 
444
  /* translators: %s: Workflow action */
445
- $message = sprintf( __( 'Workflow(s) have been %s successfully!', 'email-subscribers' ), $workflow_action );
446
 
447
  ES_Common::show_message( $message );
448
  } else {
@@ -450,7 +456,7 @@ class ES_Workflows_Table extends WP_List_Table {
450
  $workflow_action = 'bulk_activate' === $action ? __( 'activate', 'email-subscribers' ) : __( 'deactivate', 'email-subscribers' );
451
 
452
  /* translators: %s: Workflow action */
453
- $message = sprintf( __( 'Please check workflow(s) to %s.', 'email-subscribers' ), $workflow_action );
454
 
455
  ES_Common::show_message( $message, 'error' );
456
  }
171
  <form method="get">
172
  <input type="hidden" name="page" value="es_workflows" />
173
  <?php
174
+ // Display search field and other available filter fields.
175
+ $this->prepare_items();
176
+ ?>
177
+ </form>
178
+ <form method="post">
179
+ <?php
180
+ // Display bulk action fields, pagination and list items.
181
+ $this->display();
182
  ?>
183
  </form>
184
  </div>
410
  $workflow_id = ig_es_get_request_data( 'id' );
411
 
412
  $this->db->delete_workflows( $workflow_id );
413
+ $message = __( 'Workflow deleted successfully!', 'email-subscribers' );
414
  $status = 'success';
415
  }
416
 
427
  // Delete multiple Workflows.
428
  $this->db->delete_workflows( $ids );
429
 
430
+ $message = __( 'Workflow(s) deleted successfully!', 'email-subscribers' );
431
  ES_Common::show_message( $message );
432
  } else {
433
 
434
+ $message = __( 'Please select workflow(s) to delete.', 'email-subscribers' );
435
  ES_Common::show_message( $message, 'error' );
436
  }
437
  } elseif ( 'bulk_activate' === $action || 'bulk_deactivate' === $action ) {
448
  $workflow_action = 'bulk_activate' === $action ? __( 'activated', 'email-subscribers' ) : __( 'deactivated', 'email-subscribers' );
449
 
450
  /* translators: %s: Workflow action */
451
+ $message = sprintf( __( 'Workflow(s) %s successfully!', 'email-subscribers' ), $workflow_action );
452
 
453
  ES_Common::show_message( $message );
454
  } else {
456
  $workflow_action = 'bulk_activate' === $action ? __( 'activate', 'email-subscribers' ) : __( 'deactivate', 'email-subscribers' );
457
 
458
  /* translators: %s: Workflow action */
459
+ $message = sprintf( __( 'Please select workflow(s) to %s.', 'email-subscribers' ), $workflow_action );
460
 
461
  ES_Common::show_message( $message, 'error' );
462
  }
lite/public/class-email-subscribers-public.php CHANGED
@@ -141,6 +141,7 @@ class Email_Subscribers_Public {
141
  $guid = ! empty( $data['guid'] ) ? $data['guid'] : '';
142
  $message_id = ! empty( $data['message_id'] ) ? (int) $data['message_id'] : 0;
143
  $campaign_id = ! empty( $data['campaign_id'] ) ? (int) $data['campaign_id'] : 0;
 
144
  } else {
145
  $db_id = ig_es_get_request_data( 'db' );
146
  $email = ig_es_get_request_data( 'email' );
@@ -170,7 +171,7 @@ class Email_Subscribers_Public {
170
  if ( 'optin' === $option ) {
171
  $message = get_option( 'ig_es_subscription_success_message' );
172
  ES()->contacts_db->edit_contact_global_status( $ids, $unsubscribed );
173
- ES()->lists_contacts_db->edit_subscriber_status( $ids, $status );
174
  //send welcome email
175
  $contact = ES()->contacts_db->get_contacts_email_name_map( array( $email ) );
176
  $data = array(
141
  $guid = ! empty( $data['guid'] ) ? $data['guid'] : '';
142
  $message_id = ! empty( $data['message_id'] ) ? (int) $data['message_id'] : 0;
143
  $campaign_id = ! empty( $data['campaign_id'] ) ? (int) $data['campaign_id'] : 0;
144
+ $list_ids = ! empty( $data['list_ids'] ) ? $data['list_ids'] : '';
145
  } else {
146
  $db_id = ig_es_get_request_data( 'db' );
147
  $email = ig_es_get_request_data( 'email' );
171
  if ( 'optin' === $option ) {
172
  $message = get_option( 'ig_es_subscription_success_message' );
173
  ES()->contacts_db->edit_contact_global_status( $ids, $unsubscribed );
174
+ ES()->lists_contacts_db->edit_subscriber_status( $ids, $status, $list_ids );
175
  //send welcome email
176
  $contact = ES()->contacts_db->get_contacts_email_name_map( array( $email ) );
177
  $data = array(
lite/public/partials/class-es-shortcode.php CHANGED
@@ -259,7 +259,7 @@ class ES_Shortcode {
259
  }
260
 
261
  public static function prepare_lists_checkboxes( $lists, $list_ids = array(), $columns = 3, $selected_lists = array(), $contact_id = 0, $name = 'lists[]' ) {
262
- $lists_html = '<div><p><b class="font-medium text-gray-500 pb-2">' . __( 'Select List(s)', 'email-subscribers' ) . '*</b></p><table class="ig-es-form-list-selection"><tr>';
263
  $i = 0;
264
 
265
  if ( ! empty( $contact_id ) ) {
259
  }
260
 
261
  public static function prepare_lists_checkboxes( $lists, $list_ids = array(), $columns = 3, $selected_lists = array(), $contact_id = 0, $name = 'lists[]' ) {
262
+ $lists_html = '<div><p><b class="font-medium text-gray-500 pb-2">' . __( 'Select list(s)', 'email-subscribers' ) . '*</b></p><table class="ig-es-form-list-selection"><tr>';
263
  $i = 0;
264
 
265
  if ( ! empty( $contact_id ) ) {
lite/public/partials/subscription-successfull.php CHANGED
@@ -12,9 +12,10 @@ if ( 'optin' === $es_page_request ) {
12
  } elseif ( 'unsubscribe' === $es_page_request ) {
13
  $main_message = __('Unsubscription confirmed !', 'email-subscribers');
14
  }
15
- $site_name = get_option( 'blogname' );
16
- $noerror = true;
17
- $home_url = home_url( '/' );
 
18
  ?>
19
  <html>
20
  <head>
@@ -39,6 +40,7 @@ if ( 'optin' === $es_page_request ) {
39
  </div>
40
  </section>
41
 
 
42
  <section class="bg-white mt-8 py-8 shadow-md sm:rounded-lg mx-auto sm:w-2/3 xl:w-7/12">
43
  <div class="flex">
44
  <div class="sm:w-1/3 xl:w-1/4 pl-6 leading-6">
@@ -63,6 +65,7 @@ if ( 'optin' === $es_page_request ) {
63
  </div>
64
  </div>
65
  </section>
 
66
  </body>
67
  </html>
68
  <?php
12
  } elseif ( 'unsubscribe' === $es_page_request ) {
13
  $main_message = __('Unsubscription confirmed !', 'email-subscribers');
14
  }
15
+ $site_name = get_option( 'blogname' );
16
+ $ig_es_powered_by = ! empty( get_option( 'ig_es_powered_by' ) ) ? get_option( 'ig_es_powered_by' ) : 'yes' ;
17
+ $noerror = true;
18
+ $home_url = home_url( '/' );
19
  ?>
20
  <html>
21
  <head>
40
  </div>
41
  </section>
42
 
43
+ <?php if ( 'yes' === $ig_es_powered_by ) { ?>
44
  <section class="bg-white mt-8 py-8 shadow-md sm:rounded-lg mx-auto sm:w-2/3 xl:w-7/12">
45
  <div class="flex">
46
  <div class="sm:w-1/3 xl:w-1/4 pl-6 leading-6">
65
  </div>
66
  </div>
67
  </section>
68
+ <?php } ?>
69
  </body>
70
  </html>
71
  <?php
readme.txt CHANGED
@@ -6,7 +6,7 @@ Tags: email marketing, subscription, autoresponder, post notification, welcome e
6
  Requires at least: 3.9
7
  Tested up to: 5.5.1
8
  Requires PHP: 5.6
9
- Stable tag: 4.5.6
10
  License: GPLv3
11
  License URI: http://www.gnu.org/licenses
12
 
@@ -304,6 +304,17 @@ Refer [here](https://www.icegram.com/documentation/es-faq/).
304
 
305
  == Changelog ==
306
 
 
 
 
 
 
 
 
 
 
 
 
307
  **4.5.6 (09.09.2020)**
308
 
309
  * Update: Improved UI
6
  Requires at least: 3.9
7
  Tested up to: 5.5.1
8
  Requires PHP: 5.6
9
+ Stable tag: 4.6.0
10
  License: GPLv3
11
  License URI: http://www.gnu.org/licenses
12
 
304
 
305
  == Changelog ==
306
 
307
+ **4.6.0 (25.09.2020)**
308
+
309
+ * New: Added unconfirmed contacts KPI on audience page
310
+ * New: Integrate email delivery check system
311
+ * Update: Improved onboarding
312
+ * Update: User subscription on selected lists only in double opt-in (instead of all list)
313
+ * Update: Added option to remove "Powered By Icegram" link
314
+ * Fix: Deactivation feedback popup issue
315
+ * Fix: Migration issue from email subscribers 3.1.3
316
+ * Fix: Bulk actions issue for large number of list items
317
+
318
  **4.5.6 (09.09.2020)**
319
 
320
  * Update: Improved UI