Email Subscribers & Newsletters - Version 4.4.4

Version Description

Download this release

Release Info

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

Code changes from version 4.4.3 to 4.4.4

Files changed (77) hide show
  1. email-subscribers.php +2 -2
  2. lite/admin/class-email-subscribers-admin.php +38 -2
  3. lite/admin/css/email-subscribers-admin.css +144 -139
  4. lite/admin/dist/images/bfcm-2019.png +0 -0
  5. lite/admin/dist/images/bfcm-last-2019.png +0 -0
  6. lite/admin/dist/images/cf7-sync.png +0 -0
  7. lite/admin/dist/images/edd-sync.png +0 -0
  8. lite/admin/dist/images/email-marketing-mastery.png +0 -0
  9. lite/admin/dist/images/email-subscribers-pricing.png +0 -0
  10. lite/admin/dist/images/envelope.png +0 -0
  11. lite/admin/dist/images/es-captcha-2.png +0 -0
  12. lite/admin/dist/images/es-comments.png +0 -0
  13. lite/admin/dist/images/es-ig-integration.png +0 -0
  14. lite/admin/dist/images/es-logo-128x128.png +0 -0
  15. lite/admin/dist/images/es-logo-64x64.png +0 -0
  16. lite/admin/dist/images/es-smtp-label.png +0 -0
  17. lite/admin/dist/images/es-smtp.png +0 -0
  18. lite/admin/dist/images/give-sync.png +0 -0
  19. lite/admin/dist/images/icegram-engage-more-subscribers-and-visitors.png +0 -0
  20. lite/admin/dist/images/icegram-engage-optimize-results.png +0 -0
  21. lite/admin/dist/images/icegram-engage-visitors-person-flow.png +0 -0
  22. lite/admin/dist/images/icon-64.png +0 -0
  23. lite/admin/dist/images/ninja-forms-sync.png +0 -0
  24. lite/admin/dist/images/optin_form_1.png +0 -0
  25. lite/admin/dist/images/optin_form_2.png +0 -0
  26. lite/admin/dist/images/pepipost.png +0 -0
  27. lite/admin/dist/images/phpmail.png +0 -0
  28. lite/admin/dist/images/starter-tmpl.png +0 -0
  29. lite/admin/dist/images/woocommerce-sync.png +0 -0
  30. lite/admin/dist/images/wpforms-sync.png +0 -0
  31. lite/admin/dist/images/wpmail.png +0 -0
  32. lite/admin/dist/main.css +1 -1
  33. lite/admin/images/bfcm-2019.png +0 -0
  34. lite/admin/images/bfcm-last-2019.png +0 -0
  35. lite/admin/images/cf7-sync.png +0 -0
  36. lite/admin/images/covid-19.png +0 -0
  37. lite/admin/images/envelope.png +0 -0
  38. lite/admin/images/es-captcha-2.png +0 -0
  39. lite/admin/images/es-comments.png +0 -0
  40. lite/admin/images/es-logo-128x128.png +0 -0
  41. lite/admin/images/es-logo-64x64.png +0 -0
  42. lite/admin/{dist/images → images}/es-rm-integration.png +0 -0
  43. lite/admin/images/es-smtp-label.png +0 -0
  44. lite/admin/images/es-smtp.png +0 -0
  45. lite/admin/images/icegram-engage-more-subscribers-and-visitors.png +0 -0
  46. lite/admin/images/icon-64.png +0 -0
  47. lite/admin/images/optin_form_2.png +0 -0
  48. lite/admin/images/pepipost.png +0 -0
  49. lite/admin/images/phpmail.png +0 -0
  50. lite/admin/{dist/images → images}/pricing.png +0 -0
  51. lite/admin/images/starter-tmpl.png +0 -0
  52. lite/admin/images/woocommerce-sync.png +0 -0
  53. lite/admin/images/wpmail.png +0 -0
  54. lite/admin/js/email-subscribers-admin.js +75 -29
  55. lite/admin/js/ig-es-workflows.js +2 -1
  56. lite/admin/partials/dashboard.php +27 -27
  57. lite/admin/partials/help.php +31 -31
  58. lite/includes/class-email-subscribers.php +44 -43
  59. lite/includes/classes/class-es-admin-settings.php +102 -84
  60. lite/includes/classes/class-es-campaigns-table.php +59 -6
  61. lite/includes/classes/class-es-contact-background-process.php +1097 -0
  62. lite/includes/classes/class-es-contacts-table.php +10 -7
  63. lite/includes/classes/class-es-export-subscribers.php +184 -43
  64. lite/includes/classes/class-es-forms-table.php +5 -4
  65. lite/includes/classes/class-es-import-subscribers.php +121 -204
  66. lite/includes/classes/class-es-lists-table.php +21 -16
  67. lite/includes/classes/class-es-post-notifications.php +95 -94
  68. lite/includes/classes/class-es-reports-table.php +1 -1
  69. lite/includes/db/class-es-db-campaigns.php +36 -0
  70. lite/includes/db/class-es-db-lists-contacts.php +2 -2
  71. lite/includes/notices/class-es-admin-notices.php +9 -0
  72. lite/includes/notices/views/ig-es-offer.php +15 -19
  73. lite/includes/workflows/abstracts/class-es-workflow-trigger.php +1 -11
  74. lite/includes/workflows/class-es-workflows-table.php +19 -15
  75. lite/includes/workflows/db/class-es-db-workflows.php +0 -2
  76. lite/public/partials/class-es-shortcode.php +2 -2
  77. readme.txt +26 -16
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.4.3
7
  * Author: Icegram
8
  * Author URI: https://www.icegram.com/
9
  * Requires at least: 3.9
@@ -156,7 +156,7 @@ if ( $is_premium ) {
156
  /* ***************************** Initial Compatibility Work (End) ******************* */
157
 
158
  if ( ! defined( 'ES_PLUGIN_VERSION' ) ) {
159
- define( 'ES_PLUGIN_VERSION', '4.4.3' );
160
  }
161
 
162
  // 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.4.4
7
  * Author: Icegram
8
  * Author URI: https://www.icegram.com/
9
  * Requires at least: 3.9
156
  /* ***************************** Initial Compatibility Work (End) ******************* */
157
 
158
  if ( ! defined( 'ES_PLUGIN_VERSION' ) ) {
159
+ define( 'ES_PLUGIN_VERSION', '4.4.4' );
160
  }
161
 
162
  // Plugin Folder Path.
lite/admin/class-email-subscribers-admin.php CHANGED
@@ -69,6 +69,9 @@ class Email_Subscribers_Admin {
69
  add_action( 'admin_footer', array( $this, 'remove_submenu' ) );
70
  add_action( 'wp_ajax_send_test_email', array( $this, 'send_test_email' ) );
71
  add_action( 'admin_init', array( $this, 'es_save_onboarding_skip' ) );
 
 
 
72
  }
73
 
74
  /**
@@ -99,7 +102,7 @@ class Email_Subscribers_Admin {
99
  $get_page = ig_es_get_request_data( 'page' );
100
 
101
  if ( ! empty( $get_page ) && 'es_settings' === $get_page ) {
102
- wp_enqueue_style( 'email-jquery-ui', plugin_dir_url( __FILE__ ) . 'css/jquery-ui.css', array(), $this->version, 'all' );
103
  }
104
 
105
 
@@ -107,7 +110,7 @@ class Email_Subscribers_Admin {
107
  wp_enqueue_style( $this->email_subscribers . '-timepicker' );
108
 
109
 
110
- $allowed_pages = array( 'es_campaigns', 'es_reports', 'es_lists', 'es_forms', 'es_dashboard', 'es_workflows', 'es_settings', 'go_to_icegram', 'es_subscribers', 'es_general_information' , 'es_notifications' );
111
  //if ( ! empty( $get_page ) && ( in_array( $get_page, $allowed_pages , true ) ) ) {
112
  wp_enqueue_style( 'ig-es-style', plugin_dir_url( __FILE__ ) . 'dist/main.css', array(), $this->version, 'all' );
113
  //}
@@ -128,6 +131,13 @@ class Email_Subscribers_Admin {
128
 
129
  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 );
130
 
 
 
 
 
 
 
 
131
  wp_enqueue_script( 'custom', plugin_dir_url( __FILE__ ) . 'js/es-onboarding.js', array( 'jquery' ), $this->version, false );
132
 
133
  $page_prefix = 'email-subscribers_page_';
@@ -639,6 +649,7 @@ class Email_Subscribers_Admin {
639
  'custom_admin_notice',
640
  'output_custom_notices',
641
  'ig_es_fail_php_version_notice',
 
642
  );
643
 
644
  // User admin notices
@@ -707,4 +718,29 @@ class Email_Subscribers_Admin {
707
  }
708
  }
709
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
710
  }
69
  add_action( 'admin_footer', array( $this, 'remove_submenu' ) );
70
  add_action( 'wp_ajax_send_test_email', array( $this, 'send_test_email' ) );
71
  add_action( 'admin_init', array( $this, 'es_save_onboarding_skip' ) );
72
+
73
+ // Ajax handler for campaign status toggle.
74
+ add_action( 'wp_ajax_ig_es_toggle_campaign_status', array( $this, 'toggle_campaign_status' ) );
75
  }
76
 
77
  /**
102
  $get_page = ig_es_get_request_data( 'page' );
103
 
104
  if ( ! empty( $get_page ) && 'es_settings' === $get_page ) {
105
+ //wp_enqueue_style( 'email-jquery-ui', plugin_dir_url( __FILE__ ) . 'css/jquery-ui.css', array(), $this->version, 'all' );
106
  }
107
 
108
 
110
  wp_enqueue_style( $this->email_subscribers . '-timepicker' );
111
 
112
 
113
+ $allowed_pages = array( 'es_campaigns', 'es_reports', 'es_lists', 'es_forms', 'es_dashboard', 'es_workflows', 'es_settings', 'go_to_icegram', 'es_subscribers', 'es_general_information' , 'es_notifications' , 'es_settings' );
114
  //if ( ! empty( $get_page ) && ( in_array( $get_page, $allowed_pages , true ) ) ) {
115
  wp_enqueue_style( 'ig-es-style', plugin_dir_url( __FILE__ ) . 'dist/main.css', array(), $this->version, 'all' );
116
  //}
131
 
132
  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 );
133
 
134
+ $ig_es_js_data = array(
135
+ 'ajax_error_message' => __( 'An error has occured. Please try again later.', 'email-subscribers' ),
136
+ 'security' => wp_create_nonce( 'ig-es-admin-ajax-nonce' ),
137
+ );
138
+
139
+ wp_localize_script( $this->email_subscribers, 'ig_es_js_data', $ig_es_js_data );
140
+
141
  wp_enqueue_script( 'custom', plugin_dir_url( __FILE__ ) . 'js/es-onboarding.js', array( 'jquery' ), $this->version, false );
142
 
143
  $page_prefix = 'email-subscribers_page_';
649
  'custom_admin_notice',
650
  'output_custom_notices',
651
  'ig_es_fail_php_version_notice',
652
+ 'contact_background_notice'
653
  );
654
 
655
  // User admin notices
718
  }
719
  }
720
 
721
+ /**
722
+ * Method to handle campaign status change
723
+ *
724
+ * @return string JSON response of the request
725
+ *
726
+ * @since 4.4.4
727
+ */
728
+ public function toggle_campaign_status() {
729
+
730
+ check_ajax_referer( 'ig-es-admin-ajax-nonce', 'security' );
731
+
732
+ $campaign_id = ig_es_get_request_data( 'campaign_id' );
733
+ $new_campaign_status = ig_es_get_request_data( 'new_campaign_status' );
734
+
735
+ if( ! empty( $campaign_id ) ) {
736
+
737
+ $status_updated = ES()->campaigns_db->update_status( $campaign_id, $new_campaign_status );
738
+
739
+ if ( $status_updated ) {
740
+ wp_send_json_success();
741
+ } else {
742
+ wp_send_json_error();
743
+ }
744
+ }
745
+ }
746
  }
lite/admin/css/email-subscribers-admin.css CHANGED
@@ -1,3 +1,8 @@
 
 
 
 
 
1
  #email_tabs_form div#es-settings-tabs {
2
  margin-top: 20px;
3
  padding: 0;
@@ -172,10 +177,10 @@
172
  line-height: 22px;
173
  }
174
 
175
- .email-subscribers_page_es_settings input[type=text], .email-subscribers_page_es_settings input[type=password], .email-subscribers_page_es_settings input[type=email], .email-subscribers_page_es_settings textarea, #list_description, .email-subscribers_page_es_settings select {
176
  width: 70%;
177
  }
178
-
179
  .tablenav-pages span.paging-input {
180
  width: auto;
181
  display: inline-block;
@@ -294,153 +299,153 @@ div#post-body-content .meta-box-sortables .row-blog p.submit input#submit {
294
  color: #fff;
295
  text-decoration: none;
296
  text-shadow: 0 -1px 1px #0085ba, 1px 0 1px #0085ba, 0 1px 1px #0085ba, -1px 0 1px #0085ba;
297
- }
298
 
299
- p.search-box.box-ma10 {
300
- margin: 0 5px;
301
- }
302
 
303
- .esbgheader {
304
- background-image: url('../images/bg3.png');
305
- /*background: #008cdd;*/
306
- padding: 50px;
307
- background-repeat: no-repeat;
308
- background-size: cover;
309
- background-position: center center;
310
- }
311
 
312
- .esbgheader h1 {
313
- color: #fff !important;
314
- font-weight: bold;
315
- }
316
 
317
- .headerpart {
318
- margin: 10px 20px 0 2px;
319
- }
320
 
321
- .select2-container {
322
- margin: 0 2px 0 2px;
323
- }
324
 
325
- .tablenav.top #doaction, #doaction2, #post-query-submit {
326
- margin: 0px 4px 0 4px;
327
- }
328
 
329
- .leftside, .rightside {
330
- float: left;
331
- width: 10%;
332
- margin: 20px 0;
333
- }
334
 
335
- .leftside p.submit, .rightside p.submit {
336
- padding: 0 !important;
337
- margin: 0 !important;
338
- }
339
 
340
- /* Admin Settings */
341
 
342
- .email-subscribers_page_es_settings #wpwrap {
343
  background-color: white;
344
- }
345
 
346
- .form-table .helper {
347
- font-style: italic;
348
- font-weight: 100;
349
- font-size: 12px;
350
- color: #9398a7;
351
- }
352
 
353
- .form-table .es_sub_headline {
354
- margin-bottom: 0.5em;
355
- font-size: 12px;
356
- }
357
 
358
- #menu-tab-listing .ig-menu-tab.ui-tabs-active.ui-state-active.ui-tabs-active {
359
- background-color: white;
360
- }
361
 
362
- #menu-tab-listing .ui-state-default {
363
- background: #f3f6ff;
364
- }
365
 
366
- .es-settings-submit-btn {
367
- float: left;
368
- }
369
 
370
- .es-cta {
371
- font-size: 1.2em;
372
- font-weight: bold;
373
- }
374
 
375
- .wrap .page-title-action.es-imp-button:hover {
376
- color: #FFFFFF;
377
- background-color: #03a025;
378
- }
379
 
380
- .page-title-action.es-imp-button {
381
- background-color: #03a025;
382
- color: #FFFFFF;
383
- }
384
 
385
- .wrap .page-title-action.es-main-button:hover {
386
- color: #FFFFFF;
387
- background-color: #5850ec;
388
- }
389
 
390
- .page-title-action.es-main-button {
391
- background-color: #5850ec;
392
- color: #FFFFFF;
393
- }
394
 
395
- .es-contact-form {
396
- width: 70%;
397
- }
398
 
399
- .es-contact-form .form-table td {
400
- line-height: 1.3em;
401
- }
402
- .es-note-child-category td{
403
- padding-left: 2em;
404
- }
405
 
406
- /**** Dashboard : start ***/
407
- .toplevel_page_es_dashboard .about-header{
408
- margin-top: 2em;
409
- }
410
- .wrap.about-wrap {
411
- background-color: transparent;
412
- position: relative;
413
- margin: 25px 40px 0 20px;
414
- box-shadow: none;
415
- -webkit-box-shadow: none;
416
- }
417
 
418
- .about-wrap.es {
419
- max-width: 100%
420
- }
421
 
422
- .about-header .wrap .button-hero, .button-main {
423
- color: #FFFFFF !important;
424
- border-color: #03a025 !important;
425
- background: #03a025 !important;
426
- box-shadow: 0 1px 0 #03a025;
427
- font-weight: bold;
428
- height: 3em;
429
- line-height: 1em;
430
- }
431
 
432
- .about-header .wrap .button-hero:hover, .button-main {
433
- color: #FFF !important;
434
- background: #0AAB2E !important;
435
- border-color: #0AAB2E !important;
436
- }
437
 
438
- .about-header {
439
- background-color: #FFF;
440
- padding: 2em 1.5em;
441
- -webkit-box-shadow: 0 0 7px 0 rgba(0, 0, 0, .2);
442
- box-shadow: 0 0 7px 0 rgba(0, 0, 0, .2);
443
- }
444
 
445
  /*.form-table th {
446
  width: 350px !important;
@@ -969,14 +974,14 @@ div#post-body-content .meta-box-sortables .row-blog p.submit input#submit {
969
  /*text-decoration: underline;*/
970
  }
971
  a.button-send,.es-error-actions .es-dashboard-btn{
972
- text-decoration: none !important;
973
- color: #387bff;
974
- /* font-size: 1.1em; */
975
- font-weight: 500;
976
- padding: 0.50em 0.55em;
977
- border-radius: 3px;
978
- transition: background-color 0.5s;
979
- cursor: pointer;
980
  }
981
  a.button-send:hover,.es-error-actions .es-dashboard-btn:hover{
982
  background-color: #387bff !important;
@@ -1006,7 +1011,7 @@ a.button-send:hover,.es-error-actions .es-dashboard-btn:hover{
1006
  line-height:1.3em;
1007
  }
1008
  .sp .es-ltr {
1009
- padding: 1em;
1010
  }
1011
  .sp .button-hero{
1012
  color: #FFFFFF !important;
@@ -1239,15 +1244,15 @@ div.es .last {
1239
  border-color: #FF982D;
1240
  }
1241
  .es-logo-wrapper{
1242
- min-width: 120px;
1243
- min-height: 70px;
1244
- display: flex;
1245
- justify-content: center;
1246
- border: 1px solid #eaeaea;
1247
- align-items: center;
1248
- margin-bottom: 0.5em;
1249
- margin-top: 1em;
1250
- border-radius: 4px;
1251
  }
1252
 
1253
  .ig_es_docblock{
1
+ #menu-content-change:focus{
2
+ box-shadow: none;
3
+ color: #FFFFFF;
4
+ }
5
+
6
  #email_tabs_form div#es-settings-tabs {
7
  margin-top: 20px;
8
  padding: 0;
177
  line-height: 22px;
178
  }
179
 
180
+ /*.email-subscribers_page_es_settings input[type=text], .email-subscribers_page_es_settings input[type=password], .email-subscribers_page_es_settings input[type=email], .email-subscribers_page_es_settings textarea, #list_description, .email-subscribers_page_es_settings select {
181
  width: 70%;
182
  }
183
+ */
184
  .tablenav-pages span.paging-input {
185
  width: auto;
186
  display: inline-block;
299
  color: #fff;
300
  text-decoration: none;
301
  text-shadow: 0 -1px 1px #0085ba, 1px 0 1px #0085ba, 0 1px 1px #0085ba, -1px 0 1px #0085ba;
302
+ }
303
 
304
+ p.search-box.box-ma10 {
305
+ margin: 0 5px;
306
+ }
307
 
308
+ .esbgheader {
309
+ background-image: url('../images/bg3.png');
310
+ /*background: #008cdd;*/
311
+ padding: 50px;
312
+ background-repeat: no-repeat;
313
+ background-size: cover;
314
+ background-position: center center;
315
+ }
316
 
317
+ .esbgheader h1 {
318
+ color: #fff !important;
319
+ font-weight: bold;
320
+ }
321
 
322
+ .headerpart {
323
+ margin: 10px 20px 0 2px;
324
+ }
325
 
326
+ .select2-container {
327
+ margin: 0 2px 0 2px;
328
+ }
329
 
330
+ .tablenav.top #doaction, #doaction2, #post-query-submit {
331
+ margin: 0px 4px 0 4px;
332
+ }
333
 
334
+ .leftside, .rightside {
335
+ float: left;
336
+ width: 10%;
337
+ margin: 20px 0;
338
+ }
339
 
340
+ .leftside p.submit, .rightside p.submit {
341
+ padding: 0 !important;
342
+ margin: 0 !important;
343
+ }
344
 
345
+ /* Admin Settings */
346
 
347
+ /*.email-subscribers_page_es_settings #wpwrap {
348
  background-color: white;
349
+ }*/
350
 
351
+ .form-table .helper {
352
+ font-style: italic;
353
+ font-weight: 100;
354
+ font-size: 12px;
355
+ color: #9398a7;
356
+ }
357
 
358
+ .form-table .es_sub_headline {
359
+ margin-bottom: 0.5em;
360
+ font-size: 12px;
361
+ }
362
 
363
+ #menu-tab-listing .ig-menu-tab.ui-tabs-active.ui-state-active.ui-tabs-active {
364
+ background-color: white;
365
+ }
366
 
367
+ #menu-tab-listing .ui-state-default {
368
+ background: #f3f6ff;
369
+ }
370
 
371
+ .es-settings-submit-btn {
372
+ float: left;
373
+ }
374
 
375
+ .es-cta {
376
+ font-size: 1.2em;
377
+ font-weight: bold;
378
+ }
379
 
380
+ .wrap .page-title-action.es-imp-button:hover {
381
+ color: #FFFFFF;
382
+ background-color: #03a025;
383
+ }
384
 
385
+ .page-title-action.es-imp-button {
386
+ background-color: #03a025;
387
+ color: #FFFFFF;
388
+ }
389
 
390
+ .wrap .page-title-action.es-main-button:hover {
391
+ color: #FFFFFF;
392
+ background-color: #5850ec;
393
+ }
394
 
395
+ .page-title-action.es-main-button {
396
+ background-color: #5850ec;
397
+ color: #FFFFFF;
398
+ }
399
 
400
+ .es-contact-form {
401
+ width: 70%;
402
+ }
403
 
404
+ .es-contact-form .form-table td {
405
+ line-height: 1.3em;
406
+ }
407
+ .es-note-child-category td{
408
+ padding-left: 2em;
409
+ }
410
 
411
+ /**** Dashboard : start ***/
412
+ .toplevel_page_es_dashboard .about-header{
413
+ margin-top: 2em;
414
+ }
415
+ .wrap.about-wrap {
416
+ background-color: transparent;
417
+ position: relative;
418
+ margin: 25px 40px 0 20px;
419
+ box-shadow: none;
420
+ -webkit-box-shadow: none;
421
+ }
422
 
423
+ .about-wrap.es {
424
+ max-width: 100%
425
+ }
426
 
427
+ .about-header .wrap .button-hero, .button-main {
428
+ color: #FFFFFF !important;
429
+ border-color: #03a025 !important;
430
+ background: #03a025 !important;
431
+ box-shadow: 0 1px 0 #03a025;
432
+ font-weight: bold;
433
+ height: 3em;
434
+ line-height: 1em;
435
+ }
436
 
437
+ .about-header .wrap .button-hero:hover, .button-main {
438
+ color: #FFF !important;
439
+ background: #0AAB2E !important;
440
+ border-color: #0AAB2E !important;
441
+ }
442
 
443
+ .about-header {
444
+ background-color: #FFF;
445
+ padding: 2em 1.5em;
446
+ -webkit-box-shadow: 0 0 7px 0 rgba(0, 0, 0, .2);
447
+ box-shadow: 0 0 7px 0 rgba(0, 0, 0, .2);
448
+ }
449
 
450
  /*.form-table th {
451
  width: 350px !important;
974
  /*text-decoration: underline;*/
975
  }
976
  a.button-send,.es-error-actions .es-dashboard-btn{
977
+ text-decoration: none !important;
978
+ color: #387bff;
979
+ /* font-size: 1.1em; */
980
+ font-weight: 500;
981
+ padding: 0.50em 0.55em;
982
+ border-radius: 3px;
983
+ transition: background-color 0.5s;
984
+ cursor: pointer;
985
  }
986
  a.button-send:hover,.es-error-actions .es-dashboard-btn:hover{
987
  background-color: #387bff !important;
1011
  line-height:1.3em;
1012
  }
1013
  .sp .es-ltr {
1014
+ padding: 1em;
1015
  }
1016
  .sp .button-hero{
1017
  color: #FFFFFF !important;
1244
  border-color: #FF982D;
1245
  }
1246
  .es-logo-wrapper{
1247
+ min-width: 120px;
1248
+ min-height: 50px;
1249
+ display: flex;
1250
+ justify-content: center;
1251
+ border: 1px solid #eaeaea;
1252
+ align-items: center;
1253
+ margin-bottom: 0.5em;
1254
+ margin-top: 1em;
1255
+ border-radius: 4px;
1256
  }
1257
 
1258
  .ig_es_docblock{
lite/admin/dist/images/bfcm-2019.png DELETED
Binary file
lite/admin/dist/images/bfcm-last-2019.png DELETED
Binary file
lite/admin/dist/images/cf7-sync.png DELETED
Binary file
lite/admin/dist/images/edd-sync.png DELETED
Binary file
lite/admin/dist/images/email-marketing-mastery.png DELETED
Binary file
lite/admin/dist/images/email-subscribers-pricing.png DELETED
Binary file
lite/admin/dist/images/envelope.png DELETED
Binary file
lite/admin/dist/images/es-captcha-2.png DELETED
Binary file
lite/admin/dist/images/es-comments.png DELETED
Binary file
lite/admin/dist/images/es-ig-integration.png DELETED
Binary file
lite/admin/dist/images/es-logo-128x128.png DELETED
Binary file
lite/admin/dist/images/es-logo-64x64.png DELETED
Binary file
lite/admin/dist/images/es-smtp-label.png DELETED
Binary file
lite/admin/dist/images/es-smtp.png DELETED
Binary file
lite/admin/dist/images/give-sync.png DELETED
Binary file
lite/admin/dist/images/icegram-engage-more-subscribers-and-visitors.png DELETED
Binary file
lite/admin/dist/images/icegram-engage-optimize-results.png DELETED
Binary file
lite/admin/dist/images/icegram-engage-visitors-person-flow.png DELETED
Binary file
lite/admin/dist/images/icon-64.png DELETED
Binary file
lite/admin/dist/images/ninja-forms-sync.png DELETED
Binary file
lite/admin/dist/images/optin_form_1.png DELETED
Binary file
lite/admin/dist/images/optin_form_2.png DELETED
Binary file
lite/admin/dist/images/pepipost.png DELETED
Binary file
lite/admin/dist/images/phpmail.png DELETED
Binary file
lite/admin/dist/images/starter-tmpl.png DELETED
Binary file
lite/admin/dist/images/woocommerce-sync.png DELETED
Binary file
lite/admin/dist/images/wpforms-sync.png DELETED
Binary file
lite/admin/dist/images/wpmail.png DELETED
Binary file
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{color:#1c64f2}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{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;padding:.5rem 1rem;background-color:#fff;font-size:.875rem;line-height:1.25rem;font-weight:500;color:#fff;background-color:#5850ec;-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{font-size:.875rem;border-radius:.375rem;border-width:1px;border-color:#5850ec;line-height:1.25rem;font-weight:500}.wp-heading-inline+.page-title-action{color:#1c64f2;padding:.5rem;margin-left:.5rem;margin-right:.5rem}.ig-es-title-button:hover,.wp-heading-inline+.page-title-action:hover{border-color:#6875f5;background-color:#f4f5f7}.ig-es-primary-button:hover{background-color:#6875f5;color:#fff}.ig-es-primary-button:focus,.ig-es-title-button:focus,.wp-heading-inline+.page-title-action: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;font-size:.875rem!important;line-height:1.25rem!important;font-weight:500!important;color:#fff!important;background-color:#0e9f6e!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:hover{background-color:#31c48d!important;color:#fff!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;font-size:.875rem;line-height:1.25rem;font-weight:500;color:#fff;background-color:#ff5a1f;-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:hover{background-color:#ff8a4c;color:#fff}.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{background-color:#5850ec;color:#fff}.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{color:#5850ec!important}.form-select{font-size:.875rem!important;border-color:#9fa6b2!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-color:#a4cafe!important}.es-check-toggle:checked~.es-mail-toggle-line{background-color:#5850ec}.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%}.bg-white{background-color:#fff}.bg-gray-200{background-color:#e5e7eb}.bg-gray-300{background-color:#d2d6dc}.bg-green-100{background-color:#def7ec}.bg-green-600{background-color:#057a55}.bg-indigo-500{background-color:#6875f5}.bg-indigo-600{background-color:#5850ec}.bg-indigo-800{background-color:#42389d}.hover\:bg-gray-50:hover{background-color:#f9fafb}.hover\:bg-gray-100:hover{background-color:#f4f5f7}.hover\:bg-green-500:hover{background-color:#0e9f6e}.hover\:bg-indigo-500:hover{background-color:#6875f5}.focus\:bg-gray-50:focus{background-color:#f9fafb}.focus\:bg-gray-100:focus{background-color:#f4f5f7}.border-collapse{border-collapse:collapse}.border-transparent{border-color:transparent}.border-gray-100{border-color:#f4f5f7}.border-gray-200{border-color:#e5e7eb}.border-gray-300{border-color:#d2d6dc}.border-gray-400{border-color:#9fa6b2}.border-indigo-600{border-color:#5850ec}.hover\:border-indigo-500:hover{border-color:#6875f5}.focus\:border-blue-300:focus{border-color:#a4cafe}.rounded{border-radius:.25rem}.rounded-md{border-radius:.375rem}.rounded-lg{border-radius:.5rem}.rounded-full{border-radius:9999px}.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-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}.grid{display:grid}.table{display:table}.table-cell{display:table-cell}.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}.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}.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-shrink-0{-ms-flex-negative:0;flex-shrink:0}.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-normal{font-weight:400}.font-medium{font-weight:500}.font-semibold{font-weight:600}.font-bold{font-weight:700}.h-0{height:0}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-8{height:2rem}.h-10{height:2.5rem}.h-15{height:3.75rem}.h-20{height:5rem}.h-48{height:12rem}.leading-5{line-height:1.25rem}.leading-6{line-height:1.5rem}.leading-7{line-height:1.75rem}.leading-none{line-height:1}.leading-snug{line-height:1.375}.leading-normal{line-height:1.5}.leading-relaxed{line-height:1.625}.list-disc{list-style-type:disc}.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}.mb-0{margin-bottom:0}.mt-1{margin-top:.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-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}.ml-16{margin-left:4rem}.mr-1\.5{margin-right:.375rem}.-mr-1{margin-right:-.25rem}.max-h-full{max-height:100%}.max-w-7xl{max-width:80rem}.max-w-full{max-width:100%}.min-w-0{min-width:0}.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}.py-1{padding-top:.25rem;padding-bottom:.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}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.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}.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}.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-8{padding-top:2rem}.pb-8{padding-bottom:2rem}.pl-10{padding-left:2.5rem}.pr-12{padding-right:3rem}.pointer-events-none{pointer-events:none}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-y-0{top:0;bottom: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-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)}.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)}.text-left{text-align:left}.text-center{text-align:center}.text-white{color:#fff}.text-black{color:#000}.text-gray-400{color:#9fa6b2}.text-gray-500{color:#6b7280}.text-gray-600{color:#4b5563}.text-gray-700{color:#374151}.text-gray-800{color:#252f3f}.text-gray-900{color:#161e2e}.text-red-600{color:#e02424}.text-orange-400{color:#ff8a4c}.text-orange-500{color:#ff5a1f}.text-yellow-400{color:#e3a008}.text-green-400{color:#31c48d}.text-green-600{color:#057a55}.text-green-800{color:#03543f}.text-blue-500{color:#3f83f8}.text-blue-700{color:#1a56db}.text-indigo-100{color:#e5edff}.text-indigo-400{color:#8da2fb}.text-indigo-500{color:#6875f5}.text-indigo-600{color:#5850ec}.hover\:text-white:hover{color:#fff}.hover\:text-gray-900:hover{color:#161e2e}.hover\:text-blue-700:hover{color:#1a56db}.focus\:text-white:focus{color:#fff}.focus\:text-gray-900:focus{color:#161e2e}.text-xs{font-size:.75rem}.text-sm{font-size:.875rem}.text-base{font-size:1rem}.text-lg{font-size:1.125rem}.text-2xl{font-size:1.5rem}.italic{font-style:italic}.uppercase{text-transform:uppercase}.underline{text-decoration:underline}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.w-0{width:0}.w-4{width:1rem}.w-5{width:1.25rem}.w-10{width:2.5rem}.w-40{width:10rem}.w-56{width:14rem}.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-3\/5{width:60%}.w-5\/6{width:83.333333%}.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%}.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\:grid{display:grid}.sm\:justify-start{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.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\:text-sm{font-size:.875rem}.sm\:text-2xl{font-size:1.5rem}.sm\:text-3xl{font-size:1.875rem}.sm\:truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.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\:mt-0{margin-top:0}.md\:ml-4{margin-left:1rem}.md\:pb-2{padding-bottom:.5rem}.md\:pr-4{padding-right:1rem}.md\:pt-6{padding-top:1.5rem}.md\:text-base{font-size:1rem}}@media (min-width:1024px){.lg\:rounded-full{border-radius:9999px}.lg\:inline-flex{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex}.lg\:grid{display:grid}.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\:text-sm{font-size:.875rem}.lg\:text-lg{font-size:1.125rem}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (min-width:1280px){.xl\:pb-4{padding-bottom:1rem}}
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{color:#1c64f2}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{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;padding:.5rem 1rem;background-color:#fff;font-size:.875rem;line-height:1.25rem;font-weight:500;color:#fff;background-color:#5850ec;-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{font-size:.875rem;border-radius:.375rem;border-width:1px;border-color:#5850ec;line-height:1.25rem;font-weight:500}.wp-heading-inline+.page-title-action{color:#1c64f2;padding:.5rem;margin-left:.5rem;margin-right:.5rem}.ig-es-title-button:hover,.wp-heading-inline+.page-title-action:hover{border-color:#6875f5;background-color:#f4f5f7}.ig-es-primary-button:hover{background-color:#6875f5;color:#fff}.ig-es-primary-button:focus,.ig-es-title-button:focus,.wp-heading-inline+.page-title-action: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;font-size:.875rem!important;line-height:1.25rem!important;font-weight:500!important;color:#fff!important;background-color:#0e9f6e!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:hover{background-color:#31c48d!important;color:#fff!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;font-size:.875rem;line-height:1.25rem;font-weight:500;color:#fff;background-color:#ff5a1f;-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:hover{background-color:#ff8a4c;color:#fff}.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{background-color:#5850ec;color:#fff}.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{color:#5850ec!important}.form-select{font-size:.875rem!important;border-color:#9fa6b2!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-color:#a4cafe!important}.es-check-toggle:checked~.es-mail-toggle-line{background-color:#5850ec}.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}.bg-white{background-color:#fff}.bg-gray-100{background-color:#f4f5f7}.bg-gray-200{background-color:#e5e7eb}.bg-gray-300{background-color:#d2d6dc}.bg-green-100{background-color:#def7ec}.bg-green-600{background-color:#057a55}.bg-indigo-500{background-color:#6875f5}.bg-indigo-600{background-color:#5850ec}.bg-indigo-800{background-color:#42389d}.hover\:bg-gray-50:hover{background-color:#f9fafb}.hover\:bg-gray-100:hover{background-color:#f4f5f7}.hover\:bg-green-500:hover{background-color:#0e9f6e}.hover\:bg-indigo-500:hover{background-color:#6875f5}.focus\:bg-gray-50:focus{background-color:#f9fafb}.focus\:bg-gray-100:focus{background-color:#f4f5f7}.border-collapse{border-collapse:collapse}.border-transparent{border-color:transparent}.border-gray-100{border-color:#f4f5f7}.border-gray-200{border-color:#e5e7eb}.border-gray-300{border-color:#d2d6dc}.border-gray-400{border-color:#9fa6b2}.border-indigo-600{border-color:#5850ec}.hover\:border-gray-200:hover{border-color:#e5e7eb}.hover\:border-indigo-500:hover{border-color:#6875f5}.focus\:border-blue-300:focus{border-color:#a4cafe}.rounded{border-radius:.25rem}.rounded-md{border-radius:.375rem}.rounded-lg{border-radius:.5rem}.rounded-full{border-radius:9999px}.border-solid{border-style:solid}.border-dashed{border-style:dashed}.border-0{border-width:0}.border-2{border-width:2px}.border{border-width:1px}.border-t{border-top-width:1px}.border-r{border-right-width:1px}.border-b{border-bottom-width:1px}.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}.grid{display:grid}.table{display:table}.table-cell{display:table-cell}.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}.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}.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-shrink-0{-ms-flex-negative:0;flex-shrink:0}.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-normal{font-weight:400}.font-medium{font-weight:500}.font-semibold{font-weight:600}.font-bold{font-weight:700}.h-0{height:0}.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}.leading-4{line-height:1rem}.leading-5{line-height:1.25rem}.leading-6{line-height:1.5rem}.leading-7{line-height:1.75rem}.leading-none{line-height:1}.leading-snug{line-height:1.375}.leading-normal{line-height:1.5}.leading-relaxed{line-height:1.625}.list-disc{list-style-type:disc}.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-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}.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-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}.ml-16{margin-left:4rem}.mr-1\.5{margin-right:.375rem}.-mr-1{margin-right:-.25rem}.max-h-full{max-height:100%}.max-w-7xl{max-width:80rem}.max-w-full{max-width:100%}.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}.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}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.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}.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-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}.pl-10{padding-left:2.5rem}.pr-12{padding-right:3rem}.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}.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-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)}.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)}.text-left{text-align:left}.text-center{text-align:center}.text-white{color:#fff}.text-black{color:#000}.text-gray-400{color:#9fa6b2}.text-gray-500{color:#6b7280}.text-gray-600{color:#4b5563}.text-gray-700{color:#374151}.text-gray-800{color:#252f3f}.text-gray-900{color:#161e2e}.text-red-600{color:#e02424}.text-orange-400{color:#ff8a4c}.text-orange-500{color:#ff5a1f}.text-yellow-400{color:#e3a008}.text-green-400{color:#31c48d}.text-green-600{color:#057a55}.text-green-800{color:#03543f}.text-blue-500{color:#3f83f8}.text-blue-700{color:#1a56db}.text-indigo-100{color:#e5edff}.text-indigo-400{color:#8da2fb}.text-indigo-500{color:#6875f5}.text-indigo-600{color:#5850ec}.hover\:text-white:hover{color:#fff}.hover\:text-gray-800:hover{color:#252f3f}.hover\:text-gray-900:hover{color:#161e2e}.hover\:text-blue-700:hover{color:#1a56db}.focus\:text-white:focus{color:#fff}.active\:text-gray-900:active,.focus\:text-gray-900:focus{color:#161e2e}.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}.italic{font-style:italic}.uppercase{text-transform:uppercase}.underline{text-decoration:underline}.no-underline{text-decoration:none}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.tracking-wider{letter-spacing:.05em}.align-middle{vertical-align:middle}.whitespace-no-wrap{white-space:nowrap}.w-0{width:0}.w-4{width:1rem}.w-5{width:1.25rem}.w-10{width:2.5rem}.w-40{width:10rem}.w-56{width:14rem}.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-4\/6{width:66.666667%}.w-5\/6{width:83.333333%}.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}.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\:grid{display:grid}.sm\:justify-start{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.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\:text-sm{font-size:.875rem}.sm\:text-2xl{font-size:1.5rem}.sm\:text-3xl{font-size:1.875rem}.sm\:truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.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\:my-2{margin-top:.5rem;margin-bottom:.5rem}.md\:mt-0{margin-top:0}.md\:ml-4{margin-left:1rem}.md\:py-0{padding-top:0;padding-bottom:0}.md\:pb-2{padding-bottom:.5rem}.md\:pr-4{padding-right:1rem}.md\:pt-6{padding-top:1.5rem}.md\:text-base{font-size:1rem}}@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\:my-0{margin-top:0;margin-bottom:0}.lg\:mx-5{margin-left:1.25rem;margin-right:1.25rem}.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\:shadow-none{-webkit-box-shadow:none;box-shadow:none}.lg\:text-sm{font-size:.875rem}.lg\:text-lg{font-size:1.125rem}.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\:pb-4{padding-bottom:1rem}}
lite/admin/images/bfcm-2019.png DELETED
Binary file
lite/admin/images/bfcm-last-2019.png DELETED
Binary file
lite/admin/images/cf7-sync.png CHANGED
Binary file
lite/admin/images/covid-19.png ADDED
Binary file
lite/admin/images/envelope.png CHANGED
Binary file
lite/admin/images/es-captcha-2.png CHANGED
Binary file
lite/admin/images/es-comments.png CHANGED
Binary file
lite/admin/images/es-logo-128x128.png CHANGED
Binary file
lite/admin/images/es-logo-64x64.png CHANGED
Binary file
lite/admin/{dist/images → images}/es-rm-integration.png RENAMED
File without changes
lite/admin/images/es-smtp-label.png CHANGED
Binary file
lite/admin/images/es-smtp.png CHANGED
Binary file
lite/admin/images/icegram-engage-more-subscribers-and-visitors.png CHANGED
Binary file
lite/admin/images/icon-64.png CHANGED
Binary file
lite/admin/images/optin_form_2.png CHANGED
Binary file
lite/admin/images/pepipost.png CHANGED
Binary file
lite/admin/images/phpmail.png CHANGED
Binary file
lite/admin/{dist/images → images}/pricing.png RENAMED
File without changes
lite/admin/images/starter-tmpl.png CHANGED
Binary file
lite/admin/images/woocommerce-sync.png CHANGED
Binary file
lite/admin/images/wpmail.png CHANGED
Binary file
lite/admin/js/email-subscribers-admin.js CHANGED
@@ -1,8 +1,8 @@
1
- (function($) {
2
 
3
  $(document).ready(
4
- function() {
5
- $(document).on('change', '.es_visible', function() {
6
  if ($('.es_visible:checked').length >= 1) {
7
  $('.es_required').prop('disabled', false);
8
  $('.es_name_label').removeAttr('disabled');
@@ -11,9 +11,25 @@
11
  $('.es_name_label').attr('disabled', 'disabled');
12
  }
13
  });
 
14
  $('.es_visible').change();
15
 
16
- $('#es-settings-tabs').tabs().addClass('ui-tabs-vertical ui-helper-clearfix');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
 
18
  var defaultHeight = $('div#es-settings-tabs div#menu-tab-content div#tabs-general').height() + 30;
19
  $('div#es-settings-tabs div#menu-tab-listing ul').height(defaultHeight);
@@ -25,6 +41,7 @@
25
  var tabHight = $('div#es-settings-tabs div#menu-tab-content div' + tab).height() + 30;
26
  $('div#es-settings-tabs div#menu-tab-listing ul').height(tabHight);
27
  });
 
28
 
29
  if (jQuery('.statusesselect').length) {
30
  var statusselect = jQuery('.statusesselect')[0].outerHTML;
@@ -40,7 +57,7 @@
40
  //jQuery(".es-audience-view .bulkactions #bulk-action-selector-bottom").after(statusselect);
41
  // jQuery(".es-audience-view .bulkactions #bulk-action-selector-bottom").after(groupselect);
42
 
43
- jQuery("#bulk-action-selector-top").change(function() {
44
  if (jQuery('option:selected', this).attr('value') == 'bulk_list_update' || jQuery('option:selected', this).attr('value') == 'bulk_list_add') {
45
  jQuery('.groupsselect').eq(1).show();
46
  jQuery('.statusesselect').eq(1).hide();
@@ -55,13 +72,13 @@
55
 
56
  jQuery('.es-audience-view .tablenav.bottom #bulk-action-selector-bottom').hide();
57
  jQuery('.es-audience-view .tablenav.bottom #doaction2').hide();
58
- jQuery(document).on('change', "#base_template_id", function() {
59
  var img = jQuery('option:selected', this).data('img')
60
  jQuery('.es-templ-img').html(img);
61
  });
62
 
63
  //send test emails
64
- $(document).on('click', '#es-send-test', function(e) {
65
  e.preventDefault();
66
  var test_email = $('#es-test-email').val();
67
  var params = {};
@@ -74,7 +91,7 @@
74
  url: ajaxurl,
75
  data: params,
76
  dataType: 'json',
77
- success: function(response) {
78
  if (response && typeof response.status !== 'undefined' && response.status == "SUCCESS") {
79
  $('#es-send-test').parent().find('.helper').html('<span style="color:green">' + response.message + '</span>');
80
  } else {
@@ -84,7 +101,7 @@
84
  $('#es-send-test').next('#spinner-image').hide();
85
  },
86
 
87
- error: function(err) {
88
  $('#es-send-test').next('#spinner-image').hide();
89
  }
90
  });
@@ -95,7 +112,7 @@
95
  });
96
 
97
  //klawoo form submit
98
- jQuery("form[name=klawoo_subscribe]").submit(function(e) {
99
  e.preventDefault();
100
  var form = e.target;
101
  jQuery(form).find('#klawoo_response').html('');
@@ -113,18 +130,18 @@
113
  url: ajaxurl,
114
  async: false,
115
  data: params,
116
- success: function(response) {
117
  if (response != '') {
118
  jQuery('#klawoo_response').html(response);
119
  if (jQuery(form).hasClass('es-onboarding')) {
120
- setTimeout(function() {
121
  location.reload();
122
  }, 2000);
123
  } else {
124
  jQuery('.es-emm-optin #name').val('');
125
  jQuery('.es-emm-optin #email').val('');
126
  jQuery('.es-emm-optin #es-gdpr-agree').attr('checked', false);
127
- setTimeout(function() {
128
  jQuery(form).find('#klawoo_response').hide('slow');
129
  }, 2000);
130
  }
@@ -141,7 +158,7 @@
141
 
142
  // Select List ID for Export
143
  var _href = $('#ig_es_export_link_select_list').attr("href");
144
- $('#ig_es_export_list_dropdown').change(function() {
145
  var selected_list_id = $(this).val();
146
 
147
  $('#ig_es_export_link_select_list').attr("href", _href + '&list_id=' + selected_list_id);
@@ -157,7 +174,7 @@
157
  url: ajaxurl,
158
  async: false,
159
  data: params,
160
- success: function(response) {
161
  if (response != '') {
162
  response = JSON.parse(response);
163
  $('#ig_es_export_select_list .ig_es_total_contacts').text(response.total);
@@ -170,7 +187,7 @@
170
  // Broadcast Setttings
171
  // Get count by list
172
  $('#ig_es_campaign_submit_button').attr("disabled", true);
173
- $('#ig_es_broadcast_list_ids').change(function() {
174
  var selected_list_id = $(this).val();
175
 
176
  // Update total count in lists
@@ -185,7 +202,7 @@
185
  url: ajaxurl,
186
  async: true,
187
  data: params,
188
- success: function(response) {
189
  if (response !== '') {
190
  response = JSON.parse(response);
191
  if (response.hasOwnProperty('total')) {
@@ -203,7 +220,7 @@
203
  });
204
  });
205
 
206
- jQuery(document).on('change', '#base_template_id', function() {
207
  var template_id = $(this).val();
208
  // Update total count in lists
209
  var params = {
@@ -215,17 +232,17 @@
215
  url: ajaxurl,
216
  async: false,
217
  data: params,
218
- success: function(response) {
219
  if (response !== '') {
220
  response = JSON.parse(response);
221
  if (response.hasOwnProperty('subject')) {
222
  jQuery('.wp-editor-boradcast').val(response.body);
223
- if( 'undefined' !== typeof tinyMCE ) {
224
  var activeEditor = tinyMCE.get('edit-es-boradcast-body');
225
- if(activeEditor !== null){ // Make sure we're not calling setContent on null
226
- response.body = response.body.replace(/\n/g, "<br />");
227
- activeEditor.setContent(response.body); // Update tinyMCE's content
228
- }
229
  }
230
 
231
  if (response.inline_css && jQuery('#inline_css').length) {
@@ -241,7 +258,7 @@
241
  });
242
 
243
  //post notification category select
244
- jQuery(document).on('change', '.es-note-category-parent', function() {
245
  var val = jQuery('.es-note-category-parent:checked').val();
246
  if ('{a}All{a}' === val) {
247
  jQuery('input[name="es_note_cat[]"]').not('.es_custom_post_type').closest('tr').hide();
@@ -255,7 +272,7 @@
255
 
256
 
257
  //es mailer settings
258
- jQuery(document).on('change', '.es_mailer', function(e) {
259
  var val = jQuery('.es_mailer:checked').val();
260
  jQuery('[name*="ig_es_mailer_settings"], .es_sub_headline').not('.es_mailer').hide();
261
  jQuery(document).find('.' + val).show();
@@ -264,7 +281,7 @@
264
 
265
  //preview broadcast
266
  // ig_es_preview_broadcast
267
- jQuery(document).on('click', '#ig_es_preview_broadcast', function(e) {
268
  // Trigger save event for content of wp_editor instances before processing it.
269
  window.tinyMCE.triggerSave();
270
  if (jQuery('.wp-editor-boradcast').val() !== '') {
@@ -273,7 +290,7 @@
273
  jQuery(this).unbind('submit').submit();
274
  }
275
  });
276
- jQuery(document).on('click', '#ig_es_campaign_submit_button', function(e) {
277
  if (jQuery('.wp-editor-boradcast').val() !== '') {
278
  jQuery('.es-form').find('form').attr('target', '');
279
  jQuery('.es-form').find('form').find('#es_broadcast_preview').val('');
@@ -281,9 +298,38 @@
281
  });
282
  //add target new to go pro
283
  jQuery('a[href="admin.php?page=es_pricing"]').attr('target', '_blank').attr('href', 'https://www.icegram.com/email-subscribers-pricing/');
284
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
285
 
286
 
 
287
 
288
  })(jQuery);
289
 
1
+ (function ($) {
2
 
3
  $(document).ready(
4
+ function () {
5
+ $(document).on('change', '.es_visible', function () {
6
  if ($('.es_visible:checked').length >= 1) {
7
  $('.es_required').prop('disabled', false);
8
  $('.es_name_label').removeAttr('disabled');
11
  $('.es_name_label').attr('disabled', 'disabled');
12
  }
13
  });
14
+
15
  $('.es_visible').change();
16
 
17
+ $('#tabs-signup_confirmation, #tabs-email_sending, #tabs-security_settings, #tabs-user_roles').hide();
18
+
19
+ $('#tabs-general').show();
20
+
21
+ $('a[href^="#"]#menu-content-change').addClass('text-white').parent('li').eq(0).addClass('bg-indigo-600 ').siblings().find('a').addClass('text-gray-700').removeClass('text-white').parent('li').removeClass('bg-indigo-600');
22
+
23
+ $('a[href^="#"]#menu-content-change').on('click', function (event) {
24
+ $(this).addClass('text-white').removeClass('text-gray-700').parent('li').addClass('bg-indigo-600').siblings().find('a').addClass('text-gray-700').removeClass('text-white').parent('li').removeClass('bg-indigo-600');
25
+ $('.setting-content').hide();
26
+ var target = $(this).attr('href');
27
+ $('.setting-content' + target).toggle();
28
+ return false;
29
+ });
30
+
31
+
32
+ /*$('#es-settings-tabs').tabs().addClass('ui-tabs-vertical ui-helper-clearfix');
33
 
34
  var defaultHeight = $('div#es-settings-tabs div#menu-tab-content div#tabs-general').height() + 30;
35
  $('div#es-settings-tabs div#menu-tab-listing ul').height(defaultHeight);
41
  var tabHight = $('div#es-settings-tabs div#menu-tab-content div' + tab).height() + 30;
42
  $('div#es-settings-tabs div#menu-tab-listing ul').height(tabHight);
43
  });
44
+ */
45
 
46
  if (jQuery('.statusesselect').length) {
47
  var statusselect = jQuery('.statusesselect')[0].outerHTML;
57
  //jQuery(".es-audience-view .bulkactions #bulk-action-selector-bottom").after(statusselect);
58
  // jQuery(".es-audience-view .bulkactions #bulk-action-selector-bottom").after(groupselect);
59
 
60
+ jQuery("#bulk-action-selector-top").change(function () {
61
  if (jQuery('option:selected', this).attr('value') == 'bulk_list_update' || jQuery('option:selected', this).attr('value') == 'bulk_list_add') {
62
  jQuery('.groupsselect').eq(1).show();
63
  jQuery('.statusesselect').eq(1).hide();
72
 
73
  jQuery('.es-audience-view .tablenav.bottom #bulk-action-selector-bottom').hide();
74
  jQuery('.es-audience-view .tablenav.bottom #doaction2').hide();
75
+ jQuery(document).on('change', "#base_template_id", function () {
76
  var img = jQuery('option:selected', this).data('img')
77
  jQuery('.es-templ-img').html(img);
78
  });
79
 
80
  //send test emails
81
+ $(document).on('click', '#es-send-test', function (e) {
82
  e.preventDefault();
83
  var test_email = $('#es-test-email').val();
84
  var params = {};
91
  url: ajaxurl,
92
  data: params,
93
  dataType: 'json',
94
+ success: function (response) {
95
  if (response && typeof response.status !== 'undefined' && response.status == "SUCCESS") {
96
  $('#es-send-test').parent().find('.helper').html('<span style="color:green">' + response.message + '</span>');
97
  } else {
101
  $('#es-send-test').next('#spinner-image').hide();
102
  },
103
 
104
+ error: function (err) {
105
  $('#es-send-test').next('#spinner-image').hide();
106
  }
107
  });
112
  });
113
 
114
  //klawoo form submit
115
+ jQuery("form[name=klawoo_subscribe]").submit(function (e) {
116
  e.preventDefault();
117
  var form = e.target;
118
  jQuery(form).find('#klawoo_response').html('');
130
  url: ajaxurl,
131
  async: false,
132
  data: params,
133
+ success: function (response) {
134
  if (response != '') {
135
  jQuery('#klawoo_response').html(response);
136
  if (jQuery(form).hasClass('es-onboarding')) {
137
+ setTimeout(function () {
138
  location.reload();
139
  }, 2000);
140
  } else {
141
  jQuery('.es-emm-optin #name').val('');
142
  jQuery('.es-emm-optin #email').val('');
143
  jQuery('.es-emm-optin #es-gdpr-agree').attr('checked', false);
144
+ setTimeout(function () {
145
  jQuery(form).find('#klawoo_response').hide('slow');
146
  }, 2000);
147
  }
158
 
159
  // Select List ID for Export
160
  var _href = $('#ig_es_export_link_select_list').attr("href");
161
+ $('#ig_es_export_list_dropdown').change(function () {
162
  var selected_list_id = $(this).val();
163
 
164
  $('#ig_es_export_link_select_list').attr("href", _href + '&list_id=' + selected_list_id);
174
  url: ajaxurl,
175
  async: false,
176
  data: params,
177
+ success: function (response) {
178
  if (response != '') {
179
  response = JSON.parse(response);
180
  $('#ig_es_export_select_list .ig_es_total_contacts').text(response.total);
187
  // Broadcast Setttings
188
  // Get count by list
189
  $('#ig_es_campaign_submit_button').attr("disabled", true);
190
+ $('#ig_es_broadcast_list_ids').change(function () {
191
  var selected_list_id = $(this).val();
192
 
193
  // Update total count in lists
202
  url: ajaxurl,
203
  async: true,
204
  data: params,
205
+ success: function (response) {
206
  if (response !== '') {
207
  response = JSON.parse(response);
208
  if (response.hasOwnProperty('total')) {
220
  });
221
  });
222
 
223
+ jQuery(document).on('change', '#base_template_id', function () {
224
  var template_id = $(this).val();
225
  // Update total count in lists
226
  var params = {
232
  url: ajaxurl,
233
  async: false,
234
  data: params,
235
+ success: function (response) {
236
  if (response !== '') {
237
  response = JSON.parse(response);
238
  if (response.hasOwnProperty('subject')) {
239
  jQuery('.wp-editor-boradcast').val(response.body);
240
+ if ('undefined' !== typeof tinyMCE) {
241
  var activeEditor = tinyMCE.get('edit-es-boradcast-body');
242
+ if (activeEditor !== null) { // Make sure we're not calling setContent on null
243
+ response.body = response.body.replace(/\n/g, "<br />");
244
+ activeEditor.setContent(response.body); // Update tinyMCE's content
245
+ }
246
  }
247
 
248
  if (response.inline_css && jQuery('#inline_css').length) {
258
  });
259
 
260
  //post notification category select
261
+ jQuery(document).on('change', '.es-note-category-parent', function () {
262
  var val = jQuery('.es-note-category-parent:checked').val();
263
  if ('{a}All{a}' === val) {
264
  jQuery('input[name="es_note_cat[]"]').not('.es_custom_post_type').closest('tr').hide();
272
 
273
 
274
  //es mailer settings
275
+ jQuery(document).on('change', '.es_mailer', function (e) {
276
  var val = jQuery('.es_mailer:checked').val();
277
  jQuery('[name*="ig_es_mailer_settings"], .es_sub_headline').not('.es_mailer').hide();
278
  jQuery(document).find('.' + val).show();
281
 
282
  //preview broadcast
283
  // ig_es_preview_broadcast
284
+ jQuery(document).on('click', '#ig_es_preview_broadcast', function (e) {
285
  // Trigger save event for content of wp_editor instances before processing it.
286
  window.tinyMCE.triggerSave();
287
  if (jQuery('.wp-editor-boradcast').val() !== '') {
290
  jQuery(this).unbind('submit').submit();
291
  }
292
  });
293
+ jQuery(document).on('click', '#ig_es_campaign_submit_button', function (e) {
294
  if (jQuery('.wp-editor-boradcast').val() !== '') {
295
  jQuery('.es-form').find('form').attr('target', '');
296
  jQuery('.es-form').find('form').find('#es_broadcast_preview').val('');
298
  });
299
  //add target new to go pro
300
  jQuery('a[href="admin.php?page=es_pricing"]').attr('target', '_blank').attr('href', 'https://www.icegram.com/email-subscribers-pricing/');
301
+
302
+ $('.ig-es-campaign-status-toggle-label').click(function (e) {
303
+ e.preventDefault();
304
+ let checkbox_elem = $(this).find('.es-check-toggle');
305
+ let campaign_id = $(checkbox_elem).val();
306
+ let new_campaign_status = $(checkbox_elem).prop('checked') ? 0 : 1;
307
+ let data = {
308
+ action: 'ig_es_toggle_campaign_status',
309
+ campaign_id: campaign_id,
310
+ new_campaign_status: new_campaign_status,
311
+ security: ig_es_js_data.security
312
+ }
313
+ jQuery.ajax({
314
+ method: 'POST',
315
+ url: ajaxurl,
316
+ data: data,
317
+ dataType: 'json',
318
+ success: function (response) {
319
+ if (response.success) {
320
+ $(checkbox_elem).prop('checked', new_campaign_status);
321
+ } else {
322
+ alert(ig_es_js_data.ajax_error_message);
323
+ }
324
+ },
325
+ error: function (err) {
326
+ alert(ig_es_js_data.ajax_error_message);
327
+ }
328
+ });
329
+ });
330
 
331
 
332
+ });
333
 
334
  })(jQuery);
335
 
lite/admin/js/ig-es-workflows.js CHANGED
@@ -42,8 +42,9 @@
42
 
43
  $switch = $(this);
44
 
45
- if ( $switch.is('.ig-es-loading') )
46
  return;
 
47
 
48
  state = $switch.attr( 'data-ig-es-switch' );
49
  new_state = state === 'active' ? 'inactive' : 'active';
42
 
43
  $switch = $(this);
44
 
45
+ if ( $switch.is('.ig-es-loading') ) {
46
  return;
47
+ }
48
 
49
  state = $switch.attr( 'data-ig-es-switch' );
50
  new_state = state === 'active' ? 'inactive' : 'active';
lite/admin/partials/dashboard.php CHANGED
@@ -52,36 +52,36 @@ $topics_indexes = array_rand( $topics, 3 );
52
 
53
  ?>
54
  <div class="wrap" id="ig-es-container">
55
- <header class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
56
  <div class="md:flex md:items-center md:justify-between">
57
  <div class="flex-1 min-w-0">
58
  <h2 class="text-2xl font-bold leading-7 text-gray-900 sm:text-3xl sm:leading-9 sm:truncate">
59
  <?php _e( 'Dashboard', 'email_subscribers' ); ?>
60
  </h2>
61
  </div>
62
- <div class="mt-4 flex md:mt-0 md:ml-4">
63
  <a href="<?php echo $audience_url; ?>">
64
- <span class="shadow-sm rounded-md">
65
- <button type="button" class="inline-flex items-center px-4 py-2 border border-gray-300 text-sm leading-5 font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:shadow-outline focus:border-blue-300 transition duration-150 ease-in-out">
66
  <?php _e( 'Audience', 'email_subscribers' ); ?>
67
  </button>
68
  </span>
69
  </a>
70
- <span class="ml-3 shadow-sm rounded-md">
71
  <div id="ig-es-create-button" class="relative inline-block text-left">
72
  <div>
73
  <span class="rounded-md shadow-sm">
74
- <button type="button" class="ig-es-primary-button w-full">
75
  <?php _e( 'Create', 'email_subscribers' ); ?>
76
- <svg class="-mr-1 ml-2 h-5 w-5" fill="currentColor" viewBox="0 0 20 20">
77
  <path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd"/>
78
  </svg>
79
  </button>
80
  </span>
81
  </div>
82
  <div x-show="open" id="ig-es-create-dropdown" x-transition:enter="transition ease-out duration-100" x-transition:enter-start="transform opacity-0 scale-95" x-transition:enter-end="transform opacity-100 scale-100" x-transition:leave="transition ease-in duration-75" x-transition:leave-start="transform opacity-100 scale-100"
83
- x-transition:leave-end="transform opacity-0 scale-95" class="hidden origin-top-right absolute right-0 mt-2 w-56 rounded-md shadow-lg">
84
- <div class="rounded-md bg-white shadow-xs">
85
  <div class="py-1">
86
  <a href="<?php echo $new_broadcast_url; ?>" class="block px-4 py-2 text-sm leading-5 text-gray-700 hover:bg-gray-100 hover:text-gray-900 focus:outline-none focus:bg-gray-100 focus:text-gray-900"><?php _e( 'New Broadcast', 'email_subscribers' ); ?></a>
87
 
@@ -91,7 +91,7 @@ $topics_indexes = array_rand( $topics, 3 );
91
  <a href="<?php echo $new_sequence_url; ?>" class="block px-4 py-2 text-sm leading-5 text-gray-700 hover:bg-gray-100 hover:text-gray-900 focus:outline-none focus:bg-gray-100 focus:text-gray-900"><?php _e( 'New Sequence', 'email_subscribers' ); ?></a>
92
  <?php } else { ?>
93
  <a href="<?php echo $icegram_pricing_url; ?>" target="_blank" class="block px-4 py-2 text-sm leading-5 text-gray-700 hover:bg-gray-100 hover:text-gray-900 focus:outline-none focus:bg-gray-100 focus:text-gray-900"><?php _e( 'New Sequence', 'email_subscribers' ); ?>
94
- <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-green-100 text-green-800"><?php _e( 'Premium', 'email_subscribers' ); ?></span></a>
95
  <?php } ?>
96
  </div>
97
  <div class="border-t border-gray-100"></div>
@@ -112,51 +112,51 @@ $topics_indexes = array_rand( $topics, 3 );
112
  </div>
113
  </header>
114
 
115
- <main class="max-w-7xl mx-auto sm:px-6 lg:px-8">
116
 
117
- <section class="md:flex md:items-start md:justify-between sm:px-4 py-4 my-8 sm:px-0 rounded-lg bg-white shadow sm:grid sm:grid-cols-3">
118
  <div class="flex-1 min-w-0">
119
- <p class="px-3 text-lg leading-6 font-medium text-gray-400">
120
  <span class="text-black"><?php echo $active_contacts; ?></span><?php _e( ' active contacts', 'email_subscribers' ); ?>
121
  </p>
122
- <div class="bg-white-100 text-center" id="ig-es-contacts-growth">
123
 
124
  </div>
125
  </div>
126
  <div class="flex-1 min-w-0">
127
- <p class="px-3 text-lg leading-6 font-medium text-gray-400">
128
  <?php _e( 'Last 60 days', 'email_subscribers' ); ?>
129
  </p>
130
  <div class="sm:grid sm:grid-cols-2">
131
  <div class="p-3">
132
- <p class="text-2xl leading-none font-bold text-indigo-600">
133
  <?php echo $total_email_opens; ?>
134
  </p>
135
- <p class="mt-1 leading-6 font-medium text-gray-500">
136
  <?php _e( 'Opens', 'email_subscribers' ); ?>
137
  </p>
138
  </div>
139
  <div class="p-3">
140
- <p class="text-2xl leading-none font-bold text-indigo-600">
141
  <?php echo $avg_open_rate; ?> %
142
  </p>
143
- <p class="mt-1 leading-6 font-medium text-gray-500">
144
  <?php _e( ' Avg Open Rate', 'email_subscribers' ); ?>
145
  </p>
146
  </div>
147
  <div class="p-3">
148
- <p class="text-2xl leading-none font-bold text-indigo-600">
149
  <?php echo $total_message_sent; ?>
150
  </p>
151
- <p class="mt-1 leading-6 font-medium text-gray-500">
152
  <?php _e( 'Messages Sent', 'email_subscribers' ); ?>
153
  </p>
154
  </div>
155
  <div class="p-3">
156
- <p class="text-2xl leading-none font-bold text-indigo-600">
157
  <?php echo $avg_click_rate; ?> %
158
  </p>
159
- <p class="mt-1 leading-6 font-medium text-gray-500">
160
  <?php _e( 'Avg Click Rate', 'email_subscribers' ); ?>
161
  </p>
162
  </div>
@@ -168,9 +168,9 @@ $topics_indexes = array_rand( $topics, 3 );
168
  <ul>
169
  <?php foreach ( $topics_indexes as $index ) { ?>
170
  <li class="border-b border-gray-200">
171
- <a href="<?php echo $topics[ $index ]['link']; ?>" class="block hover:bg-gray-50 focus:outline-none focus:bg-gray-50 transition duration-150 ease-in-out" target="_blank">
172
 
173
- <div class="flex items-center md:justify-between px-2 py-2 sm:px-2">
174
  <div class="text-sm leading-5 text-gray-900">
175
  <?php echo $topics[ $index ]['title'];
176
  if ( ! empty( $topics[ $index ]['label'] ) ) { ?>
@@ -178,7 +178,7 @@ $topics_indexes = array_rand( $topics, 3 );
178
  <?php } ?>
179
  </div>
180
  <div>
181
- <svg class="h-5 w-5 text-gray-400" fill="currentColor" viewBox="0 0 20 20">
182
  <path fill-rule="evenodd" 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" clip-rule="evenodd"></path>
183
  </svg>
184
  </div>
@@ -188,7 +188,7 @@ $topics_indexes = array_rand( $topics, 3 );
188
  <?php } ?>
189
 
190
  <li class="">
191
- <div class="text-sm leading-5 text-gray-900 px-2 py-2 sm:px-2">
192
 
193
  <?php _e( 'Jump to: ', 'email_subscribers' ); ?><a href="<?php echo $reports_url; ?>" class="font-bold" target="_blank"><?php _e( 'Reports', 'email_subscribers' ); ?></a> ・<a href="<?php echo $templates_url; ?>" class="font-bold" target="_blank"><?php _e( 'Templates', 'email_subscribers' ); ?></a> ・<a
194
  href="<?php echo $settings_url; ?>"
52
 
53
  ?>
54
  <div class="wrap" id="ig-es-container">
55
+ <header class="px-4 mx-auto max-w-7xl sm:px-6 lg:px-8">
56
  <div class="md:flex md:items-center md:justify-between">
57
  <div class="flex-1 min-w-0">
58
  <h2 class="text-2xl font-bold leading-7 text-gray-900 sm:text-3xl sm:leading-9 sm:truncate">
59
  <?php _e( 'Dashboard', 'email_subscribers' ); ?>
60
  </h2>
61
  </div>
62
+ <div class="flex mt-4 md:mt-0 md:ml-4">
63
  <a href="<?php echo $audience_url; ?>">
64
+ <span class="rounded-md shadow-sm">
65
+ <button type="button" class="inline-flex items-center px-4 py-2 text-sm font-medium leading-5 text-gray-700 transition duration-150 ease-in-out bg-white border border-gray-300 rounded-md hover:bg-gray-50 focus:outline-none focus:shadow-outline focus:border-blue-300">
66
  <?php _e( 'Audience', 'email_subscribers' ); ?>
67
  </button>
68
  </span>
69
  </a>
70
+ <span class="ml-3 rounded-md shadow-sm">
71
  <div id="ig-es-create-button" class="relative inline-block text-left">
72
  <div>
73
  <span class="rounded-md shadow-sm">
74
+ <button type="button" class="w-full ig-es-primary-button">
75
  <?php _e( 'Create', 'email_subscribers' ); ?>
76
+ <svg class="w-5 h-5 ml-2 -mr-1" fill="currentColor" viewBox="0 0 20 20">
77
  <path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd"/>
78
  </svg>
79
  </button>
80
  </span>
81
  </div>
82
  <div x-show="open" id="ig-es-create-dropdown" x-transition:enter="transition ease-out duration-100" x-transition:enter-start="transform opacity-0 scale-95" x-transition:enter-end="transform opacity-100 scale-100" x-transition:leave="transition ease-in duration-75" x-transition:leave-start="transform opacity-100 scale-100"
83
+ x-transition:leave-end="transform opacity-0 scale-95" class="absolute right-0 hidden w-56 mt-2 origin-top-right rounded-md shadow-lg">
84
+ <div class="bg-white rounded-md shadow-xs">
85
  <div class="py-1">
86
  <a href="<?php echo $new_broadcast_url; ?>" class="block px-4 py-2 text-sm leading-5 text-gray-700 hover:bg-gray-100 hover:text-gray-900 focus:outline-none focus:bg-gray-100 focus:text-gray-900"><?php _e( 'New Broadcast', 'email_subscribers' ); ?></a>
87
 
91
  <a href="<?php echo $new_sequence_url; ?>" class="block px-4 py-2 text-sm leading-5 text-gray-700 hover:bg-gray-100 hover:text-gray-900 focus:outline-none focus:bg-gray-100 focus:text-gray-900"><?php _e( 'New Sequence', 'email_subscribers' ); ?></a>
92
  <?php } else { ?>
93
  <a href="<?php echo $icegram_pricing_url; ?>" target="_blank" class="block px-4 py-2 text-sm leading-5 text-gray-700 hover:bg-gray-100 hover:text-gray-900 focus:outline-none focus:bg-gray-100 focus:text-gray-900"><?php _e( 'New Sequence', 'email_subscribers' ); ?>
94
+ <span class="inline-flex px-2 text-xs font-semibold leading-5 text-green-800 bg-green-100 rounded-full"><?php _e( 'Premium', 'email_subscribers' ); ?></span></a>
95
  <?php } ?>
96
  </div>
97
  <div class="border-t border-gray-100"></div>
112
  </div>
113
  </header>
114
 
115
+ <main class="mx-auto max-w-7xl sm:px-6 lg:px-8">
116
 
117
+ <section class="py-4 my-8 bg-white rounded-lg shadow md:flex md:items-start md:justify-between sm:px-4 sm:px-0 sm:grid sm:grid-cols-3">
118
  <div class="flex-1 min-w-0">
119
+ <p class="px-3 text-lg font-medium leading-6 text-gray-400">
120
  <span class="text-black"><?php echo $active_contacts; ?></span><?php _e( ' active contacts', 'email_subscribers' ); ?>
121
  </p>
122
+ <div class="text-center bg-white-100" id="ig-es-contacts-growth">
123
 
124
  </div>
125
  </div>
126
  <div class="flex-1 min-w-0">
127
+ <p class="px-3 text-lg font-medium leading-6 text-gray-400">
128
  <?php _e( 'Last 60 days', 'email_subscribers' ); ?>
129
  </p>
130
  <div class="sm:grid sm:grid-cols-2">
131
  <div class="p-3">
132
+ <p class="text-2xl font-bold leading-none text-indigo-600">
133
  <?php echo $total_email_opens; ?>
134
  </p>
135
+ <p class="mt-1 font-medium leading-6 text-gray-500">
136
  <?php _e( 'Opens', 'email_subscribers' ); ?>
137
  </p>
138
  </div>
139
  <div class="p-3">
140
+ <p class="text-2xl font-bold leading-none text-indigo-600">
141
  <?php echo $avg_open_rate; ?> %
142
  </p>
143
+ <p class="mt-1 font-medium leading-6 text-gray-500">
144
  <?php _e( ' Avg Open Rate', 'email_subscribers' ); ?>
145
  </p>
146
  </div>
147
  <div class="p-3">
148
+ <p class="text-2xl font-bold leading-none text-indigo-600">
149
  <?php echo $total_message_sent; ?>
150
  </p>
151
+ <p class="mt-1 font-medium leading-6 text-gray-500">
152
  <?php _e( 'Messages Sent', 'email_subscribers' ); ?>
153
  </p>
154
  </div>
155
  <div class="p-3">
156
+ <p class="text-2xl font-bold leading-none text-indigo-600">
157
  <?php echo $avg_click_rate; ?> %
158
  </p>
159
+ <p class="mt-1 font-medium leading-6 text-gray-500">
160
  <?php _e( 'Avg Click Rate', 'email_subscribers' ); ?>
161
  </p>
162
  </div>
168
  <ul>
169
  <?php foreach ( $topics_indexes as $index ) { ?>
170
  <li class="border-b border-gray-200">
171
+ <a href="<?php echo $topics[ $index ]['link']; ?>" class="block transition duration-150 ease-in-out hover:bg-gray-50 focus:outline-none focus:bg-gray-50" target="_blank">
172
 
173
+ <div class="flex items-center px-2 py-2 md:justify-between sm:px-2">
174
  <div class="text-sm leading-5 text-gray-900">
175
  <?php echo $topics[ $index ]['title'];
176
  if ( ! empty( $topics[ $index ]['label'] ) ) { ?>
178
  <?php } ?>
179
  </div>
180
  <div>
181
+ <svg class="w-5 h-5 text-gray-400" fill="currentColor" viewBox="0 0 20 20">
182
  <path fill-rule="evenodd" 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" clip-rule="evenodd"></path>
183
  </svg>
184
  </div>
188
  <?php } ?>
189
 
190
  <li class="">
191
+ <div class="px-2 py-2 text-sm leading-5 text-gray-900 sm:px-2">
192
 
193
  <?php _e( 'Jump to: ', 'email_subscribers' ); ?><a href="<?php echo $reports_url; ?>" class="font-bold" target="_blank"><?php _e( 'Reports', 'email_subscribers' ); ?></a> ・<a href="<?php echo $templates_url; ?>" class="font-bold" target="_blank"><?php _e( 'Templates', 'email_subscribers' ); ?></a> ・<a
194
  href="<?php echo $settings_url; ?>"
lite/admin/partials/help.php CHANGED
@@ -76,13 +76,13 @@ $articles = array(
76
  );
77
 
78
  ?>
79
- <h3 class="text-gray-700 font-medium text-2xl pl-2 my-3 "><?php _e( 'Help & Info', 'email-subscribers' ) ?></h3>
80
  <div class="wrap font-sans">
81
  <div class="container w-full flex flex-wrap border rounded-lg bg-white shadow ">
82
  <div class="inline-block pl-2 border-r border-dashed px-2 w-4/12 ">
83
  <div class="max-h-full" id="features_display">
84
- <div class="mt-2 pt-6 pb-6 pl-2">
85
- <ul class="mx-6 list-disc leading-relaxed">
86
  <?php foreach ( $articles as $article ) { ?>
87
  <li><a target="_blank" href="<?php echo $article['link']; ?>" class="<?php echo $article['class']; ?>"><?php echo $article['title']; ?></a></li>
88
  <?php } ?>
@@ -94,44 +94,44 @@ $articles = array(
94
  <div class="inline-block w-4/12 border-r border-dashed">
95
  <?php if ( ES()->is_current_user_administrator() && $enable_manual_update ) { ?>
96
 
97
- <div class="database-migration bg-gray-200 px-4 py-4">
98
- <h3 class="mt-4 mb-6 text-center text-2xl font-medium text-gray-700"><?php echo __( 'Database Migration', 'email-subscribers' ); ?></h3>
99
 
100
- <p class="py-2 px-2"><?php echo __( 'If you found duplicate campaigns, lists, forms, reports after upgrading from Email Subscribers 3.5.x to 4.x and want to run the database migration again to fix this, please click the below <b>Run the updater</b> button.', 'email-subscribers' ); ?></p>
101
 
102
- <p class="py-2 px-2"><?php echo __( 'Once you click on <b>Run the updater</b> button, it will run the migration process from 3.5.x once again. So, if you have created new campaigns, forms or lists after migration to 4.x earlier, you will lose those data. So, make sure you have a backup with you.', 'email-subscribers' ); ?></p>
103
 
104
- <div class="flex w-2/3 py-2 justify-start">
105
- <span class="rounded-md shadow-sm ">
106
  <a href="<?php echo esc_url( $update_url ); ?>"><button type="button"
107
- class="inline-flex justify-center w-full rounded-md border border-transparent px-4 py-2 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 __( 'Run the updater',
108
  'email-subscribers' ); ?> </button></a>
109
  </span>
110
  </div>
111
  </div>
112
  <?php } else { ?>
113
- <h3 class="mt-4 mb-6 text-center text-2xl font-medium text-gray-700"><?php _e( 'Get Help?', 'email-subscribers' ); ?></h3>
114
- <ul class="mx-6 list-disc leading-relaxed">
115
  <li>Install & Activate <a href="https://www.icegram.com/r7gg" target="_blank" class="text-indigo-600">Temporary Login Without Password</a> plugin</li>
116
  <li>Create & Copy new Temporary Login link. <a href="https://www.icegram.com/r7gg" target="_blank" class="text-indigo-600">Learn why you should use this plugin</a></li>
117
  <li>Click on <b>Contact US</b> button and let us know your queries along with Temporary Login Link </li>
118
  </ul>
119
  <div class="flex w-2/3 py-2 justify-center <?php echo $contact_us_btn_class; ?>">
120
  <span class="rounded-md shadow-sm">
121
- <button type="button" class="inline-flex justify-center w-full rounded-md border border-transparent px-4 py-2 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 __( 'Contact US',
122
  'email-subscribers' ); ?> </button>
123
  </span>
124
  </div>
125
  <?php } ?>
126
  </div>
127
 
128
- <div class="inline-block w-4/12 ">
129
  <ul>
130
  <?php foreach ( $topics_indexes as $index ) { ?>
131
  <li class="border-b border-gray-200">
132
- <a href="<?php echo $topics[ $index ]['link']; ?>" class="block hover:bg-gray-50 focus:outline-none focus:bg-gray-50 transition duration-150 ease-in-out" target="_blank">
133
 
134
- <div class="flex items-center md:justify-between px-2 py-2 sm:px-2">
135
  <div class="text-sm leading-5 text-gray-900">
136
  <?php echo $topics[ $index ]['title'];
137
  if ( ! empty( $topics[ $index ]['label'] ) ) { ?>
@@ -139,7 +139,7 @@ $articles = array(
139
  <?php } ?>
140
  </div>
141
  <div>
142
- <svg class="h-5 w-5 text-gray-400" fill="currentColor" viewBox="0 0 20 20">
143
  <path fill-rule="evenodd" 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" clip-rule="evenodd"></path>
144
  </svg>
145
  </div>
@@ -153,36 +153,36 @@ $articles = array(
153
  </div>
154
 
155
 
156
- <div class="container w-full flex flex-wrap mt-4">
157
  <div class="block mt-6">
158
- <h3 class="text-gray-700 font-medium text-2xl "><?php _e( 'Other awesome plugins from same author', 'email_subscribers' ); ?></h3>
159
  </div>
160
- <div class="grid grid-cols-3 py-2 my-4 w-full">
161
  <?php foreach ( $plugins as $plugin ) { ?>
162
- <div class="flex flex-col mr-3 bg-white rounded-lg border shadow my-4">
163
  <div class="flex h-48">
164
  <div class="flex pl-1">
165
  <div class="flex w-1/4 rounded">
166
- <div class="flex flex-col h-6 w-full">
167
  <div>
168
- <img class="border-0 mx-auto my-4 h-15" src="<?php echo $plugin['logo']; ?>" alt="">
169
  </div>
170
  </div>
171
  </div>
172
  <div class="flex w-3/4 pt-2">
173
  <div class="flex flex-col">
174
  <div class="flex w-full">
175
- <a href="<?php echo $plugin['plugin_url']; ?>" target="_blank"><h3 class="font-medium text-lg text-indigo-600 mt-2 pl-2 pb-2"><?php echo $plugin['title']; ?></h3></a>
176
  </div>
177
  <div class="flex w-full pl-2 leading-normal xl:pb-4 lg:pb-2 md:pb-2">
178
- <h4 class="text-sm text-gray-700 pr-4 pt-1"><?php echo $plugin['desc']; ?></h4>
179
  </div>
180
  </div>
181
  </div>
182
  </div>
183
  </div>
184
- <div class="flex flex-row border-t mb-0">
185
- <div class="flex w-2/3 py-5 px-3 text-sm"><?php _e( 'Status', 'email-subscribers' ); ?>:
186
  <?php if ( in_array( $plugin['name'], $active_plugins ) ) { ?>
187
  <span class="font-bold text-green-600">&nbsp;<?php _e( 'Active', 'email_subscribers' ); ?></span>
188
  <?php } elseif ( in_array( $plugin['name'], $inactive_plugins ) ) { ?>
@@ -191,17 +191,17 @@ $articles = array(
191
  <span class="font-bold text-orange-500">&nbsp;<?php _e( 'Not Installed', 'email_subscribers' ); ?></span>
192
  <?php } ?>
193
  </div>
194
- <div class="flex w-1/3 py-3 md:pr-4 justify-center">
195
- <span class="rounded-md shadow-sm ">
196
  <?php if ( ! in_array( $plugin['name'], $active_plugins ) ) { ?>
197
  <a href="<?php echo $plugin['install_url']; ?>">
198
  <?php }
199
 
200
  if ( ! in_array( $plugin['name'], $all_plugins ) ) { ?>
201
- <button type="button" class="inline-flex justify-center w-full rounded-md border border-transparent px-4 py-2 bg-white text-sm leading-5 font-medium text-white bg-green-600 hover:bg-green-500 focus:outline-none focus:shadow-outline-blue transition ease-in-out duration-150">
202
  <?php _e( 'Install', 'email_subscribers' ); ?> </button>
203
  <?php } elseif ( in_array( $plugin['name'], $inactive_plugins ) ) { ?>
204
- <button type="button" class="inline-flex justify-center w-full rounded-md border border-transparent px-4 py-2 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">
205
  <?php _e( 'Activate', 'email_subscribers' ); ?> </button>
206
  <?php } ?>
207
  </a>
76
  );
77
 
78
  ?>
79
+ <h1 class="mt-4 wp-heading-inline"><span class="text-2xl font-bold leading-7 text-gray-900 sm:text-3xl sm:leading-9 sm:truncate"><?php _e( 'Help & Info', 'email-subscribers' ) ?></span></h1>
80
  <div class="wrap font-sans">
81
  <div class="container w-full flex flex-wrap border rounded-lg bg-white shadow ">
82
  <div class="inline-block pl-2 border-r border-dashed px-2 w-4/12 ">
83
  <div class="max-h-full" id="features_display">
84
+ <div class="pt-6 pb-6 pl-2 mt-2">
85
+ <ul class="mx-6 leading-relaxed list-disc">
86
  <?php foreach ( $articles as $article ) { ?>
87
  <li><a target="_blank" href="<?php echo $article['link']; ?>" class="<?php echo $article['class']; ?>"><?php echo $article['title']; ?></a></li>
88
  <?php } ?>
94
  <div class="inline-block w-4/12 border-r border-dashed">
95
  <?php if ( ES()->is_current_user_administrator() && $enable_manual_update ) { ?>
96
 
97
+ <div class="px-4 py-4 bg-gray-200 database-migration">
98
+ <h3 class="mt-4 mb-6 text-2xl font-medium text-center text-gray-700"><?php echo __( 'Database Migration', 'email-subscribers' ); ?></h3>
99
 
100
+ <p class="px-2 py-2"><?php echo __( 'If you found duplicate campaigns, lists, forms, reports after upgrading from Email Subscribers 3.5.x to 4.x and want to run the database migration again to fix this, please click the below <b>Run the updater</b> button.', 'email-subscribers' ); ?></p>
101
 
102
+ <p class="px-2 py-2"><?php echo __( 'Once you click on <b>Run the updater</b> button, it will run the migration process from 3.5.x once again. So, if you have created new campaigns, forms or lists after migration to 4.x earlier, you will lose those data. So, make sure you have a backup with you.', 'email-subscribers' ); ?></p>
103
 
104
+ <div class="flex justify-start w-2/3 py-2">
105
+ <span class="rounded-md shadow-sm">
106
  <a href="<?php echo esc_url( $update_url ); ?>"><button type="button"
107
+ class="inline-flex justify-center w-full px-4 py-2 text-sm font-medium leading-5 text-white transition duration-150 ease-in-out bg-white bg-indigo-600 border border-transparent rounded-md hover:bg-indigo-500 focus:outline-none focus:shadow-outline-blue"><?php echo __( 'Run the updater',
108
  'email-subscribers' ); ?> </button></a>
109
  </span>
110
  </div>
111
  </div>
112
  <?php } else { ?>
113
+ <h3 class="mt-4 mb-6 text-2xl font-medium text-center text-gray-700"><?php _e( 'Get Help?', 'email-subscribers' ); ?></h3>
114
+ <ul class="mx-6 leading-relaxed list-disc">
115
  <li>Install & Activate <a href="https://www.icegram.com/r7gg" target="_blank" class="text-indigo-600">Temporary Login Without Password</a> plugin</li>
116
  <li>Create & Copy new Temporary Login link. <a href="https://www.icegram.com/r7gg" target="_blank" class="text-indigo-600">Learn why you should use this plugin</a></li>
117
  <li>Click on <b>Contact US</b> button and let us know your queries along with Temporary Login Link </li>
118
  </ul>
119
  <div class="flex w-2/3 py-2 justify-center <?php echo $contact_us_btn_class; ?>">
120
  <span class="rounded-md shadow-sm">
121
+ <button type="button" class="inline-flex justify-center w-full px-4 py-2 text-sm font-medium leading-5 text-white transition duration-150 ease-in-out bg-white bg-indigo-600 border border-transparent rounded-md hover:bg-indigo-500 focus:outline-none focus:shadow-outline-blue"><?php echo __( 'Contact US',
122
  'email-subscribers' ); ?> </button>
123
  </span>
124
  </div>
125
  <?php } ?>
126
  </div>
127
 
128
+ <div class="inline-block w-4/12">
129
  <ul>
130
  <?php foreach ( $topics_indexes as $index ) { ?>
131
  <li class="border-b border-gray-200">
132
+ <a href="<?php echo $topics[ $index ]['link']; ?>" class="block transition duration-150 ease-in-out hover:bg-gray-50 focus:outline-none focus:bg-gray-50" target="_blank">
133
 
134
+ <div class="flex items-center px-2 py-2 md:justify-between sm:px-2">
135
  <div class="text-sm leading-5 text-gray-900">
136
  <?php echo $topics[ $index ]['title'];
137
  if ( ! empty( $topics[ $index ]['label'] ) ) { ?>
139
  <?php } ?>
140
  </div>
141
  <div>
142
+ <svg class="w-5 h-5 text-gray-400" fill="currentColor" viewBox="0 0 20 20">
143
  <path fill-rule="evenodd" 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" clip-rule="evenodd"></path>
144
  </svg>
145
  </div>
153
  </div>
154
 
155
 
156
+ <div class="container flex flex-wrap w-full mt-4">
157
  <div class="block mt-6">
158
+ <h3 class="text-2xl font-medium text-gray-700"><?php _e( 'Other awesome plugins from same author', 'email_subscribers' ); ?></h3>
159
  </div>
160
+ <div class="grid w-full grid-cols-3 py-2 my-4">
161
  <?php foreach ( $plugins as $plugin ) { ?>
162
+ <div class="flex flex-col my-4 mr-3 bg-white border rounded-lg shadow">
163
  <div class="flex h-48">
164
  <div class="flex pl-1">
165
  <div class="flex w-1/4 rounded">
166
+ <div class="flex flex-col w-full h-6">
167
  <div>
168
+ <img class="mx-auto my-4 border-0 h-15" src="<?php echo $plugin['logo']; ?>" alt="">
169
  </div>
170
  </div>
171
  </div>
172
  <div class="flex w-3/4 pt-2">
173
  <div class="flex flex-col">
174
  <div class="flex w-full">
175
+ <a href="<?php echo $plugin['plugin_url']; ?>" target="_blank"><h3 class="pb-2 pl-2 mt-2 text-lg font-medium text-indigo-600"><?php echo $plugin['title']; ?></h3></a>
176
  </div>
177
  <div class="flex w-full pl-2 leading-normal xl:pb-4 lg:pb-2 md:pb-2">
178
+ <h4 class="pt-1 pr-4 text-sm text-gray-700"><?php echo $plugin['desc']; ?></h4>
179
  </div>
180
  </div>
181
  </div>
182
  </div>
183
  </div>
184
+ <div class="flex flex-row mb-0 border-t">
185
+ <div class="flex w-2/3 px-3 py-5 text-sm"><?php _e( 'Status', 'email-subscribers' ); ?>:
186
  <?php if ( in_array( $plugin['name'], $active_plugins ) ) { ?>
187
  <span class="font-bold text-green-600">&nbsp;<?php _e( 'Active', 'email_subscribers' ); ?></span>
188
  <?php } elseif ( in_array( $plugin['name'], $inactive_plugins ) ) { ?>
191
  <span class="font-bold text-orange-500">&nbsp;<?php _e( 'Not Installed', 'email_subscribers' ); ?></span>
192
  <?php } ?>
193
  </div>
194
+ <div class="flex justify-center w-1/3 py-3 md:pr-4">
195
+ <span class="rounded-md shadow-sm">
196
  <?php if ( ! in_array( $plugin['name'], $active_plugins ) ) { ?>
197
  <a href="<?php echo $plugin['install_url']; ?>">
198
  <?php }
199
 
200
  if ( ! in_array( $plugin['name'], $all_plugins ) ) { ?>
201
+ <button type="button" class="inline-flex justify-center w-full px-4 py-2 text-sm font-medium leading-5 text-white transition duration-150 ease-in-out bg-white bg-green-600 border border-transparent rounded-md hover:bg-green-500 focus:outline-none focus:shadow-outline-blue">
202
  <?php _e( 'Install', 'email_subscribers' ); ?> </button>
203
  <?php } elseif ( in_array( $plugin['name'], $inactive_plugins ) ) { ?>
204
+ <button type="button" class="inline-flex justify-center w-full px-4 py-2 text-sm font-medium leading-5 text-white transition duration-150 ease-in-out bg-white bg-indigo-600 border border-transparent rounded-md hover:bg-indigo-500 focus:outline-none focus:shadow-outline-blue">
205
  <?php _e( 'Activate', 'email_subscribers' ); ?> </button>
206
  <?php } ?>
207
  </a>
lite/includes/class-email-subscribers.php CHANGED
@@ -280,9 +280,11 @@ if ( ! class_exists( 'Email_Subscribers' ) ) {
280
 
281
  $active_plugins = $ig_es_tracker::get_active_plugins();
282
 
283
- $args['url'] = 'https://www.icegram.com/';
284
- $args['include'] = ES_PLUGIN_DIR . 'lite/includes/notices/views/ig-es-offer.php';
285
- ES_Admin_Notices::add_custom_notice( 'bfcm_2019', $args );
 
 
286
 
287
  $screen_id = $this->get_current_screen_id();
288
  // Don't show admin notices on Dashboard if onboarding is not yet completed.
@@ -314,39 +316,6 @@ if ( ! class_exists( 'Email_Subscribers' ) ) {
314
 
315
  }
316
 
317
- /**
318
- * Dismiss Admin Notices
319
- *
320
- * @since 4.0.0
321
- */
322
- public function es_dismiss_admin_notice() {
323
- $es_dismiss_admin_notice = ig_es_get_request_data( 'es_dismiss_admin_notice' );
324
- $option_name = ig_es_get_request_data( 'option_name' );
325
- if ( $es_dismiss_admin_notice == '1' && ! empty( $option_name ) ) {
326
- update_option( 'ig_es_' . $option_name, 'yes' );
327
- if ( in_array( $option_name, array( 'redirect_upsale_notice', 'dismiss_upsale_notice', 'dismiss_star_notice', 'star_notice_done' ) ) ) {
328
- update_option( 'ig_es_' . $option_name . '_date', ig_get_current_date_time() );
329
- }
330
- if ( $option_name === 'star_notice_done' ) {
331
- header( "Location: https://wordpress.org/support/plugin/email-subscribers/reviews/" );
332
- exit();
333
- }
334
- if ( $option_name === 'redirect_upsale_notice' ) {
335
- header( "Location: https://www.icegram.com/email-subscribers-starter-plan-pricing/?utm_source=es&utm_medium=es_upsale_banner&utm_campaign=es_upsale" );
336
- exit();
337
- }
338
- if ( $option_name === 'offer_pre_halloween_done_2019' || $option_name === 'offer_halloween_done_2019' || $option_name === 'offer_last_day_halloween_done_2019' ) {
339
- $url = "https://www.icegram.com/?utm_source=in_app&utm_medium=es_banner&utm_campaign=" . $option_name;
340
- header( "Location: {$url}" );
341
- exit();
342
- } else {
343
- $referer = wp_get_referer();
344
- wp_safe_redirect( $referer );
345
- }
346
- exit();
347
- }
348
- }
349
-
350
  /**
351
  * Define Contstants
352
  *
@@ -639,6 +608,7 @@ if ( ! class_exists( 'Email_Subscribers' ) ) {
639
  'lite/includes/classes/class-es-message.php',
640
  'lite/includes/classes/class-es-lists-table.php',
641
  'lite/includes/classes/class-es-contacts-table.php',
 
642
  'lite/includes/classes/class-es-post-notifications.php',
643
  'lite/includes/classes/class-es-templates-table.php',
644
  'lite/includes/classes/class-es-campaigns-table.php',
@@ -784,8 +754,8 @@ if ( ! class_exists( 'Email_Subscribers' ) ) {
784
  'starter/workflows/triggers/class-es-trigger-gravity-forms-submitted.php',
785
 
786
  // Actions from Pro version
787
- 'pro/workflows/actions/class-es-action-move-to-list.php',
788
- 'pro/workflows/actions/class-es-action-remove-from-list.php',
789
 
790
  // Workflow Loader
791
  'lite/includes/workflows/class-es-workflow-loader.php',
@@ -836,7 +806,7 @@ if ( ! class_exists( 'Email_Subscribers' ) ) {
836
  $this->loader->add_action( 'wp_ajax_count_contacts_by_list', $plugin_admin, 'count_contacts_by_list' );
837
  $this->loader->add_action( 'wp_ajax_get_template_content', $plugin_admin, 'get_template_content' );
838
  $this->loader->add_action( 'admin_print_scripts', $plugin_admin, 'remove_other_admin_notices' );
839
-
840
  }
841
 
842
  /**
@@ -919,6 +889,17 @@ if ( ! class_exists( 'Email_Subscribers' ) ) {
919
  return file_exists( ES_PLUGIN_DIR . 'starter/starter-class-email-subscribers.php' );
920
  }
921
 
 
 
 
 
 
 
 
 
 
 
 
922
  /**
923
  * Get all ES admin screens
924
  *
@@ -949,8 +930,8 @@ if ( ! class_exists( 'Email_Subscribers' ) ) {
949
  "{$prefix}_page_es_general_information",
950
  "{$prefix}_page_es_pricing",
951
  "{$prefix}_page_es_sequence",
952
-
953
-
954
  );
955
 
956
  $screens = apply_filters( 'ig_es_admin_screens', $screens );
@@ -983,6 +964,7 @@ if ( ! class_exists( 'Email_Subscribers' ) ) {
983
  if ( in_array( $current_screen_id, $es_admin_screens ) ) {
984
  return true;
985
  }
 
986
  return false;
987
  }
988
 
@@ -1014,7 +996,7 @@ if ( ! class_exists( 'Email_Subscribers' ) ) {
1014
  * @since 4.4.2
1015
  */
1016
  public function is_current_user_administrator() {
1017
- return current_user_can('administrator');
1018
  }
1019
 
1020
  /**
@@ -1116,7 +1098,6 @@ if ( ! class_exists( 'Email_Subscribers' ) ) {
1116
  }
1117
 
1118
  add_action( 'admin_init', array( self::$instance, 'add_admin_notice' ) );
1119
- // add_action( 'admin_init', array( self::$instance, 'es_dismiss_admin_notice' ) );
1120
 
1121
  if ( ! post_type_exists( 'es_template' ) ) {
1122
  add_action( 'init', array( 'Email_Subscribers_Activator', 'register_email_templates' ) );
@@ -1126,5 +1107,25 @@ if ( ! class_exists( 'Email_Subscribers' ) ) {
1126
 
1127
  return self::$instance;
1128
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1129
  }
1130
  }
280
 
281
  $active_plugins = $ig_es_tracker::get_active_plugins();
282
 
283
+ if ( ! ES()->is_premium() ) {
284
+ $args['url'] = 'https://www.icegram.com/';
285
+ $args['include'] = ES_PLUGIN_DIR . 'lite/includes/notices/views/ig-es-offer.php';
286
+ ES_Admin_Notices::add_custom_notice( 'covid_19', $args );
287
+ }
288
 
289
  $screen_id = $this->get_current_screen_id();
290
  // Don't show admin notices on Dashboard if onboarding is not yet completed.
316
 
317
  }
318
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
319
  /**
320
  * Define Contstants
321
  *
608
  'lite/includes/classes/class-es-message.php',
609
  'lite/includes/classes/class-es-lists-table.php',
610
  'lite/includes/classes/class-es-contacts-table.php',
611
+ 'lite/includes/classes/class-es-contact-background-process.php',
612
  'lite/includes/classes/class-es-post-notifications.php',
613
  'lite/includes/classes/class-es-templates-table.php',
614
  'lite/includes/classes/class-es-campaigns-table.php',
754
  'starter/workflows/triggers/class-es-trigger-gravity-forms-submitted.php',
755
 
756
  // Actions from Pro version
757
+ 'pro/workflows/actions/class-es-action-move-to-list.php',
758
+ 'pro/workflows/actions/class-es-action-remove-from-list.php',
759
 
760
  // Workflow Loader
761
  'lite/includes/workflows/class-es-workflow-loader.php',
806
  $this->loader->add_action( 'wp_ajax_count_contacts_by_list', $plugin_admin, 'count_contacts_by_list' );
807
  $this->loader->add_action( 'wp_ajax_get_template_content', $plugin_admin, 'get_template_content' );
808
  $this->loader->add_action( 'admin_print_scripts', $plugin_admin, 'remove_other_admin_notices' );
809
+
810
  }
811
 
812
  /**
889
  return file_exists( ES_PLUGIN_DIR . 'starter/starter-class-email-subscribers.php' );
890
  }
891
 
892
+ /**
893
+ * Is ES Premium?
894
+ *
895
+ * @return bool
896
+ *
897
+ * @since 4.4.4
898
+ */
899
+ public function is_premium() {
900
+ return ES()->is_pro() || ES()->is_starter();
901
+ }
902
+
903
  /**
904
  * Get all ES admin screens
905
  *
930
  "{$prefix}_page_es_general_information",
931
  "{$prefix}_page_es_pricing",
932
  "{$prefix}_page_es_sequence",
933
+
934
+
935
  );
936
 
937
  $screens = apply_filters( 'ig_es_admin_screens', $screens );
964
  if ( in_array( $current_screen_id, $es_admin_screens ) ) {
965
  return true;
966
  }
967
+
968
  return false;
969
  }
970
 
996
  * @since 4.4.2
997
  */
998
  public function is_current_user_administrator() {
999
+ return current_user_can( 'administrator' );
1000
  }
1001
 
1002
  /**
1098
  }
1099
 
1100
  add_action( 'admin_init', array( self::$instance, 'add_admin_notice' ) );
 
1101
 
1102
  if ( ! post_type_exists( 'es_template' ) ) {
1103
  add_action( 'init', array( 'Email_Subscribers_Activator', 'register_email_templates' ) );
1107
 
1108
  return self::$instance;
1109
  }
1110
+
1111
+ /**
1112
+ * Function to init action scheduler queue runner to allow immediate processing of Action Scheduler queue.
1113
+ *
1114
+ * @since 4.4.4
1115
+ */
1116
+ public function init_action_scheduler_queue_runner() {
1117
+
1118
+ $admin_ajax_url = admin_url( 'admin-ajax.php' );
1119
+ $admin_ajax_url = add_query_arg( 'action', 'ig_es_init_queue_runner', $admin_ajax_url );
1120
+ $args = array(
1121
+ 'timeout' => 0.01,
1122
+ 'blocking' => false,
1123
+ 'cookies' => $_COOKIE,
1124
+ 'sslverify' => apply_filters( 'https_local_ssl_verify', false ),
1125
+ );
1126
+
1127
+ // Make a asynchronous request to our ajax handler function which in turn calls Action Schedulers' queue runner to start immediate processing in background.
1128
+ wp_remote_get( esc_url_raw( $admin_ajax_url ), $args );
1129
+ }
1130
  }
1131
  }
lite/includes/classes/class-es-admin-settings.php CHANGED
@@ -40,8 +40,12 @@ class ES_Admin_Settings {
40
 
41
  $options = apply_filters( 'ig_es_before_save_settings', $options );
42
 
43
- $options['ig_es_disable_wp_cron'] = isset( $options['ig_es_disable_wp_cron'] ) ? $options['ig_es_disable_wp_cron'] : 'no';
44
- $options['ig_es_track_email_opens'] = isset( $options['ig_es_track_email_opens'] ) ? $options['ig_es_track_email_opens'] : 'no';
 
 
 
 
45
 
46
  $text_fields_to_sanitize = array(
47
  'ig_es_from_name',
@@ -109,47 +113,50 @@ class ES_Admin_Settings {
109
 
110
  ?>
111
 
112
- <div class="wrap essettings">
113
- <h1 class="wp-heading-inline">Settings</h1>
114
- <form action="" method="post" id="email_tabs_form" class="ig-settings-form rcorners">
115
-
116
- <?php settings_fields( 'email_subscribers_settings' );
117
- $es_settings_tabs = array(
118
- 'general' => array( 'icon' => 'admin-generic', 'name' => __( 'General', 'email-subscribers' ) ),
119
- 'signup_confirmation' => array( 'icon' => 'groups', 'name' => __( 'Notifications', 'email-subscribers' ) ),
120
- 'email_sending' => array( 'icon' => 'schedule', 'name' => __( 'Email Sending', 'email-subscribers' ) ),
121
- 'security_settings' => array( 'icon' => 'lock', 'name' => __( 'Security', 'email-subscribers' ) ),
122
- );
123
- $es_settings_tabs = apply_filters( 'ig_es_settings_tabs', $es_settings_tabs );
124
- ?>
125
-
126
- <div id="es-settings-tabs">
127
- <div id="menu-tab-listing" class="">
128
- <ul class="main-tab-nav">
129
- <?php
130
- foreach ( $es_settings_tabs as $key => $value ) {
131
- ?>
132
- <li class="ig-menu-tab"><a href="#tabs-<?php echo $key ?>"><i class="dashicons dashicons-<?php echo $value['icon'] ?>"></i>&nbsp;<?php echo $value['name'] ?></a></li>
133
  <?php
134
- }
135
- ?>
136
- </ul>
 
 
 
 
 
 
137
  </div>
138
- <div id="menu-tab-content">
 
139
  <?php $settings = self::get_registered_settings();
140
  foreach ( $settings as $key => $value ) {
141
  ?>
142
- <div id="tabs-<?php echo $key ?>"><?php $this->render_settings_fields( $value ); ?></div>
143
  <?php
144
  }
145
  ?>
146
- </div>
147
 
 
148
  </div>
149
  </form>
150
  </div>
151
  <?php
152
-
153
  }
154
 
155
  public static function get_registered_settings() {
@@ -202,7 +209,7 @@ class ES_Admin_Settings {
202
  'name' => __( 'Image Size', 'email-subscribers' ),
203
  'type' => 'select',
204
  'options' => ES_Common::get_image_sizes(),
205
- 'desc' => __( '<p>Select image size for {{POSTIMAGE}} to be shown in the Post Notification Emails.</p>', 'email-subscribers' ),
206
  'default' => 'full'
207
  ),
208
 
@@ -210,7 +217,6 @@ class ES_Admin_Settings {
210
  'id' => 'ig_es_track_email_opens',
211
  'name' => __( 'Track Opens', 'email-subscribers' ),
212
  'type' => 'checkbox',
213
- 'desc' => __( 'Check this if you want to track email opening.', 'email-subscribers' ),
214
  'default' => 'yes'
215
  ),
216
 
@@ -322,17 +328,15 @@ class ES_Admin_Settings {
322
  'welcome_emails' => array(
323
  'id' => 'welcome_emails',
324
  'name' => __( 'Welcome Email', 'email-subscribers' ),
 
325
  'sub_fields' => array(
326
 
327
  'ig_es_enable_welcome_email' => array(
328
- 'type' => 'select',
329
- 'options' => array( 'yes' => __( 'Yes', 'email-subscribers' ), 'no' => __( 'No', 'email-subscribers' ) ),
330
- 'placeholder' => '',
331
- 'supplemental' => '',
332
- 'default' => 'yes',
333
- 'id' => 'ig_es_enable_welcome_email',
334
- 'name' => __( 'Enable?', 'email-subscribers' ),
335
- 'desc' => __( 'Send welcome email to new contact after signup.', 'email-subscribers' ),
336
  ),
337
 
338
  'ig_es_welcome_email_subject' => array(
@@ -391,17 +395,14 @@ class ES_Admin_Settings {
391
 
392
  'id' => 'admin_notifications',
393
  'name' => __( 'Admin Notification On New Subscription', 'email-subscribers' ),
 
394
  'sub_fields' => array(
395
 
396
  'notify_admin' => array(
397
  'id' => 'ig_es_notify_admin',
398
  'name' => __( 'Notify?', 'email-subscribers' ),
399
- 'type' => 'select',
400
- 'options' => array(
401
- 'yes' => __( 'Yes', 'email-subscribers' ),
402
- 'no' => __( 'No', 'email-subscribers' )
403
- ),
404
- 'desc' => __( 'Set this option to "Yes" to notify admin(s) for new contact signup.', 'email-subscribers' ),
405
  'default' => 'yes'
406
  ),
407
 
@@ -427,19 +428,17 @@ class ES_Admin_Settings {
427
  'ig_es_cron_report' => array(
428
  'id' => 'ig_es_cron_report',
429
  'name' => __( 'Admin Notification On Every Campaign Sent', 'email-subscribers' ),
 
430
  'sub_fields' => array(
431
 
432
- 'ig_es_enable_cron_admin_email' => array(
433
- 'id' => 'ig_es_enable_cron_admin_email',
434
- 'name' => __( 'Notify?', 'email-subscribers' ),
435
- 'type' => 'select',
436
- 'options' => array(
437
- 'yes' => __( 'Yes', 'email-subscribers' ),
438
- 'no' => __( 'No', 'email-subscribers' )
439
- ),
440
- 'desc' => __( 'Set this option to "Yes" to notify admin(s) on every campaign sent.', 'email-subscribers' ),
441
  'default' => 'yes'
442
  ),
 
443
  'ig_es_cron_admin_email_subject' => array(
444
  'type' => 'text',
445
  'options' => false,
@@ -477,8 +476,7 @@ class ES_Admin_Settings {
477
  'readonly' => 'readonly',
478
  'id' => 'ig_es_cronurl',
479
  'name' => __( 'Cron URL', 'email-subscribers' ),
480
- 'desc' => __( sprintf( __( "You need to visit this URL to send email notifications. Know <a href='%s' target='_blank'>how to run this in background</a>", 'email-subscribers' ),
481
- "https://www.icegram.com/documentation/es-how-to-schedule-cron-emails-in-cpanel/?utm_source=es&utm_medium=in_app&utm_campaign=view_docs_help_page" ) )
482
  ),
483
  'ig_es_disable_wp_cron' => array(
484
  'type' => 'checkbox',
@@ -487,7 +485,7 @@ class ES_Admin_Settings {
487
  'default' => 'no',
488
  'id' => 'ig_es_disable_wp_cron',
489
  'name' => __( 'Disable WordPress Cron', 'email-subscribers' ),
490
- 'desc' => __( 'Check this if you do not want Email Subscribers to use WP cron for sending emails', 'email-subscribers' )
491
  ),
492
 
493
  'ig_es_cron_interval' => array(
@@ -495,7 +493,7 @@ class ES_Admin_Settings {
495
  'name' => __( 'Send Emails At Most Every', 'email-subscribers' ),
496
  'type' => 'select',
497
  'options' => ES()->cron->cron_intervals(),
498
- 'desc' => __( '<p>Optional if a real cron service is used</p>', 'email-subscribers' ),
499
  'default' => IG_ES_CRON_INTERVAL
500
  ),
501
 
@@ -509,6 +507,7 @@ class ES_Admin_Settings {
509
  'desc' => __( 'Total emails your host can send in an hour.', 'email-subscribers' )
510
  ),
511
 
 
512
  'ig_es_max_email_send_at_once' => array(
513
  'type' => 'number',
514
  'placeholder' => '',
@@ -521,7 +520,7 @@ class ES_Admin_Settings {
521
 
522
  'ig_es_test_send_email' => array(
523
  'type' => 'html',
524
- 'html' => '<input id="es-test-email" type="email"/><input type="submit" name="submit" id="es-send-test" class="ig-es-primary-button" value="Send Email"><span class="es_spinner_image_admin" id="spinner-image" style="display:none"><img src="' . ES_PLUGIN_URL . 'lite/public/images/spinner.gif' . '"/></span>',
525
  'placeholder' => '',
526
  'supplemental' => '',
527
  'default' => '',
@@ -530,17 +529,19 @@ class ES_Admin_Settings {
530
  'desc' => __( 'Enter email address to send test email.', 'email-subscribers' )
531
  ),
532
 
 
533
  'ig_es_mailer_settings' => array(
534
  'type' => 'html',
535
  // 'html' => ES_Admin_Settings::mailers_html(),
536
  'sub_fields' => array(
537
- 'mailer' => array(
538
  'id' => 'ig_es_mailer_settings[mailer]',
539
  'name' => __( 'Select Mailer', 'email-subscribers' ),
540
  'type' => 'html',
541
  'html' => ES_Admin_Settings::mailers_html(),
542
  'desc' => '',
543
  ),
 
544
  'ig_es_pepipost_api_key' => array(
545
  'type' => 'password',
546
  'options' => false,
@@ -579,7 +580,7 @@ class ES_Admin_Settings {
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' => '',
582
- 'rows' => 3
583
  ),
584
 
585
  );
@@ -632,32 +633,41 @@ class ES_Admin_Settings {
632
  $html = ! empty( $arguments['html'] ) ? $arguments['html'] : '';
633
  $id_key = ! empty( $id_key ) ? $id_key : $uid;
634
  $class = ! empty( $arguments['class'] ) ? $arguments['class'] : '';
635
- $rows = ! empty( $arguments['rows'] ) ? $arguments['rows'] : 12;
636
  // Check which type of field we want
637
  switch ( $arguments['type'] ) {
638
- case 'password':
639
  case 'text': // If it is a text field
640
- $field_html = sprintf( '<input name="%1$s" id="%2$s" type="%3$s" placeholder="%4$s" value="%5$s" %6$s class="%7$s"/>', $uid, $id_key, $type, $placeholder, $value, $readonly, $class );
 
 
 
641
  break;
642
 
643
  case 'number': // If it is a number field
644
- $field_html = sprintf( '<input name="%1$s" id="%1$s" type="%2$s" placeholder="%3$s" value="%4$s" %5$s min="0"/>', $uid, $type, $placeholder, $value, $readonly );
645
  break;
646
 
647
  case 'email':
648
- $field_html = sprintf( '<input name="%1$s" id="%2$s" type="%3$s" placeholder="%4$s" value="%5$s" class="%6$s"/>', $uid, $id_key, $type, $placeholder, $value, $class );
649
  break;
650
 
651
  case 'textarea':
652
- $field_html = sprintf( '<textarea name="%1$s" id="%2$s" placeholder="%3$s" size="100" rows="%6$s" cols="58" class="%5$s">%4$s</textarea>', $uid, $id_key, $placeholder, $value, $class, $rows );
653
  break;
654
 
655
  case 'file':
656
- $field_html = '<input type="text" id="logo_url" name="' . $uid . '" value="' . $value . '" class="' . $class . '"/> <input id="upload_logo_button" type="button" class="button" value="Upload Logo" />';
657
  break;
658
 
659
  case 'checkbox' :
660
- $field_html = '<input id="' . $id_key . '" type="checkbox" name="' . $uid . '" value="yes" ' . checked( $value, 'yes', false ) . ' class="' . $class . '" />' . $placeholder . '</input>';
 
 
 
 
 
 
 
661
  break;
662
 
663
  case 'select':
@@ -667,7 +677,7 @@ class ES_Admin_Settings {
667
  $options_markup .= sprintf( '<option value="%s" %s>%s</option>', $key,
668
  selected( $value, $key, false ), $label );
669
  }
670
- $field_html = sprintf( '<select name="%1$s" id="%2$s" class="%4$s">%3$s</select>', $uid, $id_key, $options_markup, $class );
671
  }
672
  break;
673
 
@@ -682,7 +692,7 @@ class ES_Admin_Settings {
682
  //If there is help text
683
  if ( ! empty( $arguments['desc'] ) ) {
684
  $helper = $arguments['desc'];
685
- $field_html .= sprintf( '<span class="helper"> %s</span>', $helper ); // Show it
686
  }
687
 
688
  return $field_html;
@@ -698,30 +708,30 @@ class ES_Admin_Settings {
698
 
699
  function render_settings_fields( $fields ) {
700
 
701
- $html = "<table class='form-table'>";
702
  $html .= "<tbody>";
703
  $button_html = '';
704
  foreach ( $fields as $key => $field ) {
705
  if ( ! empty( $field['name'] ) ) {
706
- $html .= "<tr><th scope='row'>";
707
  $html .= $field['name'];
708
 
709
  //If there is help text
710
  if ( ! empty( $field['info'] ) ) {
711
  $helper = $field['info'];
712
- $html .= "<br />" . sprintf( '<span class="helper">%s</span>', $helper ); // Show it
713
  }
714
- $button_html = "<tr><td></td>";
715
 
716
  $html .= "</th>";
717
  }
718
 
719
- $html .= "<td>";
720
  if ( ! empty( $field['sub_fields'] ) ) {
721
  $option_key = '';
722
- foreach ( $field['sub_fields'] as $key => $sub_field ) {
723
  if ( strpos( $sub_field['id'], '[' ) ) {
724
- $parts = explode( '[', $sub_field['id'] );
725
  if ( $option_key !== $parts[0] ) {
726
  $option_value = get_option( $parts[0] );
727
  $option_key = $parts[0];
@@ -731,7 +741,7 @@ class ES_Admin_Settings {
731
  $class = ( ! empty( $sub_field['class'] ) ) ? $sub_field['class'] : "";
732
  $html .= ( $sub_field !== reset( $field['sub_fields'] ) ) ? '<br/>' : '';
733
  $html .= '<div class="es_sub_headline ' . $class . '" ><strong>' . $sub_field['name'] . '</strong></div>';
734
- $html .= $this->field_callback( $sub_field, $key );
735
  }
736
  } else {
737
  $html .= $this->field_callback( $field );
@@ -749,7 +759,7 @@ class ES_Admin_Settings {
749
  $html .= '<input type="hidden" name="submit_action" value="ig-es-save-admin-settings"/>';
750
  //$html .= '<input type="hidden" name="update-settings" id="update-settings" value="' . $nonce . '"/>';
751
  $html .= $nonce_field;
752
- $html .= '<input type="submit" name="submit" class="ig-es-primary-button" value="' . __( 'Save Settings', 'email-subscribers' ) . '">';
753
  $html .= "</td></tr>";
754
  $html .= "</tbody>";
755
  $html .= "</table>";
@@ -789,16 +799,24 @@ class ES_Admin_Settings {
789
  $mailers = array(
790
  'wpmail' => array( 'name' => 'WP Mail', 'logo' => ES_PLUGIN_URL . 'lite/admin/images/wpmail.png' ),
791
  'phpmail' => array( 'name' => 'PHP mail', 'logo' => ES_PLUGIN_URL . 'lite/admin/images/phpmail.png' ),
792
- 'pepipost' => array( 'name' => 'Pepipost', 'logo' => ES_PLUGIN_URL . 'lite/admin/images/pepipost.png', 'docblock' => $pepipost_doc_block ),
793
  );
794
 
795
  $mailers = apply_filters( 'ig_es_mailers', $mailers );
796
  $selected_mailer = ( array_key_exists( $selected_mailer, $mailers ) ) ? $selected_mailer : 'wpmail';
797
 
 
798
  foreach ( $mailers as $key => $mailer ) {
799
  $class = ( $key === 'pepipost' ) ? 'es_recommended' : '';
800
- $html .= '<label><div class="es-mailer-logo ' . $class . '"><div class="es-logo-wrapper"><img src="' . $mailer['logo'] . '" alt="Default (none)" class="border-0"></div>';
801
- $html .= '<input type="radio" class="es_mailer" name="ig_es_mailer_settings[mailer]" value="' . $key . '" ' . checked( $selected_mailer, $key, false ) . '>' . $mailer['name'] . '</input></div></label>';
 
 
 
 
 
 
 
802
  }
803
 
804
  return $html;
40
 
41
  $options = apply_filters( 'ig_es_before_save_settings', $options );
42
 
43
+ $options['ig_es_disable_wp_cron'] = isset( $options['ig_es_disable_wp_cron'] ) ? $options['ig_es_disable_wp_cron'] : 'no';
44
+ $options['ig_es_track_email_opens'] = isset( $options['ig_es_track_email_opens'] ) ? $options['ig_es_track_email_opens'] : 'no';
45
+ $options['ig_es_enable_welcome_email'] = isset( $options['ig_es_enable_welcome_email'] ) ? $options['ig_es_enable_welcome_email'] : 'no';
46
+ $options['ig_es_notify_admin'] = isset( $options['ig_es_notify_admin'] ) ? $options['ig_es_notify_admin'] : 'no';
47
+ $options['ig_es_enable_cron_admin_email'] = isset( $options['ig_es_enable_cron_admin_email'] ) ? $options['ig_es_enable_cron_admin_email'] : 'no';
48
+
49
 
50
  $text_fields_to_sanitize = array(
51
  'ig_es_from_name',
113
 
114
  ?>
115
 
116
+ <div class="wrap">
117
+ <h1 class="mt-4 wp-heading-inline"><span class="text-2xl font-bold leading-7 text-gray-900 sm:text-3xl sm:leading-9 sm:truncate">Settings</h1>
118
+ </header>
119
+ </span>
120
+ <form action="" method="post" class="font-sans sticky bg-white rounded-lg shadow-md">
121
+ <div class="flex flex-wrap mt-6">
122
+ <?php settings_fields( 'email_subscribers_settings' );
123
+ $es_settings_tabs = array(
124
+ 'general' => array( 'icon' => 'admin-generic', 'name' => __( 'General', 'email-subscribers' ) ),
125
+ 'signup_confirmation' => array( 'icon' => 'format-chat', 'name' => __( 'Notifications', 'email-subscribers' ) ),
126
+ 'email_sending' => array( 'icon' => 'email-alt', 'name' => __( 'Email Sending', 'email-subscribers' ) ),
127
+ 'security_settings' => array( 'icon' => 'lock', 'name' => __( 'Security', 'email-subscribers' ) ),
128
+ );
129
+ $es_settings_tabs = apply_filters( 'ig_es_settings_tabs', $es_settings_tabs );
130
+ ?>
131
+ <div id="es-settings-menu" class="w-1/5 border-r border-gray-100 pt-4 text-gray-800 leading-normal">
132
+ <div class="es-menu-list lg:block mt-0 my-2 lg:my-0 lg:border-transparent bg-white shadow lg:shadow-none lg:bg-transparent z-20" style="top:6em;" id="menu-content">
133
+ <ul id="menu-nav" class=" list-reset py-2 md:py-0">
 
 
 
134
  <?php
135
+ foreach ( $es_settings_tabs as $key => $value ) {
136
+ ?>
137
+ <li id="menu-content-li" class="settings-menu-change mx-2 h-10 py-1 border rounded md:my-2 border-transparent hover:rounded-lg hover:border-gray-200">
138
+ <a href="#tabs-<?php echo $key ?>" id="menu-content-change" class="block px-4 pt-1 align-middle font-medium text-base hover:text-gray-800 no-underline active:text-gray-900"><i class="py-0.5 dashicons dashicons-<?php echo $value['icon'] ?>"></i>&nbsp;<?php echo $value['name'] ?></a></li>
139
+ <?php
140
+ }
141
+ ?>
142
+ </ul>
143
+ </div>
144
  </div>
145
+
146
+ <div class="w-4/5" id="es-menu-tab-content">
147
  <?php $settings = self::get_registered_settings();
148
  foreach ( $settings as $key => $value ) {
149
  ?>
150
+ <div id="tabs-<?php echo $key ?>" class="setting-content"><?php $this->render_settings_fields( $value ); ?></div>
151
  <?php
152
  }
153
  ?>
 
154
 
155
+ </div>
156
  </div>
157
  </form>
158
  </div>
159
  <?php
 
160
  }
161
 
162
  public static function get_registered_settings() {
209
  'name' => __( 'Image Size', 'email-subscribers' ),
210
  'type' => 'select',
211
  'options' => ES_Common::get_image_sizes(),
212
+ 'desc' => __( 'Select image size for {{POSTIMAGE}} to be shown in the Post Notification Emails.', 'email-subscribers' ),
213
  'default' => 'full'
214
  ),
215
 
217
  'id' => 'ig_es_track_email_opens',
218
  'name' => __( 'Track Opens', 'email-subscribers' ),
219
  'type' => 'checkbox',
 
220
  'default' => 'yes'
221
  ),
222
 
328
  'welcome_emails' => array(
329
  'id' => 'welcome_emails',
330
  'name' => __( 'Welcome Email', 'email-subscribers' ),
331
+ 'info' => __( 'Send welcome email to new contact after signup.', 'email-subscribers' ),
332
  'sub_fields' => array(
333
 
334
  'ig_es_enable_welcome_email' => array(
335
+ 'id' => 'ig_es_enable_welcome_email',
336
+ 'name' => __( 'Enable?', 'email-subscribers' ),
337
+ 'type' => 'checkbox',
338
+ 'default' => 'yes',
339
+ //'desc' => __( 'Send welcome email to new contact after signup.', 'email-subscribers' ),
 
 
 
340
  ),
341
 
342
  'ig_es_welcome_email_subject' => array(
395
 
396
  'id' => 'admin_notifications',
397
  'name' => __( 'Admin Notification On New Subscription', 'email-subscribers' ),
398
+ 'info' => __( 'Notify admin(s) for new contact signup.', 'email-subscribers' ),
399
  'sub_fields' => array(
400
 
401
  'notify_admin' => array(
402
  'id' => 'ig_es_notify_admin',
403
  'name' => __( 'Notify?', 'email-subscribers' ),
404
+ 'type' => 'checkbox',
405
+ //'desc' => __( 'Set this option to "Yes" to notify admin(s) for new contact signup.', 'email-subscribers' ),
 
 
 
 
406
  'default' => 'yes'
407
  ),
408
 
428
  'ig_es_cron_report' => array(
429
  'id' => 'ig_es_cron_report',
430
  'name' => __( 'Admin Notification On Every Campaign Sent', 'email-subscribers' ),
431
+ 'info' => __( 'Notify admin(s) on every campaign sent.', 'email-subscribers' ),
432
  'sub_fields' => array(
433
 
434
+ 'ig_es_enable_cron_admin_email' => array(
435
+ 'id' => 'ig_es_enable_cron_admin_email',
436
+ 'name' => __( 'Notify?', 'email-subscribers' ),
437
+ 'type' => 'checkbox',
438
+
 
 
 
 
439
  'default' => 'yes'
440
  ),
441
+
442
  'ig_es_cron_admin_email_subject' => array(
443
  'type' => 'text',
444
  'options' => false,
476
  'readonly' => 'readonly',
477
  'id' => 'ig_es_cronurl',
478
  'name' => __( 'Cron URL', 'email-subscribers' ),
479
+ 'desc' => sprintf( __( "You need to visit this URL to send email notifications. Know <a href='%s' target='_blank'>how to run this in background</a>", 'email-subscribers' ), "https://www.icegram.com/documentation/es-how-to-schedule-cron-emails-in-cpanel/?utm_source=es&utm_medium=in_app&utm_campaign=view_docs_help_page" )
 
480
  ),
481
  'ig_es_disable_wp_cron' => array(
482
  'type' => 'checkbox',
485
  'default' => 'no',
486
  'id' => 'ig_es_disable_wp_cron',
487
  'name' => __( 'Disable WordPress Cron', 'email-subscribers' ),
488
+ 'info' => __( 'Check this if you do not want Email Subscribers to use WP Cron to send emails.', 'email-subscribers' )
489
  ),
490
 
491
  'ig_es_cron_interval' => array(
493
  'name' => __( 'Send Emails At Most Every', 'email-subscribers' ),
494
  'type' => 'select',
495
  'options' => ES()->cron->cron_intervals(),
496
+ 'desc' => __( 'Optional if a real cron service is used', 'email-subscribers' ),
497
  'default' => IG_ES_CRON_INTERVAL
498
  ),
499
 
507
  'desc' => __( 'Total emails your host can send in an hour.', 'email-subscribers' )
508
  ),
509
 
510
+
511
  'ig_es_max_email_send_at_once' => array(
512
  'type' => 'number',
513
  'placeholder' => '',
520
 
521
  'ig_es_test_send_email' => array(
522
  'type' => 'html',
523
+ 'html' => '<input id="es-test-email" class="mt-3 mb-1 form-input h-9 border-gray-400"/><input type="submit" name="submit" id="es-send-test" class="ig-es-primary-button" value="Send Email"><span class="es_spinner_image_admin" id="spinner-image" style="display:none"><img src="' . ES_PLUGIN_URL . 'lite/public/images/spinner.gif' . '" alt="Loading..."/></span>',
524
  'placeholder' => '',
525
  'supplemental' => '',
526
  'default' => '',
529
  'desc' => __( 'Enter email address to send test email.', 'email-subscribers' )
530
  ),
531
 
532
+
533
  'ig_es_mailer_settings' => array(
534
  'type' => 'html',
535
  // 'html' => ES_Admin_Settings::mailers_html(),
536
  'sub_fields' => array(
537
+ 'mailer' => array(
538
  'id' => 'ig_es_mailer_settings[mailer]',
539
  'name' => __( 'Select Mailer', 'email-subscribers' ),
540
  'type' => 'html',
541
  'html' => ES_Admin_Settings::mailers_html(),
542
  'desc' => '',
543
  ),
544
+
545
  'ig_es_pepipost_api_key' => array(
546
  'type' => 'password',
547
  'options' => false,
580
  'type' => 'textarea',
581
  'info' => __( 'Seeing spam signups from particular domains? Enter domains names (one per line) that you want to block here.', 'email-subscribers' ),
582
  'default' => '',
583
+ 'rows' => 3
584
  ),
585
 
586
  );
633
  $html = ! empty( $arguments['html'] ) ? $arguments['html'] : '';
634
  $id_key = ! empty( $id_key ) ? $id_key : $uid;
635
  $class = ! empty( $arguments['class'] ) ? $arguments['class'] : '';
636
+ $rows = ! empty( $arguments['rows'] ) ? $arguments['rows'] : 12;
637
  // Check which type of field we want
638
  switch ( $arguments['type'] ) {
 
639
  case 'text': // If it is a text field
640
+ $field_html = sprintf( '<input name="%1$s" id="%2$s" placeholder="%4$s" value="%5$s" %6$s class="form-input h-9 mt-2 mb-1 text-sm border-gray-400 w-3/5 %7$s"/>', $uid, $id_key, $type, $placeholder, $value, $readonly, $class );
641
+ break;
642
+ case 'password': // If it is a text field
643
+ $field_html = sprintf( '<input name="%1$s" id="%2$s" type="%3$s" placeholder="%4$s" value="%5$s" %6$s class="form-input h-9 mt-2 mb-1 text-sm border-gray-400 w-3/5 %7$s"/>', $uid, $id_key, $type, $placeholder, $value, $readonly, $class );
644
  break;
645
 
646
  case 'number': // If it is a number field
647
+ $field_html = sprintf( '<input name="%1$s" id="%1$s" type="%2$s" placeholder="%3$s" value="%4$s" %5$s min="0" class="mt-2 mb-1 h-9 text-sm border-gray-400 w-2/5 "/>', $uid, $type, $placeholder, $value, $readonly );
648
  break;
649
 
650
  case 'email':
651
+ $field_html = sprintf( '<input name="%1$s" id="%2$s" placeholder="%4$s" value="%5$s" class="form-input w-2/3 mt-2 mb-1 h-9 text-sm border-gray-400 w-3/5 %6$s"/>', $uid, $id_key, $type, $placeholder, $value, $class );
652
  break;
653
 
654
  case 'textarea':
655
+ $field_html = sprintf( '<textarea name="%1$s" id="%2$s" placeholder="%3$s" size="100" rows="%6$s" cols="58" class="form-textarea text-sm w-2/3 mt-3 mb-1 border-gray-400 w-3/5 %5$s">%4$s</textarea>', $uid, $id_key, $placeholder, $value, $class, $rows );
656
  break;
657
 
658
  case 'file':
659
+ $field_html = '<input id="logo_url" name="' . $uid . '" value="' . $value . '" class="form-input w-2/3 mt-2 mb-1 h-9 border-gray-400 text-sm w-3/5' . $class . '"/> <input id="upload_logo_button" type="button" class="button" value="Upload Logo" />';
660
  break;
661
 
662
  case 'checkbox' :
663
+
664
+ $field_html = '<label for="' . $id_key . '" class="mt-4 mb-1 inline-flex items-center cursor-pointer">
665
+ <span class="relative">
666
+ <input id="' . $id_key . '" type="checkbox" name="' . $uid . '" value="yes" ' . checked( $value, 'yes', false ) . ' class="mt-6 absolute es-check-toggle opacity-0 w-0 h-0 ' . $class . '" />' . $placeholder . '</input>
667
+ <span class="es-mail-toggle-line block w-10 h-6 bg-gray-300 rounded-full shadow-inner "></span>
668
+ <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>
669
+ </span>
670
+ </label>';
671
  break;
672
 
673
  case 'select':
677
  $options_markup .= sprintf( '<option value="%s" %s>%s</option>', $key,
678
  selected( $value, $key, false ), $label );
679
  }
680
+ $field_html = sprintf( '<select name="%1$s" id="%2$s" class="form-select rounded-lg w-2/5 h-9 mt-2 mb-1 border-gray-400 %4$s">%3$s</select>', $uid, $id_key, $options_markup, $class );
681
  }
682
  break;
683
 
692
  //If there is help text
693
  if ( ! empty( $arguments['desc'] ) ) {
694
  $helper = $arguments['desc'];
695
+ $field_html .= sprintf( '<p class="italic text-xs font-normal text-gray-500 mb-2 leading-snug"> %s</p>', $helper ); // Show it
696
  }
697
 
698
  return $field_html;
708
 
709
  function render_settings_fields( $fields ) {
710
 
711
+ $html = "<table class='mt-4 rounded-lg bg-white mr-4 lg:mx-5 xl:mx-7 overflow-hidden'>";
712
  $html .= "<tbody>";
713
  $button_html = '';
714
  foreach ( $fields as $key => $field ) {
715
  if ( ! empty( $field['name'] ) ) {
716
+ $html .= "<tr class=' ml-4 py-4 border-b border-gray-100'><th scope='row' class='pt-7 ml-6 block pt-3 pb-8 text-left pr-4'><span class='text-sm font-semibold text-gray-600 pb-2'>";
717
  $html .= $field['name'];
718
 
719
  //If there is help text
720
  if ( ! empty( $field['info'] ) ) {
721
  $helper = $field['info'];
722
+ $html .= "<br />" . sprintf( '<p class="italic text-xs font-normal text-gray-500 mt-1 leading-snug">%s</p>', $helper ); // Show it
723
  }
724
+ $button_html = "<tr>";
725
 
726
  $html .= "</th>";
727
  }
728
 
729
+ $html .= "<td class=' pl-5 w-4/6 bg-white rounded-lg py-2'>";
730
  if ( ! empty( $field['sub_fields'] ) ) {
731
  $option_key = '';
732
+ foreach ( $field['sub_fields'] as $field_key => $sub_field ) {
733
  if ( strpos( $sub_field['id'], '[' ) ) {
734
+ $parts = explode( '[', $sub_field['id'] );
735
  if ( $option_key !== $parts[0] ) {
736
  $option_value = get_option( $parts[0] );
737
  $option_key = $parts[0];
741
  $class = ( ! empty( $sub_field['class'] ) ) ? $sub_field['class'] : "";
742
  $html .= ( $sub_field !== reset( $field['sub_fields'] ) ) ? '<br/>' : '';
743
  $html .= '<div class="es_sub_headline ' . $class . '" ><strong>' . $sub_field['name'] . '</strong></div>';
744
+ $html .= $this->field_callback( $sub_field, $field_key );
745
  }
746
  } else {
747
  $html .= $this->field_callback( $field );
759
  $html .= '<input type="hidden" name="submit_action" value="ig-es-save-admin-settings"/>';
760
  //$html .= '<input type="hidden" name="update-settings" id="update-settings" value="' . $nonce . '"/>';
761
  $html .= $nonce_field;
762
+ $html .= '<input type="submit" name="submit" class="cursor-pointer my-2 mx-6 ig-es-primary-button" value="' . __( 'Save Settings', 'email-subscribers' ) . '">';
763
  $html .= "</td></tr>";
764
  $html .= "</tbody>";
765
  $html .= "</table>";
799
  $mailers = array(
800
  'wpmail' => array( 'name' => 'WP Mail', 'logo' => ES_PLUGIN_URL . 'lite/admin/images/wpmail.png' ),
801
  'phpmail' => array( 'name' => 'PHP mail', 'logo' => ES_PLUGIN_URL . 'lite/admin/images/phpmail.png' ),
802
+ 'pepipost' => array( 'name' => 'Pepipost <span class="dashicons dashicons-thumbs-up"></span>', 'logo' => ES_PLUGIN_URL . 'lite/admin/images/pepipost.png', 'docblock' => $pepipost_doc_block ),
803
  );
804
 
805
  $mailers = apply_filters( 'ig_es_mailers', $mailers );
806
  $selected_mailer = ( array_key_exists( $selected_mailer, $mailers ) ) ? $selected_mailer : 'wpmail';
807
 
808
+
809
  foreach ( $mailers as $key => $mailer ) {
810
  $class = ( $key === 'pepipost' ) ? 'es_recommended' : '';
811
+ $html .= '<label class="inline-flex items-center cursor-pointer">';
812
+ $html .= '<input type="radio" class="es_mailer absolute opacity-0 w-0 h-0" name="ig_es_mailer_settings[mailer]" value="' . $key . '" ' . checked( $selected_mailer, $key, false ) . ' />
813
+ <div class="mt-4 mr-4 border-solid border-2 rounded-lg border-gray-200 shadow-md es-mailer-logo ' . $class . '">
814
+ <div class="es-logo-wrapper border-0">
815
+ <img src="' . $mailer['logo'] . '" alt="Default (none)">
816
+ </div>'
817
+ . $mailer['name'] .
818
+ '</div>
819
+ </label>';
820
  }
821
 
822
  return $html;
lite/includes/classes/class-es-campaigns-table.php CHANGED
@@ -93,8 +93,8 @@ class ES_Campaigns_Table extends WP_List_Table {
93
 
94
  ?>
95
  <div class="wrap">
96
- <h1 class="wp-heading-inline"><?php _e( 'Campaigns', 'email-subscribers' ) ?>
97
- <a href="admin.php?page=es_notifications&action=new" class="ig-es-title-button px-2 py-2 mx-1"><?php _e( 'Create Post Notification', 'email-subscribers' ) ?></a>
98
  <a href="admin.php?page=es_newsletters" class="ig-es-title-button px-2 py-2 mx-1"><?php _e( 'Send Broadcast', 'email-subscribers' ) ?></a>
99
  <?php do_action( 'ig_es_after_campaign_type_buttons' );
100
 
@@ -259,6 +259,8 @@ class ES_Campaigns_Table extends WP_List_Table {
259
  * @param string $column_name
260
  *
261
  * @return mixed
 
 
262
  */
263
  public function column_default( $item, $column_name ) {
264
  switch ( $column_name ) {
@@ -270,10 +272,6 @@ class ES_Campaigns_Table extends WP_List_Table {
270
  return '-';
271
  }
272
  break;
273
- case 'status':
274
-
275
- return $this->get_statuses( $item[ $column_name ] );
276
- break;
277
  case 'type':
278
  $type = ( $item[ $column_name ] === 'newsletter' ) ? __( 'Broadcast', 'email-subscribers' ) : $item[ $column_name ];
279
  $type = ucwords( str_replace( '_', ' ', $type ) );
@@ -345,6 +343,61 @@ class ES_Campaigns_Table extends WP_List_Table {
345
  return $title;
346
  }
347
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
348
 
349
  /**
350
  * Associative array of columns
93
 
94
  ?>
95
  <div class="wrap">
96
+ <h1 class="wp-heading-inline"><span class="text-2xl font-bold leading-7 text-gray-900 sm:text-3xl sm:leading-9 sm:truncate"><?php _e( 'Campaigns', 'email-subscribers' ) ?>
97
+ <a href="admin.php?page=es_notifications&action=new" class="ig-es-title-button px-2 py-2 mx-1"><?php _e( 'Create Post Notification', 'email-subscribers' ) ?></a></span>
98
  <a href="admin.php?page=es_newsletters" class="ig-es-title-button px-2 py-2 mx-1"><?php _e( 'Send Broadcast', 'email-subscribers' ) ?></a>
99
  <?php do_action( 'ig_es_after_campaign_type_buttons' );
100
 
259
  * @param string $column_name
260
  *
261
  * @return mixed
262
+ *
263
+ * @modified 4.4.4 Removed 'status' column switch case.
264
  */
265
  public function column_default( $item, $column_name ) {
266
  switch ( $column_name ) {
272
  return '-';
273
  }
274
  break;
 
 
 
 
275
  case 'type':
276
  $type = ( $item[ $column_name ] === 'newsletter' ) ? __( 'Broadcast', 'email-subscribers' ) : $item[ $column_name ];
277
  $type = ucwords( str_replace( '_', ' ', $type ) );
343
  return $title;
344
  }
345
 
346
+ /**
347
+ * Method for campaign status HTML
348
+ *
349
+ * @return string $status_html Campaign status HTML.
350
+ *
351
+ * @since 4.4.4
352
+ */
353
+ function column_status( $item ) {
354
+ $campaign_id = ! empty( $item['id'] ) ? $item['id'] : 0;
355
+ $campaign_status = ! empty( $item['status'] ) ? (int) $item['status'] : 0;
356
+ $campaign_statuses = array(
357
+ IG_ES_CAMPAIGN_STATUS_ACTIVE,
358
+ IG_ES_CAMPAIGN_STATUS_IN_ACTIVE
359
+ );
360
+
361
+ if( in_array( $campaign_status, $campaign_statuses, true ) ) {
362
+ ?>
363
+ <label for="<?php echo esc_attr( 'ig-es-campaign-status-toggle-' . $campaign_id ); ?>" class="ig-es-campaign-status-toggle-label inline-flex items-center cursor-pointer">
364
+ <span class="relative">
365
+ <input id="<?php echo esc_attr( 'ig-es-campaign-status-toggle-' . $campaign_id ); ?>" type="checkbox" class="absolute es-check-toggle opacity-0 w-0 h-0" name="<?php echo esc_attr( 'ig-es-campaign-status-toggle-' . $campaign_id ); ?>" value="<?php echo esc_attr( $campaign_id ); ?>" <?php checked( IG_ES_CAMPAIGN_STATUS_ACTIVE, $campaign_status ); ?>>
366
+ <span class="es-mail-toggle-line inline-block w-10 h-6 bg-gray-300 rounded-full shadow-inner"></span>
367
+ <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>
368
+ </span>
369
+ </label>
370
+ <?php
371
+ } else {
372
+ switch ( $campaign_status ) {
373
+ case IG_ES_CAMPAIGN_STATUS_SCHEDULED:
374
+ ?>
375
+ <span class="dashicons dashicons-backup" title="<?php echo esc_attr__( 'Scheduled', 'email-subscribers' ); ?>"></span>
376
+ <?php
377
+ break;
378
+
379
+ case IG_ES_CAMPAIGN_STATUS_QUEUED:
380
+ ?>
381
+ <span class="dashicons dashicons-image-rotate" title="<?php echo esc_attr__( 'Queued', 'email-subscribers' ); ?>"></span>
382
+ <?php
383
+ break;
384
+
385
+ case IG_ES_CAMPAIGN_STATUS_PAUSED:
386
+ ?>
387
+ <span class="dashicons dashicons-controls-pause" title="<?php echo esc_attr__( 'Paused', 'email-subscribers' ); ?>"></span>
388
+ <?php
389
+ break;
390
+
391
+ default:
392
+ ?>
393
+ <span class="dashicons dashicons-yes-alt" title="<?php echo esc_attr__( 'Finished', 'email-subscribers' ); ?>"></span>
394
+ <?php
395
+ break;
396
+ }
397
+ }
398
+ ?>
399
+ <?php
400
+ }
401
 
402
  /**
403
  * Associative array of columns
lite/includes/classes/class-es-contact-background-process.php ADDED
@@ -0,0 +1,1097 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class to handle export/import of ES contacts in background
4
+ *
5
+ * @author Icegram
6
+ * @since 4.4.4
7
+ * @version 1.0.0
8
+ *
9
+ * @package Email Subscribers
10
+ */
11
+
12
+ if ( ! defined( 'ABSPATH' ) ) {
13
+ exit; // Exit if accessed directly.
14
+ }
15
+
16
+ if ( ! class_exists( 'ES_Contact_Background_Process' ) ) {
17
+
18
+ /**
19
+ * ES_Contact_Background_Process Class.
20
+ */
21
+ class ES_Contact_Background_Process {
22
+
23
+ /**
24
+ * Start time of current process.
25
+ *
26
+ * (default value: 0)
27
+ *
28
+ * @var int
29
+ * @access protected
30
+ */
31
+ protected $start_time = 0;
32
+
33
+ /**
34
+ * Identifier
35
+ *
36
+ * @var mixed
37
+ * @access protected
38
+ */
39
+ protected $identifier;
40
+
41
+ /**
42
+ * Background process status
43
+ *
44
+ * (default value: '')
45
+ *
46
+ * @var string
47
+ * @access protected
48
+ */
49
+ protected $is_process_running = '';
50
+
51
+ /**
52
+ * Variable to hold instance of ES_Contact_Background_Process
53
+ *
54
+ * @var $instance
55
+ */
56
+ private static $instance = null;
57
+
58
+ /**
59
+ * Contructor
60
+ *
61
+ * @since 4.4.4
62
+ */
63
+ private function __construct() {
64
+
65
+ $this->identifier = 'ig_es_contact_background_process';
66
+ add_action( 'admin_notices', array( $this, 'contact_background_notice' ) );
67
+ add_action( 'wp_ajax_ig_es_contact_background_progress', array( $this, 'ajax_contact_background_progress' ) );
68
+ add_action( 'wp_ajax_ig_es_get_background_process_results', array( $this, 'ajax_get_background_process_results' ) );
69
+ add_action( 'wp_ajax_ig_es_download_csv', array( $this, 'ajax_download_csv' ) );
70
+ add_action( 'ig_es_add_contact_to_csv', array( $this, 'add_contact_to_csv' ) );
71
+ add_action( 'ig_es_import_contacts_from_csv', array( $this, 'import_contacts_from_csv' ) );
72
+
73
+ add_action( 'action_scheduler_failed_action', array( $this, 'restart_failed_action' ) );
74
+ add_filter( 'cron_schedules', array( $this, 'modify_action_scheduler_default_interval' ), 1000 ); // phpcs:ignore
75
+ }
76
+
77
+ /**
78
+ * Get single instance of ES_Contact_Background_Process
79
+ *
80
+ * @return ES_Contact_Background_Process Singleton object of ES_Contact_Background_Process
81
+ *
82
+ * @since 4.4.4
83
+ */
84
+ public static function get_instance() {
85
+ // Check if instance is already exists.
86
+ if ( is_null( self::$instance ) ) {
87
+ self::$instance = new self();
88
+ }
89
+
90
+ return self::$instance;
91
+ }
92
+
93
+ /**
94
+ * Memory exceeded
95
+ *
96
+ * Ensures the batch process never exceeds 90%
97
+ * of the maximum WordPress memory.
98
+ *
99
+ * @return bool
100
+ *
101
+ * @since 4.4.4
102
+ */
103
+ protected function memory_exceeded() {
104
+ $memory_limit = $this->get_memory_limit() * 0.9; // 90% of max memory
105
+ $current_memory = memory_get_usage( true );
106
+
107
+ if ( $current_memory >= $memory_limit ) {
108
+ return true;
109
+ }
110
+
111
+ return false;
112
+ }
113
+
114
+ /**
115
+ * Get memory limit.
116
+ *
117
+ * @return int
118
+ *
119
+ * @since 4.4.4
120
+ */
121
+ protected function get_memory_limit() {
122
+ if ( function_exists( 'ini_get' ) ) {
123
+ $memory_limit = ini_get( 'memory_limit' );
124
+ } else {
125
+ // Sensible default.
126
+ $memory_limit = '128M';
127
+ }
128
+
129
+ if ( ! $memory_limit || -1 === intval( $memory_limit ) ) {
130
+ // Unlimited, set to 32GB.
131
+ $memory_limit = '32G';
132
+ }
133
+
134
+ return wp_convert_hr_to_bytes( $memory_limit );
135
+ }
136
+
137
+ /**
138
+ * Time exceeded.
139
+ *
140
+ * Ensures the batch never exceeds a sensible time limit.
141
+ * A timeout limit of 30s is common on shared hosting.
142
+ *
143
+ * @param string $start_time start timestamp.
144
+ *
145
+ * @return bool
146
+ *
147
+ * @since 4.4.4
148
+ */
149
+ protected function time_exceeded( $start_time = '' ) {
150
+
151
+ if ( ! empty( $start_time ) ) {
152
+ $this->start_time = $start_time;
153
+ }
154
+
155
+ $finish = $this->start_time + ( $this->get_time_limit() * 0.9 );
156
+ $return = false;
157
+
158
+ if ( time() >= $finish ) {
159
+ $return = true;
160
+ }
161
+
162
+ return apply_filters( $this->identifier . '_time_exceeded', $return );
163
+ }
164
+
165
+ /**
166
+ * Method to get Server time limit
167
+ *
168
+ * @return int $time_limit Server time limit.
169
+ *
170
+ * @since 4.4.4
171
+ */
172
+ protected function get_time_limit() {
173
+ if ( function_exists( 'ini_get' ) ) {
174
+ $time_limit = ini_get( 'max_execution_time' );
175
+ } else {
176
+ // Sensible default.
177
+ $time_limit = apply_filters( $this->identifier . '_default_time_limit', 20 );
178
+ }
179
+
180
+ $time_limit = (int) $time_limit;
181
+ return $time_limit;
182
+ }
183
+
184
+ /**
185
+ * Display notice if a background process is already running or is completed
186
+ *
187
+ * @since 4.4.4
188
+ */
189
+ public function contact_background_notice() {
190
+
191
+ if ( ! ES()->is_es_admin_screen() ) {
192
+ return;
193
+ }
194
+
195
+ if ( ! wp_script_is( 'jquery' ) ) {
196
+ wp_enqueue_script( 'jquery' );
197
+ }
198
+
199
+ $upload_dir = wp_upload_dir();
200
+ $upload_path = $upload_dir['path'];
201
+ if ( ! empty( $upload_dir['error'] ) ) {
202
+ ?>
203
+ <div id="ig_es_folder_permission_warning" class="error">
204
+ <p>
205
+ <span class="dashicons dashicons-warning"></span>&nbsp;
206
+ <?php /* translators: 1. Important 2. Upload path */ ?>
207
+ <?php echo sprintf( esc_html__( '%1$s: To allow import/export of contacts, please make sure %2$s directory is writable.', 'email-subscribers' ), '<strong>' . esc_html__( 'Important', 'email-subscribers' ) . '</strong>', '<strong><code>' . esc_html( $upload_path ) . '</code></strong>' ); ?>
208
+ </p>
209
+ </div>
210
+ <?php
211
+ } else {
212
+ $action = ig_es_get_request_data( 'action' );
213
+ $is_process_running = $this->is_process_running();
214
+ $background_process_result = get_site_option( 'ig_es_contact_background_process_result', false );
215
+
216
+ // If background process is not running and there isn't any background process result to show then return.
217
+ if( 'no' === $is_process_running && empty( $background_process_result ) ) {
218
+ return;
219
+ }
220
+
221
+ // Show background process notification only on import/export admin pages.
222
+ if( in_array( $action, array( 'import', 'export' ), true ) ) {
223
+ // Show background process in progress message.
224
+ if ( 'yes' === $is_process_running ) {
225
+ ?>
226
+ <div id="ig_es_contact_background_progress" class="error" style="display: none;">
227
+ <p>
228
+ <?php
229
+ $process_data = get_site_option( 'ig_es_contact_background_process_data', false );
230
+
231
+ if( ! empty( $process_data ) ) {
232
+ $bulk_action = $process_data['action'];
233
+
234
+ switch ( $bulk_action ) {
235
+ case 'import_contact':
236
+ $bulk_text = __( 'imported', 'email-subscribers' );
237
+ break;
238
+
239
+ case 'export_contact':
240
+ $bulk_text = __( 'exported', 'email-subscribers' );
241
+ break;
242
+
243
+ default:
244
+ $bulk_text = '';
245
+ break;
246
+ }
247
+
248
+ echo '<strong>' . esc_html__( 'Important', 'email-subscribers' ) . '</strong>: ' . esc_html__( 'Contacts are being', 'email-subscribers' );
249
+ echo '&nbsp;' . esc_html( $bulk_text ) . '&nbsp;';
250
+ echo esc_html__( 'in the background.', 'email-subscribers' ) . '&nbsp;';
251
+ ?>
252
+ <span id="ig_es_contact_background_prcess_percentage_wrapper" style="display: none;">
253
+ <?php echo esc_html__( 'Progress', 'email-subscribers' ); ?>:&nbsp;
254
+ <strong><span id="ig_es_background_process_percentage"><?php echo esc_html__( '--:--:--', 'email-subscribers' ); ?></span></strong>
255
+ </span>
256
+ <?php
257
+ }
258
+ ?>
259
+ </p>
260
+ <p>
261
+ <?php echo esc_html__( 'You can continue with other work. But before bulk exporting or importing contacts, you need to wait for this process to complete.', 'email-subscribers' ); ?>
262
+ </p>
263
+ </div>
264
+ <?php
265
+ } else {
266
+ // Check if there are any background process results to show.
267
+ if( ! empty( $background_process_result ) ) {
268
+ $this->get_background_process_results_html( $background_process_result );
269
+ }
270
+ }
271
+ }
272
+ ?>
273
+ <script type="text/javascript">
274
+ jQuery(function(){
275
+ // Clear interval callback function.
276
+ let clear_interval_callback = null;
277
+
278
+ jQuery(document).ready(function(){
279
+ var border_color = jQuery('#ig_es_contact_background_progress').css('border-left-color');
280
+ jQuery('#ig_es_contact_background_progress').css('border-top', '1px solid ' + border_color);
281
+ jQuery('#ig_es_contact_background_progress').css('border-right', '1px solid ' + border_color);
282
+ jQuery('#ig_es_contact_background_progress').css('border-bottom', '1px solid ' + border_color);
283
+ jQuery('#ig_es_contact_background_progress').show();
284
+ jQuery('body').on('click', '.download-csv-wrapper a', function(){
285
+ jQuery('.download-csv-wrapper').hide('slow');
286
+ });
287
+ <?php
288
+ // If background process is running then check it's progress continuously with the interval of 5 seconds.
289
+ if( 'yes' === $is_process_running ) {
290
+ ?>
291
+ ig_es_check_contact_background_progress();
292
+ clear_interval_callback = setInterval(function(){
293
+ ig_es_check_contact_background_progress();
294
+ },5000);
295
+ <?php
296
+ } else {
297
+ // If there are background results to show then show it using
298
+ if( ! empty( $background_process_result ) ) {
299
+ ?>
300
+ ig_es_get_background_process_results();
301
+ <?php
302
+ }
303
+ }
304
+ ?>
305
+ });
306
+
307
+ let admin_ajax_url = '<?php echo esc_url( admin_url( 'admin-ajax.php' ) ); ?>';
308
+
309
+ function ig_es_start_contact_background_progress_percentage( progress_data, target_dom ) {
310
+ let target_element_wrapper = target_dom.find('#ig_es_contact_background_prcess_percentage_wrapper');
311
+ let target_element = target_dom.find('#ig_es_background_process_percentage');
312
+ let percent_completion = progress_data.percent_completion;
313
+ let contact_action = progress_data.contact_action;
314
+ let action_data = progress_data.action_data;
315
+
316
+ target_element_wrapper.show();
317
+ percent_completion = Math.round( percent_completion * 100 ) / 100;
318
+ target_element.text(percent_completion + '%');
319
+ }
320
+
321
+ function ig_es_disable_import_form() {
322
+ if( 1 === jQuery('#ig_es_contact_background_progress').length ) {
323
+ jQuery('form#form_addemail').find('[name="submit"]').attr('disabled','disabled');
324
+ }
325
+ }
326
+
327
+ function ig_es_enable_import_form() {
328
+ if( 1 === jQuery('#ig_es_contact_background_results').length ) {
329
+ jQuery('form#form_addemail').find('[name="submit"]').removeAttr('disabled');
330
+ }
331
+ }
332
+
333
+ function ig_es_check_contact_background_progress() {
334
+ ig_es_disable_import_form();
335
+ jQuery.ajax({
336
+ url: admin_ajax_url,
337
+ method: 'post',
338
+ dataType: 'json',
339
+ data: {
340
+ action: 'ig_es_contact_background_progress',
341
+ security: '<?php echo esc_attr( wp_create_nonce( 'ig-es-background-contact-progress' ) ); ?>'
342
+ },
343
+ success: function( response ) {
344
+
345
+ let percent_completion = response.percent_completion;
346
+ let contact_action = response.contact_action;
347
+ let action_stage = response.action_stage;
348
+ let action_data = response.action_data;
349
+
350
+ let progress_data = {
351
+ percent_completion: response.percent_completion,
352
+ contact_action: response.contact_action,
353
+ action_stage: response.action_stage,
354
+ action_data: response.action_data
355
+ }
356
+
357
+ let target_dom = jQuery('#ig_es_contact_background_progress');
358
+
359
+ if ( response.percent_completion !== undefined && response.percent_completion !== '' ) {
360
+ if( 100 == response.percent_completion) {
361
+ clearInterval(clear_interval_callback);
362
+ ig_es_get_background_process_results();
363
+ }
364
+ target_dom.show();
365
+ ig_es_start_contact_background_progress_percentage( progress_data, target_dom );
366
+ }
367
+ }
368
+ });
369
+ }
370
+
371
+ function ig_es_get_background_process_results() {
372
+ // Check if results already shown then return.
373
+ if( 1 === jQuery('#ig_es_contact_background_results').length ) {
374
+ return;
375
+ }
376
+ jQuery.ajax({
377
+ url: admin_ajax_url,
378
+ method: 'post',
379
+ dataType: 'json',
380
+ data: {
381
+ action: 'ig_es_get_background_process_results',
382
+ security: '<?php echo esc_attr( wp_create_nonce( 'ig-es-background-contact-process-results' ) ); ?>'
383
+ },
384
+ success: function( response ) {
385
+ if( 'undefined' !== typeof response.response_html && '' !== response.response_html ) {
386
+ let result_html = jQuery.parseHTML( response.response_html );
387
+ // If there is background process progress message being shown then replace it with background process result html else show background process result after page heading.
388
+ if( 1 === jQuery('#ig_es_contact_background_progress').length ) {
389
+ jQuery('#ig_es_contact_background_progress').replaceWith( result_html );
390
+ } else {
391
+ jQuery(result_html).insertAfter( '.wp-heading-inline' );
392
+ }
393
+ ig_es_enable_import_form();
394
+ }
395
+ }
396
+ });
397
+ }
398
+ });
399
+ </script>
400
+ <?php
401
+ }
402
+ }
403
+
404
+ /**
405
+ * Get background process progress via ajax
406
+ *
407
+ * @since 4.4.4
408
+ */
409
+ public function ajax_contact_background_progress() {
410
+
411
+ check_ajax_referer( 'ig-es-background-contact-progress', 'security' );
412
+
413
+ $response = array();
414
+
415
+ $progress = $this->calculate_contact_background_progress();
416
+
417
+ if ( isset( $progress['percent_completion'] ) ) {
418
+ $response['percent_completion'] = $progress['percent_completion'];
419
+ }
420
+
421
+ $process_data = get_site_option( 'ig_es_contact_background_process_data', false );
422
+
423
+ if ( ! empty( $process_data ) ) {
424
+
425
+ $contact_action = $process_data['action'];
426
+ $response['contact_action'] = $contact_action;
427
+ } else {
428
+ $process_result = get_site_option( 'ig_es_contact_background_process_result', false );
429
+ if( ! empty( $process_result ) ) {
430
+ $response['percent_completion'] = 100;
431
+ $response['contact_action'] = $process_result['action'];
432
+ }
433
+ }
434
+
435
+ wp_send_json( $response );
436
+ }
437
+
438
+ /**
439
+ * Get exported CSV file.
440
+ *
441
+ * @since 4.4.4
442
+ */
443
+ public function ajax_download_csv() {
444
+
445
+ check_ajax_referer( 'ig_es_download_csv', 'download_nonce' );
446
+
447
+ $background_process_result = get_site_option( 'ig_es_contact_background_process_result', false );
448
+
449
+ if ( $background_process_result ) {
450
+
451
+ $file_path = $background_process_result['action_data']['csv_file_path'];
452
+ $file_name = basename( $file_path );
453
+ $dirname = dirname( $file_path );
454
+ $mime_type = 'text/x-csv';
455
+
456
+ if ( file_exists( $file_path ) && is_readable( $file_path ) ) {
457
+
458
+ nocache_headers();
459
+ header( 'X-Robots-Tag: noindex, nofollow', true );
460
+ header( 'Content-Type: ' . $mime_type . '; charset=UTF-8' );
461
+ header( 'Content-Description: File Transfer' );
462
+ header( 'Content-Transfer-Encoding: binary' );
463
+ header( 'Content-Disposition: attachment; filename="' . sanitize_file_name( $file_name ) . '";' );
464
+ readfile( $file_path ); // phpcs:ignore
465
+ unlink( $file_path );
466
+ } else {
467
+ echo esc_html__( 'Failed to create export file.', 'email-subscribers' );
468
+ exit();
469
+ }
470
+
471
+ delete_site_option( 'ig_es_contact_background_process_result' );
472
+ exit();
473
+
474
+ }
475
+ }
476
+
477
+ /**
478
+ * Checks if background process is running
479
+ *
480
+ * @return string $is_process_running
481
+ *
482
+ * @since 4.4.4
483
+ */
484
+ public function is_process_running() {
485
+
486
+ // Return process status if it has already been saved.
487
+ if ( ! empty( $this->is_process_running ) ) {
488
+ return $this->is_process_running;
489
+ }
490
+
491
+ $process_data = get_site_option( 'ig_es_contact_background_process_data', false );
492
+ $this->is_process_running = ( ! empty( $process_data ) ) ? 'yes' : 'no';
493
+
494
+ return $this->is_process_running;
495
+ }
496
+
497
+ /**
498
+ * Calculate progress of background contact process
499
+ *
500
+ * @return array $progress
501
+ *
502
+ * @since 4.4.4
503
+ */
504
+ public function calculate_contact_background_progress() {
505
+
506
+ $progress = array();
507
+ $process_data = get_site_option( 'ig_es_contact_background_process_data', false );
508
+
509
+ if( ! empty( $process_data ) ) {
510
+ $total_contacts_to_process = ! empty( $process_data['total_contacts_to_process'] ) ? $process_data['total_contacts_to_process'] : 0;
511
+ $total_contacts_processed = ! empty( $process_data['total_contacts_processed'] ) ? $process_data['total_contacts_processed'] : 0;
512
+
513
+ $percent_completion = 0;
514
+ if ( ! empty( $total_contacts_to_process ) ) {
515
+ $percent_completion = ( ( intval( $total_contacts_processed ) ) * 100 ) / intval( $total_contacts_to_process );
516
+ }
517
+ $progress['percent_completion'] = floatval( $percent_completion );
518
+ }
519
+
520
+ return $progress;
521
+ }
522
+
523
+ /**
524
+ * Add Contacts to CSV from saved contact's data
525
+ *
526
+ * @since 4.4.4
527
+ */
528
+ public function add_contact_to_csv() {
529
+
530
+ global $wpdb;
531
+
532
+ $process_data = get_site_option( 'ig_es_contact_background_process_data', true );
533
+
534
+ // Check status of contacts to be exported. Return if empty.
535
+ if( empty( $process_data['contact_status'] ) ) {
536
+ return;
537
+ }
538
+
539
+ $contact_status = $process_data['contact_status'];
540
+ $total_contacts_processed = ! empty( $process_data['total_contacts_processed'] ) ? $process_data['total_contacts_processed'] : 0;
541
+ $list_id = ! empty( $process_data['list_id'] ) ? $process_data['list_id'] : 0; // Contact list id.
542
+ $last_contact_id = ! empty( $process_data['last_contact_id'] ) ? $process_data['last_contact_id'] : 0; // ID of last exported contact.
543
+
544
+ $email_subscribe_table = IG_CONTACTS_TABLE;
545
+
546
+ $contact_results = array();
547
+ if ( 'all' === $contact_status ) {
548
+ $contact_results = ES()->lists_contacts_db->get_all_contacts();
549
+ } elseif ( 'subscribed' === $contact_status ) {
550
+ $contact_results = ES()->lists_contacts_db->get_all_subscribed_contacts();
551
+ } elseif ( 'unsubscribed' === $contact_status ) {
552
+ $contact_results = ES()->lists_contacts_db->get_all_unsubscribed_contacts();
553
+ } elseif ( 'confirmed' === $contact_status ) {
554
+ $contact_results = ES()->lists_contacts_db->get_all_confirmed_contacts();
555
+ } elseif ( 'unconfirmed' === $contact_status ) {
556
+ $contact_results = ES()->lists_contacts_db->get_all_unconfirmed_contacts();
557
+ } elseif ( 'select_list' === $contact_status ) {
558
+ $list_id = absint( $list_id );
559
+ $contact_results = ES()->lists_contacts_db->get_all_contacts_from_list( $list_id );
560
+ }
561
+
562
+ $subscribers = array();
563
+
564
+ // Set fail safe limit to process contact to export.
565
+ $fail_safe_limit = apply_filters( 'ig_es_fail_safe_contact_export_limit', 1000 );
566
+
567
+ // ID of last processed contact list data.
568
+ $last_processed_list_contact_id = ! empty( $process_data['last_processed_list_contact_id'] ) ? $process_data['last_processed_list_contact_id'] : 0;
569
+
570
+ if ( count( $contact_results ) > 0 ) {
571
+ $total_contacts_to_process = count( $contact_results );
572
+
573
+ $process_data['total_contacts_to_process'] = $total_contacts_to_process;
574
+ $contact_list_map = array();
575
+ $contact_ids = array();
576
+ if( ! empty( $last_processed_list_contact_id ) ) {
577
+ $last_processed_list_contact_id_index = array_search($last_processed_list_contact_id, array_column( $contact_results, 'id') );
578
+ // Remove contact results before $last_processed_list_contact_id_index since they have been processed in last run.
579
+ $contact_results = array_splice( $contact_results, $last_processed_list_contact_id_index + 1 );
580
+ }
581
+
582
+ foreach ( $contact_results as $result_count => $result ) {
583
+ if ( ! in_array( $result['contact_id'], $contact_ids ) ) {
584
+ $contact_ids[] = $result['contact_id'];
585
+ }
586
+
587
+ $contact_list_map[ $result['contact_id'] ][] = array(
588
+ 'status' => $result['status'],
589
+ 'list_id' => $result['list_id'],
590
+ 'optin_type' => $result['optin_type']
591
+ );
592
+
593
+ // If contact fail safe limit reached then set id of list contact data. This will be used in next run while processing $contact_results.
594
+ if( $result_count >= $fail_safe_limit ) {
595
+ $last_processed_list_contact_id = $result['id'];
596
+ break;
597
+ }
598
+ }
599
+ $contact_ids_str = "'" . implode( "' , '", $contact_ids ) . "' ";
600
+
601
+ $query = "SELECT `id`, `first_name`, `last_name`, `email`, `created_at` FROM {$email_subscribe_table} WHERE id IN ({$contact_ids_str}) ORDER BY FIELD( id, {$contact_ids_str})";
602
+ $subscribers = $wpdb->get_results( $query, ARRAY_A );
603
+ }
604
+
605
+ $subscribers_count = count( $subscribers );
606
+
607
+ $batch_start_time = time();
608
+
609
+ if ( isset( $process_data['export_file'] ) && is_array( $process_data['export_file'] ) ) {
610
+ $export_file = $process_data['export_file'];
611
+ $csv_folder = $export_file['wp_upload_dir'];
612
+ $file_name = $export_file['file_name'];
613
+ $csv_file_path = $csv_folder . $file_name;
614
+ $csv_file_handler = fopen( $csv_file_path, 'a' ); // phpcs:ignore
615
+
616
+ // Proceed only if file has opened in append mode.
617
+ if ( false !== $csv_file_handler ) {
618
+ $last_subscriber = end( $subscribers );
619
+ $last_subscriber_id = $last_subscriber['id'];
620
+ $lists_id_name_map = ES()->lists_db->get_list_id_name_map();
621
+ foreach ( $subscribers as $subscriber ) {
622
+ $subscriber_id = $subscriber['id'];
623
+ $data = array();
624
+ $data['first_name'] = trim( str_replace( '"', '""', $subscriber['first_name'] ) );
625
+ $data['last_name'] = trim( str_replace( '"', '""', $subscriber['last_name'] ) );
626
+ $data['email'] = trim( str_replace( '"', '""', $subscriber['email'] ) );
627
+ $contact_id = $subscriber['id'];
628
+ if ( ! empty( $contact_list_map[ $contact_id ] ) ) {
629
+ foreach ( $contact_list_map[ $contact_id ] as $list_details ) {
630
+ $file_data = "\n";
631
+ $data['list'] = $lists_id_name_map[ $list_details['list_id'] ];
632
+ $data['status'] = ucfirst( $list_details['status'] );
633
+ $data['optin_type'] = ( $list_details['optin_type'] == 1 ) ? 'Single Opt-In' : 'Double Opt-In';
634
+ $data['created_at'] = $subscriber['created_at'];
635
+ $file_data .= '"' . implode( '","', $data ) . '"';
636
+ if ( $file_data ) {
637
+ fwrite( $csv_file_handler, $file_data ); // phpcs:ignore
638
+ }
639
+ $total_contacts_processed++;
640
+ }
641
+ }
642
+
643
+ // If loop is completed or time is reached or memory limit is reached then set required options for next run and break the loop.
644
+ if ( $last_subscriber_id === $subscriber_id || $this->time_exceeded( $batch_start_time ) || $this->memory_exceeded() ) {
645
+ $process_data['last_contact_id'] = $subscriber_id;
646
+ $process_data['total_contacts_processed'] = $total_contacts_processed;
647
+ $process_data['last_processed_list_contact_id'] = $last_processed_list_contact_id;
648
+ update_site_option( 'ig_es_contact_background_process_data', $process_data );
649
+ if ( function_exists( 'as_schedule_single_action' ) ) {
650
+ as_schedule_single_action( time(), 'ig_es_add_contact_to_csv' );
651
+ }
652
+ break;
653
+ }
654
+ }
655
+
656
+ fclose( $csv_file_handler ); // phpcs:ignore
657
+
658
+ // If all contacts are processed.
659
+ if ( $total_contacts_processed >= $total_contacts_to_process ) {
660
+
661
+ $contact_background_process_result = array(
662
+ 'action' => 'export_contact',
663
+ 'total_contacts_processed' => $total_contacts_processed,
664
+ 'action_data' => array(
665
+ 'csv_file_path' => $csv_file_path,
666
+ ),
667
+ );
668
+
669
+ as_unschedule_action( 'ig_es_add_contact_to_csv' );
670
+ as_unschedule_action( 'ig_es_import_contacts_from_csv' );
671
+
672
+ // Delete background process data as it is now completed.
673
+ delete_site_option( 'ig_es_contact_background_process_data' );
674
+
675
+ update_site_option( 'ig_es_contact_background_process_result', $contact_background_process_result );
676
+ }
677
+ }
678
+ }
679
+ }
680
+
681
+ /**
682
+ * Generate Contacts from generated/imported csv file
683
+ *
684
+ * @since 4.4.4
685
+ */
686
+ public function import_contacts_from_csv() {
687
+
688
+ $process_data = get_site_option( 'ig_es_contact_background_process_data', true );
689
+ $total_contacts_to_process = ! empty( $process_data['total_contacts_to_process'] ) ? (int) $process_data['total_contacts_to_process'] : 0;
690
+
691
+ if ( isset( $process_data['import_file'] ) && is_array( $process_data['import_file'] ) && ! empty( $total_contacts_to_process ) ) {
692
+
693
+ $contact_status = $process_data['contact_status'];
694
+ $list_id = $process_data['list_id'];
695
+ $import_file = $process_data['import_file'];
696
+ $csv_file = $import_file['file'];
697
+ $file_position = isset( $import_file['file_position'] ) && is_numeric( $import_file['file_position'] ) ? $import_file['file_position'] : 0;
698
+
699
+ // Set locale.
700
+ $encoding = mb_detect_encoding( $csv_file, 'UTF-8, ISO-8859-1', true );
701
+ if ( $encoding ) {
702
+ setlocale( LC_ALL, 'en_US.' . $encoding );
703
+ }
704
+ ini_set( 'auto_detect_line_endings', true ); // phpcs:ignore
705
+ $csv_file_handler = fopen( $csv_file, 'r' ); // phpcs:ignore
706
+ if ( false !== $csv_file_handler ) {
707
+
708
+ $delimiter = $this->get_delimiter( $csv_file );
709
+
710
+ // Get Headers
711
+ $csv_header = array_map( 'trim', fgetcsv( $csv_file_handler, 0 ) );
712
+
713
+ $batch_start_time = time();
714
+
715
+ $reading_completed = false;
716
+ $no_of_remaining_contacts = -1;
717
+ $existing_contacts_email_id_map = ES()->contacts_db->get_email_id_map();
718
+
719
+ $existing_contacts = array();
720
+ if ( count( $existing_contacts_email_id_map ) > 0 ) {
721
+ $existing_contacts = array_keys( $existing_contacts_email_id_map );
722
+ $existing_contacts = array_map( 'strtolower', $existing_contacts );
723
+ }
724
+
725
+ $invalid_emails_count = ! empty( $process_data['invalid_emails_count'] ) ? $process_data['invalid_emails_count'] : 0;
726
+ $total_contacts_processed = ! empty( $process_data['total_contacts_processed'] ) ? $process_data['total_contacts_processed'] : 0;
727
+ $existing_contacts_count = ! empty( $process_data['existing_contacts_count'] ) ? $process_data['existing_contacts_count'] : 0;
728
+ $processed_emails = array();
729
+ $contacts_data = array();
730
+ $current_date_time = ig_get_current_date_time();
731
+
732
+ for ( $no_of_contacts_imported = 1; $no_of_contacts_imported <= $total_contacts_to_process; $no_of_contacts_imported++ ) {
733
+
734
+ $result = $this->parse_data_by_row( $csv_file_handler, $csv_header, $file_position, $encoding, $delimiter );
735
+ $file_position = $result['file_position'];
736
+ $parsed_csv_data = $result['parsed_csv_data'];
737
+ $reading_completed = $result['reading_completed'];
738
+ if ( ! $reading_completed ) {
739
+
740
+ $parsed_csv_data = array_map( 'trim', $parsed_csv_data );
741
+
742
+ $email = isset( $parsed_csv_data['Email'] ) ? strtolower( sanitize_email( trim( $parsed_csv_data['Email'] ) ) ) : '';
743
+ if ( empty( $email ) ) {
744
+ $total_contacts_processed++;
745
+ $invalid_emails_count++;
746
+ continue;
747
+ }
748
+
749
+ if ( ! in_array( $email, $existing_contacts ) ) {
750
+ $contacts_data = array();
751
+ $name = isset( $parsed_csv_data['Name'] ) ? trim( $parsed_csv_data['Name'] ) : '';
752
+ $first_name = isset( $parsed_csv_data['First Name'] ) ? sanitize_text_field( trim( $parsed_csv_data['First Name'] ) ) : '';
753
+ $last_name = isset( $parsed_csv_data['Last Name'] ) ? sanitize_text_field( trim( $parsed_csv_data['Last Name'] ) ) : '';
754
+
755
+ // If we don't get the first_name & last_name, consider Name field.
756
+ // If name empty, get the name from Email
757
+ if ( empty( $first_name ) && empty( $last_name ) ) {
758
+
759
+ if ( empty( $name ) ) {
760
+ $name = ES_Common::get_name_from_email( $email );
761
+ }
762
+
763
+ $names = ES_Common::prepare_first_name_last_name( $name );
764
+ $first_name = sanitize_text_field( $names['first_name'] );
765
+ $last_name = sanitize_text_field( $names['last_name'] );
766
+ }
767
+
768
+ $guid = ES_Common::generate_guid();
769
+
770
+ $contacts_data['first_name'] = $first_name;
771
+ $contacts_data['last_name'] = $last_name;
772
+ $contacts_data['email'] = $email;
773
+ $contacts_data['source'] = 'import';
774
+ $contacts_data['status'] = 'verified';
775
+ $contacts_data['hash'] = $guid;
776
+ $contacts_data['created_at'] = $current_date_time;
777
+
778
+ ES()->contacts_db->bulk_insert( array( $contacts_data ) );
779
+
780
+ } else {
781
+ $existing_contacts_count++;
782
+ }
783
+ $processed_emails[] = $email;
784
+ $total_contacts_processed++;
785
+ }
786
+
787
+ $no_of_remaining_contacts = $total_contacts_to_process - $total_contacts_processed;
788
+
789
+ if ( 0 === $no_of_remaining_contacts ) {
790
+
791
+ $contact_ids = ES()->contacts_db->get_contact_ids_by_emails( $processed_emails );
792
+ if( ! empty( $contact_ids ) ) {
793
+ ES()->lists_contacts_db->remove_contacts_from_lists( $contact_ids, $list_id );
794
+ ES()->lists_contacts_db->do_import_contacts_into_list( $list_id, $contact_ids, $contact_status, 1, $current_date_time );
795
+ }
796
+
797
+ $contact_background_process_result = array(
798
+ 'action' => 'import_contact',
799
+ 'total_contacts_to_process' => $total_contacts_to_process,
800
+ 'total_contacts_processed' => $total_contacts_processed,
801
+ 'existing_contacts_count' => $existing_contacts_count,
802
+ 'invalid_emails_count' => $invalid_emails_count,
803
+ );
804
+
805
+ fclose( $csv_file_handler ); // phpcs:ignore
806
+ unlink( $csv_file );
807
+ delete_site_option( 'ig_es_contact_background_process_data' );
808
+
809
+ update_site_option( 'ig_es_contact_background_process_result', $contact_background_process_result, 'no' );
810
+ break;
811
+ }
812
+
813
+ if ( $this->time_exceeded( $batch_start_time ) || $this->memory_exceeded() ) {
814
+
815
+ $contact_ids = ES()->contacts_db->get_contact_ids_by_emails( $processed_emails );
816
+ if( ! empty( $contact_ids ) ) {
817
+ ES()->lists_contacts_db->remove_contacts_from_lists( $contact_ids, $list_id );
818
+ ES()->lists_contacts_db->do_import_contacts_into_list( $list_id, $contact_ids, $contact_status, 1, $current_date_time );
819
+ }
820
+
821
+ fclose( $csv_file_handler ); // phpcs:ignore
822
+ $process_data['import_file']['file_position'] = $file_position;
823
+ $process_data['total_contacts_processed'] = $total_contacts_processed;
824
+ $process_data['existing_contacts_count'] = $existing_contacts_count;
825
+ $process_data['invalid_emails_count'] = $invalid_emails_count;
826
+ update_site_option( 'ig_es_contact_background_process_data', $process_data );
827
+ if ( function_exists( 'as_schedule_single_action' ) ) {
828
+ as_schedule_single_action( time(), 'ig_es_import_contacts_from_csv' );
829
+ }
830
+ break;
831
+ }
832
+ }
833
+ }
834
+ }
835
+ }
836
+
837
+ /**
838
+ * Restart scheduler after one minute if it fails
839
+ *
840
+ * @param array $action_id id of failed action.
841
+ *
842
+ * @since 4.4.4
843
+ */
844
+ public function restart_failed_action( $action_id = 0 ) {
845
+
846
+ if ( empty( $action_id ) || ! class_exists( 'ActionScheduler' ) || ! is_callable( array( 'ActionScheduler', 'store' ) ) || ! function_exists( 'as_schedule_single_action' ) ) {
847
+ return;
848
+ }
849
+
850
+ $action = ActionScheduler::store()->fetch_action( $action_id );
851
+ $action_hook = $action->get_hook();
852
+
853
+ if ( in_array( $action_hook, array( 'ig_es_add_contact_to_csv', 'ig_es_import_contacts_from_csv' ), true ) ) {
854
+ as_schedule_single_action( time() + MINUTE_IN_SECONDS, $action_hook );
855
+ }
856
+ }
857
+
858
+ /**
859
+ * Parse data one row at a time
860
+ *
861
+ * @param boolean $file_handler CSV file handler.
862
+ * @param array $header CSV header meta column name.
863
+ * @param integer $file_position file pointer posistion to read from.
864
+ * @param string $encoding Character encoding.
865
+ * @param string $delimiter Delimiting character.
866
+ *
867
+ * @return array $result parsed data with current file pointer position
868
+ *
869
+ * @since 4.4.4
870
+ */
871
+ public function parse_data_by_row( $file_handler = false, $header = array(), $file_position = 0, $encoding = '', $delimiter = ',' ) {
872
+
873
+ $parsed_csv_data = array();
874
+
875
+ $reading_completed = false;
876
+
877
+ if ( false !== $file_handler ) {
878
+
879
+ if ( $file_position > 0 ) {
880
+
881
+ fseek( $file_handler, (int) $file_position );
882
+
883
+ }
884
+
885
+ if ( false !== ( $postmeta = fgetcsv( $file_handler, 0, $delimiter ) ) ) { // phpcs:ignore
886
+ $row = array();
887
+ foreach ( $header as $key => $heading ) {
888
+
889
+ // Put all CSV data into an associative array by row.
890
+ $row[ $heading ] = ( isset( $postmeta[ $key ] ) ) ? $this->format_data_from_csv( stripslashes( $postmeta[ $key ] ), $encoding ) : '';
891
+ }
892
+
893
+ $parsed_csv_data = $row;
894
+
895
+ unset( $postmeta, $row );
896
+
897
+ } else {
898
+
899
+ $reading_completed = true;
900
+
901
+ }
902
+
903
+ $file_position = ftell( $file_handler );
904
+ }
905
+
906
+ $result = array(
907
+ 'parsed_csv_data' => $parsed_csv_data,
908
+ 'file_position' => $file_position,
909
+ 'reading_completed' => $reading_completed,
910
+ );
911
+
912
+ return $result;
913
+ }
914
+
915
+ /**
916
+ * Format data passed from CSV
917
+ *
918
+ * @param array $data The data to format.
919
+ * @param string $enc Encoding.
920
+ *
921
+ * @since 4.4.4
922
+ */
923
+ public function format_data_from_csv( $data, $enc ) {
924
+ return ( 'UTF-8' === $enc ) ? $data : utf8_encode( $data );
925
+ }
926
+
927
+ /**
928
+ * Get CSV file delimiter
929
+ *
930
+ * @param $file
931
+ * @param int $check_lines
932
+ *
933
+ * @return mixed
934
+ *
935
+ * @since 4.4.4
936
+ */
937
+ public function get_delimiter( $file, $check_lines = 2 ) {
938
+
939
+ $file = new SplFileObject( $file );
940
+
941
+ $delimiters = array( ',', '\t', ';', '|', ':' );
942
+ $results = array();
943
+ $i = 0;
944
+ while ( $file->valid() && $i <= $check_lines ) {
945
+ $line = $file->fgets();
946
+ foreach ( $delimiters as $delimiter ) {
947
+ $regExp = '/[' . $delimiter . ']/';
948
+ $fields = preg_split( $regExp, $line );
949
+ if ( count( $fields ) > 1 ) {
950
+ if ( ! empty( $results[ $delimiter ] ) ) {
951
+ $results[ $delimiter ] ++;
952
+ } else {
953
+ $results[ $delimiter ] = 1;
954
+ }
955
+ }
956
+ }
957
+ $i ++;
958
+ }
959
+
960
+ if ( count( $results ) > 0 ) {
961
+
962
+ $results = array_keys( $results, max( $results ) );
963
+
964
+ return $results[0];
965
+ }
966
+
967
+ return ',';
968
+
969
+ }
970
+
971
+ /**
972
+ * Function to modify action scheduler's default interval between two consecutive scheduler when background process running
973
+ *
974
+ * @param array $schedules schedules with interval and display.
975
+ *
976
+ * @return array $schedules
977
+ *
978
+ * @since 4.4.4
979
+ */
980
+ public function modify_action_scheduler_default_interval( $schedules = array() ) {
981
+
982
+ if ( 'yes' === $this->is_process_running() ) {
983
+
984
+ $schedules['every_minute'] = array(
985
+ 'interval' => 5,
986
+ 'display' => __( 'Every 5 Seconds', 'email-subscribers' ),
987
+ );
988
+ }
989
+
990
+ return $schedules;
991
+ }
992
+
993
+
994
+ /**
995
+ * Method to get background process result HTML in ajax request.
996
+ *
997
+ * @return array $response Response HTML array
998
+ *
999
+ * @since 4.4.4
1000
+ */
1001
+ public function ajax_get_background_process_results() {
1002
+
1003
+ check_ajax_referer( 'ig-es-background-contact-process-results', 'security' );
1004
+
1005
+ $background_process_result = get_site_option( 'ig_es_contact_background_process_result', false );
1006
+
1007
+ $response = array(
1008
+ 'response_html' => '',
1009
+ );
1010
+
1011
+ if ( false !== $background_process_result ) {
1012
+ switch ( $background_process_result['action'] ) {
1013
+ case 'export_contact':
1014
+ $action_text = __( 'exported', 'email-subscribers' );
1015
+ break;
1016
+ default:
1017
+ $action_text = __( 'imported', 'email-subscribers' );
1018
+ break;
1019
+ }
1020
+ ob_start();
1021
+ $this->get_background_process_results_html( $background_process_result );
1022
+ $response_html = ob_get_clean();
1023
+ $response['response_html'] = $response_html;
1024
+ wp_send_json( $response );
1025
+ }
1026
+ }
1027
+
1028
+ /**
1029
+ * Method to get background process result HTML
1030
+ *
1031
+ * @since 4.4.4
1032
+ */
1033
+ public function get_background_process_results_html( $background_process_result ) {
1034
+
1035
+ if ( ! empty( $background_process_result ) ) {
1036
+ switch ( $background_process_result['action'] ) {
1037
+ case 'export_contact':
1038
+ $action_text = __( 'exported', 'email-subscribers' );
1039
+ break;
1040
+ default:
1041
+ $action_text = __( 'imported', 'email-subscribers' );
1042
+ break;
1043
+ }
1044
+ ?>
1045
+ <div id="ig_es_contact_background_results" class="updated">
1046
+ <p>
1047
+ <?php echo esc_html__( 'Successfully', 'email-subscribers' ) . ' ' . esc_html( $action_text ) . ' ' . esc_html( $background_process_result['total_contacts_processed'] ) . ' ' . esc_html( _n( 'contact', 'contacts', $background_process_result['total_contacts_processed'], 'email-subscribers' ) ) . '.'; ?>
1048
+ </p>
1049
+ <?php
1050
+ if ( 'export_contact' === $background_process_result['action'] ) {
1051
+ $action_data = ! empty( $background_process_result['action_data'] ) ? $background_process_result['action_data'] : '';
1052
+ if( ! empty( $action_data ) && ! empty( $action_data['csv_file_path' ] ) ) {
1053
+ ?>
1054
+ <p class="download-csv-wrapper">
1055
+ <?php
1056
+ echo esc_html__( 'CSV file has been generated. You can download it from ', 'email-subscribers' ) . '<a href="' . esc_url( admin_url( 'admin-ajax.php' ) ) . '?action=ig_es_download_csv&download_nonce=' . esc_attr( wp_create_nonce( 'ig_es_download_csv' ) ) . '">' . esc_html__( 'here', 'email-subscribers' ) . '</a>.';
1057
+ ?>
1058
+ </p>
1059
+ <?php
1060
+ }
1061
+ } else if( 'import_contact' === $background_process_result['action'] ) {
1062
+ $existing_contacts_count = ! empty( $background_process_result['existing_contacts_count'] ) ? $background_process_result['existing_contacts_count'] : 0;
1063
+ $invalid_emails_count = ! empty( $background_process_result['invalid_emails_count'] ) ? $background_process_result['invalid_emails_count'] : 0;
1064
+
1065
+ if( ! empty( $existing_contacts_count ) ) :
1066
+ ?>
1067
+ <p class="ig-es-existing-contacts-message">
1068
+ <?php
1069
+ echo sprintf( __( '%d contacts are already existed.', 'email-subscribers' ), $existing_contacts_count );
1070
+ ?>
1071
+ </p>
1072
+ <?php
1073
+ endif;
1074
+
1075
+ if( ! empty( $invalid_emails_count ) ) :
1076
+ ?>
1077
+ <p class="ig-es-invalid-contacts-message">
1078
+ <?php
1079
+ echo sprintf( __( '%d contacts are invalid.', 'email-subscribers' ), $invalid_emails_count );;
1080
+ ?>
1081
+ </p>
1082
+ <?php
1083
+ endif;
1084
+ ?>
1085
+ <?php
1086
+ delete_site_option( 'ig_es_contact_background_process_result' );
1087
+ }
1088
+ ?>
1089
+ </div>
1090
+ <?php
1091
+ }
1092
+ }
1093
+ }
1094
+
1095
+ }
1096
+
1097
+ ES_Contact_Background_Process::get_instance();
lite/includes/classes/class-es-contacts-table.php CHANGED
@@ -189,9 +189,12 @@ class ES_Contacts_Table extends WP_List_Table {
189
  ?>
190
 
191
  <h1 class="wp-heading-inline">
192
- <?php
193
- _e( 'Audience > Contacts', 'email-subscribers' );
194
- ES_Common::prepare_main_header_navigation( $audience_tab_main_navigation );
 
 
 
195
  ?>
196
  </h1>
197
 
@@ -459,10 +462,11 @@ class ES_Contacts_Table extends WP_List_Table {
459
  <header class="ml-12 mr-8 wp-heading-inline">
460
  <div class="md:flex md:items-center md:justify-between justify-center">
461
  <div class="flex-1 min-w-0">
462
- <h2 class=" my-2 text-2xl font-medium text-gray-800 sm:leading-9 sm:truncate">
463
- <a href="admin.php?page=es_subscribers"><?php _e('Audience ','email-subscribers'); ?></a> >
 
464
  <?php echo $title; ?>
465
- </h2>
466
  </div>
467
 
468
  <div class="py-2 flex md:mt-0 pb-2">
@@ -595,7 +599,6 @@ class ES_Contacts_Table extends WP_List_Table {
595
 
596
 
597
  public function prepare_contact_form( $data = array(), $is_new = false ) {
598
-
599
  $id = ! empty( $data['id'] ) ? $data['id'] : '';
600
  $created = ! empty( $data['created'] ) ? $data['created'] : '';
601
  $guid = ! empty( $data['guid'] ) ? $data['guid'] : '';
189
  ?>
190
 
191
  <h1 class="wp-heading-inline">
192
+ <span class="text-2xl font-bold leading-7 text-gray-900 sm:text-3xl sm:leading-9 sm:truncate"><?php
193
+ _e( 'Audience', 'email-subscribers' ); ?>
194
+ </span>
195
+ <?php
196
+ _e( ' > Contacts', 'email-subscribers' ); ?>
197
+ <?php ES_Common::prepare_main_header_navigation( $audience_tab_main_navigation );
198
  ?>
199
  </h1>
200
 
462
  <header class="ml-12 mr-8 wp-heading-inline">
463
  <div class="md:flex md:items-center md:justify-between justify-center">
464
  <div class="flex-1 min-w-0">
465
+ <h1 class="text-2xl leading-7 font-bold text-gray-900 sm:text-3xl sm:leading-9 sm:truncate">
466
+ <span class="text-2xl font-bold leading-7 text-gray-900 sm:text-3xl sm:leading-9 sm:truncate">
467
+ <a href="admin.php?page=es_subscribers"><?php _e('Audience ','email-subscribers'); ?></a></span> >
468
  <?php echo $title; ?>
469
+ </h1>
470
  </div>
471
 
472
  <div class="py-2 flex md:mt-0 pb-2">
599
 
600
 
601
  public function prepare_contact_form( $data = array(), $is_new = false ) {
 
602
  $id = ! empty( $data['id'] ) ? $data['id'] : '';
603
  $created = ! empty( $data['created'] ) ? $data['created'] : '';
604
  $guid = ! empty( $data['guid'] ) ? $data['guid'] : '';
lite/includes/classes/class-es-export-subscribers.php CHANGED
@@ -15,52 +15,10 @@ class Export_Subscribers {
15
  */
16
  public function __construct() {
17
 
18
- $report = ig_es_get_request_data( 'report' );
19
- $status = ig_es_get_request_data( 'status' );
20
-
21
- $can_access = ES_Common::ig_es_can_access( 'audience' );
22
-
23
- if ( $report && $status && $can_access ) {
24
-
25
- $status = trim( $status );
26
-
27
- $selected_list_id = 0;
28
-
29
- if ( 'select_list' === $status ) {
30
- $selected_list_id = ig_es_get_request_data( 'list_id', 0 );
31
-
32
- if ( 0 === $selected_list_id ) {
33
- $message = __( "Please Select List", "email-subscribers" );
34
- ES_Common::show_message( $message, 'error' );
35
- exit();
36
- }
37
- }
38
-
39
- $csv = $this->generate_csv( $status, $selected_list_id );
40
-
41
- $file_name = strtolower( $status ) . '-' . 'contacts.csv';
42
-
43
- if ( empty( $csv ) ) {
44
- $message = __( "No data available", 'email-subscribers' );
45
- ES_Common::show_message( $message, 'error' );
46
- exit();
47
- } else {
48
- header( "Pragma: public" );
49
- header( "Expires: 0" );
50
- header( "Cache-Control: must-revalidate, post-check=0, pre-check=0" );
51
- header( "Cache-Control: private", false );
52
- header( "Content-Type: application/octet-stream" );
53
- header( "Content-Disposition: attachment; filename={$file_name};" );
54
- header( "Content-Transfer-Encoding: binary" );
55
-
56
- echo $csv;
57
- exit;
58
- }
59
- }
60
-
61
  add_filter( 'query_vars', array( $this, 'query_vars' ) );
62
  add_action( 'parse_request', array( $this, 'parse_request' ) );
63
  add_action( 'admin_menu', array( $this, 'plugin_menu' ) );
 
64
  }
65
 
66
  public function plugin_menu() {
@@ -326,5 +284,188 @@ class Export_Subscribers {
326
  return $csv_output;
327
  }
328
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
329
  }
330
 
15
  */
16
  public function __construct() {
17
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18
  add_filter( 'query_vars', array( $this, 'query_vars' ) );
19
  add_action( 'parse_request', array( $this, 'parse_request' ) );
20
  add_action( 'admin_menu', array( $this, 'plugin_menu' ) );
21
+ add_action( 'init', array( $this, 'maybe_export_contact' ) );
22
  }
23
 
24
  public function plugin_menu() {
284
  return $csv_output;
285
  }
286
 
287
+ /**
288
+ * Method to generate a csv file and return generated file info.
289
+ *
290
+ * @return array $file_info Generated CSV file information.
291
+ *
292
+ * @since 4.4.4
293
+ */
294
+ public function create_csv( $file_name = '' ) {
295
+
296
+ $file_info = array();
297
+
298
+ if( ! empty( $file_name ) ) {
299
+ $getfield = '';
300
+
301
+ $columns_header = $this->get_csv_headers();
302
+
303
+ foreach ( $columns_header as $value ) {
304
+ $getfield .= $value . ',';
305
+ }
306
+
307
+ $fields = substr_replace( $getfield, '', -1 );
308
+
309
+ $fields .= $this->get_contact_csv_data( $columns_header, array() );
310
+
311
+ $upload_dir = wp_upload_dir();
312
+ $file_info['wp_upload_dir'] = $upload_dir['path'] . '/';
313
+ $file_info['file_name'] = $file_name;
314
+ $file_info['file_content'] = $fields;
315
+
316
+ if ( isset( $upload_dir['error'] ) && ! empty( $upload_dir['error'] ) ) {
317
+ $file_info['error'] = $upload_dir['error'];
318
+ }
319
+
320
+ return $file_info;
321
+ }
322
+ }
323
+
324
+ /**
325
+ * Export contact CSV data
326
+ *
327
+ * @param array $columns_header Column header.
328
+ * @param array $data The data.
329
+ * @return array $file_data
330
+ */
331
+ public function get_contact_csv_data( $columns_header, $data ) {
332
+
333
+ $each_field = array_keys( $columns_header );
334
+
335
+ $csv_data = '';
336
+
337
+ foreach ( (array) $data as $row ) {
338
+ $count_columns_header = count( $columns_header );
339
+ for ( $i = 0; $i < $count_columns_header; $i++ ) {
340
+ if ( 0 === $i ) {
341
+ $csv_data .= "\n";
342
+ }
343
+
344
+ if ( array_key_exists( $each_field[ $i ], $row ) ) {
345
+ $row_each_field = $row[ $each_field[ $i ] ];
346
+ } else {
347
+ $row_each_field = '';
348
+ }
349
+
350
+ $array = str_replace( array( "\n", "\n\r", "\r\n", "\r" ), "\t", $row_each_field );
351
+
352
+ $array = str_getcsv( $array, ',', '"', '\\' );
353
+
354
+ $str = ( $array && is_array( $array ) ) ? implode( ', ', $array ) : '';
355
+
356
+ $str = addslashes( $str );
357
+
358
+ $csv_data .= '"' . $str . '",';
359
+ }
360
+ $csv_data = substr_replace( $csv_data, '', -1 );
361
+ }
362
+
363
+ return $csv_data;
364
+ }
365
+
366
+ /**
367
+ * Method to get headers for ES contact CSV file.
368
+ *
369
+ * @return array $column_header CSV Headers
370
+ *
371
+ * @since 4.4.4
372
+ */
373
+ public function get_csv_headers() {
374
+
375
+ $csv_headers = apply_filters( 'ig_es_contact_csv_headers' ,
376
+ array(
377
+ __( 'First Name', 'email-subscribers' ),
378
+ __( 'Last Name', 'email-subscribers' ),
379
+ __( 'Email', 'email-subscribers' ),
380
+ __( 'List', 'email-subscribers' ),
381
+ __( 'Status', 'email-subscribers' ),
382
+ __( 'Opt-In Type', 'email-subscribers' ),
383
+ __( 'Created On', 'email-subscribers' )
384
+ )
385
+ );
386
+
387
+ return $csv_headers;
388
+
389
+ }
390
+
391
+ /**
392
+ * Method to initiate contact background export process
393
+ *
394
+ * @since 4.4.4
395
+ */
396
+ public function maybe_export_contact() {
397
+
398
+ $report = ig_es_get_request_data( 'report' );
399
+ $status = ig_es_get_request_data( 'status' );
400
+
401
+ $can_access = ES_Common::ig_es_can_access( 'audience' );
402
+
403
+ if ( $report && $status && $can_access ) {
404
+
405
+ $status = trim( $status );
406
+
407
+ $selected_list_id = 0;
408
+
409
+ if ( 'select_list' === $status ) {
410
+ $selected_list_id = ig_es_get_request_data( 'list_id', 0 );
411
+
412
+ if ( 0 === $selected_list_id ) {
413
+ $message = __( "Please Select List", "email-subscribers" );
414
+ ES_Common::show_message( $message, 'error' );
415
+ exit();
416
+ }
417
+ }
418
+
419
+ $file_name = strtolower( $status ) . '-' . 'contacts-' . date('Y-m-d') . '-' . time() . '.csv';
420
+
421
+ $export_file = $this->create_csv( $file_name );
422
+
423
+ if( ! empty( $export_file ) && is_array( $export_file ) ) {
424
+ // Check if there isn't any error e.g. file permission.
425
+ if( empty( $export_file['error'] ) ) {
426
+ // Create CSV file.
427
+ $csv_folder = $export_file['wp_upload_dir'];
428
+ $csvfilename = $csv_folder . $file_name;
429
+ $fp = fopen( $csvfilename, 'w' ); // phpcs:ignore
430
+
431
+ if ( false !== $fp ) {
432
+ file_put_contents( $csvfilename, $export_file['file_content'] ); // phpcs:ignore
433
+ fclose( $fp ); // phpcs:ignore
434
+
435
+ $contact_background_process_data = array(
436
+ 'action' => 'export_contact',
437
+ 'contact_status' => $status,
438
+ 'list_id' => $selected_list_id,
439
+ 'export_file' => $export_file,
440
+ );
441
+
442
+ update_site_option( 'ig_es_contact_background_process_data', $contact_background_process_data );
443
+
444
+ as_unschedule_action( 'ig_es_add_contact_to_csv' );
445
+ as_unschedule_action( 'ig_es_import_contacts_from_csv' );
446
+
447
+ as_schedule_single_action( time(), 'ig_es_add_contact_to_csv' );
448
+
449
+ ES()->init_action_scheduler_queue_runner();
450
+ } else {
451
+ $error_message = __( 'Unable to generate CSV file. Please try again later.', 'email-subscribers' );
452
+ }
453
+ } else {
454
+ $error_message = $created_file_info['error'];
455
+ }
456
+ } else {
457
+ $error_message = __( 'No data available', 'email-subscribers' );
458
+ }
459
+
460
+ if( ! empty( $error_message ) ) {
461
+ ES_Common::show_message( $error_message, 'error' );
462
+ } else {
463
+ $email_subscribers_page = admin_url( 'admin.php?page=es_subscribers&action=export' );
464
+ wp_safe_redirect( $email_subscribers_page );
465
+ }
466
+ exit();
467
+ }
468
+ }
469
+
470
  }
471
 
lite/includes/classes/class-es-forms-table.php CHANGED
@@ -78,7 +78,7 @@ class ES_Forms_Table extends WP_List_Table {
78
  $form = ig_es_get_request_data( 'form' );
79
  echo $this->edit_form( absint( $form ) );
80
  } else { ?>
81
- <h1 class="wp-heading-inline"><?php _e( 'Forms', 'email-subscribers' ) ?><a href="admin.php?page=es_forms&action=new" class="ig-es-title-button px-2 py-2 mx-1"><?php _e('Add New','email-subscribers'); ?></a></h1>
82
  <div id="poststuff">
83
  <div id="post-body" class="metabox-holder column-1">
84
  <div id="post-body-content">
@@ -257,8 +257,9 @@ class ES_Forms_Table extends WP_List_Table {
257
  <header class="ml-12 mr-8 wp-heading-inline">
258
  <div class="md:flex md:items-center md:justify-between justify-center">
259
  <div class="flex-1 min-w-0">
260
- <h2 class="wp-heading-inline my-2 text-2xl font-medium text-gray-800 sm:leading-9 sm:truncate">
261
- <a href="admin.php?page=es_forms"><?php _e('Forms ','email-subscribers'); ?></a> >
 
262
  <?php
263
  if ( $is_new ) {
264
  _e( ' New Form', 'email-subscribers' );
@@ -267,7 +268,7 @@ class ES_Forms_Table extends WP_List_Table {
267
  }
268
 
269
  ?>
270
- </h2>
271
  </div>
272
  </div>
273
  </header>
78
  $form = ig_es_get_request_data( 'form' );
79
  echo $this->edit_form( absint( $form ) );
80
  } else { ?>
81
+ <h1 class=" wp-heading-inline"><span class="text-2xl font-bold leading-7 text-gray-900 sm:text-3xl sm:leading-9 sm:truncate"><?php _e( 'Forms', 'email-subscribers' ) ?><a href="admin.php?page=es_forms&action=new" class="pt-2 ig-es-title-button px-2 py-2 mx-2"><?php _e('Add New','email-subscribers'); ?></a></span></h1>
82
  <div id="poststuff">
83
  <div id="post-body" class="metabox-holder column-1">
84
  <div id="post-body-content">
257
  <header class="ml-12 mr-8 wp-heading-inline">
258
  <div class="md:flex md:items-center md:justify-between justify-center">
259
  <div class="flex-1 min-w-0">
260
+ <h1 class="text-xl leading-7 text-gray-900 sm:text-3xl sm:leading-9 sm:truncate">
261
+ <span class="text-2xl font-bold leading-7 text-gray-900 sm:text-3xl sm:leading-9 sm:truncate">
262
+ <a href="admin.php?page=es_forms"><?php _e('Forms ','email-subscribers'); ?></a></span> >
263
  <?php
264
  if ( $is_new ) {
265
  _e( ' New Form', 'email-subscribers' );
268
  }
269
 
270
  ?>
271
+ </h1>
272
  </div>
273
  </div>
274
  </header>
lite/includes/classes/class-es-import-subscribers.php CHANGED
@@ -12,6 +12,7 @@ class ES_Import_Subscribers {
12
  * @since 4.0.0
13
  */
14
  public function __construct() {
 
15
  }
16
 
17
  /**
@@ -20,181 +21,13 @@ class ES_Import_Subscribers {
20
  * @since 4.0,0
21
  *
22
  * @modify 4.3.1
 
 
23
  */
24
  public function import_callback() {
25
 
26
  require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
27
 
28
- $submit = ig_es_get_post_data( 'submit' );
29
- if ( $submit ) {
30
- $import_contacts_nonce = ig_es_get_post_data( 'import_contacts' );
31
- if ( ! isset( $_POST['import_contacts'] ) || ! wp_verify_nonce( sanitize_key( $import_contacts_nonce ), 'import-contacts' ) ) {
32
- $message = __( "Sorry, you do not have permission to import contacts.", 'email-subscribers' );
33
- ES_Common::show_message( $message, 'error' );
34
- }
35
-
36
- if ( isset( $_FILES["file"] ) ) {
37
-
38
- if ( is_uploaded_file( $_FILES["file"]["tmp_name"] ) ) {
39
-
40
- $tmp_file = $_FILES["file"]["tmp_name"];
41
- $file = $_FILES['file']['name'];
42
-
43
- $ext = strtolower( substr( $file, strrpos( $file, "." ), ( strlen( $file ) - strrpos( $file, "." ) ) ) );
44
-
45
- if ( $ext == ".csv" ) {
46
-
47
- if ( ! ini_get( "auto_detect_line_endings" ) ) {
48
- ini_set( "auto_detect_line_endings", '1' );
49
- }
50
-
51
- $statuses = ES_Common::get_statuses_key_name_map();
52
- $es_email_status = ig_es_get_post_data( 'es_email_status' );
53
-
54
- $status = '';
55
- if ( in_array( $es_email_status, array_keys( $statuses ) ) ) {
56
- $status = $es_email_status;
57
- }
58
-
59
- if ( ! empty( $status ) ) {
60
-
61
- $lists = ES()->lists_db->get_id_name_map();
62
-
63
- $list_id = ig_es_get_post_data( 'list_id' );
64
-
65
- if ( ! in_array( $list_id, array_keys( $lists ) ) ) {
66
- $list_id = '';
67
- }
68
-
69
- if ( ! empty( $list_id ) ) {
70
-
71
- $delimiter = $this->get_delimiter( $tmp_file );
72
-
73
- $handle = fopen( $tmp_file, 'r' );
74
-
75
- // Get Headers
76
- $headers = array_map( 'trim', fgetcsv( $handle, 0, $delimiter ) );
77
-
78
- $existing_contacts_email_id_map = ES()->contacts_db->get_email_id_map();
79
-
80
- $existing_contacts = array();
81
- if ( count( $existing_contacts_email_id_map ) > 0 ) {
82
- $existing_contacts = array_keys( $existing_contacts_email_id_map );
83
- $existing_contacts = array_map( 'strtolower', $existing_contacts );
84
- }
85
-
86
- $invalid_emails_count = $imported_subscribers_count = $existing_contacts_count = 0;
87
- $emails = array();
88
-
89
- $values = $place_holders = $contacts_data = array();
90
- $current_date_time = ig_get_current_date_time();
91
-
92
- $i = 0;
93
- while ( ( $data = fgetcsv( $handle, 0, $delimiter ) ) !== false ) {
94
-
95
- $data = array_map( 'trim', $data );
96
-
97
- $data = array_combine( $headers, $data );
98
-
99
- $email = isset( $data['Email'] ) ? strtolower( sanitize_email( trim( $data['Email'] ) ) ) : '';
100
-
101
- if ( empty( $email ) ) {
102
- $invalid_emails_count ++;
103
- continue;
104
- }
105
-
106
- if ( ! in_array( $email, $existing_contacts ) ) {
107
-
108
- $name = isset( $data['Name'] ) ? trim( $data['Name'] ) : '';
109
- $first_name = isset( $data['First Name'] ) ? sanitize_text_field( trim( $data['First Name'] ) ) : '';
110
- $last_name = isset( $data['Last Name'] ) ? sanitize_text_field( trim( $data['Last Name'] ) ) : '';
111
-
112
- // If we don't get the first_name & last_name, consider Name field.
113
- // If name empty, get the name from Email
114
- if ( empty( $first_name ) && empty( $last_name ) ) {
115
-
116
- if ( empty( $name ) ) {
117
- $name = ES_Common::get_name_from_email( $email );
118
- }
119
-
120
- $names = ES_Common::prepare_first_name_last_name( $name );
121
- $first_name = sanitize_text_field( $names['first_name'] );
122
- $last_name = sanitize_text_field( $names['last_name'] );
123
- }
124
-
125
- $guid = ES_Common::generate_guid();
126
-
127
- $contacts_data[ $imported_subscribers_count ]['first_name'] = $first_name;
128
- $contacts_data[ $imported_subscribers_count ]['last_name'] = $last_name;
129
- $contacts_data[ $imported_subscribers_count ]['email'] = $email;
130
- $contacts_data[ $imported_subscribers_count ]['source'] = 'import';
131
- $contacts_data[ $imported_subscribers_count ]['status'] = 'verified';
132
- $contacts_data[ $imported_subscribers_count ]['hash'] = $guid;
133
- $contacts_data[ $imported_subscribers_count ]['created_at'] = $current_date_time;
134
-
135
- $existing_contacts[] = $email;
136
- } else {
137
- $existing_contacts_count ++;
138
- }
139
-
140
- $emails[] = $email;
141
- $imported_subscribers_count ++;
142
- }
143
-
144
- if ( count( $emails ) > 0 ) {
145
-
146
- ES()->contacts_db->bulk_insert( $contacts_data );
147
-
148
- $contact_ids = ES()->contacts_db->get_contact_ids_by_emails( $emails );
149
- if ( count( $contact_ids ) > 0 ) {
150
- ES()->lists_contacts_db->remove_contacts_from_lists( $contact_ids, $list_id );
151
- ES()->lists_contacts_db->do_import_contacts_into_list( $list_id, $contact_ids, $status, 1, $current_date_time );
152
- }
153
-
154
- $message = sprintf( __( 'Total %d contacts have been imported successfully!', 'email-subscribers' ), $imported_subscribers_count );
155
- $status = 'success';
156
- } else {
157
-
158
- $message = sprintf( __( 'Total %d contacts have been imported successfully!', 'email-subscribers' ), $imported_subscribers_count );
159
-
160
- if ( $existing_contacts_count > 0 ) {
161
- $message .= " ";
162
- $message .= sprintf( __( '%d contacts are already exists.', 'email-subscribers' ), $existing_contacts );
163
- }
164
-
165
- if ( $invalid_emails_count > 0 ) {
166
- $message .= " ";
167
- $message .= sprintf( __( '%d contacts are invalid.', 'email-subscribers' ), $invalid_emails_count );
168
- }
169
-
170
- $status = 'error';
171
- }
172
-
173
- fclose( $handle );
174
- ES_Common::show_message( $message, $status );
175
-
176
- } else {
177
- $message = __( "Error: Please Select List", 'email-subscribers' );
178
- ES_Common::show_message( $message, 'error' );
179
- }
180
- } else {
181
- $message = __( "Error: Please select status", 'email-subscribers' );
182
- ES_Common::show_message( $message, 'error' );
183
- }
184
- } else {
185
- $message = __( "Error: Please Upload only CSV File", 'email-subscribers' );
186
- ES_Common::show_message( $message, 'error' );
187
- }
188
- } else {
189
- $message = __( "Error: Please Upload File", 'email-subscribers' );
190
- ES_Common::show_message( $message, 'error' );
191
- }
192
- } else {
193
- $message = __( "Error: Please Upload File", 'email-subscribers' );
194
- ES_Common::show_message( $message, 'error' );
195
- }
196
- }
197
-
198
  $this->prepare_import_subscriber_form();
199
 
200
  }
@@ -283,47 +116,131 @@ class ES_Import_Subscribers {
283
  }
284
 
285
  /**
286
- * Get CSV file delimiter
287
- *
288
- * @param $file
289
- * @param int $check_lines
290
- *
291
- * @return mixed
292
- *
293
- * @since 4.3.1
294
  */
295
- function get_delimiter( $file, $check_lines = 2 ) {
296
-
297
- $file = new SplFileObject( $file );
298
-
299
- $delimiters = array( ',', '\t', ';', '|', ':' );
300
- $results = array();
301
- $i = 0;
302
- while ( $file->valid() && $i <= $check_lines ) {
303
- $line = $file->fgets();
304
- foreach ( $delimiters as $delimiter ) {
305
- $regExp = '/[' . $delimiter . ']/';
306
- $fields = preg_split( $regExp, $line );
307
- if ( count( $fields ) > 1 ) {
308
- if ( ! empty( $results[ $delimiter ] ) ) {
309
- $results[ $delimiter ] ++;
310
- } else {
311
- $results[ $delimiter ] = 1;
312
- }
313
- }
314
- }
315
- $i ++;
316
  }
317
 
318
- if ( count( $results ) > 0 ) {
 
 
 
 
 
 
 
 
319
 
320
- $results = array_keys( $results, max( $results ) );
321
 
322
- return $results[0];
323
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
324
 
325
- return ',';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
326
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
327
  }
328
 
329
  }
12
  * @since 4.0.0
13
  */
14
  public function __construct() {
15
+ add_action( 'init', array( &$this, 'maybe_start_import' ) );
16
  }
17
 
18
  /**
21
  * @since 4.0,0
22
  *
23
  * @modify 4.3.1
24
+ *
25
+ * @modfiy 4.4.4 Moved importing code section to maybe_start_import method.
26
  */
27
  public function import_callback() {
28
 
29
  require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
30
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
31
  $this->prepare_import_subscriber_form();
32
 
33
  }
116
  }
117
 
118
  /**
119
+ * Start import process after validating sumitted data
120
+ *
121
+ * @since 4.4.4
 
 
 
 
 
122
  */
123
+ public function maybe_start_import() {
124
+ $action = ig_es_get_request_data( 'action' );
125
+
126
+ if( 'import' !== $action ) {
127
+ return;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
128
  }
129
 
130
+ $submit = ig_es_get_post_data( 'submit' );
131
+ if ( $submit ) {
132
+ $import_contacts_nonce = ig_es_get_post_data( 'import_contacts' );
133
+ if ( ! isset( $_POST['import_contacts'] ) || ! wp_verify_nonce( sanitize_key( $import_contacts_nonce ), 'import-contacts' ) ) {
134
+ $message = __( "Sorry, you do not have permission to import contacts.", 'email-subscribers' );
135
+ ES_Common::show_message( $message, 'error' );
136
+ }
137
+
138
+ if ( isset( $_FILES["file"] ) ) {
139
 
140
+ if ( is_uploaded_file( $_FILES["file"]["tmp_name"] ) ) {
141
 
142
+ $tmp_file = $_FILES["file"]["tmp_name"];
143
+ $file = $_FILES['file']['name'];
144
+
145
+ $ext = strtolower( substr( $file, strrpos( $file, "." ), ( strlen( $file ) - strrpos( $file, "." ) ) ) );
146
+
147
+ if ( $ext == ".csv" ) {
148
+
149
+ if ( ! ini_get( "auto_detect_line_endings" ) ) {
150
+ ini_set( "auto_detect_line_endings", '1' );
151
+ }
152
+
153
+ $statuses = ES_Common::get_statuses_key_name_map();
154
+ $es_email_status = ig_es_get_post_data( 'es_email_status' );
155
+
156
+ $status = '';
157
+ if ( in_array( $es_email_status, array_keys( $statuses ) ) ) {
158
+ $status = $es_email_status;
159
+ }
160
 
161
+ if ( ! empty( $status ) ) {
162
+
163
+ $lists = ES()->lists_db->get_id_name_map();
164
+
165
+ $list_id = ig_es_get_post_data( 'list_id' );
166
+
167
+ if ( ! in_array( $list_id, array_keys( $lists ) ) ) {
168
+ $list_id = '';
169
+ }
170
+
171
+ if ( ! empty( $list_id ) ) {
172
+
173
+ $uploaded_file = $_FILES['file'];
174
+ $upload_overrides = array( 'test_form' => false );
175
+
176
+ if ( ! function_exists( 'wp_handle_upload' ) ) {
177
+ require_once( ABSPATH . 'wp-admin/includes/file.php' );
178
+ }
179
+
180
+ $import_file = wp_handle_upload( $uploaded_file, $upload_overrides );
181
+
182
+ if ( $import_file && ! isset( $import_file['error'] ) ) {
183
+
184
+ $file_pointer = file( $import_file['file'] );
185
+ if ( is_array( $file_pointer ) && ! empty( $file_pointer ) ) {
186
+ $total_contacts_to_process = count( $file_pointer ) - 1;
187
+
188
+ if( ! empty( $total_contacts_to_process ) ) {
189
+ $contact_background_process_data = array(
190
+ 'action' => 'import_contact',
191
+ 'contact_status' => $status,
192
+ 'list_id' => $list_id,
193
+ 'import_file' => $import_file,
194
+ 'total_contacts_to_process' => $total_contacts_to_process,
195
+ );
196
+
197
+ update_site_option( 'ig_es_contact_background_process_data', $contact_background_process_data );
198
+
199
+ as_unschedule_action( 'ig_es_add_contact_to_csv' );
200
+ as_unschedule_action( 'ig_es_import_contacts_from_csv' );
201
+
202
+ as_schedule_single_action( time(), 'ig_es_import_contacts_from_csv' );
203
+
204
+ $email_subscribers_import_page = admin_url( 'admin.php?page=es_subscribers&action=import' );
205
+ wp_safe_redirect( $email_subscribers_import_page );
206
+
207
+ ES()->init_action_scheduler_queue_runner();
208
+ exit();
209
+ } else {
210
+ $message = __( 'There are no contacts to import in the uploaded CSV file. Please add some contacts and try again later..', 'email-subscribers' );
211
+ ES_Common::show_message( $message, 'error' );
212
+ }
213
+
214
+ } else {
215
+ $message = __( 'Unable to import from uploaded file. Please try again later.', 'email-subscribers' );
216
+ ES_Common::show_message( $message, 'error' );
217
+ }
218
 
219
+ } else {
220
+ $message = $import_file['error'];
221
+ ES_Common::show_message( $message, 'error' );
222
+ }
223
+ } else {
224
+ $message = __( "Error: Please Select List", 'email-subscribers' );
225
+ ES_Common::show_message( $message, 'error' );
226
+ }
227
+ } else {
228
+ $message = __( "Error: Please select status", 'email-subscribers' );
229
+ ES_Common::show_message( $message, 'error' );
230
+ }
231
+ } else {
232
+ $message = __( "Error: Please Upload only CSV File", 'email-subscribers' );
233
+ ES_Common::show_message( $message, 'error' );
234
+ }
235
+ } else {
236
+ $message = __( "Error: Please Upload File", 'email-subscribers' );
237
+ ES_Common::show_message( $message, 'error' );
238
+ }
239
+ } else {
240
+ $message = __( "Error: Please Upload File", 'email-subscribers' );
241
+ ES_Common::show_message( $message, 'error' );
242
+ }
243
+ }
244
  }
245
 
246
  }
lite/includes/classes/class-es-lists-table.php CHANGED
@@ -72,24 +72,28 @@ class ES_Lists_Table extends WP_List_Table {
72
  $list = ig_es_get_request_data( 'list' );
73
  echo $this->edit_list( absint( $list ) );
74
  } else { ?>
75
- <h1 class="wp-heading-inline"><a href="admin.php?page=es_subscribers"><?php _e( 'Audience', 'email-subscribers' ); ?> </a> > <?php _e('Lists', 'email-subscribers'); ?> <a href="admin.php?page=es_lists&action=new" class="ig-es-title-button px-2 py-2 mx-1"><?php _e('Add New','email-subscribers'); ?></a> </h1>
76
- <div id="poststuff">
77
- <div id="post-body" class="metabox-holder column-1">
78
- <div id="post-body-content">
79
- <div class="meta-box-sortables ui-sortable">
80
- <form method="post">
81
- <?php
82
- $this->prepare_items();
83
- $this->display(); ?>
84
- </form>
 
 
 
 
 
85
  </div>
86
  </div>
 
87
  </div>
88
- <br class="clear">
89
  </div>
90
- </div>
91
- <?php }
92
- }
93
 
94
  /**
95
  * Validate data
@@ -245,8 +249,9 @@ class ES_Lists_Table extends WP_List_Table {
245
  <header class="ml-12 mr-8 wp-heading-inline">
246
  <div class="md:flex md:items-center md:justify-between justify-center">
247
  <div class="flex-1 min-w-0">
248
- <h2 class=" my-2 text-2xl font-medium text-gray-800 sm:leading-9 sm:truncate">
249
- <a href="admin.php?page=es_subscribers"><?php _e('Audience ','email-subscribers'); ?></a> >
 
250
  <a href="admin.php?page=es_lists&action=manage-lists"><?php _e(' Lists ','email-subscribers'); ?></a> >
251
  <?php
252
  if ( $is_new ) {
72
  $list = ig_es_get_request_data( 'list' );
73
  echo $this->edit_list( absint( $list ) );
74
  } else { ?>
75
+
76
+ <h1 class="wp-heading-inline text-xl leading-7 font-bold text-gray-900 sm:text-3xl sm:leading-9 sm:truncate">
77
+ <span class="text-2xl font-bold leading-7 text-gray-900 sm:text-3xl sm:leading-9 sm:truncate"><a href="admin.php?page=es_subscribers"><?php _e( 'Audience', 'email-subscribers' ); ?> </a>
78
+ </span> > <?php _e('Lists', 'email-subscribers'); ?> <a href="admin.php?page=es_lists&action=new" class="ig-es-title-button px-1 pt-2 pb-1 mx-1 "><?php _e('Add New','email-subscribers'); ?></a></h1>
79
+
80
+ <div id="poststuff">
81
+ <div id="post-body" class="metabox-holder column-1">
82
+ <div id="post-body-content">
83
+ <div class="meta-box-sortables ui-sortable">
84
+ <form method="post">
85
+ <?php
86
+ $this->prepare_items();
87
+ $this->display(); ?>
88
+ </form>
89
+ </div>
90
  </div>
91
  </div>
92
+ <br class="clear">
93
  </div>
 
94
  </div>
95
+ <?php }
96
+ }
 
97
 
98
  /**
99
  * Validate data
249
  <header class="ml-12 mr-8 wp-heading-inline">
250
  <div class="md:flex md:items-center md:justify-between justify-center">
251
  <div class="flex-1 min-w-0">
252
+ <h1 class="text-xl leading-7 text-gray-900 sm:text-3xl sm:leading-9 sm:truncate">
253
+ <span class="text-2xl font-bold leading-7 text-gray-900 sm:text-3xl sm:leading-9 sm:truncate">
254
+ <a href="admin.php?page=es_subscribers"><?php _e('Audience ','email-subscribers'); ?></a></span> >
255
  <a href="admin.php?page=es_lists&action=manage-lists"><?php _e(' Lists ','email-subscribers'); ?></a> >
256
  <?php
257
  if ( $is_new ) {
lite/includes/classes/class-es-post-notifications.php CHANGED
@@ -257,122 +257,123 @@ class ES_Post_Notifications_Table {
257
  <header class="ml-12 mr-8 wp-heading-inline">
258
  <div class="sm:grid sm:grid-cols lg:grid lg:grid-cols-2 max-w-full">
259
  <div class="mt-2">
260
- <h2 class=" my-2 text-2xl font-medium text-gray-800 sm:leading-9 sm:truncate"> <a href="admin.php?page=es_campaigns"><?php _e('Campaigns ','email-subscribers'); ?></a> > <?php echo $heading; ?>
261
- </h2>
262
- </div>
263
- <div class="py-2 md:mt-0">
264
- <div class="flex flex-row sm:justify-start md:justify-end mt-2">
265
- <div>
266
- <?php if ( $action === 'edit' ) { ?>
267
- <a href="admin.php?page=es_notifications&action=new" class="ig-es-title-button px-4 py-2 mx-2"><?php _e( 'Add New', 'email-subscribers' ) ?></a>
268
- <?php } ?>
269
- <a href="edit.php?post_type=es_template" class="ig-es-imp-button mx-2 px-4 py-2"><?php _e( 'Manage Templates', 'email-subscribers' ) ?></a>
270
- </div>
 
 
271
  </div>
272
  </div>
273
- </div>
274
- </header>
275
- <div class="ml-12 mr-8"><hr class="wp-header-end"></div>
276
-
277
- <div class="meta-box-sortables ui-sortable bg-white shadow-md ml-12 mr-8 mt-6 rounded-lg">
278
- <form class="ml-5 mr-4 text-left pt-4 mt-2 item-center" method="post" action="admin.php?page=es_notifications&action=<?php echo $action; ?>&list=<?php echo $id; ?>&_wpnonce=<?php echo $nonce; ?>">
279
-
280
- <table class="max-w-full form-table">
281
- <tbody>
282
-
283
- <?php do_action('es_before_post_notification_settings', $id ); ?>
284
-
285
- <tr class="border-b border-gray-100">
286
- <th scope="row" class="w-3/12 pt-3 pb-8 text-left">
287
- <label for="tag-link"><span class="block ml-6 pr-4 text-sm font-medium text-gray-600 pb-2">
288
- <?php _e( 'Select List', 'email-subscribers' ); ?></span>
289
- <p class="italic text-xs font-normal text-gray-400 mt-2 ml-6 leading-snug"><?php _e( 'Contacts from the selected list will be notified about new post notification.', 'email-subscribers' ); ?></p></label>
290
- </th>
291
-
292
- <td class="w-9/12 pb-3 ">
293
- <select class="relative form-select shadow-sm border border-gray-400 w-1/3 ml-12" name="list_id" id="ig_es_post_notification_list_ids">
294
- <?php echo ES_Common::prepare_list_dropdown_options( $list_id ); ?>
295
- </select>
296
- </td>
297
- </tr>
298
- <tr class="border-b border-gray-100">
299
  <th scope="row" class="w-3/12 pt-3 pb-8 text-left">
300
  <label for="tag-link"><span class="block ml-6 pr-4 text-sm font-medium text-gray-600 pb-2">
301
- <?php _e( 'Select template', 'email-subscribers' ); ?></span>
302
- <p class="italic text-xs font-normal text-gray-400 mt-2 ml-6 leading-snug"><?php _e( 'Content of the selected template will be sent out as post notification.', 'email-subscribers' ); ?></p>
303
- </label>
304
- </th>
305
- <td class="w-9/12 pb-3">
306
- <select class="relative form-select shadow-sm border border-gray-400 w-1/3 ml-12" name="template_id" id="base_template_id">
307
- <?php echo ES_Common::prepare_templates_dropdown_options( 'post_notification', $template_id ); ?>
308
- </select>
309
- <div class="es-preview" style="float: right;width: 25%;">
310
- <div class="es-templ-img"></div>
311
- </div>
312
- </td>
313
- </tr>
314
- <?php do_action('es_after_post_notification_template', $id ); ?>
315
- <?php if ( ! $is_new ) { ?>
316
- <tr class="border-b border-gray-100">
317
- <th scope="row" class="w-3/12 pt-3 pb-8 text-left">
318
- <label for="tag-link"><span class="block ml-6 pr-4 pt-2 text-sm font-medium text-gray-600 pb-2">
319
- <?php _e( 'Select Status', 'email-subscribers' ); ?>
320
- </label>
321
  </th>
322
- <td class="w-9/12 py-3">
323
- <select class="relative form-select shadow-sm border border-gray-400 w-1/3 ml-12" name="status" id="status">
324
- <?php echo ES_Common::prepare_status_dropdown_options( $status ); ?>
 
325
  </select>
326
  </td>
327
  </tr>
328
- <?php } ?>
329
- <tr class="border-b border-gray-100">
330
- <th scope="row" class="pt-3 pb-8 w-3/12 text-left">
331
- <label for="tag-link"><span class="block ml-6 pr-4 text-sm font-medium text-gray-600 pb-2"><?php _e( 'Select Post Category', 'email-subscribers' ); ?></span>
332
- <p class="italic text-xs font-normal text-gray-400 mt-2 ml-6 leading-snug"><?php _e( 'Notification will be sent out when any post from selected categories will be published.', 'email-subscribers' ); ?></p></label>
 
333
  </th>
334
- <td class="pt-3 w-9/12" style="vertical-align: top;">
335
- <table border="0" cellspacing="0" class="ml-4 pt-3">
336
- <tbody>
337
- <?php echo ES_Common::prepare_categories_html( $cat ); ?>
338
- </tbody>
339
- </table>
 
340
  </td>
341
  </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
342
  <tr class="border-b border-gray-100">
343
  <th scope="row" class="pt-3 pb-8 w-3/12 text-left">
344
- <label for="tag-link"><span class="block ml-6 pr-4 text-sm font-medium text-gray-600 pb-2">
345
- <?php _e( 'Select custom post type(s)', 'email-subscribers' ); ?></span>
346
- <p class="italic text-xs font-normal text-gray-400 mt-2 ml-6 leading-snug"><?php _e( '(Optional) Select custom post type for which you want to send notification.', 'email-subscribers' ); ?></p></label>
347
-
348
  </th>
349
- <td class="w-9/12 pt-3 pb-8">
350
- <table border="0" cellspacing="0">
351
  <tbody>
352
- <?php $custom_post_type = '';
353
- echo ES_Common::prepare_custom_post_type_checkbox( $cat ); ?>
354
  </tbody>
355
  </table>
356
  </td>
357
- </tr>
358
- <?php do_action('es_after_post_notification_settings', $id ); ?>
359
- <tr>
360
- <td><input type="hidden" name="submitted" value="submitted"></td>
361
  </tr>
362
- </tbody>
363
- </table>
364
- <div>
365
- <p class="submit"><input type="submit" name="submit" id="ig_es_campaign_post_notification_submit_button" class="cursor-pointer ig-es-primary-button px-4 py-2 mx-6" value="<?php _e( 'Save Changes', 'email-subscribers' ); ?>"/></p>
366
- </div>
367
-
368
- </form>
369
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
370
  </div>
371
- </div>
372
 
373
- <?php
374
 
375
- }
376
 
377
 
378
  /**
257
  <header class="ml-12 mr-8 wp-heading-inline">
258
  <div class="sm:grid sm:grid-cols lg:grid lg:grid-cols-2 max-w-full">
259
  <div class="mt-2">
260
+ <h2 class="text-xl font-medium text-gray-800 sm:leading-9 sm:truncate"><h1 class="text-xl leading-7 text-gray-900 sm:text-3xl sm:leading-9 sm:truncate">
261
+ <span class="text-2xl font-bold leading-7 text-gray-900 sm:text-3xl sm:leading-9 sm:truncate"> <a href="admin.php?page=es_campaigns"><?php _e('Campaigns ','email-subscribers'); ?></a></span> > <?php echo $heading; ?>
262
+ </h2>
263
+ </div>
264
+ <div class="py-2 md:mt-0">
265
+ <div class="flex flex-row sm:justify-start md:justify-end mt-2">
266
+ <div>
267
+ <?php if ( $action === 'edit' ) { ?>
268
+ <a href="admin.php?page=es_notifications&action=new" class="ig-es-title-button px-4 py-2 mx-2"><?php _e( 'Add New', 'email-subscribers' ) ?></a>
269
+ <?php } ?>
270
+ <a href="edit.php?post_type=es_template" class="ig-es-imp-button mx-2 px-4 py-2"><?php _e( 'Manage Templates', 'email-subscribers' ) ?></a>
271
+ </div>
272
+ </div>
273
  </div>
274
  </div>
275
+ </header>
276
+ <div class="ml-12 mr-8"><hr class="wp-header-end"></div>
277
+
278
+ <div class="meta-box-sortables ui-sortable bg-white shadow-md ml-12 mr-8 mt-6 rounded-lg">
279
+ <form class="ml-5 mr-4 text-left pt-4 mt-2 item-center" method="post" action="admin.php?page=es_notifications&action=<?php echo $action; ?>&list=<?php echo $id; ?>&_wpnonce=<?php echo $nonce; ?>">
280
+
281
+ <table class="max-w-full form-table">
282
+ <tbody>
283
+
284
+ <?php do_action('es_before_post_notification_settings', $id ); ?>
285
+
286
+ <tr class="border-b border-gray-100">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
287
  <th scope="row" class="w-3/12 pt-3 pb-8 text-left">
288
  <label for="tag-link"><span class="block ml-6 pr-4 text-sm font-medium text-gray-600 pb-2">
289
+ <?php _e( 'Select List', 'email-subscribers' ); ?></span>
290
+ <p class="italic text-xs font-normal text-gray-400 mt-2 ml-6 leading-snug"><?php _e( 'Contacts from the selected list will be notified about new post notification.', 'email-subscribers' ); ?></p></label>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
291
  </th>
292
+
293
+ <td class="w-9/12 pb-3 ">
294
+ <select class="relative form-select shadow-sm border border-gray-400 w-1/3 ml-12" name="list_id" id="ig_es_post_notification_list_ids">
295
+ <?php echo ES_Common::prepare_list_dropdown_options( $list_id ); ?>
296
  </select>
297
  </td>
298
  </tr>
299
+ <tr class="border-b border-gray-100">
300
+ <th scope="row" class="w-3/12 pt-3 pb-8 text-left">
301
+ <label for="tag-link"><span class="block ml-6 pr-4 text-sm font-medium text-gray-600 pb-2">
302
+ <?php _e( 'Select template', 'email-subscribers' ); ?></span>
303
+ <p class="italic text-xs font-normal text-gray-400 mt-2 ml-6 leading-snug"><?php _e( 'Content of the selected template will be sent out as post notification.', 'email-subscribers' ); ?></p>
304
+ </label>
305
  </th>
306
+ <td class="w-9/12 pb-3">
307
+ <select class="relative form-select shadow-sm border border-gray-400 w-1/3 ml-12" name="template_id" id="base_template_id">
308
+ <?php echo ES_Common::prepare_templates_dropdown_options( 'post_notification', $template_id ); ?>
309
+ </select>
310
+ <div class="es-preview" style="float: right;width: 25%;">
311
+ <div class="es-templ-img"></div>
312
+ </div>
313
  </td>
314
  </tr>
315
+ <?php do_action('es_after_post_notification_template', $id ); ?>
316
+ <?php if ( ! $is_new ) { ?>
317
+ <tr class="border-b border-gray-100">
318
+ <th scope="row" class="w-3/12 pt-3 pb-8 text-left">
319
+ <label for="tag-link"><span class="block ml-6 pr-4 pt-2 text-sm font-medium text-gray-600 pb-2">
320
+ <?php _e( 'Select Status', 'email-subscribers' ); ?>
321
+ </label>
322
+ </th>
323
+ <td class="w-9/12 py-3">
324
+ <select class="relative form-select shadow-sm border border-gray-400 w-1/3 ml-12" name="status" id="status">
325
+ <?php echo ES_Common::prepare_status_dropdown_options( $status ); ?>
326
+ </select>
327
+ </td>
328
+ </tr>
329
+ <?php } ?>
330
  <tr class="border-b border-gray-100">
331
  <th scope="row" class="pt-3 pb-8 w-3/12 text-left">
332
+ <label for="tag-link"><span class="block ml-6 pr-4 text-sm font-medium text-gray-600 pb-2"><?php _e( 'Select Post Category', 'email-subscribers' ); ?></span>
333
+ <p class="italic text-xs font-normal text-gray-400 mt-2 ml-6 leading-snug"><?php _e( 'Notification will be sent out when any post from selected categories will be published.', 'email-subscribers' ); ?></p></label>
 
 
334
  </th>
335
+ <td class="pt-3 w-9/12" style="vertical-align: top;">
336
+ <table border="0" cellspacing="0" class="ml-4 pt-3">
337
  <tbody>
338
+ <?php echo ES_Common::prepare_categories_html( $cat ); ?>
 
339
  </tbody>
340
  </table>
341
  </td>
 
 
 
 
342
  </tr>
343
+ <tr class="border-b border-gray-100">
344
+ <th scope="row" class="pt-3 pb-8 w-3/12 text-left">
345
+ <label for="tag-link"><span class="block ml-6 pr-4 text-sm font-medium text-gray-600 pb-2">
346
+ <?php _e( 'Select custom post type(s)', 'email-subscribers' ); ?></span>
347
+ <p class="italic text-xs font-normal text-gray-400 mt-2 ml-6 leading-snug"><?php _e( '(Optional) Select custom post type for which you want to send notification.', 'email-subscribers' ); ?></p></label>
348
+
349
+ </th>
350
+ <td class="w-9/12 pt-3 pb-8">
351
+ <table border="0" cellspacing="0">
352
+ <tbody>
353
+ <?php $custom_post_type = '';
354
+ echo ES_Common::prepare_custom_post_type_checkbox( $cat ); ?>
355
+ </tbody>
356
+ </table>
357
+ </td>
358
+ </tr>
359
+ <?php do_action('es_after_post_notification_settings', $id ); ?>
360
+ <tr>
361
+ <td><input type="hidden" name="submitted" value="submitted"></td>
362
+ </tr>
363
+ </tbody>
364
+ </table>
365
+ <div>
366
+ <p class="submit"><input type="submit" name="submit" id="ig_es_campaign_post_notification_submit_button" class="cursor-pointer ig-es-primary-button px-4 py-2 mx-6" value="<?php _e( 'Save Changes', 'email-subscribers' ); ?>"/></p>
367
+ </div>
368
+
369
+ </form>
370
+
371
+ </div>
372
  </div>
 
373
 
374
+ <?php
375
 
376
+ }
377
 
378
 
379
  /**
lite/includes/classes/class-es-reports-table.php CHANGED
@@ -33,7 +33,7 @@ class ES_Reports_Table extends WP_List_Table {
33
  ?>
34
 
35
  <div class="wrap">
36
- <h1 class="wp-heading-inline"><?php _e( 'Reports', 'email-subscribers' ); ?></h1>
37
  <?php
38
  $emails_to_be_sent = ES_DB_Sending_Queue::get_total_emails_to_be_sent();
39
  if ( $emails_to_be_sent > 0 ) {
33
  ?>
34
 
35
  <div class="wrap">
36
+ <h1 class="wp-heading-inline"><span class="text-2xl font-bold leading-7 text-gray-900 sm:text-3xl sm:leading-9 sm:truncate"><?php _e( 'Reports', 'email-subscribers' ); ?></span></h1>
37
  <?php
38
  $emails_to_be_sent = ES_DB_Sending_Queue::get_total_emails_to_be_sent();
39
  if ( $emails_to_be_sent > 0 ) {
lite/includes/db/class-es-db-campaigns.php CHANGED
@@ -663,5 +663,41 @@ class ES_DB_Campaigns extends ES_DB {
663
 
664
  }
665
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
666
 
 
 
 
 
 
 
667
  }
663
 
664
  }
665
 
666
+ /**
667
+ * Method to update campaign status
668
+ *
669
+ * @param array $campaign_ids Campaign IDs.
670
+ * @param integer $status New status.
671
+ * @return bool $updated Update status
672
+ *
673
+ * @since 4.4.4
674
+ */
675
+ public function update_status( $campaign_ids = array(), $status = 0 ) {
676
+ global $wpdb;
677
+
678
+ $updated = false;
679
+ if ( empty( $campaign_ids ) ) {
680
+ return $updated;
681
+ }
682
+
683
+ $id_str = '';
684
+ if ( is_array( $campaign_ids ) && count( $campaign_ids ) > 0 ) {
685
+ $id_str = implode( ',', $campaign_ids );
686
+ } elseif ( is_numeric( $campaign_ids ) ) {
687
+ $id_str = $campaign_ids;
688
+ }
689
+
690
+ if ( ! empty( $id_str ) ) {
691
+ $sql = 'UPDATE ' . IG_CAMPAIGNS_TABLE . ' SET status = %d';
692
+
693
+ $sql .= " WHERE id IN ($id_str)";
694
+
695
+ $sql = $wpdb->prepare( $sql, $status ); // phpcs:ignore
696
 
697
+ $updated = $wpdb->query( $sql ); // phpcs:ignore
698
+ }
699
+
700
+ return $updated;
701
+
702
+ }
703
  }
lite/includes/db/class-es-db-lists-contacts.php CHANGED
@@ -528,7 +528,7 @@ class ES_DB_Lists_Contacts extends ES_DB {
528
  if ( ! empty( $where ) ) {
529
  $query .= " WHERE $where";
530
  }
531
-
532
  return $wpdb->get_var( $query );
533
  }
534
 
@@ -789,7 +789,7 @@ class ES_DB_Lists_Contacts extends ES_DB {
789
  $where = implode( " AND ", $where );
790
  $where = $wpdb->prepare( $where, $args );
791
  }
792
-
793
  if ( $count_only ) {
794
  return $this->get_total_contacts( $where, $distinct );
795
  } else {
528
  if ( ! empty( $where ) ) {
529
  $query .= " WHERE $where";
530
  }
531
+
532
  return $wpdb->get_var( $query );
533
  }
534
 
789
  $where = implode( " AND ", $where );
790
  $where = $wpdb->prepare( $where, $args );
791
  }
792
+
793
  if ( $count_only ) {
794
  return $this->get_total_contacts( $where, $distinct );
795
  } else {
lite/includes/notices/class-es-admin-notices.php CHANGED
@@ -189,6 +189,7 @@ class ES_Admin_Notices {
189
  * If we need to update, include a message with the update button.
190
  */
191
  public static function es_dismiss_admin_notice() {
 
192
  $es_dismiss_admin_notice = ig_es_get_request_data( 'es_dismiss_admin_notice' );
193
  $option_name = ig_es_get_request_data( 'option_name' );
194
  if ( $es_dismiss_admin_notice == '1' && ! empty( $option_name ) ) {
@@ -196,6 +197,14 @@ class ES_Admin_Notices {
196
  if ( in_array( $option_name, array( 'redirect_upsale_notice', 'dismiss_upsale_notice', 'dismiss_star_notice', 'star_notice_done' ) ) ) {
197
  update_option( 'ig_es_' . $option_name . '_date', ig_get_current_date_time(), false );
198
  }
 
 
 
 
 
 
 
 
199
  if ( $option_name === 'star_notice_done' ) {
200
  header( "Location: https://wordpress.org/support/plugin/email-subscribers/reviews/" );
201
  exit();
189
  * If we need to update, include a message with the update button.
190
  */
191
  public static function es_dismiss_admin_notice() {
192
+
193
  $es_dismiss_admin_notice = ig_es_get_request_data( 'es_dismiss_admin_notice' );
194
  $option_name = ig_es_get_request_data( 'option_name' );
195
  if ( $es_dismiss_admin_notice == '1' && ! empty( $option_name ) ) {
197
  if ( in_array( $option_name, array( 'redirect_upsale_notice', 'dismiss_upsale_notice', 'dismiss_star_notice', 'star_notice_done' ) ) ) {
198
  update_option( 'ig_es_' . $option_name . '_date', ig_get_current_date_time(), false );
199
  }
200
+
201
+ // Covid-19 Offer
202
+ if ( $option_name === 'offer_covid_19' ) {
203
+ $url = "https://www.icegram.com/email-subscribers-pricing/?utm_source=in_app&utm_medium=es_banner&utm_campaign=" . $option_name;
204
+ header( "Location: {$url}" );
205
+ exit();
206
+ }
207
+
208
  if ( $option_name === 'star_notice_done' ) {
209
  header( "Location: https://wordpress.org/support/plugin/email-subscribers/reviews/" );
210
  exit();
lite/includes/notices/views/ig-es-offer.php CHANGED
@@ -1,24 +1,20 @@
1
  <style type="text/css">
2
- .ig_es_offer{
3
- width: 60%;
4
- margin: 0 auto;
5
- text-align: center;
6
- padding-top: 1.2em;
7
- }
8
- .ig_es_offer img{
9
- /*width: 100%;*/
10
- }
 
11
  </style>
12
- <?php
13
- if( (get_option('ig_es_offer_bfcm_done_2019') !== 'yes') && ($ig_current_date >= strtotime("2019-11-22")) && ($ig_current_date <= strtotime("2019-11-30")) ) { ?>
14
- <div class="ig_es_offer">
15
- <a target="_blank" href="?es_dismiss_admin_notice=1&option_name=offer_bfcm_done_2019"><img src="<?php echo ES_PLUGIN_URL ?>/lite/admin/images/bfcm-2019.png" /></a>
16
- </div>
17
 
18
- <?php }
19
- if( (get_option('ig_es_offer_last_day_bfcm_done_2019') !== 'yes') && ($ig_current_date >= strtotime("2019-12-02")) && ($ig_current_date <= strtotime("2019-12-03")) ) { ?>
20
- <div class="ig_es_offer">
21
- <a target="_blank" href="?es_dismiss_admin_notice=1&option_name=offer_last_day_bfcm_done_2019"><img src="<?php echo ES_PLUGIN_URL ?>/lite/admin/images/bfcm-last-2019.png" /></a>
22
- </div>
23
 
24
  <?php } ?>
1
  <style type="text/css">
2
+ .ig_es_offer {
3
+ width: 60%;
4
+ margin: 0 auto;
5
+ text-align: center;
6
+ padding-top: 1.2em;
7
+ }
8
+
9
+ .ig_es_offer img {
10
+ /*width: 100%;*/
11
+ }
12
  </style>
13
+ <?php
 
 
 
 
14
 
15
+ if ( ( get_option( 'ig_es_offer_covid_19' ) !== 'yes' ) && ( $ig_current_date >= strtotime( "2020-04-08" ) ) && ( $ig_current_date <= strtotime( "2020-04-30" ) )) { ?>
16
+ <div class="ig_es_offer">
17
+ <a target="_blank" href="?es_dismiss_admin_notice=1&option_name=offer_covid_19"><img src="<?php echo ES_PLUGIN_URL ?>/lite/admin/images/covid-19.png"/></a>
18
+ </div>
 
19
 
20
  <?php } ?>
lite/includes/workflows/abstracts/class-es-workflow-trigger.php CHANGED
@@ -261,17 +261,7 @@ abstract class ES_Workflow_Trigger {
261
  }
262
 
263
  if ( $process_immediately ) {
264
- $admin_ajax_url = admin_url( 'admin-ajax.php' );
265
- $admin_ajax_url = add_query_arg( 'action', 'ig_es_init_queue_runner', $admin_ajax_url );
266
- $args = array(
267
- 'timeout' => 0.01,
268
- 'blocking' => false,
269
- 'cookies' => $_COOKIE,
270
- 'sslverify' => apply_filters( 'https_local_ssl_verify', false ),
271
- );
272
-
273
- // Make a asynchronous request to our ajax handler function which in turn calls Action Schedulers' queue runner to start immediate processing in background.
274
- wp_remote_get( esc_url_raw( $admin_ajax_url ), $args );
275
  }
276
  }
277
 
261
  }
262
 
263
  if ( $process_immediately ) {
264
+ ES()->init_action_scheduler_queue_runner();
 
 
 
 
 
 
 
 
 
 
265
  }
266
  }
267
 
lite/includes/workflows/class-es-workflows-table.php CHANGED
@@ -142,12 +142,16 @@ class ES_Workflows_Table extends WP_List_Table {
142
  * Render Workflows list
143
  *
144
  * @since 4.4.1
 
 
145
  */
146
  public function load_workflow_list() {
147
  ?>
148
- <h1 class="wp-heading-inline"><?php esc_html_e( 'Workflows', 'email-subscribers' ); ?>
 
 
149
  <a href="admin.php?page=es_workflows&action=new"
150
- class="ig-es-title-button px-2 py-2 mx-1"><?php esc_html_e( 'Add New', 'email-subscribers' ); ?></a>
151
  <?php do_action( 'ig_es_after_workflow_type_buttons' ); ?>
152
  </h1>
153
  <div id="poststuff">
@@ -156,8 +160,8 @@ class ES_Workflows_Table extends WP_List_Table {
156
  <div class="meta-box-sortables ui-sortable">
157
  <form method="post">
158
  <?php
159
- $this->prepare_items();
160
- $this->display();
161
  ?>
162
  </form>
163
  </div>
@@ -220,10 +224,10 @@ class ES_Workflows_Table extends WP_List_Table {
220
  switch ( $column_name ) {
221
 
222
  case 'created_at':
223
- $output = ig_es_format_date_time( $item[ $column_name ] );
224
- break;
225
  default:
226
- $output = $item[ $column_name ];
227
  }
228
 
229
  return $output;
@@ -273,9 +277,9 @@ class ES_Workflows_Table extends WP_List_Table {
273
  */
274
  public function column_status( $item ) {
275
  return '<button type="button" class="ig-es-switch js-toggle-workflow-status" '
276
- . 'data-workflow-id="' . $item['id'] . '" '
277
- . 'data-ig-es-switch="' . ( '1' === $item['status'] ? 'active' : 'inactive' ) . '">'
278
- . __( 'Toggle Status', 'email-subscribers' ) . '</button>';
279
  }
280
 
281
  /**
@@ -334,12 +338,12 @@ class ES_Workflows_Table extends WP_List_Table {
334
  */
335
  public function search_box( $text = '', $input_id = '' ) {
336
  ?>
337
- <p class="search-box">
338
- <label class="screen-reader-text"
339
  for="<?php echo esc_attr( $input_id ); ?>"><?php echo esc_attr( $text ); ?>:</label>
340
- <input type="search" id="<?php echo esc_attr( $input_id ); ?>" name="s" value="<?php _admin_search_query(); ?>" />
341
- <?php submit_button( __( 'Search Workflows', 'email-subscribers' ), 'button', false, false, array( 'id' => 'search-submit' ) ); ?>
342
- </p>
343
  <?php
344
  }
345
 
142
  * Render Workflows list
143
  *
144
  * @since 4.4.1
145
+ *
146
+ * @modified 4.4.4 Added wp-heading-inline class to heading tag.
147
  */
148
  public function load_workflow_list() {
149
  ?>
150
+ <h1 class="wp-heading-inline text-xl leading-7 font-bold text-gray-900 sm:text-3xl sm:leading-9 sm:truncate">
151
+ <span class="text-2xl font-bold leading-7 text-gray-900 sm:text-3xl sm:leading-9 sm:truncate"><?php esc_html_e( 'Workflows', 'email-subscribers' ); ?>
152
+ </span>
153
  <a href="admin.php?page=es_workflows&action=new"
154
+ class="ig-es-title-button px-2 pt-2 pb-1 my-1 mx-1"><?php esc_html_e( 'Add New', 'email-subscribers' ); ?></a>
155
  <?php do_action( 'ig_es_after_workflow_type_buttons' ); ?>
156
  </h1>
157
  <div id="poststuff">
160
  <div class="meta-box-sortables ui-sortable">
161
  <form method="post">
162
  <?php
163
+ $this->prepare_items();
164
+ $this->display();
165
  ?>
166
  </form>
167
  </div>
224
  switch ( $column_name ) {
225
 
226
  case 'created_at':
227
+ $output = ig_es_format_date_time( $item[ $column_name ] );
228
+ break;
229
  default:
230
+ $output = $item[ $column_name ];
231
  }
232
 
233
  return $output;
277
  */
278
  public function column_status( $item ) {
279
  return '<button type="button" class="ig-es-switch js-toggle-workflow-status" '
280
+ . 'data-workflow-id="' . $item['id'] . '" '
281
+ . 'data-ig-es-switch="' . ( '1' === $item['status'] ? 'active' : 'inactive' ) . '">'
282
+ . __( 'Toggle Status', 'email-subscribers' ) . '</button>';
283
  }
284
 
285
  /**
338
  */
339
  public function search_box( $text = '', $input_id = '' ) {
340
  ?>
341
+ <p class="search-box">
342
+ <label class="screen-reader-text"
343
  for="<?php echo esc_attr( $input_id ); ?>"><?php echo esc_attr( $text ); ?>:</label>
344
+ <input type="search" id="<?php echo esc_attr( $input_id ); ?>" name="s" value="<?php _admin_search_query(); ?>" />
345
+ <?php submit_button( __( 'Search Workflows', 'email-subscribers' ), 'button', false, false, array( 'id' => 'search-submit' ) ); ?>
346
+ </p>
347
  <?php
348
  }
349
 
lite/includes/workflows/db/class-es-db-workflows.php CHANGED
@@ -318,8 +318,6 @@ class ES_DB_Workflows extends ES_DB {
318
  /**
319
  * Method to update workflow status
320
  *
321
- * @since 4.4.1
322
- *
323
  * @param array $workflow_ids Workflow IDs.
324
  * @param integer $status New status.
325
  * @return bool $updated Update status
318
  /**
319
  * Method to update workflow status
320
  *
 
 
321
  * @param array $workflow_ids Workflow IDs.
322
  * @param integer $status New status.
323
  * @return bool $updated Update status
lite/public/partials/class-es-shortcode.php CHANGED
@@ -175,7 +175,7 @@ class ES_Shortcode {
175
  $name_label .= '*';
176
  }
177
  }
178
- $name_html = '<div class="es-field-wrap"><label>' . $name_label . '<br/><input type="text" name="name" placeholder="' . $name_place_holder . '" value="" ' . $required . '/></label></div>';
179
  }
180
 
181
  // Lists
@@ -207,7 +207,7 @@ class ES_Shortcode {
207
  if ( ! empty( $email_label ) ) {
208
  $email_html .= $email_label . '*' . '<br/>';
209
  }
210
- $email_html .= '<input class="es_required_field es_txt_email" type="email" name="email" value="" placeholder="' . $email_place_holder . '" required/></label></div>';
211
 
212
  ?>
213
 
175
  $name_label .= '*';
176
  }
177
  }
178
+ $name_html = '<div class="es-field-wrap"><label>' . $name_label . '<br/><input type="text" name="name" class="ig_es_form_field_name" placeholder="' . $name_place_holder . '" value="" ' . $required . '/></label></div>';
179
  }
180
 
181
  // Lists
207
  if ( ! empty( $email_label ) ) {
208
  $email_html .= $email_label . '*' . '<br/>';
209
  }
210
+ $email_html .= '<input class="es_required_field es_txt_email ig_es_form_field_email" type="email" name="email" value="" placeholder="' . $email_place_holder . '" required/></label></div>';
211
 
212
  ?>
213
 
readme.txt CHANGED
@@ -6,7 +6,7 @@ Tags: subscription, newsletter, email marketing, post notification, email newsle
6
  Requires at least: 3.9
7
  Tested up to: 5.4
8
  Requires PHP: 5.6
9
- Stable tag: 4.4.3
10
  License: GPLv3
11
  License URI: http://www.gnu.org/licenses
12
 
@@ -238,38 +238,48 @@ Refer [here](https://www.icegram.com/documentation/es-faq/).
238
 
239
  == Screenshots ==
240
 
241
- 1. Front Page - Subscription Form
242
 
243
- 2. Admin page - Audience
244
 
245
- 3. Admin page - Post Notifications
246
 
247
- 4. Admin page - Broadcasts
248
 
249
- 5. Admin page - Reports of all Newsletter & Post Notification emails sent
250
 
251
- 6. Admin page - Settings Tab 1 - General Settings
252
 
253
- 7. Admin page - Settings Tab 2 - Signup Confirmation related Settings
254
 
255
- 8. Admin page - Settings Tab 3 - Cron Job (Schedule Email) related Settings
256
 
257
- 9. Admin page - Settings Tab 4 - Security Settings
258
 
259
- 10. Admin Dashboard
260
 
261
- 11. Workflows
262
 
263
- 12. Campaigns
264
 
265
- 13. New Form
266
 
267
- 14. Forms
 
 
 
 
 
 
268
 
269
- 15. Add New Contact
270
 
271
  == Changelog ==
272
 
 
 
 
 
 
273
  **4.4.3 (02.04.2020)**
274
 
275
  * Update: Improve Workflows
6
  Requires at least: 3.9
7
  Tested up to: 5.4
8
  Requires PHP: 5.6
9
+ Stable tag: 4.4.4
10
  License: GPLv3
11
  License URI: http://www.gnu.org/licenses
12
 
238
 
239
  == Screenshots ==
240
 
241
+ 1. Admin Dashboard
242
 
243
+ 2. Audience Dashboard
244
 
245
+ 3. Add New Contact Form
246
 
247
+ 4. Campaigns
248
 
249
+ 5. Send Broadcasts
250
 
251
+ 6. New Post Notification
252
 
253
+ 7. Forms
254
 
255
+ 8. Create New Form
256
 
257
+ 9. Workflows
258
 
259
+ 10. Reports of all Newsletter & Post Notification emails sent
260
 
261
+ 11. General Settings
262
 
263
+ 12. Notifications Settings
264
 
265
+ 13. Email Sending Settings
266
 
267
+ 14. Security Settings
268
+
269
+ 15. Access Control Settings
270
+
271
+ 16. Subscribe Form
272
+
273
+ 17. Subscribe Form - Allow subscriber to choose list
274
 
 
275
 
276
  == Changelog ==
277
 
278
+ **4.4.4 (10.04.2020)**
279
+
280
+ * Update: Improve Settings UI
281
+ * Update: Improve Import/ Export contacts
282
+
283
  **4.4.3 (02.04.2020)**
284
 
285
  * Update: Improve Workflows