Email Subscribers & Newsletters - Version 4.5.6

Version Description

Download this release

Release Info

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

Code changes from version 4.5.5 to 4.5.6

Files changed (31) hide show
  1. email-subscribers.php +2 -2
  2. lite/admin/class-email-subscribers-admin.php +5 -5
  3. lite/admin/css/email-subscribers-admin.css +12 -9
  4. lite/admin/dist/main.css +1 -1
  5. lite/admin/partials/dashboard.php +8 -8
  6. lite/admin/partials/help.php +12 -7
  7. lite/includes/class-es-common.php +3 -3
  8. lite/includes/classes/class-es-admin-settings.php +13 -10
  9. lite/includes/classes/class-es-campaigns-table.php +23 -11
  10. lite/includes/classes/class-es-contacts-table.php +368 -359
  11. lite/includes/classes/class-es-export-subscribers.php +49 -45
  12. lite/includes/classes/class-es-forms-table.php +31 -20
  13. lite/includes/classes/class-es-handle-subscription.php +5 -5
  14. lite/includes/classes/class-es-handle-sync-wp-user.php +14 -7
  15. lite/includes/classes/class-es-ig-redirect.php +6 -6
  16. lite/includes/classes/class-es-import-subscribers.php +207 -200
  17. lite/includes/classes/class-es-lists-table.php +29 -22
  18. lite/includes/classes/class-es-mailer.php +12 -8
  19. lite/includes/classes/class-es-newsletters.php +39 -31
  20. lite/includes/classes/class-es-post-notifications.php +217 -200
  21. lite/includes/classes/class-es-reports-table.php +30 -20
  22. lite/includes/classes/class-es-templates-table.php +8 -4
  23. lite/includes/classes/class-es-tools.php +3 -1
  24. lite/includes/es-core-functions.php +40 -1
  25. lite/includes/feedback/class-ig-feedback.php +11 -5
  26. lite/includes/pro-features.php +4 -4
  27. lite/includes/workflows/admin/class-es-workflow-admin-edit.php +23 -10
  28. lite/includes/workflows/class-es-workflows-table.php +20 -11
  29. lite/includes/workflows/triggers/class-es-trigger-user-deleted.php +1 -1
  30. lite/public/class-email-subscribers-public.php +18 -4
  31. readme.txt +8 -1
email-subscribers.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Email Subscribers & Newsletters
4
  * Plugin URI: https://www.icegram.com/
5
  * Description: Add subscription forms on website, send HTML newsletters & automatically notify subscribers about new blog posts once it is published.
6
- * Version: 4.5.5
7
  * Author: Icegram
8
  * Author URI: https://www.icegram.com/
9
  * Requires at least: 3.9
@@ -163,7 +163,7 @@ if ( $is_premium ) {
163
  /* ***************************** Initial Compatibility Work (End) ******************* */
164
 
165
  if ( ! defined( 'ES_PLUGIN_VERSION' ) ) {
166
- define( 'ES_PLUGIN_VERSION', '4.5.5' );
167
  }
168
 
169
  // Plugin Folder Path.
3
  * Plugin Name: Email Subscribers & Newsletters
4
  * Plugin URI: https://www.icegram.com/
5
  * Description: Add subscription forms on website, send HTML newsletters & automatically notify subscribers about new blog posts once it is published.
6
+ * Version: 4.5.6
7
  * Author: Icegram
8
  * Author URI: https://www.icegram.com/
9
  * Requires at least: 3.9
163
  /* ***************************** Initial Compatibility Work (End) ******************* */
164
 
165
  if ( ! defined( 'ES_PLUGIN_VERSION' ) ) {
166
+ define( 'ES_PLUGIN_VERSION', '4.5.6' );
167
  }
168
 
169
  // Plugin Folder Path.
lite/admin/class-email-subscribers-admin.php CHANGED
@@ -214,19 +214,19 @@ class Email_Subscribers_Admin {
214
 
215
  // Add Lists Submenu
216
  $hook = add_submenu_page( 'es_dashboard', __( 'Lists', 'email-subscribers' ), '<span id="ig-es-lists">' . __( 'Lists', 'email-subscribers' ) . '</span>', 'edit_posts', 'es_lists', array( $this, 'render_lists' ) );
217
- add_action( "load-$hook", array( 'ES_Lists_Table', 'screen_options' ) );
218
  }
219
 
220
  if ( in_array( 'forms', $accessible_sub_menus ) ) {
221
  // Add Forms Submenu
222
  $hook = add_submenu_page( 'es_dashboard', __( 'Forms', 'email-subscribers' ), __( 'Forms', 'email-subscribers' ), 'edit_posts', 'es_forms', array( $this, 'render_forms' ) );
223
- add_action( "load-$hook", array( 'ES_Forms_Table', 'screen_options' ) );
224
  }
225
 
226
  if ( in_array( 'campaigns', $accessible_sub_menus ) ) {
227
  // Add Campaigns Submenu
228
  $hook = add_submenu_page( 'es_dashboard', __( 'Campaigns', 'email-subscribers' ), __( 'Campaigns', 'email-subscribers' ), 'edit_posts', 'es_campaigns', array( $this, 'render_campaigns' ) );
229
- add_action( "load-$hook", array( 'ES_Campaigns_Table', 'screen_options' ) );
230
 
231
  add_submenu_page( 'es_dashboard', __( 'Post Notifications', 'email-subscribers' ), '<span id="ig-es-post-notifications">' . __( 'Post Notifications', 'email-subscribers' ) . '</span>', 'edit_posts', 'es_notifications', array( $this, 'load_post_notifications' ) );
232
  add_submenu_page( 'es_dashboard', __( 'Broadcast', 'email-subscribers' ), '<span id="ig-es-broadcast">' . __( 'Broadcast', 'email-subscribers' ) . '</span>', 'edit_posts', 'es_newsletters', array( $this, 'load_newsletters' ) );
@@ -239,7 +239,7 @@ class Email_Subscribers_Admin {
239
  // Add Workflows Submenu
240
  $hook = add_submenu_page( 'es_dashboard', __( 'Workflows', 'email-subscribers' ), __( 'Workflows', 'email-subscribers' ), 'edit_posts', 'es_workflows', array( $this, 'render_workflows' ) );
241
 
242
- add_action( "load-$hook", array( 'ES_Workflows_Table', 'screen_options' ) );
243
  add_action( "load-$hook", array( 'ES_Workflow_Admin_Edit', 'register_meta_boxes' ) );
244
  add_action( "admin_footer-$hook", array( 'ES_Workflow_Admin_Edit', 'print_script_in_footer' ) );
245
  add_action( 'admin_init', array( 'ES_Workflow_Admin_Edit', 'maybe_save' ) );
@@ -292,7 +292,7 @@ class Email_Subscribers_Admin {
292
  }
293
 
294
  if ( ! empty( $_POST ) ) {
295
- $params = ig_es_get_post_data();
296
  } else {
297
  exit();
298
  }
214
 
215
  // Add Lists Submenu
216
  $hook = add_submenu_page( 'es_dashboard', __( 'Lists', 'email-subscribers' ), '<span id="ig-es-lists">' . __( 'Lists', 'email-subscribers' ) . '</span>', 'edit_posts', 'es_lists', array( $this, 'render_lists' ) );
217
+ //add_action( "load-$hook", array( 'ES_Lists_Table', 'screen_options' ) );
218
  }
219
 
220
  if ( in_array( 'forms', $accessible_sub_menus ) ) {
221
  // Add Forms Submenu
222
  $hook = add_submenu_page( 'es_dashboard', __( 'Forms', 'email-subscribers' ), __( 'Forms', 'email-subscribers' ), 'edit_posts', 'es_forms', array( $this, 'render_forms' ) );
223
+ //add_action( "load-$hook", array( 'ES_Forms_Table', 'screen_options' ) );
224
  }
225
 
226
  if ( in_array( 'campaigns', $accessible_sub_menus ) ) {
227
  // Add Campaigns Submenu
228
  $hook = add_submenu_page( 'es_dashboard', __( 'Campaigns', 'email-subscribers' ), __( 'Campaigns', 'email-subscribers' ), 'edit_posts', 'es_campaigns', array( $this, 'render_campaigns' ) );
229
+ //add_action( "load-$hook", array( 'ES_Campaigns_Table', 'screen_options' ) );
230
 
231
  add_submenu_page( 'es_dashboard', __( 'Post Notifications', 'email-subscribers' ), '<span id="ig-es-post-notifications">' . __( 'Post Notifications', 'email-subscribers' ) . '</span>', 'edit_posts', 'es_notifications', array( $this, 'load_post_notifications' ) );
232
  add_submenu_page( 'es_dashboard', __( 'Broadcast', 'email-subscribers' ), '<span id="ig-es-broadcast">' . __( 'Broadcast', 'email-subscribers' ) . '</span>', 'edit_posts', 'es_newsletters', array( $this, 'load_newsletters' ) );
239
  // Add Workflows Submenu
240
  $hook = add_submenu_page( 'es_dashboard', __( 'Workflows', 'email-subscribers' ), __( 'Workflows', 'email-subscribers' ), 'edit_posts', 'es_workflows', array( $this, 'render_workflows' ) );
241
 
242
+ //add_action( "load-$hook", array( 'ES_Workflows_Table', 'screen_options' ) );
243
  add_action( "load-$hook", array( 'ES_Workflow_Admin_Edit', 'register_meta_boxes' ) );
244
  add_action( "admin_footer-$hook", array( 'ES_Workflow_Admin_Edit', 'print_script_in_footer' ) );
245
  add_action( 'admin_init', array( 'ES_Workflow_Admin_Edit', 'maybe_save' ) );
292
  }
293
 
294
  if ( ! empty( $_POST ) ) {
295
+ $params = ig_es_get_data( $_POST, '', array(), true );
296
  } else {
297
  exit();
298
  }
lite/admin/css/email-subscribers-admin.css CHANGED
@@ -322,7 +322,7 @@ div#post-body-content .meta-box-sortables .row-blog p.submit input#submit {
322
  text-shadow: 0 -1px 1px #0085ba, 1px 0 1px #0085ba, 0 1px 1px #0085ba, -1px 0 1px #0085ba;
323
  }
324
 
325
- p.search-box.box-ma10 {
326
  margin: 0 5px;
327
  }
328
 
@@ -852,7 +852,7 @@ h5.es-badge {
852
 
853
  .es_list_contact_status:before {
854
  content: " \2219 ";
855
- font-size: 4em;
856
  vertical-align: text-bottom;
857
  }
858
 
@@ -870,17 +870,13 @@ h5.es-badge {
870
 
871
  .ig-es-process-queue {
872
  float: right;
873
- margin: 18px 0 3px;
874
  }
875
 
876
  .ig-es-process-queue .page-title-action {
877
  font-size: 16px;
878
  }
879
 
880
- .ig-es-process-queue .es-helper {
881
- margin: 3em;
882
- }
883
-
884
  .email-subscribers_page_es_settings .ui-widget {
885
  font-family: Roboto, Arial, Helvetica, sans-serif;
886
  font-size: 1em;
@@ -1174,9 +1170,8 @@ a.button-send:hover, .es-error-actions .es-dashboard-btn {
1174
  .ig-es-indicator {
1175
  text-align: center;
1176
  z-index: 26;
1177
- font-size: 0.8em;
1178
  margin-left: 0.3em;
1179
- padding: 2px;
1180
  background: #e66060;
1181
  color: #fff;
1182
  border-radius: 2px;
@@ -1923,3 +1918,11 @@ div.broadcast_side_content{
1923
  }
1924
 
1925
  /* Campaign Report : end */
 
 
 
 
 
 
 
 
322
  text-shadow: 0 -1px 1px #0085ba, 1px 0 1px #0085ba, 0 1px 1px #0085ba, -1px 0 1px #0085ba;
323
  }
324
 
325
+ p.search-box.box-ma10, p.search-box {
326
  margin: 0 5px;
327
  }
328
 
852
 
853
  .es_list_contact_status:before {
854
  content: " \2219 ";
855
+ font-size: 52px;
856
  vertical-align: text-bottom;
857
  }
858
 
870
 
871
  .ig-es-process-queue {
872
  float: right;
873
+ margin: 2px 0 3px;
874
  }
875
 
876
  .ig-es-process-queue .page-title-action {
877
  font-size: 16px;
878
  }
879
 
 
 
 
 
880
  .email-subscribers_page_es_settings .ui-widget {
881
  font-family: Roboto, Arial, Helvetica, sans-serif;
882
  font-size: 1em;
1170
  .ig-es-indicator {
1171
  text-align: center;
1172
  z-index: 26;
1173
+ font-size: 12px;
1174
  margin-left: 0.3em;
 
1175
  background: #e66060;
1176
  color: #fff;
1177
  border-radius: 2px;
1918
  }
1919
 
1920
  /* Campaign Report : end */
1921
+
1922
+ .wp-core-ui #poststuff select, .wp-core-ui .search-box input[name="s"], .wp-core-ui #bulk-action-selector-top, .wp-core-ui #filter-by-date {
1923
+ border-color: #a0aec0;
1924
+ }
1925
+
1926
+ .wp-core-ui #search-submit, .wp-core-ui #doaction, .wp-core-ui #doaction2, .wp-core-ui #post-query-submit{
1927
+ border-color : hsl(215,13.8%,54.1%);
1928
+ }
lite/admin/dist/main.css CHANGED
@@ -1 +1 @@
1
- /*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{-webkit-box-sizing:content-box;box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{-webkit-box-sizing:border-box;box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{-webkit-box-sizing:border-box;box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}[hidden],template{display:none}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}button{background-color:transparent;background-image:none;padding:0}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}fieldset,ol,ul{margin:0;padding:0}ol,ul{list-style:none}html{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5}*,:after,:before{-webkit-box-sizing:border-box;box-sizing:border-box;border:0 solid #d2d6dc}hr{border-top-width:1px}img{border-style:solid}textarea{resize:vertical}input::-webkit-input-placeholder,textarea::-webkit-input-placeholder{color:#a0aec0}input::-moz-placeholder,textarea::-moz-placeholder{color:#a0aec0}input::-ms-input-placeholder,textarea::-ms-input-placeholder{color:#a0aec0}input::placeholder,textarea::placeholder{color:#a0aec0}[role=button],button{cursor:pointer}table{border-collapse:collapse}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}button,input,optgroup,select,textarea{padding:0;line-height:inherit;color:inherit}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}a{--text-opacity:1;color:#5850ec;color:rgba(88,80,236,var(--text-opacity))}img{border-width:0}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}.form-input{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#d2d6dc;border-width:1px;border-radius:.375rem;padding:.5rem .75rem;font-size:1rem;line-height:1.5}.form-input::-webkit-input-placeholder{color:#9fa6b2;opacity:1}.form-input::-moz-placeholder{color:#9fa6b2;opacity:1}.form-input::-ms-input-placeholder{color:#9fa6b2;opacity:1}.form-input::placeholder{color:#9fa6b2;opacity:1}.form-input:focus{outline:none;-webkit-box-shadow:0 0 0 3px rgba(164,202,254,.45);box-shadow:0 0 0 3px rgba(164,202,254,.45);border-color:#a4cafe}.form-textarea{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#d2d6dc;border-width:1px;border-radius:.375rem;padding:.5rem .75rem;font-size:1rem;line-height:1.5}.form-textarea::-webkit-input-placeholder{color:#9fa6b2;opacity:1}.form-textarea::-moz-placeholder{color:#9fa6b2;opacity:1}.form-textarea::-ms-input-placeholder{color:#9fa6b2;opacity:1}.form-textarea::placeholder{color:#9fa6b2;opacity:1}.form-textarea:focus{outline:none;-webkit-box-shadow:0 0 0 3px rgba(164,202,254,.45);box-shadow:0 0 0 3px rgba(164,202,254,.45);border-color:#a4cafe}.form-multiselect{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#d2d6dc;border-width:1px;border-radius:.375rem;padding:.5rem .75rem;font-size:1rem;line-height:1.5}.form-multiselect:focus{outline:none;-webkit-box-shadow:0 0 0 3px rgba(164,202,254,.45);box-shadow:0 0 0 3px rgba(164,202,254,.45);border-color:#a4cafe}.form-select{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M7 7l3-3 3 3m0 6l-3 3-3-3' stroke='%239fa6b2' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-print-color-adjust:exact;color-adjust:exact;background-repeat:no-repeat;background-color:#fff;border-color:#d2d6dc;border-width:1px;border-radius:.375rem;padding:.5rem 2.5rem .5rem .75rem;font-size:1rem;line-height:1.5;background-position:right .5rem center;background-size:1.5em 1.5em}.form-select::-ms-expand{color:#9fa6b2;border:none}@media not print{.form-select::-ms-expand{display:none}}@media print and (-ms-high-contrast:active),print and (-ms-high-contrast:none){.form-select{padding-right:.75rem}}.form-select:focus{outline:none;-webkit-box-shadow:0 0 0 3px rgba(164,202,254,.45);box-shadow:0 0 0 3px rgba(164,202,254,.45);border-color:#a4cafe}.form-checkbox{-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-print-color-adjust:exact;color-adjust:exact;display:inline-block;vertical-align:middle;background-origin:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-ms-flex-negative:0;flex-shrink:0;height:1rem;width:1rem;color:#3f83f8;background-color:#fff;border-color:#d2d6dc;border-width:1px;border-radius:.25rem}.form-checkbox:checked{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 16 16' fill='%23fff' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5.707 7.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4a1 1 0 00-1.414-1.414L7 8.586 5.707 7.293z'/%3E%3C/svg%3E");border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:50%;background-repeat:no-repeat}@media not print{.form-checkbox::-ms-check{border-width:1px;color:transparent;background:inherit;border-color:inherit;border-radius:inherit}}.form-checkbox:focus{outline:none;-webkit-box-shadow:0 0 0 3px rgba(164,202,254,.45);box-shadow:0 0 0 3px rgba(164,202,254,.45);border-color:#a4cafe}.form-checkbox:checked:focus{border-color:transparent}.form-radio{-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-print-color-adjust:exact;color-adjust:exact;display:inline-block;vertical-align:middle;background-origin:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-ms-flex-negative:0;flex-shrink:0;border-radius:100%;height:1rem;width:1rem;color:#3f83f8;background-color:#fff;border-color:#d2d6dc;border-width:1px}.form-radio:checked{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 16 16' fill='%23fff' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='8' cy='8' r='3'/%3E%3C/svg%3E");border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:50%;background-repeat:no-repeat}@media not print{.form-radio::-ms-check{border-width:1px;color:transparent;background:inherit;border-color:inherit;border-radius:inherit}}.form-radio:focus{outline:none;-webkit-box-shadow:0 0 0 3px rgba(164,202,254,.45);box-shadow:0 0 0 3px rgba(164,202,254,.45);border-color:#a4cafe}.form-radio:checked:focus{border-color:transparent}.ig-es-primary-button,.ig-es-send-queue-emails{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;background-color:rgba(255,255,255,var(--bg-opacity));font-size:.875rem;line-height:1.25rem;font-weight:500;--text-opacity:1;color:#fff;color:rgba(255,255,255,var(--text-opacity));--bg-opacity:1;background-color:#5850ec;background-color:rgba(88,80,236,var(--bg-opacity));-webkit-transition-property:background-color,border-color,color,fill,stroke,opacity,-webkit-box-shadow,-webkit-transform;transition-property:background-color,border-color,color,fill,stroke,opacity,-webkit-box-shadow,-webkit-transform;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,-webkit-box-shadow,-webkit-transform;-webkit-transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(.4,0,.2,1);-webkit-transition-duration:.15s;transition-duration:.15s}.ig-es-title-button,.wp-heading-inline+.page-title-action{font-size:.875rem;border-radius:.375rem;border-width:1px;--border-opacity:1;border-color:#5850ec;border-color:rgba(88,80,236,var(--border-opacity));line-height:1.25rem;font-weight:500}.wp-heading-inline+.page-title-action{--text-opacity:1;color:#1c64f2;color:rgba(28,100,242,var(--text-opacity));padding:.5rem;margin-left:.5rem;margin-right:.5rem}.ig-es-title-button:hover,.wp-heading-inline+.page-title-action:hover{--text-opacity:1;color:#6875f5;color:rgba(104,117,245,var(--text-opacity))}.ig-es-primary-button:hover{--bg-opacity:1;background-color:#6875f5;background-color:rgba(104,117,245,var(--bg-opacity));--text-opacity:1;color:#fff;color:rgba(255,255,255,var(--text-opacity))}.ig-es-primary-button:focus,.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;background-color:rgba(255,255,255,var(--bg-opacity))!important;font-size:.875rem!important;line-height:1.25rem!important;font-weight:500!important;background-color:#0e9f6e!important;background-color:rgba(14,159,110,var(--bg-opacity))!important;-webkit-transition-property:background-color,border-color,color,fill,stroke,opacity,-webkit-box-shadow,-webkit-transform!important;transition-property:background-color,border-color,color,fill,stroke,opacity,-webkit-box-shadow,-webkit-transform!important;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform!important;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,-webkit-box-shadow,-webkit-transform!important;-webkit-transition-timing-function:cubic-bezier(.4,0,.2,1)!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important;-webkit-transition-duration:.15s!important;transition-duration:.15s!important}.ig-es-imp-button,.ig-es-imp-button:hover{--text-opacity:1!important;color:#fff!important;color:rgba(255,255,255,var(--text-opacity))!important;--bg-opacity:1!important}.ig-es-imp-button:hover{background-color:#31c48d!important;background-color:rgba(49,196,141,var(--bg-opacity))!important}.ig-es-imp-button:focus{outline:0!important;-webkit-box-shadow:0 0 0 3px rgba(132,225,188,.45)!important;box-shadow:0 0 0 3px rgba(132,225,188,.45)!important}.ig-es-link-button{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;border-radius:.375rem;border-width:1px;border-color:transparent;background-color:#fff;background-color:rgba(255,255,255,var(--bg-opacity));font-size:.875rem;line-height:1.25rem;font-weight:500;background-color:#ff5a1f;background-color:rgba(255,90,31,var(--bg-opacity));-webkit-transition-property:background-color,border-color,color,fill,stroke,opacity,-webkit-box-shadow,-webkit-transform;transition-property:background-color,border-color,color,fill,stroke,opacity,-webkit-box-shadow,-webkit-transform;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,-webkit-box-shadow,-webkit-transform;-webkit-transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(.4,0,.2,1);-webkit-transition-duration:.15s;transition-duration:.15s}.ig-es-link-button,.ig-es-link-button:hover{--text-opacity:1;color:#fff;color:rgba(255,255,255,var(--text-opacity));--bg-opacity:1}.ig-es-link-button:hover{background-color:#ff8a4c;background-color:rgba(255,138,76,var(--bg-opacity))}.ig-es-link-button:focus{outline:0;-webkit-box-shadow:0 0 0 3px rgba(253,186,140,.45);box-shadow:0 0 0 3px rgba(253,186,140,.45)}.ig-es-action.js-open .ig-es-action__header{--bg-opacity:1;background-color:#5850ec;background-color:rgba(88,80,236,var(--bg-opacity));--text-opacity:1;color:#fff;color:rgba(255,255,255,var(--text-opacity))}.form-checkbox{content:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 16 16' fill='%23fff' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5.707 7.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4a1 1 0 00-1.414-1.414L7 8.586 5.707 7.293z'/%3E%3C/svg%3E")}.form-radio{content:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 16 16' fill='%23fff' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='8' cy='8' r='3'/%3E%3C/svg%3E")}.form-checkbox:checked,.form-radio:checked{--text-opacity:1!important;color:#5850ec!important;color:rgba(88,80,236,var(--text-opacity))!important}.form-select{font-size:.875rem!important;--border-opacity:1!important;border-color:#9fa6b2!important;border-color:rgba(159,166,178,var(--border-opacity))!important;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M7 7l3-3 3 3m0 6l-3 3-3-3' stroke='%239fa6b2' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")!important}.form-select:focus,input[type=number]:focus{outline:0!important;-webkit-box-shadow:0 0 0 3px rgba(164,202,254,.45)!important;box-shadow:0 0 0 3px rgba(164,202,254,.45)!important;--border-opacity:1!important;border-color:#a4cafe!important;border-color:rgba(164,202,254,var(--border-opacity))!important}.es-check-toggle:checked~.es-mail-toggle-line{--bg-opacity:1;background-color:#5850ec;background-color:rgba(88,80,236,var(--bg-opacity))}.es-check-toggle:checked~.es-mail-toggle-dot{--transform-translate-x:0;--transform-translate-y:0;--transform-rotate:0;--transform-skew-x:0;--transform-skew-y:0;--transform-scale-x:1;--transform-scale-y:1;-webkit-transform:translateX(var(--transform-translate-x)) translateY(var(--transform-translate-y)) rotate(var(--transform-rotate)) skewX(var(--transform-skew-x)) skewY(var(--transform-skew-y)) scaleX(var(--transform-scale-x)) scaleY(var(--transform-scale-y));transform:translateX(var(--transform-translate-x)) translateY(var(--transform-translate-y)) rotate(var(--transform-rotate)) skewX(var(--transform-skew-x)) skewY(var(--transform-skew-y)) scaleX(var(--transform-scale-x)) scaleY(var(--transform-scale-y));--transform-translate-x:100%}[type=radio]:checked+.es-mailer-logo{-webkit-transition-property:all;transition-property:all;-webkit-transition-duration:.1s;transition-duration:.1s;-webkit-transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(.4,0,.2,1);--transform-translate-x:0;--transform-translate-y:0;--transform-rotate:0;--transform-skew-x:0;--transform-skew-y:0;--transform-scale-x:1;--transform-scale-y:1;-webkit-transform:translateX(var(--transform-translate-x)) translateY(var(--transform-translate-y)) rotate(var(--transform-rotate)) skewX(var(--transform-skew-x)) skewY(var(--transform-skew-y)) scaleX(var(--transform-scale-x)) scaleY(var(--transform-scale-y));transform:translateX(var(--transform-translate-x)) translateY(var(--transform-translate-y)) rotate(var(--transform-rotate)) skewX(var(--transform-skew-x)) skewY(var(--transform-skew-y)) scaleX(var(--transform-scale-x)) scaleY(var(--transform-scale-y));--transform-scale-x:1.1;--transform-scale-y:1.1;-webkit-box-shadow:0 0 3px 3px #5a67d8;box-shadow:0 0 3px 3px #5a67d8}.wp-core-ui .button,.wp-core-ui .button-secondary{--border-opacity:1;border-color:#5850ec;border-color:rgba(88,80,236,var(--border-opacity));color:#5850ec;color:rgba(88,80,236,var(--text-opacity))}.wp-core-ui .button,.wp-core-ui .button-primary,.wp-core-ui .button-secondary{font-size:.875rem;border-radius:.375rem;border-width:1px;line-height:1.25rem;font-weight:500;--text-opacity:1}.wp-core-ui .button-primary{--bg-opacity:1;background-color:#5850ec;background-color:rgba(88,80,236,var(--bg-opacity));color:#fff;color:rgba(255,255,255,var(--text-opacity));-webkit-transition-property:background-color,border-color,color,fill,stroke,opacity,-webkit-box-shadow,-webkit-transform;transition-property:background-color,border-color,color,fill,stroke,opacity,-webkit-box-shadow,-webkit-transform;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,-webkit-box-shadow,-webkit-transform;-webkit-transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(.4,0,.2,1);-webkit-transition-duration:.15s;transition-duration:.15s}.wp-core-ui .button-primary:hover,.wp-core-ui .button:hover{--border-opacity:1;border-color:#5850ec;border-color:rgba(88,80,236,var(--border-opacity));--text-opacity:1;color:#6875f5;color:rgba(104,117,245,var(--text-opacity))}.bg-white{--bg-opacity:1;background-color:#fff;background-color:rgba(255,255,255,var(--bg-opacity))}.bg-gray-100{--bg-opacity:1;background-color:#f4f5f7;background-color:rgba(244,245,247,var(--bg-opacity))}.bg-gray-200{--bg-opacity:1;background-color:#e5e7eb;background-color:rgba(229,231,235,var(--bg-opacity))}.bg-gray-300{--bg-opacity:1;background-color:#d2d6dc;background-color:rgba(210,214,220,var(--bg-opacity))}.bg-red-100{--bg-opacity:1;background-color:#fde8e8;background-color:rgba(253,232,232,var(--bg-opacity))}.bg-green-100{--bg-opacity:1;background-color:#def7ec;background-color:rgba(222,247,236,var(--bg-opacity))}.bg-green-600{--bg-opacity:1;background-color:#057a55;background-color:rgba(5,122,85,var(--bg-opacity))}.bg-teal-50{--bg-opacity:1;background-color:#edfafa;background-color:rgba(237,250,250,var(--bg-opacity))}.bg-teal-100{--bg-opacity:1;background-color:#d5f5f6;background-color:rgba(213,245,246,var(--bg-opacity))}.bg-blue-50{--bg-opacity:1;background-color:#ebf5ff;background-color:rgba(235,245,255,var(--bg-opacity))}.bg-indigo-500{--bg-opacity:1;background-color:#6875f5;background-color:rgba(104,117,245,var(--bg-opacity))}.bg-indigo-600{--bg-opacity:1;background-color:#5850ec;background-color:rgba(88,80,236,var(--bg-opacity))}.bg-indigo-800{--bg-opacity:1;background-color:#42389d;background-color:rgba(66,56,157,var(--bg-opacity))}.hover\:bg-gray-50:hover{--bg-opacity:1;background-color:#f9fafb;background-color:rgba(249,250,251,var(--bg-opacity))}.hover\:bg-gray-100:hover{--bg-opacity:1;background-color:#f4f5f7;background-color:rgba(244,245,247,var(--bg-opacity))}.hover\:bg-green-500:hover{--bg-opacity:1;background-color:#0e9f6e;background-color:rgba(14,159,110,var(--bg-opacity))}.hover\:bg-indigo-500:hover{--bg-opacity:1;background-color:#6875f5;background-color:rgba(104,117,245,var(--bg-opacity))}.focus\:bg-gray-50:focus{--bg-opacity:1;background-color:#f9fafb;background-color:rgba(249,250,251,var(--bg-opacity))}.focus\:bg-gray-100:focus{--bg-opacity:1;background-color:#f4f5f7;background-color:rgba(244,245,247,var(--bg-opacity))}.border-collapse{border-collapse:collapse}.border-transparent{border-color:transparent}.border-gray-100{--border-opacity:1;border-color:#f4f5f7;border-color:rgba(244,245,247,var(--border-opacity))}.border-gray-200{--border-opacity:1;border-color:#e5e7eb;border-color:rgba(229,231,235,var(--border-opacity))}.border-gray-300{--border-opacity:1;border-color:#d2d6dc;border-color:rgba(210,214,220,var(--border-opacity))}.border-gray-400{--border-opacity:1;border-color:#9fa6b2;border-color:rgba(159,166,178,var(--border-opacity))}.border-indigo-500{--border-opacity:1;border-color:#6875f5;border-color:rgba(104,117,245,var(--border-opacity))}.border-indigo-600{--border-opacity:1;border-color:#5850ec;border-color:rgba(88,80,236,var(--border-opacity))}.hover\:border-gray-200:hover{--border-opacity:1;border-color:#e5e7eb;border-color:rgba(229,231,235,var(--border-opacity))}.hover\:border-gray-500:hover{--border-opacity:1;border-color:#6b7280;border-color:rgba(107,114,128,var(--border-opacity))}.hover\:border-red-400:hover{--border-opacity:1;border-color:#f98080;border-color:rgba(249,128,128,var(--border-opacity))}.hover\:border-indigo-500:hover{--border-opacity:1;border-color:#6875f5;border-color:rgba(104,117,245,var(--border-opacity))}.hover\:border-indigo-600:hover{--border-opacity:1;border-color:#5850ec;border-color:rgba(88,80,236,var(--border-opacity))}.focus\:border-blue-300:focus{--border-opacity:1;border-color:#a4cafe;border-color:rgba(164,202,254,var(--border-opacity))}.rounded{border-radius:.25rem}.rounded-md{border-radius:.375rem}.rounded-lg{border-radius:.5rem}.rounded-full{border-radius:9999px}.rounded-r-lg{border-top-right-radius:.5rem;border-bottom-right-radius:.5rem}.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-auto{cursor:auto}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:-webkit-box;display:-ms-flexbox;display:flex}.inline-flex{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex}.table{display:table}.table-cell{display:table-cell}.grid{display:grid}.hidden{display:none}.flex-row{-webkit-box-orient:horizontal;-ms-flex-direction:row;flex-direction:row}.flex-col,.flex-row{-webkit-box-direction:normal}.flex-col{-webkit-box-orient:vertical;-ms-flex-direction:column;flex-direction:column}.flex-wrap{-ms-flex-wrap:wrap;flex-wrap:wrap}.items-start{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.items-center{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.self-start{-ms-flex-item-align:start;align-self:flex-start}.justify-start{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.justify-center{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.justify-between{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.flex-1{-webkit-box-flex:1;-ms-flex:1 1 0%;flex:1 1 0%}.flex-auto{-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto}.flex-none{-webkit-box-flex:0;-ms-flex:none;flex:none}.flex-shrink-0{-ms-flex-negative:0;flex-shrink:0}.float-right{float:right}.float-left{float:left}.font-sans{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.font-thin{font-weight:200}.font-normal{font-weight:400}.font-medium{font-weight:500}.font-semibold{font-weight:600}.font-bold{font-weight:700}.h-0{height:0}.h-3{height:.75rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-10{height:2.5rem}.h-15{height:3.75rem}.h-20{height:5rem}.h-48{height:12rem}.h-auto{height:auto}.h-full{height:100%}.text-xs{font-size:.75rem}.text-sm{font-size:.875rem}.text-base{font-size:1rem}.text-lg{font-size:1.125rem}.text-xl{font-size:1.25rem}.text-2xl{font-size:1.5rem}.text-4xl{font-size:2.25rem}.leading-4{line-height:1rem}.leading-5{line-height:1.25rem}.leading-6{line-height:1.5rem}.leading-7{line-height:1.75rem}.leading-none{line-height:1}.leading-snug{line-height:1.375}.leading-normal{line-height:1.5}.leading-relaxed{line-height:1.625}.list-none{list-style-type:none}.list-disc{list-style-type:disc}.list-decimal{list-style-type:decimal}.m-4{margin:1rem}.my-1{margin-top:.25rem;margin-bottom:.25rem}.mx-1{margin-left:.25rem;margin-right:.25rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.my-3{margin-top:.75rem;margin-bottom:.75rem}.my-4{margin-top:1rem;margin-bottom:1rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-6{margin-left:1.5rem;margin-right:1.5rem}.my-8{margin-top:2rem;margin-bottom:2rem}.mx-8{margin-left:2rem;margin-right:2rem}.mx-auto{margin-left:auto;margin-right:auto}.mt-0{margin-top:0}.mb-0{margin-bottom:0}.mt-1{margin-top:.25rem}.mr-1{margin-right:.25rem}.mb-1{margin-bottom:.25rem}.ml-1{margin-left:.25rem}.mt-2{margin-top:.5rem}.mr-2{margin-right:.5rem}.mb-2{margin-bottom:.5rem}.ml-2{margin-left:.5rem}.mt-3{margin-top:.75rem}.mr-3{margin-right:.75rem}.mb-3{margin-bottom:.75rem}.ml-3{margin-left:.75rem}.mt-4{margin-top:1rem}.mr-4{margin-right:1rem}.mb-4{margin-bottom:1rem}.ml-4{margin-left:1rem}.ml-5{margin-left:1.25rem}.mt-6{margin-top:1.5rem}.mr-6{margin-right:1.5rem}.mb-6{margin-bottom:1.5rem}.ml-6{margin-left:1.5rem}.mt-8{margin-top:2rem}.mr-8{margin-right:2rem}.mr-10{margin-right:2.5rem}.mt-12{margin-top:3rem}.ml-12{margin-left:3rem}.mt-16{margin-top:4rem}.mr-16{margin-right:4rem}.ml-16{margin-left:4rem}.mt-1\.5{margin-top:.375rem}.mr-1\.5{margin-right:.375rem}.mt-3\.5{margin-top:.875rem}.-mr-1{margin-right:-.25rem}.max-h-full{max-height:100%}.max-w-7xl{max-width:80rem}.max-w-full{max-width:100%}.min-h-screen{min-height:100vh}.min-w-0{min-width:0}.min-w-full{min-width:100%}.opacity-0{opacity:0}.opacity-100{opacity:1}.focus\:outline-none:focus{outline:0}.overflow-hidden{overflow:hidden}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.px-1{padding-left:.25rem;padding-right:.25rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.px-2{padding-left:.5rem;padding-right:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.px-3{padding-left:.75rem;padding-right:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.px-4{padding-left:1rem;padding-right:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.py-12{padding-top:3rem;padding-bottom:3rem}.px-12{padding-left:3rem;padding-right:3rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.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}.pr-2{padding-right:.5rem}.pb-2{padding-bottom:.5rem}.pl-2{padding-left:.5rem}.pt-3{padding-top:.75rem}.pb-3{padding-bottom:.75rem}.pl-3{padding-left:.75rem}.pt-4{padding-top:1rem}.pr-4{padding-right:1rem}.pb-4{padding-bottom:1rem}.pl-4{padding-left:1rem}.pl-5{padding-left:1.25rem}.pt-6{padding-top:1.5rem}.pr-6{padding-right:1.5rem}.pb-6{padding-bottom:1.5rem}.pl-6{padding-left:1.5rem}.pt-7{padding-top:1.75rem}.pt-8{padding-top:2rem}.pb-8{padding-bottom:2rem}.pl-8{padding-left:2rem}.pt-10{padding-top:2.5rem}.pl-10{padding-left:2.5rem}.pr-12{padding-right:3rem}.pb-12{padding-bottom:3rem}.pl-16{padding-left:4rem}.pt-1\.5{padding-top:.375rem}.pointer-events-none{pointer-events:none}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:-webkit-sticky;position:sticky}.inset-y-0{top:0;bottom:0}.top-0{top:0}.right-0{right:0}.left-0{left:0}.shadow-xs{-webkit-box-shadow:0 0 0 1px rgba(0,0,0,.05);box-shadow:0 0 0 1px rgba(0,0,0,.05)}.shadow-sm{-webkit-box-shadow:0 1px 2px 0 rgba(0,0,0,.05);box-shadow:0 1px 2px 0 rgba(0,0,0,.05)}.shadow{-webkit-box-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px 0 rgba(0,0,0,.06);box-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px 0 rgba(0,0,0,.06)}.shadow-md{-webkit-box-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -1px rgba(0,0,0,.06);box-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -1px rgba(0,0,0,.06)}.shadow-lg{-webkit-box-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -2px rgba(0,0,0,.05);box-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -2px rgba(0,0,0,.05)}.shadow-xl{-webkit-box-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 10px 10px -5px rgba(0,0,0,.04);box-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 10px 10px -5px rgba(0,0,0,.04)}.shadow-inner{-webkit-box-shadow:inset 0 2px 4px 0 rgba(0,0,0,.06);box-shadow:inset 0 2px 4px 0 rgba(0,0,0,.06)}.hover\:shadow-md:hover{-webkit-box-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -1px rgba(0,0,0,.06);box-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -1px rgba(0,0,0,.06)}.focus\:shadow-lg:focus{-webkit-box-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -2px rgba(0,0,0,.05);box-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -2px rgba(0,0,0,.05)}.focus\:shadow-outline:focus{-webkit-box-shadow:0 0 0 3px rgba(118,169,250,.45);box-shadow:0 0 0 3px rgba(118,169,250,.45)}.focus\:shadow-outline-blue:focus{-webkit-box-shadow:0 0 0 3px rgba(164,202,254,.45);box-shadow:0 0 0 3px rgba(164,202,254,.45)}.focus\:shadow-outline-red:focus{-webkit-box-shadow:0 0 0 3px rgba(248,180,180,.45);box-shadow:0 0 0 3px rgba(248,180,180,.45)}.focus\:shadow-outline-indigo:focus{-webkit-box-shadow:0 0 0 3px rgba(180,198,252,.45);box-shadow:0 0 0 3px rgba(180,198,252,.45)}.table-fixed{table-layout:fixed}.text-left{text-align:left}.text-center{text-align:center}.text-white{--text-opacity:1;color:#fff;color:rgba(255,255,255,var(--text-opacity))}.text-black{--text-opacity:1;color:#000;color:rgba(0,0,0,var(--text-opacity))}.text-gray-400{--text-opacity:1;color:#9fa6b2;color:rgba(159,166,178,var(--text-opacity))}.text-gray-500{--text-opacity:1;color:#6b7280;color:rgba(107,114,128,var(--text-opacity))}.text-gray-600{--text-opacity:1;color:#4b5563;color:rgba(75,85,99,var(--text-opacity))}.text-gray-700{--text-opacity:1;color:#374151;color:rgba(55,65,81,var(--text-opacity))}.text-gray-800{--text-opacity:1;color:#252f3f;color:rgba(37,47,63,var(--text-opacity))}.text-gray-900{--text-opacity:1;color:#161e2e;color:rgba(22,30,46,var(--text-opacity))}.text-red-600{--text-opacity:1;color:#e02424;color:rgba(224,36,36,var(--text-opacity))}.text-red-800{--text-opacity:1;color:#9b1c1c;color:rgba(155,28,28,var(--text-opacity))}.text-orange-400{--text-opacity:1;color:#ff8a4c;color:rgba(255,138,76,var(--text-opacity))}.text-orange-500{--text-opacity:1;color:#ff5a1f;color:rgba(255,90,31,var(--text-opacity))}.text-yellow-400{--text-opacity:1;color:#e3a008;color:rgba(227,160,8,var(--text-opacity))}.text-green-400{--text-opacity:1;color:#31c48d;color:rgba(49,196,141,var(--text-opacity))}.text-green-600{--text-opacity:1;color:#057a55;color:rgba(5,122,85,var(--text-opacity))}.text-green-800{--text-opacity:1;color:#03543f;color:rgba(3,84,63,var(--text-opacity))}.text-teal-400{--text-opacity:1;color:#16bdca;color:rgba(22,189,202,var(--text-opacity))}.text-teal-500{--text-opacity:1;color:#0694a2;color:rgba(6,148,162,var(--text-opacity))}.text-teal-700{--text-opacity:1;color:#036672;color:rgba(3,102,114,var(--text-opacity))}.text-blue-400{--text-opacity:1;color:#76a9fa;color:rgba(118,169,250,var(--text-opacity))}.text-blue-500{--text-opacity:1;color:#3f83f8;color:rgba(63,131,248,var(--text-opacity))}.text-blue-700{--text-opacity:1;color:#1a56db;color:rgba(26,86,219,var(--text-opacity))}.text-blue-800{--text-opacity:1;color:#1e429f;color:rgba(30,66,159,var(--text-opacity))}.text-indigo-100{--text-opacity:1;color:#e5edff;color:rgba(229,237,255,var(--text-opacity))}.text-indigo-400{--text-opacity:1;color:#8da2fb;color:rgba(141,162,251,var(--text-opacity))}.text-indigo-500{--text-opacity:1;color:#6875f5;color:rgba(104,117,245,var(--text-opacity))}.text-indigo-600{--text-opacity:1;color:#5850ec;color:rgba(88,80,236,var(--text-opacity))}.hover\:text-white:hover{--text-opacity:1;color:#fff;color:rgba(255,255,255,var(--text-opacity))}.hover\:text-gray-800:hover{--text-opacity:1;color:#252f3f;color:rgba(37,47,63,var(--text-opacity))}.hover\:text-gray-900:hover{--text-opacity:1;color:#161e2e;color:rgba(22,30,46,var(--text-opacity))}.hover\:text-blue-700:hover{--text-opacity:1;color:#1a56db;color:rgba(26,86,219,var(--text-opacity))}.hover\:text-indigo-500:hover{--text-opacity:1;color:#6875f5;color:rgba(104,117,245,var(--text-opacity))}.focus\:text-white:focus{--text-opacity:1;color:#fff;color:rgba(255,255,255,var(--text-opacity))}.focus\:text-gray-900:focus{--text-opacity:1;color:#161e2e;color:rgba(22,30,46,var(--text-opacity))}.active\:text-indigo-600:active{--text-opacity:1;color:#5850ec;color:rgba(88,80,236,var(--text-opacity))}.italic{font-style:italic}.not-italic{font-style:normal}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.underline{text-decoration:underline}.no-underline{text-decoration:none}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.select-none{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.align-middle{vertical-align:middle}.whitespace-no-wrap{white-space:nowrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.w-0{width:0}.w-3{width:.75rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-7{width:1.75rem}.w-8{width:2rem}.w-10{width:2.5rem}.w-40{width:10rem}.w-56{width:14rem}.w-auto{width:auto}.w-1\/2{width:50%}.w-1\/3{width:33.333333%}.w-2\/3{width:66.666667%}.w-1\/4{width:25%}.w-2\/4{width:50%}.w-3\/4{width:75%}.w-1\/5{width:20%}.w-2\/5{width:40%}.w-3\/5{width:60%}.w-4\/5{width:80%}.w-3\/6{width:50%}.w-4\/6{width:66.666667%}.w-5\/6{width:83.333333%}.w-1\/12{width:8.333333%}.w-2\/12{width:16.666667%}.w-3\/12{width:25%}.w-4\/12{width:33.333333%}.w-9\/12{width:75%}.w-11\/12{width:91.666667%}.w-full{width:100%}.z-20{z-index:20}.z-40{z-index:40}.z-50{z-index:50}.gap-8{grid-gap:2rem;gap:2rem}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.transform{--transform-translate-x:0;--transform-translate-y:0;--transform-rotate:0;--transform-skew-x:0;--transform-skew-y:0;--transform-scale-x:1;--transform-scale-y:1;-webkit-transform:translateX(var(--transform-translate-x)) translateY(var(--transform-translate-y)) rotate(var(--transform-rotate)) skewX(var(--transform-skew-x)) skewY(var(--transform-skew-y)) scaleX(var(--transform-scale-x)) scaleY(var(--transform-scale-y));transform:translateX(var(--transform-translate-x)) translateY(var(--transform-translate-y)) rotate(var(--transform-rotate)) skewX(var(--transform-skew-x)) skewY(var(--transform-skew-y)) scaleX(var(--transform-scale-x)) scaleY(var(--transform-scale-y))}.origin-top-right{-webkit-transform-origin:top right;transform-origin:top right}.scale-95{--transform-scale-x:.95;--transform-scale-y:.95}.scale-100{--transform-scale-x:1;--transform-scale-y:1}.transition-all{-webkit-transition-property:all;transition-property:all}.transition{-webkit-transition-property:background-color,border-color,color,fill,stroke,opacity,-webkit-box-shadow,-webkit-transform;transition-property:background-color,border-color,color,fill,stroke,opacity,-webkit-box-shadow,-webkit-transform;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,-webkit-box-shadow,-webkit-transform}.ease-in{-webkit-transition-timing-function:cubic-bezier(.4,0,1,1);transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-out{-webkit-transition-timing-function:cubic-bezier(0,0,.2,1);transition-timing-function:cubic-bezier(0,0,.2,1)}.ease-in-out{-webkit-transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-75{-webkit-transition-duration:75ms;transition-duration:75ms}.duration-100{-webkit-transition-duration:.1s;transition-duration:.1s}.duration-150{-webkit-transition-duration:.15s;transition-duration:.15s}.duration-300{-webkit-transition-duration:.3s;transition-duration:.3s}@media (min-width:640px){.sm\:rounded{border-radius:.25rem}.sm\:rounded-md{border-radius:.375rem}.sm\:rounded-lg{border-radius:.5rem}.sm\:border-r{border-right-width:1px}.sm\:border-l{border-left-width:1px}.sm\:grid{display:grid}.sm\:justify-start{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.sm\:text-sm{font-size:.875rem}.sm\:text-2xl{font-size:1.5rem}.sm\:text-3xl{font-size:1.875rem}.sm\:leading-5{line-height:1.25rem}.sm\:leading-7{line-height:1.75rem}.sm\:leading-9{line-height:2.25rem}.sm\:px-0{padding-left:0;padding-right:0}.sm\:px-2{padding-left:.5rem;padding-right:.5rem}.sm\:px-4{padding-left:1rem;padding-right:1rem}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sm\:w-32{width:8rem}.sm\:w-1\/3{width:33.333333%}.sm\:w-2\/3{width:66.666667%}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (min-width:768px){.md\:flex{display:-webkit-box;display:-ms-flexbox;display:flex}.md\:items-start{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.md\:items-center{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.md\:justify-end{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.md\:justify-between{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.md\:text-base{font-size:1rem}.md\:mx-0{margin-left:0;margin-right:0}.md\:my-2{margin-top:.5rem;margin-bottom:.5rem}.md\:mt-0{margin-top:0}.md\:ml-2{margin-left:.5rem}.md\:ml-4{margin-left:1rem}.md\:ml-8{margin-left:2rem}.md\:-mr-8{margin-right:-2rem}.md\:max-w-xl{max-width:36rem}.md\:max-w-5xl{max-width:64rem}.md\:p-2{padding:.5rem}.md\:p-6{padding:1.5rem}.md\:py-0{padding-top:0;padding-bottom:0}.md\:px-1{padding-left:.25rem;padding-right:.25rem}.md\:px-2{padding-left:.5rem;padding-right:.5rem}.md\:pb-2{padding-bottom:.5rem}.md\:pr-4{padding-right:1rem}.md\:pt-6{padding-top:1.5rem}.md\:w-3\/5{width:60%}}@media (min-width:1024px){.lg\:bg-transparent{background-color:transparent}.lg\:border-transparent{border-color:transparent}.lg\:rounded-full{border-radius:9999px}.lg\:block{display:block}.lg\:inline-flex{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex}.lg\:grid{display:grid}.lg\:text-sm{font-size:.875rem}.lg\:text-lg{font-size:1.125rem}.lg\:my-0{margin-top:0;margin-bottom:0}.lg\:mx-5{margin-left:1.25rem;margin-right:1.25rem}.lg\:ml-16{margin-left:4rem}.lg\:-mr-16{margin-right:-4rem}.lg\:p-6{padding:1.5rem}.lg\:p-8{padding:2rem}.lg\:px-3{padding-left:.75rem;padding-right:.75rem}.lg\:px-4{padding-left:1rem;padding-right:1rem}.lg\:px-8{padding-left:2rem;padding-right:2rem}.lg\:pt-2{padding-top:.5rem}.lg\:pb-2{padding-bottom:.5rem}.lg\:pl-2{padding-left:.5rem}.lg\:shadow-none{-webkit-box-shadow:none;box-shadow:none}.lg\:w-40{width:10rem}.lg\:w-1\/2{width:50%}.lg\:w-3\/5{width:60%}.lg\:w-3\/12{width:25%}.lg\:w-7\/12{width:58.333333%}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (min-width:1280px){.xl\:mx-7{margin-left:1.75rem;margin-right:1.75rem}.xl\:mr-0{margin-right:0}.xl\:ml-3{margin-left:.75rem}.xl\:ml-4{margin-left:1rem}.xl\:ml-20{margin-left:5rem}.xl\:px-4{padding-left:1rem;padding-right:1rem}.xl\:pb-4{padding-bottom:1rem}.xl\:w-1\/4{width:25%}.xl\:w-2\/5{width:40%}.xl\:w-3\/5{width:60%}.xl\:w-2\/12{width:16.666667%}.xl\:w-7\/12{width:58.333333%}}
1
+ /*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{-webkit-box-sizing:content-box;box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{-webkit-box-sizing:border-box;box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{-webkit-box-sizing:border-box;box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}[hidden],template{display:none}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}button{background-color:transparent;background-image:none;padding:0}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}fieldset,ol,ul{margin:0;padding:0}ol,ul{list-style:none}html{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5}*,:after,:before{-webkit-box-sizing:border-box;box-sizing:border-box;border:0 solid #d2d6dc}hr{border-top-width:1px}img{border-style:solid}textarea{resize:vertical}input::-webkit-input-placeholder,textarea::-webkit-input-placeholder{color:#a0aec0}input::-moz-placeholder,textarea::-moz-placeholder{color:#a0aec0}input::-ms-input-placeholder,textarea::-ms-input-placeholder{color:#a0aec0}input::placeholder,textarea::placeholder{color:#a0aec0}[role=button],button{cursor:pointer}table{border-collapse:collapse}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}button,input,optgroup,select,textarea{padding:0;line-height:inherit;color:inherit}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}a{--text-opacity:1;color:#5850ec;color:rgba(88,80,236,var(--text-opacity))}img{border-width:0}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}.form-input{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#d2d6dc;border-width:1px;border-radius:.375rem;padding:.5rem .75rem;font-size:1rem;line-height:1.5}.form-input::-webkit-input-placeholder{color:#9fa6b2;opacity:1}.form-input::-moz-placeholder{color:#9fa6b2;opacity:1}.form-input::-ms-input-placeholder{color:#9fa6b2;opacity:1}.form-input::placeholder{color:#9fa6b2;opacity:1}.form-input:focus{outline:none;-webkit-box-shadow:0 0 0 3px rgba(164,202,254,.45);box-shadow:0 0 0 3px rgba(164,202,254,.45);border-color:#a4cafe}.form-textarea{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#d2d6dc;border-width:1px;border-radius:.375rem;padding:.5rem .75rem;font-size:1rem;line-height:1.5}.form-textarea::-webkit-input-placeholder{color:#9fa6b2;opacity:1}.form-textarea::-moz-placeholder{color:#9fa6b2;opacity:1}.form-textarea::-ms-input-placeholder{color:#9fa6b2;opacity:1}.form-textarea::placeholder{color:#9fa6b2;opacity:1}.form-textarea:focus{outline:none;-webkit-box-shadow:0 0 0 3px rgba(164,202,254,.45);box-shadow:0 0 0 3px rgba(164,202,254,.45);border-color:#a4cafe}.form-multiselect{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#d2d6dc;border-width:1px;border-radius:.375rem;padding:.5rem .75rem;font-size:1rem;line-height:1.5}.form-multiselect:focus{outline:none;-webkit-box-shadow:0 0 0 3px rgba(164,202,254,.45);box-shadow:0 0 0 3px rgba(164,202,254,.45);border-color:#a4cafe}.form-select{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M7 7l3-3 3 3m0 6l-3 3-3-3' stroke='%239fa6b2' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-print-color-adjust:exact;color-adjust:exact;background-repeat:no-repeat;background-color:#fff;border-color:#d2d6dc;border-width:1px;border-radius:.375rem;padding:.5rem 2.5rem .5rem .75rem;font-size:1rem;line-height:1.5;background-position:right .5rem center;background-size:1.5em 1.5em}.form-select::-ms-expand{color:#9fa6b2;border:none}@media not print{.form-select::-ms-expand{display:none}}@media print and (-ms-high-contrast:active),print and (-ms-high-contrast:none){.form-select{padding-right:.75rem}}.form-select:focus{outline:none;-webkit-box-shadow:0 0 0 3px rgba(164,202,254,.45);box-shadow:0 0 0 3px rgba(164,202,254,.45);border-color:#a4cafe}.form-checkbox{-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-print-color-adjust:exact;color-adjust:exact;display:inline-block;vertical-align:middle;background-origin:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-ms-flex-negative:0;flex-shrink:0;height:1rem;width:1rem;color:#3f83f8;background-color:#fff;border-color:#d2d6dc;border-width:1px;border-radius:.25rem}.form-checkbox:checked{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 16 16' fill='%23fff' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5.707 7.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4a1 1 0 00-1.414-1.414L7 8.586 5.707 7.293z'/%3E%3C/svg%3E");border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:50%;background-repeat:no-repeat}@media not print{.form-checkbox::-ms-check{border-width:1px;color:transparent;background:inherit;border-color:inherit;border-radius:inherit}}.form-checkbox:focus{outline:none;-webkit-box-shadow:0 0 0 3px rgba(164,202,254,.45);box-shadow:0 0 0 3px rgba(164,202,254,.45);border-color:#a4cafe}.form-checkbox:checked:focus{border-color:transparent}.form-radio{-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-print-color-adjust:exact;color-adjust:exact;display:inline-block;vertical-align:middle;background-origin:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-ms-flex-negative:0;flex-shrink:0;border-radius:100%;height:1rem;width:1rem;color:#3f83f8;background-color:#fff;border-color:#d2d6dc;border-width:1px}.form-radio:checked{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 16 16' fill='%23fff' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='8' cy='8' r='3'/%3E%3C/svg%3E");border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:50%;background-repeat:no-repeat}@media not print{.form-radio::-ms-check{border-width:1px;color:transparent;background:inherit;border-color:inherit;border-radius:inherit}}.form-radio:focus{outline:none;-webkit-box-shadow:0 0 0 3px rgba(164,202,254,.45);box-shadow:0 0 0 3px rgba(164,202,254,.45);border-color:#a4cafe}.form-radio:checked:focus{border-color:transparent}.ig-es-primary-button,.ig-es-send-queue-emails{border-color:transparent;padding:.5rem 1rem;background-color:#fff;background-color:rgba(255,255,255,var(--bg-opacity));color:#fff;color:rgba(255,255,255,var(--text-opacity));background-color:#5850ec;background-color:rgba(88,80,236,var(--bg-opacity))}.ig-es-primary-button,.ig-es-send-queue-emails,.ig-es-title-button,.wp-heading-inline+.page-title-action{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;border-radius:.375rem;border-width:1px;font-size:.875rem;line-height:1.25rem;font-weight:500;--text-opacity:1;--bg-opacity:1;-webkit-transition-property:background-color,border-color,color,fill,stroke,opacity,-webkit-box-shadow,-webkit-transform;transition-property:background-color,border-color,color,fill,stroke,opacity,-webkit-box-shadow,-webkit-transform;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,-webkit-box-shadow,-webkit-transform;-webkit-transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(.4,0,.2,1);-webkit-transition-duration:.15s;transition-duration:.15s}.ig-es-title-button,.wp-heading-inline+.page-title-action{--border-opacity:1;border-color:#d2d6dc;border-color:rgba(210,214,220,var(--border-opacity));color:#374151;color:rgba(55,65,81,var(--text-opacity));background-color:#fff;background-color:rgba(255,255,255,var(--bg-opacity));padding:.25rem .75rem}.wrap .wp-heading-inline+.page-title-action{margin-left:.5rem}.ig-es-title-button:hover,.wp-heading-inline+.page-title-action:hover{--bg-opacity:1;background-color:#f9fafb;background-color:rgba(249,250,251,var(--bg-opacity));--text-opacity:1;color:#374151;color:rgba(55,65,81,var(--text-opacity))}.ig-es-title-button:focus,.wp-heading-inline+.page-title-action:focus{outline:0;-webkit-box-shadow:0 0 0 3px rgba(118,169,250,.45);box-shadow:0 0 0 3px rgba(118,169,250,.45);--border-opacity:1;border-color:#a4cafe;border-color:rgba(164,202,254,var(--border-opacity))}.ig-es-primary-button:hover{--bg-opacity:1;background-color:#6875f5;background-color:rgba(104,117,245,var(--bg-opacity));--text-opacity:1;color:#fff;color:rgba(255,255,255,var(--text-opacity))}.ig-es-primary-button:focus{outline:0;-webkit-box-shadow:0 0 0 3px rgba(164,202,254,.45);box-shadow:0 0 0 3px rgba(164,202,254,.45)}.ig-es-imp-button{display:-webkit-inline-box!important;display:-ms-inline-flexbox!important;display:inline-flex!important;-webkit-box-pack:center!important;-ms-flex-pack:center!important;justify-content:center!important;border-radius:.375rem!important;border-width:1px!important;border-color:transparent!important;background-color:#fff!important;background-color:rgba(255,255,255,var(--bg-opacity))!important;font-size:.875rem!important;line-height:1.25rem!important;font-weight:500!important;background-color:#0e9f6e!important;background-color:rgba(14,159,110,var(--bg-opacity))!important;-webkit-transition-property:background-color,border-color,color,fill,stroke,opacity,-webkit-box-shadow,-webkit-transform!important;transition-property:background-color,border-color,color,fill,stroke,opacity,-webkit-box-shadow,-webkit-transform!important;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform!important;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,-webkit-box-shadow,-webkit-transform!important;-webkit-transition-timing-function:cubic-bezier(.4,0,.2,1)!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important;-webkit-transition-duration:.15s!important;transition-duration:.15s!important}.ig-es-imp-button,.ig-es-imp-button:hover{--text-opacity:1!important;color:#fff!important;color:rgba(255,255,255,var(--text-opacity))!important;--bg-opacity:1!important}.ig-es-imp-button:hover{background-color:#31c48d!important;background-color:rgba(49,196,141,var(--bg-opacity))!important}.ig-es-imp-button:focus{outline:0!important;-webkit-box-shadow:0 0 0 3px rgba(132,225,188,.45)!important;box-shadow:0 0 0 3px rgba(132,225,188,.45)!important}.ig-es-link-button{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;border-radius:.375rem;border-width:1px;border-color:transparent;background-color:#fff;background-color:rgba(255,255,255,var(--bg-opacity));font-size:.875rem;line-height:1.25rem;font-weight:500;background-color:#ff5a1f;background-color:rgba(255,90,31,var(--bg-opacity));-webkit-transition-property:background-color,border-color,color,fill,stroke,opacity,-webkit-box-shadow,-webkit-transform;transition-property:background-color,border-color,color,fill,stroke,opacity,-webkit-box-shadow,-webkit-transform;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,-webkit-box-shadow,-webkit-transform;-webkit-transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(.4,0,.2,1);-webkit-transition-duration:.15s;transition-duration:.15s}.ig-es-link-button,.ig-es-link-button:hover{--text-opacity:1;color:#fff;color:rgba(255,255,255,var(--text-opacity));--bg-opacity:1}.ig-es-link-button:hover{background-color:#ff8a4c;background-color:rgba(255,138,76,var(--bg-opacity))}.ig-es-link-button:focus{outline:0;-webkit-box-shadow:0 0 0 3px rgba(253,186,140,.45);box-shadow:0 0 0 3px rgba(253,186,140,.45)}.ig-es-action.js-open .ig-es-action__header{--bg-opacity:1;background-color:#5850ec;background-color:rgba(88,80,236,var(--bg-opacity));--text-opacity:1;color:#fff;color:rgba(255,255,255,var(--text-opacity))}.form-checkbox{content:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 16 16' fill='%23fff' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5.707 7.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4a1 1 0 00-1.414-1.414L7 8.586 5.707 7.293z'/%3E%3C/svg%3E")}.form-radio{content:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 16 16' fill='%23fff' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='8' cy='8' r='3'/%3E%3C/svg%3E")}.form-checkbox:checked,.form-radio:checked{--text-opacity:1!important;color:#5850ec!important;color:rgba(88,80,236,var(--text-opacity))!important}.form-select{font-size:.875rem!important;--border-opacity:1!important;border-color:#9fa6b2!important;border-color:rgba(159,166,178,var(--border-opacity))!important;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M7 7l3-3 3 3m0 6l-3 3-3-3' stroke='%239fa6b2' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")!important}.form-select:focus,input[type=number]:focus{outline:0!important;-webkit-box-shadow:0 0 0 3px rgba(164,202,254,.45)!important;box-shadow:0 0 0 3px rgba(164,202,254,.45)!important;--border-opacity:1!important;border-color:#a4cafe!important;border-color:rgba(164,202,254,var(--border-opacity))!important}.es-check-toggle:checked~.es-mail-toggle-line{--bg-opacity:1;background-color:#5850ec;background-color:rgba(88,80,236,var(--bg-opacity))}.es-check-toggle:checked~.es-mail-toggle-dot{--transform-translate-x:0;--transform-translate-y:0;--transform-rotate:0;--transform-skew-x:0;--transform-skew-y:0;--transform-scale-x:1;--transform-scale-y:1;-webkit-transform:translateX(var(--transform-translate-x)) translateY(var(--transform-translate-y)) rotate(var(--transform-rotate)) skewX(var(--transform-skew-x)) skewY(var(--transform-skew-y)) scaleX(var(--transform-scale-x)) scaleY(var(--transform-scale-y));transform:translateX(var(--transform-translate-x)) translateY(var(--transform-translate-y)) rotate(var(--transform-rotate)) skewX(var(--transform-skew-x)) skewY(var(--transform-skew-y)) scaleX(var(--transform-scale-x)) scaleY(var(--transform-scale-y));--transform-translate-x:100%}[type=radio]:checked+.es-mailer-logo{-webkit-transition-property:all;transition-property:all;-webkit-transition-duration:.1s;transition-duration:.1s;-webkit-transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(.4,0,.2,1);--transform-translate-x:0;--transform-translate-y:0;--transform-rotate:0;--transform-skew-x:0;--transform-skew-y:0;--transform-scale-x:1;--transform-scale-y:1;-webkit-transform:translateX(var(--transform-translate-x)) translateY(var(--transform-translate-y)) rotate(var(--transform-rotate)) skewX(var(--transform-skew-x)) skewY(var(--transform-skew-y)) scaleX(var(--transform-scale-x)) scaleY(var(--transform-scale-y));transform:translateX(var(--transform-translate-x)) translateY(var(--transform-translate-y)) rotate(var(--transform-rotate)) skewX(var(--transform-skew-x)) skewY(var(--transform-skew-y)) scaleX(var(--transform-scale-x)) scaleY(var(--transform-scale-y));--transform-scale-x:1.1;--transform-scale-y:1.1;-webkit-box-shadow:0 0 3px 3px #5a67d8;box-shadow:0 0 3px 3px #5a67d8}.wp-core-ui .button,.wp-core-ui .button-secondary{--border-opacity:1;border-color:#5850ec;border-color:rgba(88,80,236,var(--border-opacity));color:#5850ec;color:rgba(88,80,236,var(--text-opacity))}.wp-core-ui .button,.wp-core-ui .button-primary,.wp-core-ui .button-secondary{font-size:.875rem;border-radius:.375rem;border-width:1px;line-height:1.25rem;font-weight:500;--text-opacity:1}.wp-core-ui .button-primary{--bg-opacity:1;background-color:#5850ec;background-color:rgba(88,80,236,var(--bg-opacity));color:#fff;color:rgba(255,255,255,var(--text-opacity));-webkit-transition-property:background-color,border-color,color,fill,stroke,opacity,-webkit-box-shadow,-webkit-transform;transition-property:background-color,border-color,color,fill,stroke,opacity,-webkit-box-shadow,-webkit-transform;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,-webkit-box-shadow,-webkit-transform;-webkit-transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(.4,0,.2,1);-webkit-transition-duration:.15s;transition-duration:.15s}.wp-core-ui .button-primary:hover,.wp-core-ui .button:hover{--border-opacity:1;border-color:#5850ec;border-color:rgba(88,80,236,var(--border-opacity));--text-opacity:1;color:#6875f5;color:rgba(104,117,245,var(--text-opacity))}.wp-core-ui .search-box input[name=s],.wp-core-ui select{border-radius:.375rem}.wp-core-ui #bulk-action-selector-top,.wp-core-ui #doaction,.wp-core-ui #doaction2,.wp-core-ui #filter-by-date,.wp-core-ui #post-query-submit,.wp-core-ui #poststuff select,.wp-core-ui #search-submit{cursor:pointer;line-height:1.25rem;--text-opacity:1;color:#4b5563;color:rgba(75,85,99,var(--text-opacity));background-color:transparent;font-size:.875rem}.wp-core-ui #search-submit{margin-left:.375rem}.wp-core-ui #doaction2:focus .wp-core-ui #post-query-submit:focus,.wp-core-ui #doaction:focus,.wp-core-ui #search-submit:focus{outline:0;-webkit-box-shadow:0 0 0 3px rgba(159,166,178,.45);box-shadow:0 0 0 3px rgba(159,166,178,.45)}.es-items-lists table.fixed,.post-type-es_template table.fixed{margin-top:1.5rem;margin-bottom:1rem;-webkit-box-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px 0 rgba(0,0,0,.06);box-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px 0 rgba(0,0,0,.06);border-radius:.5rem;overflow:hidden}.es-items-lists table.fixed tfoot td,.es-items-lists table.fixed tfoot th,.es-items-lists table.fixed thead td,.es-items-lists table.fixed thead th,.post-type-es_template table.fixed tfoot th,.post-type-es_template table.fixed thead td,.post-type-es_template table.fixed thead th{--bg-opacity:1;background-color:#f4f5f7;background-color:rgba(244,245,247,var(--bg-opacity));border-bottom-width:1px;--border-opacity:1;border-color:#e5e7eb;border-color:rgba(229,231,235,var(--border-opacity));--text-opacity:1;color:#6b7280;color:rgba(107,114,128,var(--text-opacity));font-weight:500;letter-spacing:.05em}.es-items-lists table.fixed tfoot th,.es-items-lists table.fixed thead th,.post-type-es_template table.fixed tfoot th,.post-type-es_template table.fixed thead th{padding-top:.5rem;padding-bottom:.5rem}.es-items-lists .widefat thead td input,.post-type-es_template .widefat thead td input{margin-right:1.5rem}.post-type-es_template .wrap{padding-top:.75rem;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.post-type-es_template .wrap>h1{padding-top:0;line-height:2.25rem}.es-items-lists .striped>tbody tr,.post-type-es_template .striped>tbody tr{border-bottom-width:1px;--border-opacity:1;border-color:#e5e7eb;border-color:rgba(229,231,235,var(--border-opacity));padding-top:.5rem;padding-bottom:.5rem}.bg-white,.es-items-lists .striped>tbody>:nth-child(odd),.post-type-es_template .striped>tbody>:nth-child(odd){--bg-opacity:1;background-color:#fff;background-color:rgba(255,255,255,var(--bg-opacity))}.bg-gray-100{--bg-opacity:1;background-color:#f4f5f7;background-color:rgba(244,245,247,var(--bg-opacity))}.bg-gray-200{--bg-opacity:1;background-color:#e5e7eb;background-color:rgba(229,231,235,var(--bg-opacity))}.bg-gray-300{--bg-opacity:1;background-color:#d2d6dc;background-color:rgba(210,214,220,var(--bg-opacity))}.bg-red-100{--bg-opacity:1;background-color:#fde8e8;background-color:rgba(253,232,232,var(--bg-opacity))}.bg-green-100{--bg-opacity:1;background-color:#def7ec;background-color:rgba(222,247,236,var(--bg-opacity))}.bg-green-600{--bg-opacity:1;background-color:#057a55;background-color:rgba(5,122,85,var(--bg-opacity))}.bg-teal-50{--bg-opacity:1;background-color:#edfafa;background-color:rgba(237,250,250,var(--bg-opacity))}.bg-teal-100{--bg-opacity:1;background-color:#d5f5f6;background-color:rgba(213,245,246,var(--bg-opacity))}.bg-blue-50{--bg-opacity:1;background-color:#ebf5ff;background-color:rgba(235,245,255,var(--bg-opacity))}.bg-indigo-500{--bg-opacity:1;background-color:#6875f5;background-color:rgba(104,117,245,var(--bg-opacity))}.bg-indigo-600{--bg-opacity:1;background-color:#5850ec;background-color:rgba(88,80,236,var(--bg-opacity))}.bg-indigo-800{--bg-opacity:1;background-color:#42389d;background-color:rgba(66,56,157,var(--bg-opacity))}.hover\:bg-gray-50:hover{--bg-opacity:1;background-color:#f9fafb;background-color:rgba(249,250,251,var(--bg-opacity))}.hover\:bg-gray-100:hover{--bg-opacity:1;background-color:#f4f5f7;background-color:rgba(244,245,247,var(--bg-opacity))}.hover\:bg-green-500:hover{--bg-opacity:1;background-color:#0e9f6e;background-color:rgba(14,159,110,var(--bg-opacity))}.hover\:bg-indigo-500:hover{--bg-opacity:1;background-color:#6875f5;background-color:rgba(104,117,245,var(--bg-opacity))}.focus\:bg-gray-50:focus{--bg-opacity:1;background-color:#f9fafb;background-color:rgba(249,250,251,var(--bg-opacity))}.focus\:bg-gray-100:focus{--bg-opacity:1;background-color:#f4f5f7;background-color:rgba(244,245,247,var(--bg-opacity))}.border-collapse{border-collapse:collapse}.border-transparent{border-color:transparent}.border-gray-100{--border-opacity:1;border-color:#f4f5f7;border-color:rgba(244,245,247,var(--border-opacity))}.border-gray-200{--border-opacity:1;border-color:#e5e7eb;border-color:rgba(229,231,235,var(--border-opacity))}.border-gray-300{--border-opacity:1;border-color:#d2d6dc;border-color:rgba(210,214,220,var(--border-opacity))}.border-gray-400{--border-opacity:1;border-color:#9fa6b2;border-color:rgba(159,166,178,var(--border-opacity))}.border-indigo-500{--border-opacity:1;border-color:#6875f5;border-color:rgba(104,117,245,var(--border-opacity))}.border-indigo-600{--border-opacity:1;border-color:#5850ec;border-color:rgba(88,80,236,var(--border-opacity))}.hover\:border-gray-200:hover{--border-opacity:1;border-color:#e5e7eb;border-color:rgba(229,231,235,var(--border-opacity))}.hover\:border-gray-500:hover{--border-opacity:1;border-color:#6b7280;border-color:rgba(107,114,128,var(--border-opacity))}.hover\:border-red-400:hover{--border-opacity:1;border-color:#f98080;border-color:rgba(249,128,128,var(--border-opacity))}.hover\:border-indigo-600:hover{--border-opacity:1;border-color:#5850ec;border-color:rgba(88,80,236,var(--border-opacity))}.focus\:border-blue-300:focus{--border-opacity:1;border-color:#a4cafe;border-color:rgba(164,202,254,var(--border-opacity))}.rounded{border-radius:.25rem}.rounded-md{border-radius:.375rem}.rounded-lg{border-radius:.5rem}.rounded-full{border-radius:9999px}.rounded-r-lg{border-top-right-radius:.5rem;border-bottom-right-radius:.5rem}.rounded-l-lg{border-top-left-radius:.5rem;border-bottom-left-radius:.5rem}.border-dashed{border-style:dashed}.border-0{border-width:0}.border{border-width:1px}.border-t{border-top-width:1px}.border-r{border-right-width:1px}.border-b{border-bottom-width:1px}.cursor-auto{cursor:auto}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:-webkit-box;display:-ms-flexbox;display:flex}.inline-flex{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex}.table{display:table}.table-cell{display:table-cell}.grid{display:grid}.hidden{display:none}.flex-row{-webkit-box-orient:horizontal;-ms-flex-direction:row;flex-direction:row}.flex-col,.flex-row{-webkit-box-direction:normal}.flex-col{-webkit-box-orient:vertical;-ms-flex-direction:column;flex-direction:column}.flex-wrap{-ms-flex-wrap:wrap;flex-wrap:wrap}.items-start{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.items-center{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.self-start{-ms-flex-item-align:start;align-self:flex-start}.justify-start{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.justify-center{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.justify-between{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.flex-1{-webkit-box-flex:1;-ms-flex:1 1 0%;flex:1 1 0%}.flex-auto{-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto}.flex-none{-webkit-box-flex:0;-ms-flex:none;flex:none}.flex-shrink-0{-ms-flex-negative:0;flex-shrink:0}.float-right{float:right}.float-left{float:left}.font-sans{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.font-thin{font-weight:200}.font-normal{font-weight:400}.font-medium{font-weight:500}.font-semibold{font-weight:600}.font-bold{font-weight:700}.h-0{height:0}.h-3{height:.75rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-10{height:2.5rem}.h-15{height:3.75rem}.h-20{height:5rem}.h-48{height:12rem}.h-auto{height:auto}.h-full{height:100%}.text-xs{font-size:.75rem}.text-sm{font-size:.875rem}.text-base{font-size:1rem}.text-lg{font-size:1.125rem}.text-xl{font-size:1.25rem}.text-2xl{font-size:1.5rem}.text-3xl{font-size:1.875rem}.text-4xl{font-size:2.25rem}.leading-4{line-height:1rem}.leading-5{line-height:1.25rem}.leading-6{line-height:1.5rem}.leading-7{line-height:1.75rem}.leading-9{line-height:2.25rem}.leading-none{line-height:1}.leading-snug{line-height:1.375}.leading-normal{line-height:1.5}.leading-relaxed{line-height:1.625}.list-none{list-style-type:none}.list-disc{list-style-type:disc}.list-decimal{list-style-type:decimal}.m-4{margin:1rem}.my-1{margin-top:.25rem;margin-bottom:.25rem}.mx-1{margin-left:.25rem;margin-right:.25rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.my-3{margin-top:.75rem;margin-bottom:.75rem}.my-4{margin-top:1rem;margin-bottom:1rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-6{margin-left:1.5rem;margin-right:1.5rem}.my-8{margin-top:2rem;margin-bottom:2rem}.mx-8{margin-left:2rem;margin-right:2rem}.mx-auto{margin-left:auto;margin-right:auto}.mt-0{margin-top:0}.mb-0{margin-bottom:0}.mt-1{margin-top:.25rem}.mr-1{margin-right:.25rem}.mb-1{margin-bottom:.25rem}.ml-1{margin-left:.25rem}.mt-2{margin-top:.5rem}.mr-2{margin-right:.5rem}.mb-2{margin-bottom:.5rem}.ml-2{margin-left:.5rem}.mt-3{margin-top:.75rem}.mr-3{margin-right:.75rem}.mb-3{margin-bottom:.75rem}.ml-3{margin-left:.75rem}.mt-4{margin-top:1rem}.mr-4{margin-right:1rem}.mb-4{margin-bottom:1rem}.ml-4{margin-left:1rem}.ml-5{margin-left:1.25rem}.mt-6{margin-top:1.5rem}.mr-6{margin-right:1.5rem}.mb-6{margin-bottom:1.5rem}.ml-6{margin-left:1.5rem}.mt-7{margin-top:1.75rem}.mb-7{margin-bottom:1.75rem}.ml-7{margin-left:1.75rem}.mt-8{margin-top:2rem}.mr-8{margin-right:2rem}.mr-10{margin-right:2.5rem}.mt-12{margin-top:3rem}.ml-12{margin-left:3rem}.mt-16{margin-top:4rem}.mr-16{margin-right:4rem}.ml-16{margin-left:4rem}.mt-1\.5{margin-top:.375rem}.mr-1\.5{margin-right:.375rem}.mt-3\.5{margin-top:.875rem}.mb-3\.5{margin-bottom:.875rem}.-mr-1{margin-right:-.25rem}.max-h-full{max-height:100%}.max-w-7xl{max-width:80rem}.max-w-full{max-width:100%}.min-h-screen{min-height:100vh}.min-w-0{min-width:0}.min-w-full{min-width:100%}.opacity-0{opacity:0}.opacity-100{opacity:1}.focus\:outline-none:focus{outline:0}.overflow-hidden{overflow:hidden}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.px-1{padding-left:.25rem;padding-right:.25rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.px-2{padding-left:.5rem;padding-right:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.px-3{padding-left:.75rem;padding-right:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.px-4{padding-left:1rem;padding-right:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.py-12{padding-top:3rem;padding-bottom:3rem}.px-12{padding-left:3rem;padding-right:3rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.pt-1{padding-top:.25rem}.pr-1{padding-right:.25rem}.pb-1{padding-bottom:.25rem}.pl-1{padding-left:.25rem}.pt-2{padding-top:.5rem}.pr-2{padding-right:.5rem}.pb-2{padding-bottom:.5rem}.pl-2{padding-left:.5rem}.pt-3{padding-top:.75rem}.pb-3{padding-bottom:.75rem}.pl-3{padding-left:.75rem}.pt-4{padding-top:1rem}.pr-4{padding-right:1rem}.pb-4{padding-bottom:1rem}.pl-4{padding-left:1rem}.pl-5{padding-left:1.25rem}.pt-6{padding-top:1.5rem}.pr-6{padding-right:1.5rem}.pb-6{padding-bottom:1.5rem}.pl-6{padding-left:1.5rem}.pt-7{padding-top:1.75rem}.pt-8{padding-top:2rem}.pb-8{padding-bottom:2rem}.pl-8{padding-left:2rem}.pt-10{padding-top:2.5rem}.pl-10{padding-left:2.5rem}.pr-12{padding-right:3rem}.pb-12{padding-bottom:3rem}.pl-16{padding-left:4rem}.pt-1\.5{padding-top:.375rem}.pointer-events-none{pointer-events:none}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:-webkit-sticky;position:sticky}.inset-y-0{top:0;bottom:0}.top-0{top:0}.right-0{right:0}.left-0{left:0}.shadow-xs{-webkit-box-shadow:0 0 0 1px rgba(0,0,0,.05);box-shadow:0 0 0 1px rgba(0,0,0,.05)}.shadow-sm{-webkit-box-shadow:0 1px 2px 0 rgba(0,0,0,.05);box-shadow:0 1px 2px 0 rgba(0,0,0,.05)}.shadow{-webkit-box-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px 0 rgba(0,0,0,.06);box-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px 0 rgba(0,0,0,.06)}.shadow-md{-webkit-box-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -1px rgba(0,0,0,.06);box-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -1px rgba(0,0,0,.06)}.shadow-lg{-webkit-box-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -2px rgba(0,0,0,.05);box-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -2px rgba(0,0,0,.05)}.shadow-xl{-webkit-box-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 10px 10px -5px rgba(0,0,0,.04);box-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 10px 10px -5px rgba(0,0,0,.04)}.shadow-inner{-webkit-box-shadow:inset 0 2px 4px 0 rgba(0,0,0,.06);box-shadow:inset 0 2px 4px 0 rgba(0,0,0,.06)}.hover\:shadow-md:hover{-webkit-box-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -1px rgba(0,0,0,.06);box-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -1px rgba(0,0,0,.06)}.focus\:shadow-lg:focus{-webkit-box-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -2px rgba(0,0,0,.05);box-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -2px rgba(0,0,0,.05)}.focus\:shadow-outline:focus{-webkit-box-shadow:0 0 0 3px rgba(118,169,250,.45);box-shadow:0 0 0 3px rgba(118,169,250,.45)}.focus\:shadow-outline-blue:focus{-webkit-box-shadow:0 0 0 3px rgba(164,202,254,.45);box-shadow:0 0 0 3px rgba(164,202,254,.45)}.focus\:shadow-outline-red:focus{-webkit-box-shadow:0 0 0 3px rgba(248,180,180,.45);box-shadow:0 0 0 3px rgba(248,180,180,.45)}.focus\:shadow-outline-indigo:focus{-webkit-box-shadow:0 0 0 3px rgba(180,198,252,.45);box-shadow:0 0 0 3px rgba(180,198,252,.45)}.table-fixed{table-layout:fixed}.text-left{text-align:left}.text-center{text-align:center}.text-white{--text-opacity:1;color:#fff;color:rgba(255,255,255,var(--text-opacity))}.text-black{--text-opacity:1;color:#000;color:rgba(0,0,0,var(--text-opacity))}.text-gray-400{--text-opacity:1;color:#9fa6b2;color:rgba(159,166,178,var(--text-opacity))}.text-gray-500{--text-opacity:1;color:#6b7280;color:rgba(107,114,128,var(--text-opacity))}.text-gray-600{--text-opacity:1;color:#4b5563;color:rgba(75,85,99,var(--text-opacity))}.text-gray-700{--text-opacity:1;color:#374151;color:rgba(55,65,81,var(--text-opacity))}.text-gray-800{--text-opacity:1;color:#252f3f;color:rgba(37,47,63,var(--text-opacity))}.text-gray-900{--text-opacity:1;color:#161e2e;color:rgba(22,30,46,var(--text-opacity))}.text-red-600{--text-opacity:1;color:#e02424;color:rgba(224,36,36,var(--text-opacity))}.text-red-800{--text-opacity:1;color:#9b1c1c;color:rgba(155,28,28,var(--text-opacity))}.text-orange-400{--text-opacity:1;color:#ff8a4c;color:rgba(255,138,76,var(--text-opacity))}.text-orange-500{--text-opacity:1;color:#ff5a1f;color:rgba(255,90,31,var(--text-opacity))}.text-yellow-400{--text-opacity:1;color:#e3a008;color:rgba(227,160,8,var(--text-opacity))}.text-green-400{--text-opacity:1;color:#31c48d;color:rgba(49,196,141,var(--text-opacity))}.text-green-600{--text-opacity:1;color:#057a55;color:rgba(5,122,85,var(--text-opacity))}.text-green-800{--text-opacity:1;color:#03543f;color:rgba(3,84,63,var(--text-opacity))}.text-teal-400{--text-opacity:1;color:#16bdca;color:rgba(22,189,202,var(--text-opacity))}.text-teal-500{--text-opacity:1;color:#0694a2;color:rgba(6,148,162,var(--text-opacity))}.text-teal-700{--text-opacity:1;color:#036672;color:rgba(3,102,114,var(--text-opacity))}.text-blue-400{--text-opacity:1;color:#76a9fa;color:rgba(118,169,250,var(--text-opacity))}.text-blue-500{--text-opacity:1;color:#3f83f8;color:rgba(63,131,248,var(--text-opacity))}.text-blue-700{--text-opacity:1;color:#1a56db;color:rgba(26,86,219,var(--text-opacity))}.text-blue-800{--text-opacity:1;color:#1e429f;color:rgba(30,66,159,var(--text-opacity))}.text-indigo-100{--text-opacity:1;color:#e5edff;color:rgba(229,237,255,var(--text-opacity))}.text-indigo-400{--text-opacity:1;color:#8da2fb;color:rgba(141,162,251,var(--text-opacity))}.text-indigo-500{--text-opacity:1;color:#6875f5;color:rgba(104,117,245,var(--text-opacity))}.text-indigo-600{--text-opacity:1;color:#5850ec;color:rgba(88,80,236,var(--text-opacity))}.hover\:text-white:hover{--text-opacity:1;color:#fff;color:rgba(255,255,255,var(--text-opacity))}.hover\:text-gray-800:hover{--text-opacity:1;color:#252f3f;color:rgba(37,47,63,var(--text-opacity))}.hover\:text-gray-900:hover{--text-opacity:1;color:#161e2e;color:rgba(22,30,46,var(--text-opacity))}.hover\:text-blue-700:hover{--text-opacity:1;color:#1a56db;color:rgba(26,86,219,var(--text-opacity))}.hover\:text-indigo-500:hover{--text-opacity:1;color:#6875f5;color:rgba(104,117,245,var(--text-opacity))}.focus\:text-gray-900:focus{--text-opacity:1;color:#161e2e;color:rgba(22,30,46,var(--text-opacity))}.active\:text-indigo-600:active{--text-opacity:1;color:#5850ec;color:rgba(88,80,236,var(--text-opacity))}.italic{font-style:italic}.not-italic{font-style:normal}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.underline{text-decoration:underline}.no-underline{text-decoration:none}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.select-none{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.align-middle{vertical-align:middle}.whitespace-no-wrap{white-space:nowrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.w-0{width:0}.w-3{width:.75rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-7{width:1.75rem}.w-8{width:2rem}.w-10{width:2.5rem}.w-40{width:10rem}.w-56{width:14rem}.w-auto{width:auto}.w-1\/2{width:50%}.w-1\/3{width:33.333333%}.w-2\/3{width:66.666667%}.w-1\/4{width:25%}.w-2\/4{width:50%}.w-3\/4{width:75%}.w-1\/5{width:20%}.w-2\/5{width:40%}.w-3\/5{width:60%}.w-4\/5{width:80%}.w-3\/6{width:50%}.w-4\/6{width:66.666667%}.w-5\/6{width:83.333333%}.w-1\/12{width:8.333333%}.w-2\/12{width:16.666667%}.w-3\/12{width:25%}.w-4\/12{width:33.333333%}.w-9\/12{width:75%}.w-11\/12{width:91.666667%}.w-full{width:100%}.z-20{z-index:20}.z-40{z-index:40}.z-50{z-index:50}.gap-8{grid-gap:2rem;gap:2rem}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.transform{--transform-translate-x:0;--transform-translate-y:0;--transform-rotate:0;--transform-skew-x:0;--transform-skew-y:0;--transform-scale-x:1;--transform-scale-y:1;-webkit-transform:translateX(var(--transform-translate-x)) translateY(var(--transform-translate-y)) rotate(var(--transform-rotate)) skewX(var(--transform-skew-x)) skewY(var(--transform-skew-y)) scaleX(var(--transform-scale-x)) scaleY(var(--transform-scale-y));transform:translateX(var(--transform-translate-x)) translateY(var(--transform-translate-y)) rotate(var(--transform-rotate)) skewX(var(--transform-skew-x)) skewY(var(--transform-skew-y)) scaleX(var(--transform-scale-x)) scaleY(var(--transform-scale-y))}.origin-top-right{-webkit-transform-origin:top right;transform-origin:top right}.scale-95{--transform-scale-x:.95;--transform-scale-y:.95}.scale-100{--transform-scale-x:1;--transform-scale-y:1}.transition-all{-webkit-transition-property:all;transition-property:all}.transition{-webkit-transition-property:background-color,border-color,color,fill,stroke,opacity,-webkit-box-shadow,-webkit-transform;transition-property:background-color,border-color,color,fill,stroke,opacity,-webkit-box-shadow,-webkit-transform;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,-webkit-box-shadow,-webkit-transform}.ease-in{-webkit-transition-timing-function:cubic-bezier(.4,0,1,1);transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-out{-webkit-transition-timing-function:cubic-bezier(0,0,.2,1);transition-timing-function:cubic-bezier(0,0,.2,1)}.ease-in-out{-webkit-transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-75{-webkit-transition-duration:75ms;transition-duration:75ms}.duration-100{-webkit-transition-duration:.1s;transition-duration:.1s}.duration-150{-webkit-transition-duration:.15s;transition-duration:.15s}.duration-300{-webkit-transition-duration:.3s;transition-duration:.3s}@media (min-width:640px){.sm\:rounded-md{border-radius:.375rem}.sm\:rounded-lg{border-radius:.5rem}.sm\:grid{display:grid}.sm\:justify-start{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.sm\:text-sm{font-size:.875rem}.sm\:text-2xl{font-size:1.5rem}.sm\:leading-5{line-height:1.25rem}.sm\:leading-9{line-height:2.25rem}.sm\:px-0{padding-left:0;padding-right:0}.sm\:px-2{padding-left:.5rem;padding-right:.5rem}.sm\:px-4{padding-left:1rem;padding-right:1rem}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sm\:w-32{width:8rem}.sm\:w-1\/3{width:33.333333%}.sm\:w-2\/3{width:66.666667%}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (min-width:768px){.md\:flex{display:-webkit-box;display:-ms-flexbox;display:flex}.md\:items-start{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.md\:items-center{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.md\:justify-end{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.md\:justify-between{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.md\:text-base{font-size:1rem}.md\:mx-0{margin-left:0;margin-right:0}.md\:my-2{margin-top:.5rem;margin-bottom:.5rem}.md\:mt-0{margin-top:0}.md\:ml-2{margin-left:.5rem}.md\:ml-4{margin-left:1rem}.md\:ml-8{margin-left:2rem}.md\:-mr-8{margin-right:-2rem}.md\:max-w-xl{max-width:36rem}.md\:max-w-5xl{max-width:64rem}.md\:p-2{padding:.5rem}.md\:p-6{padding:1.5rem}.md\:py-0{padding-top:0;padding-bottom:0}.md\:px-1{padding-left:.25rem;padding-right:.25rem}.md\:px-2{padding-left:.5rem;padding-right:.5rem}.md\:pb-2{padding-bottom:.5rem}.md\:pr-4{padding-right:1rem}.md\:pt-6{padding-top:1.5rem}.md\:w-3\/5{width:60%}}@media (min-width:1024px){.lg\:bg-transparent{background-color:transparent}.lg\:border-transparent{border-color:transparent}.lg\:rounded-full{border-radius:9999px}.lg\:block{display:block}.lg\:inline-flex{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex}.lg\:grid{display:grid}.lg\:text-sm{font-size:.875rem}.lg\:text-lg{font-size:1.125rem}.lg\:my-0{margin-top:0;margin-bottom:0}.lg\:mx-5{margin-left:1.25rem;margin-right:1.25rem}.lg\:ml-16{margin-left:4rem}.lg\:-mr-16{margin-right:-4rem}.lg\:p-6{padding:1.5rem}.lg\:p-8{padding:2rem}.lg\:px-3{padding-left:.75rem;padding-right:.75rem}.lg\:px-4{padding-left:1rem;padding-right:1rem}.lg\:px-8{padding-left:2rem;padding-right:2rem}.lg\:pt-2{padding-top:.5rem}.lg\:pb-2{padding-bottom:.5rem}.lg\:pl-2{padding-left:.5rem}.lg\:shadow-none{-webkit-box-shadow:none;box-shadow:none}.lg\:w-40{width:10rem}.lg\:w-1\/2{width:50%}.lg\:w-3\/5{width:60%}.lg\:w-3\/12{width:25%}.lg\:w-7\/12{width:58.333333%}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (min-width:1280px){.xl\:mx-7{margin-left:1.75rem;margin-right:1.75rem}.xl\:mr-0{margin-right:0}.xl\:ml-3{margin-left:.75rem}.xl\:ml-4{margin-left:1rem}.xl\:ml-20{margin-left:5rem}.xl\:px-4{padding-left:1rem;padding-right:1rem}.xl\:pb-4{padding-bottom:1rem}.xl\:w-1\/4{width:25%}.xl\:w-2\/5{width:40%}.xl\:w-3\/5{width:60%}.xl\:w-2\/12{width:16.666667%}.xl\:w-7\/12{width:58.333333%}}
lite/admin/partials/dashboard.php CHANGED
@@ -49,11 +49,11 @@ $topics = ES_Common::get_useful_articles();
49
  $topics_indexes = array_rand( $topics, 3 );
50
 
51
  ?>
52
- <div class="wrap" id="ig-es-container">
53
- <header class="px-4 mx-auto max-w-7xl sm:px-6 lg:px-8">
54
  <div class="md:flex md:items-center md:justify-between">
55
  <div class="flex-1 min-w-0">
56
- <h2 class="text-2xl font-bold leading-7 text-gray-900 sm:text-3xl sm:leading-9 sm:truncate">
57
  <?php echo esc_html__( 'Dashboard', 'email-subscribers' ); ?>
58
  </h2>
59
  </div>
@@ -110,9 +110,9 @@ $topics_indexes = array_rand( $topics, 3 );
110
  </div>
111
  </header>
112
 
113
- <main class="mx-auto max-w-7xl sm:px-6 lg:px-8">
114
 
115
- <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">
116
  <div class="flex-1 min-w-0">
117
  <p class="px-3 text-lg font-medium leading-6 text-gray-400">
118
  <span class="text-black"><?php echo esc_html( $active_contacts ); ?></span><?php echo esc_html__( ' active contacts', 'email-subscribers' ); ?>
@@ -165,10 +165,10 @@ $topics_indexes = array_rand( $topics, 3 );
165
  <div class="overflow-hidden">
166
  <ul>
167
  <?php foreach ( $topics_indexes as $index ) { ?>
168
- <li class="border-b border-gray-200">
169
  <a href="<?php echo esc_url( $topics[ $index ]['link'] ); ?>" class="block transition duration-150 ease-in-out hover:bg-gray-50 focus:outline-none focus:bg-gray-50" target="_blank">
170
 
171
- <div class="flex items-center px-2 py-2 md:justify-between sm:px-2">
172
  <div class="text-sm leading-5 text-gray-900">
173
  <?php
174
  echo wp_kses_post( $topics[ $index ]['title'] );
@@ -190,7 +190,7 @@ $topics_indexes = array_rand( $topics, 3 );
190
  <li class="">
191
  <div class="px-2 py-2 text-sm leading-5 text-gray-900 sm:px-2">
192
  <?php echo esc_html__( 'Jump to: ', 'email-subscribers' ); ?>
193
- <a href="<?php echo esc_url( $reports_url ); ?>" class="font-bold" target="_blank">
194
  <?php echo esc_html__( 'Reports', 'email-subscribers' ); ?>
195
  </a>
196
 
49
  $topics_indexes = array_rand( $topics, 3 );
50
 
51
  ?>
52
+ <div class="wrap pt-3 font-sans" id="ig-es-container">
53
+ <header class="mx-auto max-w-7xl">
54
  <div class="md:flex md:items-center md:justify-between">
55
  <div class="flex-1 min-w-0">
56
+ <h2 class="text-3xl font-bold leading-7 text-gray-700 sm:leading-9 sm:truncate">
57
  <?php echo esc_html__( 'Dashboard', 'email-subscribers' ); ?>
58
  </h2>
59
  </div>
110
  </div>
111
  </header>
112
 
113
+ <main class="mx-auto max-w-7xl">
114
 
115
+ <section class="py-4 my-8 bg-white rounded-lg shadow md:flex md:items-start md:justify-between sm:px-4 sm:grid sm:grid-cols-3">
116
  <div class="flex-1 min-w-0">
117
  <p class="px-3 text-lg font-medium leading-6 text-gray-400">
118
  <span class="text-black"><?php echo esc_html( $active_contacts ); ?></span><?php echo esc_html__( ' active contacts', 'email-subscribers' ); ?>
165
  <div class="overflow-hidden">
166
  <ul>
167
  <?php foreach ( $topics_indexes as $index ) { ?>
168
+ <li class="border-b border-gray-200 mb-0">
169
  <a href="<?php echo esc_url( $topics[ $index ]['link'] ); ?>" class="block transition duration-150 ease-in-out hover:bg-gray-50 focus:outline-none focus:bg-gray-50" target="_blank">
170
 
171
+ <div class="flex items-center px-2 py-2 md:justify-between">
172
  <div class="text-sm leading-5 text-gray-900">
173
  <?php
174
  echo wp_kses_post( $topics[ $index ]['title'] );
190
  <li class="">
191
  <div class="px-2 py-2 text-sm leading-5 text-gray-900 sm:px-2">
192
  <?php echo esc_html__( 'Jump to: ', 'email-subscribers' ); ?>
193
+ <a href="<?php echo esc_url( $reports_url ); ?>" class="font-bold pl-1" target="_blank">
194
  <?php echo esc_html__( 'Reports', 'email-subscribers' ); ?>
195
  </a>
196
 
lite/admin/partials/help.php CHANGED
@@ -76,9 +76,14 @@ $articles = array(
76
  );
77
 
78
  ?>
79
- <h1 class="mt-4 wp-heading-inline"><span class="text-2xl font-medium leading-7 text-gray-900 sm:leading-9 sm:truncate"><?php echo esc_html__( 'Help & Info', 'email-subscribers' ); ?></span></h1>
80
- <div class="font-sans wrap">
81
- <div class="container flex flex-wrap w-full bg-white border rounded-lg shadow ">
 
 
 
 
 
82
  <div class="inline-block w-4/12 px-2 pl-2 border-r border-dashed ">
83
  <div class="max-h-full" id="features_display">
84
  <div class="pt-6 pb-6 pl-2 mt-2">
@@ -172,13 +177,13 @@ $articles = array(
172
  </div>
173
 
174
 
175
- <div class="container flex flex-wrap w-full mt-4">
176
  <div class="block mt-6">
177
- <h3 class="text-2xl font-medium text-gray-700"><?php echo esc_html__( 'Other awesome plugins from same author', 'email-subscribers' ); ?></h3>
178
  </div>
179
- <div class="grid w-full grid-cols-3 py-2 my-4">
180
  <?php foreach ( $ig_plugins as $ig_plugin ) { ?>
181
- <div class="flex flex-col my-4 mr-3 bg-white border rounded-lg shadow">
182
  <div class="flex h-48">
183
  <div class="flex pl-1">
184
  <div class="flex w-1/4 rounded">
76
  );
77
 
78
  ?>
79
+ <div class="font-sans wrap pt-3">
80
+ <header>
81
+ <h2 class="wp-heading-inline text-3xl font-bold text-gray-700 sm:leading-9 sm:truncate pr-4">
82
+ <?php echo esc_html__( 'Help & Info', 'email-subscribers' ); ?>
83
+ </h2>
84
+ </header>
85
+ <div><hr class="wp-header-end"></div>
86
+ <div class="container flex flex-wrap w-full bg-white rounded-lg shadow mt-8">
87
  <div class="inline-block w-4/12 px-2 pl-2 border-r border-dashed ">
88
  <div class="max-h-full" id="features_display">
89
  <div class="pt-6 pb-6 pl-2 mt-2">
177
  </div>
178
 
179
 
180
+ <div class="container flex flex-wrap w-full mt-4 mb-7">
181
  <div class="block mt-6">
182
+ <h3 class="text-2xl font-bold leading-9 text-gray-700 sm:truncate mb-3"><?php echo esc_html__( 'Other awesome plugins from same author', 'email-subscribers' ); ?></h3>
183
  </div>
184
+ <div class="grid w-full grid-cols-3 ">
185
  <?php foreach ( $ig_plugins as $ig_plugin ) { ?>
186
+ <div class="flex flex-col mb-4 mr-3 bg-white rounded-lg shadow">
187
  <div class="flex h-48">
188
  <div class="flex pl-1">
189
  <div class="flex w-1/4 rounded">
lite/includes/class-es-common.php CHANGED
@@ -1009,7 +1009,7 @@ class ES_Common {
1009
  $is_imp = ! empty( $navigation['is_imp'] ) ? $navigation['is_imp'] : false;
1010
  ?>
1011
 
1012
- <a href="<?php echo esc_url( $url ); ?>" class="ig-es-title-button px-2 py-2 mx-2
1013
  <?php
1014
  if ( $is_imp ) {
1015
  echo esc_attr( ' ig-es-imp-button' );
@@ -1283,12 +1283,12 @@ class ES_Common {
1283
 
1284
  $can_access = $user->has_cap( $default_permission );
1285
 
1286
- // Is Admin? Have full access
1287
  if ( $can_access ) {
1288
  return true;
1289
  }
1290
 
1291
- // We are using this filter in ES Premium to check permission
1292
  return apply_filters( 'ig_es_can_access', $can_access, $page );
1293
 
1294
  }
1009
  $is_imp = ! empty( $navigation['is_imp'] ) ? $navigation['is_imp'] : false;
1010
  ?>
1011
 
1012
+ <a href="<?php echo esc_url( $url ); ?>" class="ig-es-title-button ml-2
1013
  <?php
1014
  if ( $is_imp ) {
1015
  echo esc_attr( ' ig-es-imp-button' );
1283
 
1284
  $can_access = $user->has_cap( $default_permission );
1285
 
1286
+ // Is Admin? Have full access.
1287
  if ( $can_access ) {
1288
  return true;
1289
  }
1290
 
1291
+ // We are using this filter in ES Premium to check permission.
1292
  return apply_filters( 'ig_es_can_access', $can_access, $page );
1293
 
1294
  }
lite/includes/classes/class-es-admin-settings.php CHANGED
@@ -37,7 +37,7 @@ class ES_Admin_Settings {
37
  ES_Common::show_message( $message, 'error' );
38
  } else {
39
 
40
- $options = ig_es_get_post_data( '', '', false );
41
 
42
  $options = apply_filters( 'ig_es_before_save_settings', $options );
43
 
@@ -111,12 +111,15 @@ class ES_Admin_Settings {
111
 
112
  ?>
113
 
114
- <div class="wrap">
115
- <h1 class="mt-4 wp-heading-inline"><span class="text-2xl font-medium leading-7 text-gray-900 sm:leading-9 sm:truncate">Settings</h1>
 
 
116
  </header>
117
  </span>
118
- <form action="" method="post" id="email_tabs_form" class="sticky font-sans bg-white rounded-lg shadow-md">
119
- <div class="flex flex-wrap mt-6">
 
120
  <?php
121
  settings_fields( 'email_subscribers_settings' );
122
  $es_settings_tabs = array(
@@ -711,7 +714,7 @@ class ES_Admin_Settings {
711
  $html .= $field['name'];
712
 
713
  if ( ! empty( $field['is_premium'] ) ) {
714
- $html .= '<a href="' . $field['link'] . '" target="_blank"><span class="inline-flex px-2 text-xs font-semibold leading-5 text-green-800 bg-green-100 rounded-full">' . __( 'Premium', 'email-subscribers' ) . '</span></a>';
715
  }
716
 
717
  // If there is help text
@@ -849,14 +852,14 @@ class ES_Admin_Settings {
849
  $html .= '<a href="' . $mailer['url'] . '" target="_blank">';
850
  }
851
 
852
- $html .= '<div class="mt-4 mr-4 border-2 border-gray-200 border-solid rounded-lg shadow-md es-mailer-logo">
853
  <div class="border-0 es-logo-wrapper">
854
  <img src="' . $mailer['logo'] . '" alt="Default (none)">
855
- </div>'
856
- . $mailer['name'];
857
 
858
  if ( ! empty( $mailer['is_premium'] ) ) {
859
- $html .= '<span class="inline-flex px-2 text-xs font-semibold leading-5 text-green-800 bg-green-100 rounded-full">Premium</span></a>';
860
  }
861
  $html .= '</div></label>';
862
  }
37
  ES_Common::show_message( $message, 'error' );
38
  } else {
39
 
40
+ $options = ig_es_get_data( $_POST );
41
 
42
  $options = apply_filters( 'ig_es_before_save_settings', $options );
43
 
111
 
112
  ?>
113
 
114
+ <div class="wrap pt-3 font-sans">
115
+ <span>
116
+ <h2 class="wp-heading-inline text-3xl font-bold leading-9 text-gray-700 sm:truncate pb-1"><?php esc_html_e( 'Settings', 'email-subscribers' ); ?></h2>
117
+ </span>
118
  </header>
119
  </span>
120
+ <div><hr class="wp-header-end"></div>
121
+ <form action="" method="post" id="email_tabs_form" class="sticky bg-white rounded-lg shadow">
122
+ <div class="flex flex-wrap mt-7">
123
  <?php
124
  settings_fields( 'email_subscribers_settings' );
125
  $es_settings_tabs = array(
714
  $html .= $field['name'];
715
 
716
  if ( ! empty( $field['is_premium'] ) ) {
717
+ $html .= '<a href="' . $field['link'] . '" target="_blank"><span class="ml-2 inline-flex px-2 text-xs font-semibold leading-5 text-green-800 bg-green-100 rounded-full">' . __( 'Premium', 'email-subscribers' ) . '</span></a>';
718
  }
719
 
720
  // If there is help text
852
  $html .= '<a href="' . $mailer['url'] . '" target="_blank">';
853
  }
854
 
855
+ $html .= '<div class="mt-4 mr-4 border border-gray-200 rounded-lg shadow-md es-mailer-logo">
856
  <div class="border-0 es-logo-wrapper">
857
  <img src="' . $mailer['logo'] . '" alt="Default (none)">
858
+ </div><p class="mb-2 inline-block">'
859
+ . $mailer['name'] . '</p>';
860
 
861
  if ( ! empty( $mailer['is_premium'] ) ) {
862
+ $html .= '<span class="inline-flex ml-2 px-2 text-xs font-semibold leading-5 text-green-800 bg-green-100 rounded-full">Premium</span></a>';
863
  }
864
  $html .= '</div></label>';
865
  }
lite/includes/classes/class-es-campaigns-table.php CHANGED
@@ -92,6 +92,9 @@ class ES_Campaigns_Table extends WP_List_Table {
92
  public function render() {
93
  $action = ig_es_get_request_data( 'action' );
94
  global $ig_es_tracker;
 
 
 
95
  if ( 'broadcast_created' === $action ) {
96
 
97
  // Trigger feedback popup for broadcast creation.
@@ -101,10 +104,15 @@ class ES_Campaigns_Table extends WP_List_Table {
101
  ES_Common::show_message( $message, 'success' );
102
  }
103
  ?>
104
- <div class="wrap">
105
- <h1 class="wp-heading-inline"><span class="text-2xl font-medium leading-7 text-gray-900 sm:leading-9 sm:truncate"><?php esc_html_e( 'Campaigns', 'email-subscribers' ); ?>
106
- <a href="admin.php?page=es_notifications&action=new" class="ig-es-title-button px-2 py-2 mx-1"><?php esc_html_e( 'Create Post Notification', 'email-subscribers' ); ?></a></span>
107
- <a href="admin.php?page=es_newsletters" class="ig-es-title-button px-2 py-2 mx-1"><?php esc_html_e( 'Send Broadcast', 'email-subscribers' ); ?></a>
 
 
 
 
 
108
  <?php
109
  do_action( 'ig_es_after_campaign_type_buttons' );
110
 
@@ -113,23 +121,26 @@ class ES_Campaigns_Table extends WP_List_Table {
113
  if ( in_array( $icegram_plugin, $active_plugins ) ) {
114
  $redirect_url = admin_url( 'post-new.php?post_type=ig_campaign' );
115
  ?>
116
- <a href="<?php echo esc_url( $redirect_url ); ?>" class="ig-es-link-button px-2 py-2 mx-1"><?php esc_html_e( 'Onsite Campaigns', 'email-subscribers' ); ?></a>
117
  <?php } else { ?>
118
- <a href="admin.php?page=go_to_icegram&action=create_campaign" class="ig-es-link-button px-2 py-2 mx-1"><?php esc_html_e( 'Onsite Campaigns', 'email-subscribers' ); ?></a>
119
  <?php } ?>
120
 
121
- <a href="edit.php?post_type=es_template" class="ig-es-imp-button px-2 py-2 mx-1"><?php esc_html_e( 'Manage Templates', 'email-subscribers' ); ?></a>
122
 
123
 
124
- </h1>
125
- <div id="poststuff" class="es-items-lists">
 
 
126
  <div id="post-body" class="metabox-holder column-1">
127
  <div id="post-body-content">
128
  <div class="meta-box-sortables ui-sortable">
129
- <form method="post">
 
130
  <?php
131
  $this->prepare_items();
132
- $this->display();
133
  ?>
134
  </form>
135
  </div>
@@ -138,6 +149,7 @@ class ES_Campaigns_Table extends WP_List_Table {
138
  <br class="clear">
139
  </div>
140
  </div>
 
141
  <?php
142
  }
143
 
92
  public function render() {
93
  $action = ig_es_get_request_data( 'action' );
94
  global $ig_es_tracker;
95
+ ?>
96
+ <div class="wrap pt-3 font-sans">
97
+ <?php
98
  if ( 'broadcast_created' === $action ) {
99
 
100
  // Trigger feedback popup for broadcast creation.
104
  ES_Common::show_message( $message, 'success' );
105
  }
106
  ?>
107
+ <div class="flex">
108
+ <div>
109
+ <h2 class="wp-heading-inline text-3xl font-bold text-gray-700 sm:leading-9 sm:truncate pr-4 pb-1"><?php esc_html_e( 'Campaigns', 'email-subscribers' ); ?>
110
+ </h2>
111
+ </div>
112
+ <div class="mt-1">
113
+ <a href="admin.php?page=es_notifications&action=new" class="ig-es-title-button ml-2 align-middle"><?php esc_html_e( 'Create Post Notification', 'email-subscribers' ); ?></a>
114
+ <a href="admin.php?page=es_newsletters" class="ig-es-title-button ml-2 align-middle"><?php esc_html_e( 'Send Broadcast', 'email-subscribers' ); ?></a>
115
+
116
  <?php
117
  do_action( 'ig_es_after_campaign_type_buttons' );
118
 
121
  if ( in_array( $icegram_plugin, $active_plugins ) ) {
122
  $redirect_url = admin_url( 'post-new.php?post_type=ig_campaign' );
123
  ?>
124
+ <a href="<?php echo esc_url( $redirect_url ); ?>" class="ig-es-link-button px-3 py-1 ml-2 align-middle"><?php esc_html_e( 'Onsite Campaigns', 'email-subscribers' ); ?></a>
125
  <?php } else { ?>
126
+ <a href="admin.php?page=go_to_icegram&action=create_campaign" class="ig-es-link-button px-3 py-1 ml-2 align-middle"><?php esc_html_e( 'Onsite Campaigns', 'email-subscribers' ); ?></a>
127
  <?php } ?>
128
 
129
+ <a href="edit.php?post_type=es_template" class="ig-es-imp-button px-3 py-1 ml-2 align-middle"><?php esc_html_e( 'Manage Templates', 'email-subscribers' ); ?></a>
130
 
131
 
132
+ </div>
133
+ </div>
134
+ <div><hr class="wp-header-end"></div>
135
+ <div id="poststuff" class="es-items-lists mt-4">
136
  <div id="post-body" class="metabox-holder column-1">
137
  <div id="post-body-content">
138
  <div class="meta-box-sortables ui-sortable">
139
+ <form method="get">
140
+ <input type="hidden" name="page" value="es_campaigns" />
141
  <?php
142
  $this->prepare_items();
143
+ $this->display();
144
  ?>
145
  </form>
146
  </div>
149
  <br class="clear">
150
  </div>
151
  </div>
152
+
153
  <?php
154
  }
155
 
lite/includes/classes/class-es-contacts-table.php CHANGED
@@ -8,6 +8,7 @@ if ( ! defined( 'ABSPATH' ) ) {
8
  if ( ! class_exists( 'WP_List_Table' ) ) {
9
  require_once ABSPATH . 'wp-admin/includes/class-wp-list-table.php';
10
  }
 
11
  class ES_Contacts_Table extends WP_List_Table {
12
  /**
13
  * Contact lists status array
@@ -88,7 +89,7 @@ class ES_Contacts_Table extends WP_List_Table {
88
  // Don't show screen option on Import/ Export subscribers page.
89
  $action = ig_es_get_request_data( 'action' );
90
 
91
- if ( '' === $action ) {
92
 
93
  $option = 'per_page';
94
  $args = array(
@@ -106,7 +107,7 @@ class ES_Contacts_Table extends WP_List_Table {
106
  * Get the content of Audience main tab
107
  *
108
  * @param $active_tab
109
- * @param array $audience_main_tabs
110
  *
111
  * @return array
112
  *
@@ -115,7 +116,7 @@ class ES_Contacts_Table extends WP_List_Table {
115
  public function get_audience_main_tabs( $active_tab, $audience_main_tabs = array() ) {
116
 
117
  $audience_tab_main_navigation = array(
118
- 'new_contact' => array(
119
  'label' => __( 'Add New Contact', 'email-subscribers' ),
120
  'indicator_option' => '',
121
  'indicator_label' => '',
@@ -124,7 +125,7 @@ class ES_Contacts_Table extends WP_List_Table {
124
  'url' => add_query_arg( 'action', 'new', 'admin.php?page=es_subscribers' ),
125
  ),
126
 
127
- 'import' => array(
128
  'label' => __( 'Import Contacts', 'email-subscribers' ),
129
  'indicator_option' => '',
130
  'indicator_label' => '',
@@ -133,7 +134,7 @@ class ES_Contacts_Table extends WP_List_Table {
133
  'url' => add_query_arg( 'action', 'import', 'admin.php?page=es_subscribers' ),
134
  ),
135
 
136
- 'export' => array(
137
  'label' => __( 'Export Contacts', 'email-subscribers' ),
138
  'indicator_option' => '',
139
  'indicator_label' => '',
@@ -142,7 +143,7 @@ class ES_Contacts_Table extends WP_List_Table {
142
  'url' => add_query_arg( 'action', 'export', 'admin.php?page=es_subscribers' ),
143
  ),
144
 
145
- 'sync' => array(
146
  'label' => __( 'Sync', 'email-subscribers' ),
147
  'indicator_option' => 'ig_es_show_sync_tab',
148
  'indicator_label' => __( 'New', 'email-subscribers' ),
@@ -179,68 +180,66 @@ class ES_Contacts_Table extends WP_List_Table {
179
  public function render() {
180
 
181
  ?>
182
- <div class="wrap">
183
-
184
- <?php
185
-
186
- $action = ig_es_get_request_data( 'action' );
187
- if ( 'import' === $action ) {
188
- $this->load_import();
189
- } elseif ( 'export' === $action ) {
190
- $this->load_export();
191
- } elseif ( 'new' === $action || 'edit' === $action ) {
192
- $contact_id = absint( ig_es_get_request_data( 'subscriber' ) );
193
- $this->save_contact( $contact_id );
194
- } elseif ( 'sync' === $action ) {
195
- update_option( 'ig_es_show_sync_tab', 'no' ); // yes/no
196
- $this->load_sync();
197
- } else {
198
 
199
- $audience_tab_main_navigation = array();
200
- $active_tab = '';
201
- $audience_tab_main_navigation = apply_filters( 'ig_es_audience_tab_main_navigation', $active_tab, $audience_tab_main_navigation );
202
-
203
- ?>
204
 
205
- <h2 class="wp-heading-inline">
206
- <span class="text-base font-normal text-indigo-600 sm:leading-7 sm:truncate">
207
- <?php
208
- echo esc_html__( 'Audience', 'email-subscribers' );
209
- ?>
210
- <svg fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" stroke="currentColor" viewBox="0 0 24 24" class="w-4 h-4 inline-block align-middle text-gray-900"><path d="M9 5l7 7-7 7"></path></svg>
211
- </span>
212
- <span class="text-2xl font-medium text-gray-900 sm:leading-9 sm:truncate">
213
- <?php
214
- echo esc_html__( 'Contacts', 'email-subscribers' );
215
- ?>
216
- </span>
217
- <?php
218
- ES_Common::prepare_main_header_navigation( $audience_tab_main_navigation );
219
- ?>
220
- </h2>
221
 
222
- <div class="my-4">
223
- <?php $this->get_contacts_reports(); ?>
224
- </div>
225
 
226
- <div id="poststuff" class="es-audience-view es-items-lists">
227
- <div id="post-body" class="metabox-holder column-1">
228
- <div id="post-body-content">
229
- <div class="meta-box-sortables ui-sortable">
230
- <form method="post">
231
- <?php
232
- $this->prepare_items();
233
- $this->display();
234
- ?>
235
- </form>
236
- </div>
237
- </div>
238
- </div>
239
- <br class="clear">
240
- </div>
241
- </div>
242
- <?php
243
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
244
  }
245
 
246
  /**
@@ -284,56 +283,58 @@ class ES_Contacts_Table extends WP_List_Table {
284
  $es_total_unsubscribed_contacts = ES_Reports_Data::get_total_unsubscribed_contacts( 60 );
285
  $es_total_contacts_opened_emails = ES_Reports_Data::get_total_contacts_opened_emails( 60 );
286
  ?>
287
- <div class="bg-white rounded-md shadow ">
288
- <table class="min-w-full overflow-hidden bg-white border-t border-b sm:border-l sm:border-r sm:rounded shadow font-sans">
289
- <tr>
290
- <td class="w-1/5 border-r lg:px-4">
291
- <div class="block pt-3 pb-2 pl-2"><span class="text-lg font-medium text-gray-400"><?php echo esc_html__( 'Total Contacts', 'email-subscribers' ); ?></span></div>
292
- <div class="flex pt-2 pb-2 h-20">
293
- <div class="lg:pl-2 ">
294
- <svg fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 24 24" class="w-8 h-8 text-gray-400 mt-1"><path d="M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z"></path></svg>
295
- </div>
296
- <div>
297
- <span class="text-4xl font-bold leading-none text-indigo-600 pl-4"><?php echo esc_html( number_format( $es_total_contact ) ); ?></span>
298
-
299
- </div>
300
- </div>
301
- </td>
302
- <td class="w-4/5">
303
- <div class="block pt-4 pb-1"><span class="text-lg font-medium text-gray-400 pl-4"><?php echo esc_html__( 'Last 60 Days', 'email-subscribers' ); ?></span></div>
304
- <div class="flex">
305
- <div class="lg:w-3/12 xl:w-2/12 h-20 pl-4 pt-3 border-r border-gray-200">
306
- <div class="mb-1">
307
- <span class="text-2xl font-bold leading-none text-gray-700"><?php echo esc_html( number_format( $es_total_subscribed_contacts ) ); ?></span>
308
- </div>
309
- <div class="text-sm text-gray-400 tracking-wide">
 
 
310
  <?php echo esc_html__( 'Subscribed', 'email-subscribers' ); ?>
311
- </div>
312
- </div>
313
- <div class="lg:w-3/12 xl:w-2/12 h-20 pl-4 pt-3 mb-2 border-r border-gray-200">
314
- <div class=" mb-1">
315
- <span class="text-2xl font-bold leading-none text-gray-700"><?php echo esc_html( number_format( $es_total_unsubscribed_contacts ) ); ?></span>
316
- </div>
317
- <div class="text-sm text-gray-400 tracking-wide">
318
  <?php echo esc_html__( 'Unsubscribed', 'email-subscribers' ); ?>
319
- </div>
320
- </div>
321
- <div class="lg:w-3/12 xl:w-2/12 h-20 pl-4 pt-3 border-r border-gray-200">
322
- <div class="mb-1">
323
- <span class="text-2xl font-bold leading-none text-gray-700"><?php echo esc_html( number_format( $es_total_contacts_opened_emails ) ); ?></span>
324
- </div>
325
- <div class="text-sm text-gray-400 tracking-wide">
326
  <?php echo esc_html__( 'Opened', 'email-subscribers' ); ?>
327
- </div>
328
- </div>
329
- <div class="lg:w-3/12 xl:w-2/12 h-20 pl-4 pt-3">
330
  <?php do_action( 'ig_es_after_contacts_kpis' ); ?>
331
- </div>
332
- </div>
333
- </td>
334
- </tr>
335
- </table>
336
- </div>
337
  <?php
338
  }
339
 
@@ -348,10 +349,10 @@ class ES_Contacts_Table extends WP_List_Table {
348
  global $wpdb;
349
 
350
  $first_name = '';
351
- $action = '';
352
- $last_name = '';
353
- $email = '';
354
- $guid = '';
355
  $created_at = '';
356
  $list_ids = array();
357
  $is_new = true;
@@ -384,120 +385,122 @@ class ES_Contacts_Table extends WP_List_Table {
384
  $submitted = ig_es_get_request_data( 'submitted' );
385
 
386
  if ( 'submitted' === $submitted ) {
 
 
 
 
 
 
387
 
388
- $contact_data = ig_es_get_post_data( 'contact_data', array() );
389
 
390
- $is_error = false;
391
- if ( ! empty( $contact_data ) ) {
392
 
393
- $email = sanitize_email( ig_es_get_data( $contact_data, 'email', '', true ) );
394
 
395
- if ( $email ) {
 
 
396
 
397
- $lists = ig_es_get_data( $contact_data, 'lists', array() );
398
 
399
- if ( count( $lists ) > 0 ) {
400
- $first_name = ig_es_get_data( $contact_data, 'first_name', '', true );
401
- $last_name = ig_es_get_data( $contact_data, 'last_name', '', true );
 
 
402
 
403
- if ( ! empty( $first_name ) ) {
 
404
 
405
- $contact = array(
406
- 'first_name' => $first_name,
407
- 'last_name' => $last_name,
408
- 'email' => $email,
409
- );
 
 
 
 
 
 
 
410
 
411
- // Add contact
412
- $existing_contact_id = ES()->contacts_db->get_contact_id_by_email( $email );
 
413
 
414
- if ( $existing_contact_id && ( $existing_contact_id != $id ) ) {
415
- $message = __( 'Contact already exist.', 'email-subscribers' );
416
- ES_Common::show_message( $message, 'error' );
417
- $is_error = true;
418
- } else {
419
  if ( $id ) {
420
  ES()->contacts_db->update_contact( $id, $contact );
421
  } else {
422
- $contact['source'] = 'admin';
423
- $contact['status'] = 'verified';
424
- $contact['hash'] = ES_Common::generate_guid();
425
- $contact['created_at'] = ig_get_current_date_time();
 
426
 
427
- $id = ES()->contacts_db->insert( $contact );
428
- }
429
- }
430
-
431
- /*
432
- if ( $id ) {
433
- ES()->contacts_db->update_contact( $id, $contact );
434
- } else {
435
- if ( ! $existing_contact_id ) {
436
- $contact['source'] = 'admin';
437
- $contact['status'] = 'verified';
438
- $contact['hash'] = ES_Common::generate_guid();
439
- $contact['created_at'] = ig_get_current_date_time();
440
 
441
- $id = ES()->contacts_db->insert( $contact );
 
 
 
 
442
 
443
- } else {
444
- $message = __( 'Contact already exist.', 'email-subscribers' );
445
- ES_Common::show_message( $message, 'error' );
446
- $is_error = true;
447
  }
 
448
 
449
- }
450
- */
451
 
452
- if ( ! $is_error ) {
453
 
454
- $lists = ! empty( $lists ) ? $lists : array( 1 => 0 );
455
 
456
- ES()->lists_contacts_db->update_contact_lists( $id, $lists );
457
 
458
- if ( $id ) {
459
 
460
- if ( $is_new ) {
461
 
462
- if ( ! empty( $contact_data['send_welcome_email'] ) ) {
 
 
463
 
464
- // Get comma(,) separated list name based on ids
465
- $list_name = ES_Common::prepare_list_name_by_ids( $list_ids );
466
- $name = ES_Common::prepare_name_from_first_name_last_name( $contact['first_name'], $contact['last_name'] );
 
 
 
 
 
 
467
 
468
- $template_data = array(
469
- 'email' => $contact['email'],
470
- 'contact_id' => $id,
471
- 'name' => $name,
472
- 'first_name' => $contact['first_name'],
473
- 'last_name' => $contact['last_name'],
474
- 'guid' => $contact['hash'],
475
- 'list_name' => $list_name,
476
- );
477
 
478
- // Send Welcome Email
479
- ES()->mailer->send_welcome_email( $contact['email'], $template_data );
 
480
  }
481
 
482
- $message = __( 'Contact has been added successfully!', 'email-subscribers' );
483
- } else {
484
- $message = __( 'Contact has been updated successfully!', 'email-subscribers' );
485
  }
486
-
487
- ES_Common::show_message( $message, 'success' );
488
  }
 
 
 
489
  }
490
  } else {
491
- $message = __( 'Please Enter First Name', 'email-subscribers' );
492
  ES_Common::show_message( $message, 'error' );
493
  }
494
  } else {
495
- $message = __( 'Please Select List', 'email-subscribers' );
496
  ES_Common::show_message( $message, 'error' );
497
  }
498
- } else {
499
- $message = __( 'Please Enter Valid Email Address', 'email-subscribers' );
500
- ES_Common::show_message( $message, 'error' );
501
  }
502
  }
503
  }
@@ -512,38 +515,42 @@ class ES_Contacts_Table extends WP_List_Table {
512
 
513
  ?>
514
 
515
- <div class="wrap max-w-full mt-1 font-sans">
516
- <header class="wp-heading-inline">
517
- <div class="md:flex md:items-center md:justify-between justify-center">
518
- <div class="flex-1 min-w-0">
519
- <h2 class="text-2xl leading-7 text-gray-900 sm:leading-9 sm:truncate">
520
  <span class="text-base font-normal leading-7 text-indigo-600 sm:leading-9 sm:truncate">
521
- <a href="admin.php?page=es_subscribers"><?php esc_html_e('Audience ', 'email-subscribers'); ?></a></span> <svg class="w-6 h-6 mt-2 inline-block" fill="currentColor" viewBox="0 0 24 24">
522
- <path
523
- fill-rule="evenodd"
524
- 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"
525
- clip-rule="evenodd"
526
- ></path>
527
- </svg>
528
- <?php echo esc_html( $title ); ?>
529
- </h2>
530
- </div>
531
-
532
- <div class="py-2 flex md:mt-0 pb-2">
533
- <div id="ig-es-create-button" class="relative inline-block text-left">
534
- <?php
535
- echo wp_kses_post( $title_action );
536
- ?>
537
- </div>
538
- </div>
539
- </div>
540
- </header>
541
- <div class=""><hr class="wp-header-end"></div>
542
- <div class="bg-white shadow-md rounded-lg">
543
- <?php echo wp_kses_post( $this->prepare_contact_form( $data, $is_new ) ); ?>
544
-
545
- </div>
546
- <?php
 
 
 
 
547
 
548
  }
549
 
@@ -601,7 +608,7 @@ class ES_Contacts_Table extends WP_List_Table {
601
  }
602
 
603
  $filter_sql .= $list_filter_sql;
604
- $query[] = "id IN ( $filter_sql )";
605
  }
606
 
607
  // Prepare search query
@@ -676,131 +683,133 @@ class ES_Contacts_Table extends WP_List_Table {
676
 
677
  ?>
678
 
679
-
680
- <form method="post" action="<?php echo esc_attr( $action ); ?>" class="ml-5 mr-4 text-left pt-8 flex-row mt-2 item-center ">
681
- <div class="flex flex-row border-b border-gray-100">
682
- <div class="flex w-1/5">
683
- <div class="ml-4 pt-6">
684
- <label for="firstname"><span class="block ml-4 pt-1 pr-4 text-sm font-medium text-gray-600 pb-2"><?php esc_html_e( 'First Name', 'email-subscribers' ); ?></span></label>
685
-
686
- </div>
687
- </div>
688
- <div class="flex">
689
- <div class="ml-16 mb-4 h-10 mr-4 mt-4">
690
- <div class="h-10 relative">
691
- <div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
 
692
  <span class="inset-y-0 text-gray-400 sm:text-sm sm:leading-5">
693
  <span class="my-2 mr-10 dashicons dashicons-admin-users"></span>
694
  </span>
695
- </div>
696
- <input id="ig-es-contact-first-name" class="ig-es-contact-first-name form-input block border-gray-400 w-full pl-10 pr-12 shadow-sm focus:bg-gray-100 sm:text-sm sm:leading-5" placeholder="<?php esc_html_e( 'Enter First Name', 'email-subscribers' ); ?>" name="contact_data[first_name]" value="<?php echo esc_attr( $first_name ); ?>" />
697
- </div>
698
- </div>
699
- </div>
700
- </div>
701
-
702
- <div class="flex flex-row border-b border-gray-100">
703
- <div class="flex w-1/5">
704
- <div class="ml-4 pt-6">
705
- <label for="lastname"><span class="block ml-4 pt-1 pr-4 text-sm font-medium text-gray-600 pb-2"><?php esc_html_e( 'Last Name', 'email-subscribers' ); ?></span></label>
706
- </div>
707
- </div>
708
- <div class="flex">
709
- <div class="ml-16 my-4 h-10 mr-4">
710
- <div class="h-10 relative">
711
- <div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
 
712
  <span class="inset-y-0 text-gray-400 sm:text-sm sm:leading-5">
713
  <span class="my-2 mr-10 dashicons dashicons-admin-users"></span>
714
  </span>
715
- </div>
716
- <input id="ig-es-contact-last-name" class="ig-es-contact-last-name form-input block border-gray-400 w-full pl-10 pr-12 shadow-sm focus:bg-gray-100 sm:text-sm sm:leading-5" placeholder="<?php esc_html_e( 'Enter Last Name', 'email-subscribers' ); ?>" name="contact_data[last_name]" value="<?php echo esc_attr( $last_name ); ?>" />
717
- </div>
718
- </div>
719
- </div>
720
- </div>
721
-
722
- <div class="flex flex-row border-b border-gray-100">
723
- <div class="flex w-1/5" >
724
- <div class="ml-4 pt-6">
725
- <label for="email"><span class="block ml-4 pt-1 pr-4 text-sm font-medium text-gray-600 pb-2"><?php esc_html_e( 'Email', 'email-subscribers' ); ?></span></label>
726
- </div>
727
- </div>
728
- <div class="flex">
729
- <div class="ml-16 my-4 mr-4">
730
- <div class="h-10 relative">
731
- <div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
732
  <span class="inset-y-0 text-gray-400 sm:text-sm sm:leading-5">
733
  <span class="my-2 mr-10 dashicons dashicons-email-alt"></span></span>
734
- </div>
735
- <input id="email" class="form-input block border-gray-400 w-full pl-10 pr-12 shadow-sm focus:bg-gray-100 sm:text-sm sm:leading-5" id="email" name="contact_data[email]" value="<?php echo esc_attr( $email ); ?>" placeholder="<?php esc_html_e( 'Enter Email', 'email-subscribers' ); ?>" />
736
- </div>
737
- </div>
738
- </div>
739
- </div>
740
-
741
- <?php if ( $is_new ) { ?>
742
- <div class="flex flex-row border-b border-gray-100">
743
- <div class="flex w-1/5">
744
- <div class="ml-4 pt-4">
745
- <label for="send_email"><span class="block ml-4 pt-1 pr-4 text-sm font-medium text-gray-600 pb-2"><?php esc_html_e( 'Send Welcome Email?', 'email-subscribers' ); ?></span>
746
- </label>
747
- </div>
748
- </div>
749
- <div class="flex">
750
- <div class="ml-16 my-4 mr-4">
751
- <label for="send_email" class=" inline-flex items-center cursor-pointer">
752
  <span class="relative">
753
- <input id="send_email" type="checkbox" class="absolute es-check-toggle opacity-0 w-0 h-0"
754
- name="contact_data[send_welcome_email]"
755
- <?php
756
  if ( $send_welcome_email ) {
757
  echo "checked='checked'";
758
- }
759
  ?>
760
  />
761
  <span class="es-mail-toggle-line block w-10 h-6 bg-gray-300 rounded-full shadow-inner"></span>
762
  <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>
763
  </span>
764
- </label>
765
- </div>
766
- </div>
767
- </div>
768
- <?php } ?>
769
-
770
- <div class="flex flex-row border-b border-gray-100">
771
- <div class="flex w-1/5">
772
- <div class="ml-4 pt-6">
773
- <label for="status">
774
- <span class="block ml-4 pt-1 pr-4 text-sm font-medium text-gray-600 pb-2"> <?php esc_html_e( 'List(s)', 'email-subscribers' ); ?></span></label>
775
- </div>
776
- </div>
777
- <div class="flex">
778
- <div class="ml-16 my-4 mr-4">
779
- <div class=" relative">
780
- <?php
781
- $allowedtags = ig_es_allowed_html_tags_in_esc();
782
- echo wp_kses( $list_html , $allowedtags );
783
- ?>
784
- </div>
785
- </div>
786
- </div>
787
- </div>
788
-
789
- <div class="flex border-b border-gray-100">
790
- <?php
791
- $submit_button_text = $is_new ? __( 'Save Contact', 'email-subscribers' ) : __( 'Save Changes', 'email-subscribers' );
792
- ?>
793
- <div class="ml-4 mb-4 pt-6">
794
- <input type="hidden" name="contact_data[created_at]" value="<?php echo esc_attr( $created ); ?>" />
795
- <input type="hidden" name="contact_data[guid]" value="<?php echo esc_attr( $guid ); ?>" />
796
- <input type="hidden" name="submitted" value="submitted" />
797
- <input type="submit" name="submit" class="cursor-pointer align-middle px-4 my-2 py-2 mx-2 ig-es-primary-button hover:shadow-md" value="<?php echo esc_attr( $submit_button_text ); ?>"/>
798
- <a href="admin.php?page=es_subscribers" class="cursor-pointer align-middle rounded-md border border-indigo-600 hover:shadow-md focus:outline-none focus:shadow-outline-indigo text-sm leading-5 font-medium transition ease-in-out duration-150 px-4 my-2 py-2 mx-2 "><?php esc_html_e( 'Cancel', 'email-subscribers' ); ?></a>
799
- </div>
800
- </div>
801
- </form>
802
- </div>
803
- <?php
804
 
805
  }
806
 
@@ -818,7 +827,7 @@ class ES_Contacts_Table extends WP_List_Table {
818
  /**
819
  * Render a column when no column specific method exist.
820
  *
821
- * @param array $item
822
  * @param string $column_name
823
  *
824
  * @return mixed
@@ -870,7 +879,7 @@ class ES_Contacts_Table extends WP_List_Table {
870
 
871
  $selected = ! empty( $list_contact_status_map[ $list_id ] ) ? $list_contact_status_map[ $list_id ] : '';
872
 
873
- $status_dropdown_html = '<select class="h-8 form-select w-40 mt-2 mr-8 shadow-sm border-gray-400 ig-es-statuses-dropdown shadow-sm sm:text-sm sm:leading-5" name="contact_data[lists][' . esc_attr( $list_id ) . ']" >';
874
  $status_dropdown_html .= ES_Common::prepare_statuses_dropdown_options( $selected );
875
  $status_dropdown_html .= '</select>';
876
 
@@ -879,7 +888,7 @@ class ES_Contacts_Table extends WP_List_Table {
879
  $status_span = '<span class="border-gray-400 focus:bg-gray-100 es_list_contact_status ' . $list_contact_status_map[ $list_id ] . '" title="' . ucwords( $list_contact_status_map[ $list_id ] ) . '">';
880
  }
881
 
882
- $list_name = strlen( $list_name ) > 15 ? substr( $list_name, 0, 15 ) . '...' : $list_name;
883
  $lists_html .= "<td class='pr-1 pt-2 text-sm leading-5 font-normal text-gray-500'>$status_span$list_name</td><td>$status_dropdown_html</td>";
884
 
885
  $i ++;
@@ -1036,33 +1045,33 @@ class ES_Contacts_Table extends WP_List_Table {
1036
  public function search_box( $text = '', $input_id = '' ) {
1037
 
1038
  ?>
1039
- <p class="search-box box-ma10">
1040
- <label class="screen-reader-text" for="<?php echo esc_attr( $input_id ); ?>"><?php echo esc_attr( $text ); ?>:</label>
1041
- <input type="search" id="<?php echo esc_attr( $input_id ); ?>" name="s" value="<?php _admin_search_query(); ?>"/>
1042
  <?php submit_button( __( 'Search Contacts', 'email-subscribers' ), 'button', false, false, array( 'id' => 'search-submit' ) ); ?>
1043
- </p>
1044
- <p class="search-box search-group-box box-ma10">
1045
  <?php $filter_by_status = ig_es_get_request_data( 'filter_by_status' ); ?>
1046
- <select name="filter_by_status">
1047
- <?php
1048
- $allowedtags = ig_es_allowed_html_tags_in_esc();
1049
  add_filter( 'safe_style_css', 'ig_es_allowed_css_style' );
1050
- $status_types = ES_Common::prepare_statuses_dropdown_options( $filter_by_status, __( 'All Statuses', 'email-subscribers' ) );
1051
- echo wp_kses( $status_types , $allowedtags );
1052
  ?>
1053
- </select>
1054
- </p>
1055
- <p class="search-box search-group-box box-ma10">
1056
  <?php $filter_by_list_id = ig_es_get_request_data( 'filter_by_list_id' ); ?>
1057
- <select name="filter_by_list_id">
1058
- <?php
1059
  $lists_dropdown = ES_Common::prepare_list_dropdown_options( $filter_by_list_id, __( 'All Lists', 'email-subscribers' ) );
1060
- echo wp_kses( $lists_dropdown , $allowedtags );
1061
  ?>
1062
- </select>
1063
- </p>
1064
 
1065
- <?php
1066
  }
1067
 
1068
  /**
@@ -1126,12 +1135,12 @@ class ES_Contacts_Table extends WP_List_Table {
1126
  * @since 4.0.0
1127
  */
1128
  public function prepare_lists_dropdown() {
1129
- $data = '<label for="bulk-action-selector-top" class="screen-reader-text">Select bulk action</label><select name="list_id" id="list_id" class="groupsselect" style="display: none">';
1130
  $data .= ES_Common::prepare_list_dropdown_options();
1131
  $data .= '</select>';
1132
 
1133
  $allowedtags = ig_es_allowed_html_tags_in_esc();
1134
- echo wp_kses( $data , $allowedtags );
1135
  }
1136
 
1137
  /**
@@ -1140,12 +1149,12 @@ class ES_Contacts_Table extends WP_List_Table {
1140
  * @since 4.0.0
1141
  */
1142
  public function prepare_statuses_dropdown() {
1143
- $data = '<label for="bulk-action-selector-top" class="screen-reader-text">Select bulk action</label><select name="status_select" id="status_select" class="statusesselect" style="display:none;">';
1144
  $data .= ES_Common::prepare_statuses_dropdown_options();
1145
  $data .= '</select>';
1146
 
1147
  $allowedtags = ig_es_allowed_html_tags_in_esc();
1148
- echo wp_kses( $data , $allowedtags );
1149
 
1150
  }
1151
 
@@ -1202,7 +1211,7 @@ class ES_Contacts_Table extends WP_List_Table {
1202
  $url = add_query_arg( 'resend', true );
1203
  // redirect to resend link and avoid resending email
1204
  ?>
1205
- <meta http-equiv="refresh" content="0; url=<?php echo esc_url( $url ); ?>"/>
1206
  <?php
1207
  }
1208
 
@@ -1330,7 +1339,7 @@ class ES_Contacts_Table extends WP_List_Table {
1330
 
1331
  global $wpdb;
1332
 
1333
- $wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->prefix}ig_contacts SET form_id = %d WHERE form_id = %d" , 0, $form_id ) );
1334
  }
1335
 
1336
  }
8
  if ( ! class_exists( 'WP_List_Table' ) ) {
9
  require_once ABSPATH . 'wp-admin/includes/class-wp-list-table.php';
10
  }
11
+
12
  class ES_Contacts_Table extends WP_List_Table {
13
  /**
14
  * Contact lists status array
89
  // Don't show screen option on Import/ Export subscribers page.
90
  $action = ig_es_get_request_data( 'action' );
91
 
92
+ if ( empty( $action ) ) {
93
 
94
  $option = 'per_page';
95
  $args = array(
107
  * Get the content of Audience main tab
108
  *
109
  * @param $active_tab
110
+ * @param array $audience_main_tabs
111
  *
112
  * @return array
113
  *
116
  public function get_audience_main_tabs( $active_tab, $audience_main_tabs = array() ) {
117
 
118
  $audience_tab_main_navigation = array(
119
+ 'new_contact' => array(
120
  'label' => __( 'Add New Contact', 'email-subscribers' ),
121
  'indicator_option' => '',
122
  'indicator_label' => '',
125
  'url' => add_query_arg( 'action', 'new', 'admin.php?page=es_subscribers' ),
126
  ),
127
 
128
+ 'import' => array(
129
  'label' => __( 'Import Contacts', 'email-subscribers' ),
130
  'indicator_option' => '',
131
  'indicator_label' => '',
134
  'url' => add_query_arg( 'action', 'import', 'admin.php?page=es_subscribers' ),
135
  ),
136
 
137
+ 'export' => array(
138
  'label' => __( 'Export Contacts', 'email-subscribers' ),
139
  'indicator_option' => '',
140
  'indicator_label' => '',
143
  'url' => add_query_arg( 'action', 'export', 'admin.php?page=es_subscribers' ),
144
  ),
145
 
146
+ 'sync' => array(
147
  'label' => __( 'Sync', 'email-subscribers' ),
148
  'indicator_option' => 'ig_es_show_sync_tab',
149
  'indicator_label' => __( 'New', 'email-subscribers' ),
180
  public function render() {
181
 
182
  ?>
183
+ <div class="wrap pt-3 font-sans">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
184
 
185
+ <?php
 
 
 
 
186
 
187
+ $action = ig_es_get_request_data( 'action' );
188
+ if ( 'import' === $action ) {
189
+ $this->load_import();
190
+ } elseif ( 'export' === $action ) {
191
+ $this->load_export();
192
+ } elseif ( 'new' === $action || 'edit' === $action ) {
193
+ $contact_id = absint( ig_es_get_request_data( 'subscriber' ) );
194
+ $this->save_contact( $contact_id );
195
+ } elseif ( 'sync' === $action ) {
196
+ update_option( 'ig_es_show_sync_tab', 'no' ); // yes/no
197
+ $this->load_sync();
198
+ } else {
 
 
 
 
199
 
200
+ $audience_tab_main_navigation = array();
201
+ $active_tab = '';
202
+ $audience_tab_main_navigation = apply_filters( 'ig_es_audience_tab_main_navigation', $active_tab, $audience_tab_main_navigation );
203
 
204
+ ?>
205
+ <div class="flex">
206
+ <div>
207
+ <h2 class="wp-heading-inline text-3xl font-bold text-gray-700 sm:leading-9 sm:truncate pr-4">
208
+ <?php
209
+ echo esc_html__( 'Audience', 'email-subscribers' );
210
+ ?>
211
+ </h2>
212
+ </div>
213
+ <div class="mt-1">
214
+ <?php
215
+ ES_Common::prepare_main_header_navigation( $audience_tab_main_navigation );
216
+ ?>
217
+ </div>
218
+ </div>
219
+ <div>
220
+ <hr class="wp-header-end">
221
+ </div>
222
+ <?php $this->get_contacts_reports(); ?>
223
+
224
+ <div id="poststuff" class="es-audience-view es-items-lists">
225
+ <div id="post-body" class="metabox-holder column-1">
226
+ <div id="post-body-content">
227
+ <div class="meta-box-sortables ui-sortable">
228
+ <form method="get">
229
+ <input type="hidden" name="page" value="es_subscribers"/>
230
+ <?php
231
+ $this->prepare_items();
232
+ $this->display();
233
+ ?>
234
+ </form>
235
+ </div>
236
+ </div>
237
+ </div>
238
+ <br class="clear">
239
+ </div>
240
+ </div>
241
+ <?php
242
+ }
243
  }
244
 
245
  /**
283
  $es_total_unsubscribed_contacts = ES_Reports_Data::get_total_unsubscribed_contacts( 60 );
284
  $es_total_contacts_opened_emails = ES_Reports_Data::get_total_contacts_opened_emails( 60 );
285
  ?>
286
+ <div class="border-0 mt-8 mb-4">
287
+ <table class="min-w-full overflow-hidden bg-white rounded-lg shadow font-sans">
288
+ <tr>
289
+ <td class="w-1/5 border-r lg:px-4">
290
+ <div class="block pt-3 pb-2 pl-2"><span class="text-lg font-medium text-gray-400"><?php echo esc_html__( 'Total Contacts', 'email-subscribers' ); ?></span></div>
291
+ <div class="flex pt-2 pb-2 h-20">
292
+ <div class="lg:pl-2 ">
293
+ <svg fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 24 24" class="w-8 h-8 text-gray-400 mt-1">
294
+ <path d="M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z"></path>
295
+ </svg>
296
+ </div>
297
+ <div>
298
+ <span class="text-4xl font-bold leading-none text-indigo-600 pl-4"><?php echo esc_html( number_format( $es_total_contact ) ); ?></span>
299
+
300
+ </div>
301
+ </div>
302
+ </td>
303
+ <td class="w-4/5">
304
+ <div class="block pt-4 pb-1"><span class="text-lg font-medium text-gray-400 pl-6"><?php echo esc_html__( 'Last 60 Days', 'email-subscribers' ); ?></span></div>
305
+ <div class="flex">
306
+ <div class="lg:w-3/12 xl:w-2/12 h-20 pl-6 pt-3 border-r border-gray-200">
307
+ <div class="mb-1">
308
+ <span class="text-2xl font-bold leading-none text-gray-700"><?php echo esc_html( number_format( $es_total_subscribed_contacts ) ); ?></span>
309
+ </div>
310
+ <div class="text-sm text-gray-400 tracking-wide">
311
  <?php echo esc_html__( 'Subscribed', 'email-subscribers' ); ?>
312
+ </div>
313
+ </div>
314
+ <div class="lg:w-3/12 xl:w-2/12 h-20 pl-4 pt-3 mb-2 border-r border-gray-200">
315
+ <div class=" mb-1">
316
+ <span class="text-2xl font-bold leading-none text-gray-700"><?php echo esc_html( number_format( $es_total_unsubscribed_contacts ) ); ?></span>
317
+ </div>
318
+ <div class="text-sm text-gray-400 tracking-wide">
319
  <?php echo esc_html__( 'Unsubscribed', 'email-subscribers' ); ?>
320
+ </div>
321
+ </div>
322
+ <div class="lg:w-3/12 xl:w-2/12 h-20 pl-4 pt-3 border-r border-gray-200">
323
+ <div class="mb-1">
324
+ <span class="text-2xl font-bold leading-none text-gray-700"><?php echo esc_html( number_format( $es_total_contacts_opened_emails ) ); ?></span>
325
+ </div>
326
+ <div class="text-sm text-gray-400 tracking-wide">
327
  <?php echo esc_html__( 'Opened', 'email-subscribers' ); ?>
328
+ </div>
329
+ </div>
330
+ <div class="lg:w-3/12 xl:w-2/12 h-20 pl-4 pt-3">
331
  <?php do_action( 'ig_es_after_contacts_kpis' ); ?>
332
+ </div>
333
+ </div>
334
+ </td>
335
+ </tr>
336
+ </table>
337
+ </div>
338
  <?php
339
  }
340
 
349
  global $wpdb;
350
 
351
  $first_name = '';
352
+ $action = '';
353
+ $last_name = '';
354
+ $email = '';
355
+ $guid = '';
356
  $created_at = '';
357
  $list_ids = array();
358
  $is_new = true;
385
  $submitted = ig_es_get_request_data( 'submitted' );
386
 
387
  if ( 'submitted' === $submitted ) {
388
+ $contact_nonce = ig_es_get_request_data( 'ig_es_contact_nonce' );
389
+ // Verify nonce.
390
+ if ( wp_verify_nonce( $contact_nonce, 'ig-es-contact-nonce' ) ) {
391
+ $contact_data = ig_es_get_data( $_POST, 'contact_data', array(), true );
392
+ $is_error = false;
393
+ if ( ! empty( $contact_data ) ) {
394
 
395
+ $email = sanitize_email( ig_es_get_data( $contact_data, 'email', '', true ) );
396
 
397
+ if ( $email ) {
 
398
 
399
+ $lists = ig_es_get_data( $contact_data, 'lists', array() );
400
 
401
+ if ( count( $lists ) > 0 ) {
402
+ $first_name = ig_es_get_data( $contact_data, 'first_name', '', true );
403
+ $last_name = ig_es_get_data( $contact_data, 'last_name', '', true );
404
 
405
+ if ( ! empty( $first_name ) ) {
406
 
407
+ $contact = array(
408
+ 'first_name' => $first_name,
409
+ 'last_name' => $last_name,
410
+ 'email' => $email,
411
+ );
412
 
413
+ // Add contact.
414
+ $existing_contact_id = ES()->contacts_db->get_contact_id_by_email( $email );
415
 
416
+ if ( $existing_contact_id && ( $existing_contact_id != $id ) ) {
417
+ $message = __( 'Contact already exist.', 'email-subscribers' );
418
+ ES_Common::show_message( $message, 'error' );
419
+ $is_error = true;
420
+ } else {
421
+ if ( $id ) {
422
+ ES()->contacts_db->update_contact( $id, $contact );
423
+ } else {
424
+ $contact['source'] = 'admin';
425
+ $contact['status'] = 'verified';
426
+ $contact['hash'] = ES_Common::generate_guid();
427
+ $contact['created_at'] = ig_get_current_date_time();
428
 
429
+ $id = ES()->contacts_db->insert( $contact );
430
+ }
431
+ }
432
 
433
+ /*
 
 
 
 
434
  if ( $id ) {
435
  ES()->contacts_db->update_contact( $id, $contact );
436
  } else {
437
+ if ( ! $existing_contact_id ) {
438
+ $contact['source'] = 'admin';
439
+ $contact['status'] = 'verified';
440
+ $contact['hash'] = ES_Common::generate_guid();
441
+ $contact['created_at'] = ig_get_current_date_time();
442
 
443
+ $id = ES()->contacts_db->insert( $contact );
 
 
 
 
 
 
 
 
 
 
 
 
444
 
445
+ } else {
446
+ $message = __( 'Contact already exist.', 'email-subscribers' );
447
+ ES_Common::show_message( $message, 'error' );
448
+ $is_error = true;
449
+ }
450
 
 
 
 
 
451
  }
452
+ */
453
 
454
+ if ( ! $is_error ) {
 
455
 
456
+ $lists = ! empty( $lists ) ? $lists : array( 1 => 0 );
457
 
458
+ ES()->lists_contacts_db->update_contact_lists( $id, $lists );
459
 
460
+ if ( $id ) {
461
 
462
+ if ( $is_new ) {
463
 
464
+ if ( ! empty( $contact_data['send_welcome_email'] ) ) {
465
 
466
+ // Get comma(,) separated list name based on ids.
467
+ $list_name = ES_Common::prepare_list_name_by_ids( $list_ids );
468
+ $name = ES_Common::prepare_name_from_first_name_last_name( $contact['first_name'], $contact['last_name'] );
469
 
470
+ $template_data = array(
471
+ 'email' => $contact['email'],
472
+ 'contact_id' => $id,
473
+ 'name' => $name,
474
+ 'first_name' => $contact['first_name'],
475
+ 'last_name' => $contact['last_name'],
476
+ 'guid' => $contact['hash'],
477
+ 'list_name' => $list_name,
478
+ );
479
 
480
+ // Send Welcome Email.
481
+ ES()->mailer->send_welcome_email( $contact['email'], $template_data );
482
+ }
 
 
 
 
 
 
483
 
484
+ $message = __( 'Contact has been added successfully!', 'email-subscribers' );
485
+ } else {
486
+ $message = __( 'Contact has been updated successfully!', 'email-subscribers' );
487
  }
488
 
489
+ ES_Common::show_message( $message, 'success' );
 
 
490
  }
 
 
491
  }
492
+ } else {
493
+ $message = __( 'Please Enter First Name', 'email-subscribers' );
494
+ ES_Common::show_message( $message, 'error' );
495
  }
496
  } else {
497
+ $message = __( 'Please Select List', 'email-subscribers' );
498
  ES_Common::show_message( $message, 'error' );
499
  }
500
  } else {
501
+ $message = __( 'Please Enter Valid Email Address', 'email-subscribers' );
502
  ES_Common::show_message( $message, 'error' );
503
  }
 
 
 
504
  }
505
  }
506
  }
515
 
516
  ?>
517
 
518
+ <div class="max-w-full mt-1 font-sans">
519
+ <header class="wp-heading-inline">
520
+ <div class="md:flex md:items-center md:justify-between justify-center">
521
+ <div class="flex-1 min-w-0">
522
+ <h2 class="text-2xl leading-7 text-gray-900 sm:leading-9 sm:truncate">
523
  <span class="text-base font-normal leading-7 text-indigo-600 sm:leading-9 sm:truncate">
524
+ <a href="admin.php?page=es_subscribers"><?php esc_html_e( 'Audience ', 'email-subscribers' ); ?></a></span>
525
+ <svg class="w-6 h-6 mt-2 inline-block" fill="currentColor" viewBox="0 0 24 24">
526
+ <path
527
+ fill-rule="evenodd"
528
+ d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z"
529
+ clip-rule="evenodd"
530
+ ></path>
531
+ </svg>
532
+ <?php echo esc_html( $title ); ?>
533
+ </h2>
534
+ </div>
535
+
536
+ <div class="py-2 flex md:mt-0 pb-2">
537
+ <div id="ig-es-create-button" class="relative inline-block text-left">
538
+ <?php
539
+ echo wp_kses_post( $title_action );
540
+ ?>
541
+ </div>
542
+ </div>
543
+ </div>
544
+ </header>
545
+ <div>
546
+ <hr class="wp-header-end">
547
+ </div>
548
+ <div class="bg-white shadow-md rounded-lg">
549
+ <?php echo wp_kses_post( $this->prepare_contact_form( $data, $is_new ) ); ?>
550
+
551
+ </div>
552
+ </div>
553
+ <?php
554
 
555
  }
556
 
608
  }
609
 
610
  $filter_sql .= $list_filter_sql;
611
+ $query[] = "id IN ( $filter_sql )";
612
  }
613
 
614
  // Prepare search query
683
 
684
  ?>
685
 
686
+
687
+ <form method="post" action="<?php echo esc_attr( $action ); ?>" class="ml-5 mr-4 text-left pt-8 flex-row mt-2 item-center ">
688
+ <?php wp_nonce_field( 'ig-es-contact-nonce', 'ig_es_contact_nonce' ); ?>
689
+ <div class="flex flex-row border-b border-gray-100">
690
+ <div class="flex w-1/5">
691
+ <div class="ml-4 pt-6">
692
+ <label for="firstname"><span class="block ml-4 pt-1 pr-4 text-sm font-medium text-gray-600 pb-2"><?php esc_html_e( 'First Name', 'email-subscribers' ); ?></span></label>
693
+
694
+ </div>
695
+ </div>
696
+ <div class="flex">
697
+ <div class="ml-16 mb-4 h-10 mr-4 mt-4">
698
+ <div class="h-10 relative">
699
+ <div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
700
  <span class="inset-y-0 text-gray-400 sm:text-sm sm:leading-5">
701
  <span class="my-2 mr-10 dashicons dashicons-admin-users"></span>
702
  </span>
703
+ </div>
704
+ <input id="ig-es-contact-first-name" class="ig-es-contact-first-name form-input block border-gray-400 w-full pl-10 pr-12 shadow-sm focus:bg-gray-100 sm:text-sm sm:leading-5" placeholder="<?php esc_html_e( 'Enter First Name', 'email-subscribers' ); ?>" name="contact_data[first_name]"
705
+ value="<?php echo esc_attr( $first_name ); ?>"/>
706
+ </div>
707
+ </div>
708
+ </div>
709
+ </div>
710
+
711
+ <div class="flex flex-row border-b border-gray-100">
712
+ <div class="flex w-1/5">
713
+ <div class="ml-4 pt-6">
714
+ <label for="lastname"><span class="block ml-4 pt-1 pr-4 text-sm font-medium text-gray-600 pb-2"><?php esc_html_e( 'Last Name', 'email-subscribers' ); ?></span></label>
715
+ </div>
716
+ </div>
717
+ <div class="flex">
718
+ <div class="ml-16 my-4 h-10 mr-4">
719
+ <div class="h-10 relative">
720
+ <div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
721
  <span class="inset-y-0 text-gray-400 sm:text-sm sm:leading-5">
722
  <span class="my-2 mr-10 dashicons dashicons-admin-users"></span>
723
  </span>
724
+ </div>
725
+ <input id="ig-es-contact-last-name" class="ig-es-contact-last-name form-input block border-gray-400 w-full pl-10 pr-12 shadow-sm focus:bg-gray-100 sm:text-sm sm:leading-5" placeholder="<?php esc_html_e( 'Enter Last Name', 'email-subscribers' ); ?>" name="contact_data[last_name]" value="<?php echo esc_attr( $last_name ); ?>"/>
726
+ </div>
727
+ </div>
728
+ </div>
729
+ </div>
730
+
731
+ <div class="flex flex-row border-b border-gray-100">
732
+ <div class="flex w-1/5">
733
+ <div class="ml-4 pt-6">
734
+ <label for="email"><span class="block ml-4 pt-1 pr-4 text-sm font-medium text-gray-600 pb-2"><?php esc_html_e( 'Email', 'email-subscribers' ); ?></span></label>
735
+ </div>
736
+ </div>
737
+ <div class="flex">
738
+ <div class="ml-16 my-4 mr-4">
739
+ <div class="h-10 relative">
740
+ <div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
741
  <span class="inset-y-0 text-gray-400 sm:text-sm sm:leading-5">
742
  <span class="my-2 mr-10 dashicons dashicons-email-alt"></span></span>
743
+ </div>
744
+ <input id="email" class="form-input block border-gray-400 w-full pl-10 pr-12 shadow-sm focus:bg-gray-100 sm:text-sm sm:leading-5" id="email" name="contact_data[email]" value="<?php echo esc_attr( $email ); ?>" placeholder="<?php esc_html_e( 'Enter Email', 'email-subscribers' ); ?>"/>
745
+ </div>
746
+ </div>
747
+ </div>
748
+ </div>
749
+
750
+ <?php if ( $is_new ) { ?>
751
+ <div class="flex flex-row border-b border-gray-100">
752
+ <div class="flex w-1/5">
753
+ <div class="ml-4 pt-4">
754
+ <label for="send_email"><span class="block ml-4 pt-1 pr-4 text-sm font-medium text-gray-600 pb-2"><?php esc_html_e( 'Send Welcome Email?', 'email-subscribers' ); ?></span>
755
+ </label>
756
+ </div>
757
+ </div>
758
+ <div class="flex">
759
+ <div class="ml-16 my-4 mr-4">
760
+ <label for="send_email" class=" inline-flex items-center cursor-pointer">
761
  <span class="relative">
762
+ <input id="send_email" type="checkbox" class="absolute es-check-toggle opacity-0 w-0 h-0"
763
+ name="contact_data[send_welcome_email]"
764
+ <?php
765
  if ( $send_welcome_email ) {
766
  echo "checked='checked'";
767
+ }
768
  ?>
769
  />
770
  <span class="es-mail-toggle-line block w-10 h-6 bg-gray-300 rounded-full shadow-inner"></span>
771
  <span class="es-mail-toggle-dot absolute transition-all duration-300 ease-in-out block w-4 h-4 mt-1 ml-1 bg-white rounded-full shadow inset-y-0 left-0 focus-within:shadow-outline"></span>
772
  </span>
773
+ </label>
774
+ </div>
775
+ </div>
776
+ </div>
777
+ <?php } ?>
778
+
779
+ <div class="flex flex-row border-b border-gray-100">
780
+ <div class="flex w-1/5">
781
+ <div class="ml-4 pt-6">
782
+ <label for="status">
783
+ <span class="block ml-4 pt-1 pr-4 text-sm font-medium text-gray-600 pb-2"> <?php esc_html_e( 'List(s)', 'email-subscribers' ); ?></span></label>
784
+ </div>
785
+ </div>
786
+ <div class="flex">
787
+ <div class="ml-16 my-4 mr-4">
788
+ <div class=" relative">
789
+ <?php
790
+ $allowedtags = ig_es_allowed_html_tags_in_esc();
791
+ echo wp_kses( $list_html, $allowedtags );
792
+ ?>
793
+ </div>
794
+ </div>
795
+ </div>
796
+ </div>
797
+
798
+ <div class="flex border-b border-gray-100">
799
+ <?php
800
+ $submit_button_text = $is_new ? __( 'Save Contact', 'email-subscribers' ) : __( 'Save Changes', 'email-subscribers' );
801
+ ?>
802
+ <div class="ml-4 mb-4 pt-6">
803
+ <input type="hidden" name="contact_data[created_at]" value="<?php echo esc_attr( $created ); ?>"/>
804
+ <input type="hidden" name="contact_data[guid]" value="<?php echo esc_attr( $guid ); ?>"/>
805
+ <input type="hidden" name="submitted" value="submitted"/>
806
+ <input type="submit" name="submit" class="cursor-pointer align-middle px-4 my-2 py-2 mx-2 ig-es-primary-button hover:shadow-md" value="<?php echo esc_attr( $submit_button_text ); ?>"/>
807
+ <a href="admin.php?page=es_subscribers" class="cursor-pointer align-middle rounded-md border border-indigo-600 hover:shadow-md focus:outline-none focus:shadow-outline-indigo text-sm leading-5 font-medium transition ease-in-out duration-150 px-4 my-2 py-2 mx-2 "><?php esc_html_e( 'Cancel', 'email-subscribers' ); ?></a>
808
+ </div>
809
+ </div>
810
+ </form>
811
+ </div>
812
+ <?php
813
 
814
  }
815
 
827
  /**
828
  * Render a column when no column specific method exist.
829
  *
830
+ * @param array $item
831
  * @param string $column_name
832
  *
833
  * @return mixed
879
 
880
  $selected = ! empty( $list_contact_status_map[ $list_id ] ) ? $list_contact_status_map[ $list_id ] : '';
881
 
882
+ $status_dropdown_html = '<select class="h-8 form-select w-40 mt-2 mr-8 shadow-sm border-gray-400 ig-es-statuses-dropdown shadow-sm sm:text-sm sm:leading-5" name="contact_data[lists][' . esc_attr( $list_id ) . ']" >';
883
  $status_dropdown_html .= ES_Common::prepare_statuses_dropdown_options( $selected );
884
  $status_dropdown_html .= '</select>';
885
 
888
  $status_span = '<span class="border-gray-400 focus:bg-gray-100 es_list_contact_status ' . $list_contact_status_map[ $list_id ] . '" title="' . ucwords( $list_contact_status_map[ $list_id ] ) . '">';
889
  }
890
 
891
+ $list_name = strlen( $list_name ) > 15 ? substr( $list_name, 0, 15 ) . '...' : $list_name;
892
  $lists_html .= "<td class='pr-1 pt-2 text-sm leading-5 font-normal text-gray-500'>$status_span$list_name</td><td>$status_dropdown_html</td>";
893
 
894
  $i ++;
1045
  public function search_box( $text = '', $input_id = '' ) {
1046
 
1047
  ?>
1048
+ <p class="search-box box-ma10">
1049
+ <label class="screen-reader-text" for="<?php echo esc_attr( $input_id ); ?>"><?php echo esc_attr( $text ); ?>:</label>
1050
+ <input type="search" id="<?php echo esc_attr( $input_id ); ?>" name="s" value="<?php _admin_search_query(); ?>"/>
1051
  <?php submit_button( __( 'Search Contacts', 'email-subscribers' ), 'button', false, false, array( 'id' => 'search-submit' ) ); ?>
1052
+ </p>
1053
+ <p class="search-box search-group-box box-ma10">
1054
  <?php $filter_by_status = ig_es_get_request_data( 'filter_by_status' ); ?>
1055
+ <select name="filter_by_status">
1056
+ <?php
1057
+ $allowedtags = ig_es_allowed_html_tags_in_esc();
1058
  add_filter( 'safe_style_css', 'ig_es_allowed_css_style' );
1059
+ $status_types = ES_Common::prepare_statuses_dropdown_options( $filter_by_status, __( 'All Statuses', 'email-subscribers' ) );
1060
+ echo wp_kses( $status_types, $allowedtags );
1061
  ?>
1062
+ </select>
1063
+ </p>
1064
+ <p class="search-box search-group-box box-ma10">
1065
  <?php $filter_by_list_id = ig_es_get_request_data( 'filter_by_list_id' ); ?>
1066
+ <select name="filter_by_list_id">
1067
+ <?php
1068
  $lists_dropdown = ES_Common::prepare_list_dropdown_options( $filter_by_list_id, __( 'All Lists', 'email-subscribers' ) );
1069
+ echo wp_kses( $lists_dropdown, $allowedtags );
1070
  ?>
1071
+ </select>
1072
+ </p>
1073
 
1074
+ <?php
1075
  }
1076
 
1077
  /**
1135
  * @since 4.0.0
1136
  */
1137
  public function prepare_lists_dropdown() {
1138
+ $data = '<label for="bulk-action-selector-top" class="screen-reader-text">Select bulk action</label><select name="list_id" id="list_id" class="groupsselect" style="display: none">';
1139
  $data .= ES_Common::prepare_list_dropdown_options();
1140
  $data .= '</select>';
1141
 
1142
  $allowedtags = ig_es_allowed_html_tags_in_esc();
1143
+ echo wp_kses( $data, $allowedtags );
1144
  }
1145
 
1146
  /**
1149
  * @since 4.0.0
1150
  */
1151
  public function prepare_statuses_dropdown() {
1152
+ $data = '<label for="bulk-action-selector-top" class="screen-reader-text">Select bulk action</label><select name="status_select" id="status_select" class="statusesselect" style="display:none;">';
1153
  $data .= ES_Common::prepare_statuses_dropdown_options();
1154
  $data .= '</select>';
1155
 
1156
  $allowedtags = ig_es_allowed_html_tags_in_esc();
1157
+ echo wp_kses( $data, $allowedtags );
1158
 
1159
  }
1160
 
1211
  $url = add_query_arg( 'resend', true );
1212
  // redirect to resend link and avoid resending email
1213
  ?>
1214
+ <meta http-equiv="refresh" content="0; url=<?php echo esc_url( $url ); ?>"/>
1215
  <?php
1216
  }
1217
 
1339
 
1340
  global $wpdb;
1341
 
1342
+ $wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->prefix}ig_contacts SET form_id = %d WHERE form_id = %d", 0, $form_id ) );
1343
  }
1344
 
1345
  }
lite/includes/classes/class-es-export-subscribers.php CHANGED
@@ -22,41 +22,45 @@ class Export_Subscribers {
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
- /* translators: %s : csv filename in lowercase */
42
- $file_name = sprintf( '%s-contacts.csv', strtolower( $status ) );
43
-
44
- if ( empty( $csv ) ) {
45
- $message = __( 'No data available', 'email-subscribers' );
46
- ES_Common::show_message( $message, 'error' );
47
- exit();
48
- } else {
49
- header( 'Pragma: public' );
50
- header( 'Expires: 0' );
51
- header( 'Cache-Control: must-revalidate, post-check=0, pre-check=0' );
52
- header( 'Cache-Control: private', false );
53
- header( 'Content-Type: application/octet-stream' );
54
- header( "Content-Disposition: attachment; filename={$file_name};" );
55
- header( 'Content-Transfer-Encoding: binary' );
56
-
57
- echo wp_kses_post( $csv );
58
- exit;
59
- }
60
  }
61
 
62
  add_filter( 'query_vars', array( $this, 'query_vars' ) );
@@ -72,11 +76,11 @@ class Export_Subscribers {
72
 
73
  ?>
74
 
75
- <tr class="bg-gray-100 text-xs text-left leading-4 font-medium text-gray-500 uppercase tracking-wider border-b border-t border-gray-200 ">
76
- <th class="w-1/12 pl-8 py-4" scope="col"><?php esc_html_e( 'No.', 'email-subscribers' ); ?></th>
77
- <th class="w-2/12 pl-4 py-4" scope="col"><?php esc_html_e( 'Contacts', 'email-subscribers' ); ?></th>
78
- <th class="w-2/12 pl-8 py-4" scope="col"><?php esc_html_e( 'Total Contacts', 'email-subscribers' ); ?></th>
79
- <th class="w-2/12 pl-16 py-4" scope="col"><?php esc_html_e( 'Export', 'email-subscribers' ); ?></th>
80
  </tr>
81
 
82
  <?php
@@ -106,7 +110,8 @@ class Export_Subscribers {
106
  $class = 'alternate';
107
  }*/
108
 
109
- $url = "admin.php?page=download_report&report=users&status={$key}";
 
110
 
111
  ?>
112
 
@@ -142,20 +147,20 @@ class Export_Subscribers {
142
 
143
  ?>
144
 
145
- <div class="wrap ml-4">
146
- <header class="wp-heading-inline">
147
- <div class="mt-2">
148
- <h2 class="text-2xl font-medium text-gray-900 sm:leading-9 sm:truncate">
149
- <span class="text-base font-normal leading-7 text-indigo-600 sm:leading-9 sm:truncate"> <a href="admin.php?page=es_subscribers"><?php esc_html_e( 'Audience', 'email-subscribers' ); ?> </a> </span> <svg fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" stroke="currentColor" viewBox="0 0 24 24" class="w-4 h-4 mt-1 inline-block align-middle"><path d="M9 5l7 7-7 7"></path></svg> <?php esc_html_e( 'Export Contacts', 'email-subscribers' ); ?>
 
 
150
  <?php
151
  ES_Common::prepare_main_header_navigation( $audience_tab_main_navigation );
152
  ?>
153
- </div>
154
- </h2>
155
-
156
- </header>
157
  <div><hr class="wp-header-end"></div>
158
- <div class="mt-6 shadow-lg rounded-md overflow-hidden">
159
  <form name="frm_es_subscriberexport" method="post">
160
  <table class="min-w-full" id="straymanage">
161
  <thead>
@@ -170,7 +175,6 @@ class Export_Subscribers {
170
  </table>
171
  </form>
172
  </div>
173
- </div>
174
  <?php
175
  }
176
 
22
 
23
  if ( $report && $status && $can_access ) {
24
 
25
+ $export_nonce = ig_es_get_request_data( 'export-nonce' );
26
+ // Verify nonce.
27
+ if ( wp_verify_nonce( $export_nonce, 'ig-es-subscriber-export-nonce' ) ) {
28
+ $status = trim( $status );
29
 
30
+ $selected_list_id = 0;
31
 
32
+ if ( 'select_list' === $status ) {
33
+ $selected_list_id = ig_es_get_request_data( 'list_id', 0 );
34
 
35
+ if ( 0 === $selected_list_id ) {
36
+ $message = __( 'Please Select List', 'email-subscribers' );
37
+ ES_Common::show_message( $message, 'error' );
38
+ exit();
39
+ }
40
+ }
41
+
42
+ $csv = $this->generate_csv( $status, $selected_list_id );
43
+
44
+ /* translators: %s : csv filename in lowercase */
45
+ $file_name = sprintf( '%s-contacts.csv', strtolower( $status ) );
46
+
47
+ if ( empty( $csv ) ) {
48
+ $message = __( 'No data available', 'email-subscribers' );
49
  ES_Common::show_message( $message, 'error' );
50
  exit();
51
+ } else {
52
+ header( 'Pragma: public' );
53
+ header( 'Expires: 0' );
54
+ header( 'Cache-Control: must-revalidate, post-check=0, pre-check=0' );
55
+ header( 'Cache-Control: private', false );
56
+ header( 'Content-Type: application/octet-stream' );
57
+ header( "Content-Disposition: attachment; filename={$file_name};" );
58
+ header( 'Content-Transfer-Encoding: binary' );
59
+
60
+ echo wp_kses_post( $csv );
61
+ exit;
62
  }
63
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
64
  }
65
 
66
  add_filter( 'query_vars', array( $this, 'query_vars' ) );
76
 
77
  ?>
78
 
79
+ <tr class="bg-gray-100 text-sm text-left leading-4 text-gray-500 tracking-wider border-b border-t border-gray-200 ">
80
+ <th class="w-1/12 pl-8 py-4 font-medium" scope="col"><?php esc_html_e( 'No.', 'email-subscribers' ); ?></th>
81
+ <th class="w-2/12 pl-4 py-4 font-medium" scope="col"><?php esc_html_e( 'Contacts', 'email-subscribers' ); ?></th>
82
+ <th class="w-2/12 pl-8 py-4 font-medium" scope="col"><?php esc_html_e( 'Total Contacts', 'email-subscribers' ); ?></th>
83
+ <th class="w-2/12 pl-16 py-4 font-medium" scope="col"><?php esc_html_e( 'Export', 'email-subscribers' ); ?></th>
84
  </tr>
85
 
86
  <?php
110
  $class = 'alternate';
111
  }*/
112
 
113
+ $export_nonce = wp_create_nonce( 'ig-es-subscriber-export-nonce' );
114
+ $url = "admin.php?page=download_report&report=users&status={$key}&export-nonce={$export_nonce}";
115
 
116
  ?>
117
 
147
 
148
  ?>
149
 
150
+ <div class="flex">
151
+ <div>
152
+ <h2 class="text-2xl font-medium text-gray-800 sm:leading-9 sm:truncate pr-4">
153
+ <span class="text-base font-normal leading-7 text-indigo-600 sm:leading-9 sm:truncate"> <a href="admin.php?page=es_subscribers"><?php esc_html_e( 'Audience', 'email-subscribers' ); ?> </a> </span> <svg fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" stroke="currentColor" viewBox="0 0 24 24" class="w-4 h-4 mt-1 inline-block align-middle"><path d="M9 5l7 7-7 7"></path></svg> <?php esc_html_e( 'Export Contacts', 'email-subscribers' ); ?>
154
+ </h2>
155
+ </div>
156
+ <div class="mt-1">
157
  <?php
158
  ES_Common::prepare_main_header_navigation( $audience_tab_main_navigation );
159
  ?>
160
+ </div>
161
+ </div>
 
 
162
  <div><hr class="wp-header-end"></div>
163
+ <div class="mt-6 shadow rounded-lg overflow-hidden">
164
  <form name="frm_es_subscriberexport" method="post">
165
  <table class="min-w-full" id="straymanage">
166
  <thead>
175
  </table>
176
  </form>
177
  </div>
 
178
  <?php
179
  }
180
 
lite/includes/classes/class-es-forms-table.php CHANGED
@@ -53,14 +53,19 @@ class ES_Forms_Table extends WP_List_Table {
53
  */
54
  public static function screen_options() {
55
 
56
- $option = 'per_page';
57
- $args = array(
58
- 'label' => __( 'Number of forms per page', 'email-subscribers' ),
59
- 'default' => 20,
60
- 'option' => self::$option_per_page,
61
- );
 
 
 
 
62
 
63
- add_screen_option( $option, $args );
 
64
  }
65
 
66
 
@@ -73,7 +78,7 @@ class ES_Forms_Table extends WP_List_Table {
73
 
74
  $action = ig_es_get_request_data( 'action' );
75
  ?>
76
- <div class="wrap">
77
  <?php
78
  if ( 'new' === $action ) {
79
  $this->es_new_form_callback();
@@ -82,14 +87,19 @@ class ES_Forms_Table extends WP_List_Table {
82
  echo wp_kses_post( $this->edit_form( absint( $form ) ) );
83
  } else {
84
  ?>
85
- <h1 class=" wp-heading-inline">
86
- <span class="text-2xl font-medium leading-7 text-gray-900 sm:leading-9 sm:truncate">
 
87
  <?php esc_html_e( 'Forms', 'email-subscribers' ); ?>
88
- <a href="admin.php?page=es_forms&action=new" class="pt-2 ig-es-title-button px-2 py-2 mx-2">
89
- <?php esc_html_e('Add New', 'email-subscribers'); ?>
90
- </a>
91
- </span>
92
- </h1>
 
 
 
 
93
  <?php
94
  if ( 'form_created' === $action ) {
95
  $message = __( 'Form has been added successfully!', 'email-subscribers' );
@@ -103,7 +113,8 @@ class ES_Forms_Table extends WP_List_Table {
103
  <div id="post-body" class="metabox-holder column-1">
104
  <div id="post-body-content">
105
  <div class="meta-box-sortables ui-sortable">
106
- <form method="post">
 
107
  <?php
108
  $this->prepare_items();
109
  $this->display();
@@ -284,7 +295,7 @@ class ES_Forms_Table extends WP_List_Table {
284
 
285
  ?>
286
 
287
- <div class="wrap max-w-full mt-1 font-sans">
288
  <header class="wp-heading-inline">
289
  <div class="md:flex md:items-center md:justify-between justify-center">
290
  <div class="flex-1 min-w-0">
@@ -320,7 +331,7 @@ class ES_Forms_Table extends WP_List_Table {
320
  <div class="flex">
321
  <div class="ml-16 mb-4 h-10 mr-4 mt-4">
322
  <div class="h-10 relative">
323
- <input id="ig_es_title" class="form-input block border-gray-400 w-full pl-3 pr-12 shadow-sm focus:bg-gray-100 sm:text-sm sm:leading-5" placeholder="Enter form name" name="form_data[name]" value="<?php echo esc_html( stripslashes( $form_data['name'] ) ); ?>" size="30" maxlength="100"/>
324
  </div>
325
  </div>
326
  </div>
@@ -334,7 +345,7 @@ class ES_Forms_Table extends WP_List_Table {
334
  <div class="flex ">
335
  <div class="ml-16 mb-4 h-10 mr-4 mt-4">
336
  <div class="h-10 relative ">
337
- <input id="ig_es_title" class="form-input block border-gray-400 w-full pl-3 pr-12 shadow-sm focus:bg-gray-100 sm:text-sm sm:leading-5" placeholder="Enter description" name="form_data[desc]" id="ig_es_title" value="<?php echo esc_html( stripslashes( $form_data['desc'] ) ); ?>" size="30" />
338
  </div>
339
  </div>
340
  </div>
@@ -512,7 +523,7 @@ class ES_Forms_Table extends WP_List_Table {
512
  </tr>
513
  <tr>
514
  <td>
515
- <textarea class="form-textarea" rows="2" cols="50" name="form_data[gdpr_consent_text]"><?php echo wp_kses_post( $form_data['gdpr_consent_text'] ); ?></textarea>
516
  <p class="italic text-xs text-gray-400 mt-2 leading-snug pb-4"><?php esc_html_e( 'Consent text will show up at subscription form next to consent checkbox.', 'email-subscribers' ); ?></p>
517
  </td>
518
  </tr>
53
  */
54
  public static function screen_options() {
55
 
56
+ $action = ig_es_get_request_data( 'action' );
57
+
58
+ if( empty( $action ) ) {
59
+
60
+ $option = 'per_page';
61
+ $args = array(
62
+ 'label' => __( 'Number of forms per page', 'email-subscribers' ),
63
+ 'default' => 20,
64
+ 'option' => self::$option_per_page,
65
+ );
66
 
67
+ add_screen_option( $option, $args );
68
+ }
69
  }
70
 
71
 
78
 
79
  $action = ig_es_get_request_data( 'action' );
80
  ?>
81
+ <div class="wrap pt-3 font-sans">
82
  <?php
83
  if ( 'new' === $action ) {
84
  $this->es_new_form_callback();
87
  echo wp_kses_post( $this->edit_form( absint( $form ) ) );
88
  } else {
89
  ?>
90
+ <div class="flex">
91
+ <div>
92
+ <h2 class="wp-heading-inline text-3xl font-bold text-gray-700 sm:leading-9 sm:truncate pr-4">
93
  <?php esc_html_e( 'Forms', 'email-subscribers' ); ?>
94
+ </h2>
95
+ </div>
96
+ <div class="mt-1">
97
+ <a href="admin.php?page=es_forms&action=new" class="ig-es-title-button ml-2 leading-5 align-middle">
98
+ <?php esc_html_e('Add New', 'email-subscribers'); ?>
99
+ </a>
100
+ </div>
101
+ </div>
102
+ <div><hr class="wp-header-end"></div>
103
  <?php
104
  if ( 'form_created' === $action ) {
105
  $message = __( 'Form has been added successfully!', 'email-subscribers' );
113
  <div id="post-body" class="metabox-holder column-1">
114
  <div id="post-body-content">
115
  <div class="meta-box-sortables ui-sortable">
116
+ <form method="get">
117
+ <input type="hidden" name="page" value="es_forms" />
118
  <?php
119
  $this->prepare_items();
120
  $this->display();
295
 
296
  ?>
297
 
298
+ <div class="max-w-full mt-1 font-sans">
299
  <header class="wp-heading-inline">
300
  <div class="md:flex md:items-center md:justify-between justify-center">
301
  <div class="flex-1 min-w-0">
331
  <div class="flex">
332
  <div class="ml-16 mb-4 h-10 mr-4 mt-4">
333
  <div class="h-10 relative">
334
+ <input id="ig_es_title" class="form-input block border-gray-400 w-full pl-3 pr-12 shadow-sm focus:bg-gray-100 sm:text-sm sm:leading-5" placeholder="<?php echo esc_html__( 'Enter form name', 'email-subscribers' ); ?>" name="form_data[name]" value="<?php echo esc_html( stripslashes( $form_data['name'] ) ); ?>" size="30" maxlength="100"/>
335
  </div>
336
  </div>
337
  </div>
345
  <div class="flex ">
346
  <div class="ml-16 mb-4 h-10 mr-4 mt-4">
347
  <div class="h-10 relative ">
348
+ <input id="ig_es_title" class="form-input block border-gray-400 w-full pl-3 pr-12 shadow-sm focus:bg-gray-100 sm:text-sm sm:leading-5" placeholder="<?php echo esc_html__( 'Enter description', 'email-subscribers' ); ?>" name="form_data[desc]" id="ig_es_title" value="<?php echo esc_html( stripslashes( $form_data['desc'] ) ); ?>" size="30" />
349
  </div>
350
  </div>
351
  </div>
523
  </tr>
524
  <tr>
525
  <td>
526
+ <textarea class="form-textarea text-sm" rows="2" cols="50" name="form_data[gdpr_consent_text]"><?php echo wp_kses_post( $form_data['gdpr_consent_text'] ); ?></textarea>
527
  <p class="italic text-xs text-gray-400 mt-2 leading-snug pb-4"><?php esc_html_e( 'Consent text will show up at subscription form next to consent checkbox.', 'email-subscribers' ); ?></p>
528
  </td>
529
  </tr>
lite/includes/classes/class-es-handle-subscription.php CHANGED
@@ -147,12 +147,12 @@ if ( ! class_exists( 'ES_Handle_Subscription' ) ) {
147
  'message' => '',
148
  );
149
 
150
- $es = ig_es_get_post_data( 'es' );
151
- $es_subscribe = ig_es_get_post_data( 'esfpx_es-subscribe' );
152
 
153
- if ( 'subscribe' === $es && ! empty( $es_subscribe ) ) {
154
 
155
- $form_data = ig_es_get_post_data();
156
  $validate_response = $this->validate_data( $form_data );
157
  if ( 'ERROR' === $validate_response['status'] ) {
158
 
@@ -173,7 +173,7 @@ if ( ! class_exists( 'ES_Handle_Subscription' ) ) {
173
  $first_name = '';
174
  $last_name = '';
175
  if ( ! empty( $name ) ) {
176
- // Get First Name and Last Name from Name
177
  $name_parts = ES_Common::prepare_first_name_last_name( $name );
178
  $first_name = $name_parts['first_name'];
179
  $last_name = $name_parts['last_name'];
147
  'message' => '',
148
  );
149
 
150
+ $es = ! empty( $_POST['es'] ) ? sanitize_text_field( wp_unslash( $_POST['es'] ) ) : '';
151
+ $es_subscribe = ! empty( $_POST['esfpx_es-subscribe'] ) ? sanitize_text_field( wp_unslash( $_POST['esfpx_es-subscribe'] ) ) : '';
152
 
153
+ if ( 'subscribe' === $es && ! empty( $es_subscribe ) && wp_verify_nonce( $es_subscribe, 'es-subscribe' ) ) {
154
 
155
+ $form_data = wp_unslash( $_POST );
156
  $validate_response = $this->validate_data( $form_data );
157
  if ( 'ERROR' === $validate_response['status'] ) {
158
 
173
  $first_name = '';
174
  $last_name = '';
175
  if ( ! empty( $name ) ) {
176
+ // Get First Name and Last Name from Name.
177
  $name_parts = ES_Common::prepare_first_name_last_name( $name );
178
  $first_name = $name_parts['first_name'];
179
  $last_name = $name_parts['last_name'];
lite/includes/classes/class-es-handle-sync-wp-user.php CHANGED
@@ -12,12 +12,13 @@ class ES_Handle_Sync_Wp_User {
12
 
13
  public function __construct() {
14
  // Sync upcoming WordPress users
15
- add_action( 'ig_es_sync_users_tabs_wordpress', array( $this, 'sync_wordpress_users_settings' ) );
16
 
17
  // add_action( 'user_register', array( $this, 'sync_registered_wp_user' ) );
18
  // add_action( 'delete_user', array( $this, 'delete_contact' ), 10, 1 );
19
  }
20
 
 
21
  public function sync_wordpress_users_settings( $wordpress_tab ) {
22
 
23
  if ( ! empty( $wordpress_tab['indicator_option'] ) ) {
@@ -110,6 +111,7 @@ class ES_Handle_Sync_Wp_User {
110
 
111
  <?php
112
  }
 
113
 
114
  /**
115
  * Sync/Add WP new user into ES
@@ -205,12 +207,17 @@ class ES_Handle_Sync_Wp_User {
205
 
206
  ?>
207
  <div class="wrap">
208
- <h2>
209
- <?php
210
- esc_html_e( 'Audience > Sync Contacts', 'email-subscribers' );
211
- ES_Common::prepare_main_header_navigation( $audience_tab_main_navigation );
212
- ?>
213
- </h2>
 
 
 
 
 
214
  <?php $this->sync_users_callback(); ?>
215
  </div>
216
 
12
 
13
  public function __construct() {
14
  // Sync upcoming WordPress users
15
+ // add_action( 'ig_es_sync_users_tabs_wordpress', array( $this, 'sync_wordpress_users_settings' ) );
16
 
17
  // add_action( 'user_register', array( $this, 'sync_registered_wp_user' ) );
18
  // add_action( 'delete_user', array( $this, 'delete_contact' ), 10, 1 );
19
  }
20
 
21
+ /*
22
  public function sync_wordpress_users_settings( $wordpress_tab ) {
23
 
24
  if ( ! empty( $wordpress_tab['indicator_option'] ) ) {
111
 
112
  <?php
113
  }
114
+ */
115
 
116
  /**
117
  * Sync/Add WP new user into ES
207
 
208
  ?>
209
  <div class="wrap">
210
+ <header class="wp-heading-inline">
211
+ <div class="mt-2">
212
+ <h2 class="text-2xl font-medium text-gray-900 sm:leading-9 sm:truncate">
213
+ <span class="text-base font-normal leading-7 text-indigo-600 sm:leading-9 sm:truncate"> <a href="admin.php?page=es_subscribers"><?php esc_html_e( 'Audience', 'email-subscribers' ); ?> </a> </span> <svg fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" stroke="currentColor" viewBox="0 0 24 24" class="w-4 h-4 mt-1 inline-block align-middle"><path d="M9 5l7 7-7 7"></path></svg> <?php esc_html_e( 'Sync Contacts', 'email-subscribers' ); ?>
214
+ <?php
215
+ ES_Common::prepare_main_header_navigation( $audience_tab_main_navigation );
216
+ ?>
217
+ </h2>
218
+ </div>
219
+ </header>
220
+
221
  <?php $this->sync_users_callback(); ?>
222
  </div>
223
 
lite/includes/classes/class-es-ig-redirect.php CHANGED
@@ -52,18 +52,18 @@ if ( ! class_exists( 'ES_IG_Redirect' ) ) {
52
  wp_safe_redirect( $redirect_url );
53
  exit;
54
  } else { ?>
55
- <div class="wrap" id="ig-es-container">
56
- <header class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 ">
57
  <div class="md:flex md:items-center md:justify-between">
58
  <div class="flex-1 min-w-0">
59
- <h2 class="text-2xl font-bold text-gray-900 sm:text-3xl sm:leading-9 sm:truncate">
60
  <?php echo wp_kses_post( $info ); ?>
61
  </h2>
62
  </div>
63
 
64
- <div class="mt-4 flex md:mt-0 md:ml-4">
65
  <span class="ml-3 shadow-sm rounded-md">
66
- <div id="ig-es-create-button" class="relative inline-block text-left">
67
  <div>
68
  <span class="rounded-md shadow-sm">
69
 
@@ -89,7 +89,7 @@ if ( ! class_exists( 'ES_IG_Redirect' ) ) {
89
 
90
  </header>
91
 
92
- <main class="max-w-7xl mx-auto sm:px-6 lg:px-8">
93
  <section class="md:flex md:items-start md:justify-between sm:px-4 py-2 my-4 sm:px-0 rounded-lg bg-white shadow sm:grid sm:grid-cols-3">
94
 
95
  <div class="flex min-w-0 mr-4 pl-1">
52
  wp_safe_redirect( $redirect_url );
53
  exit;
54
  } else { ?>
55
+ <div class="wrap font-sans pt-3" id="ig-es-container">
56
+ <header class="wp-heading-inline max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 ">
57
  <div class="md:flex md:items-center md:justify-between">
58
  <div class="flex-1 min-w-0">
59
+ <h2 class="text-3xl font-bold text-gray-700 sm:leading-9 sm:truncate pr-4 pb-1">
60
  <?php echo wp_kses_post( $info ); ?>
61
  </h2>
62
  </div>
63
 
64
+ <div class="flex md:ml-4">
65
  <span class="ml-3 shadow-sm rounded-md">
66
+ <div id="ig-es-create-button" class="relative inline-block text-left align-middle">
67
  <div>
68
  <span class="rounded-md shadow-sm">
69
 
89
 
90
  </header>
91
 
92
+ <main class="mt-8 max-w-7xl mx-auto sm:px-6 lg:px-8">
93
  <section class="md:flex md:items-start md:justify-between sm:px-4 py-2 my-4 sm:px-0 rounded-lg bg-white shadow sm:grid sm:grid-cols-3">
94
 
95
  <div class="flex min-w-0 mr-4 pl-1">
lite/includes/classes/class-es-import-subscribers.php CHANGED
@@ -25,218 +25,226 @@ class ES_Import_Subscribers {
25
  */
26
  public function import_callback() {
27
 
28
- require_once ABSPATH . 'wp-admin/includes/upgrade.php';
29
-
30
- $submit = ig_es_get_post_data( 'submit' );
31
- if ( $submit ) {
32
- $import_contacts_nonce = ig_es_get_post_data( 'import_contacts' );
33
- if ( ! isset( $_POST['import_contacts'] ) || ! wp_verify_nonce( sanitize_key( $import_contacts_nonce ), 'import-contacts' ) ) {
34
  $message = __( 'Sorry, you do not have permission to import contacts.', 'email-subscribers' );
35
  ES_Common::show_message( $message, 'error' );
36
- }
37
-
38
- if ( isset( $_FILES['file'] ) ) {
39
-
40
- $max_upload_size = $this->get_max_upload_size();
41
- if ( isset( $_FILES['file']['tmp_name'] ) && is_uploaded_file( sanitize_text_field( $_FILES['file']['tmp_name'] ) ) ) {
42
-
43
- $tmp_file = sanitize_text_field( $_FILES['file']['tmp_name'] );
44
- $file = isset( $_FILES['file']['name'] ) ? sanitize_text_field( $_FILES['file']['name'] ) : '';
45
-
46
- $ext = strtolower( substr( $file, strrpos( $file, '.' ), ( strlen( $file ) - strrpos( $file, '.' ) ) ) );
47
-
48
- if ( '.csv' == $ext ) {
49
- $file_size = isset( $_FILES['file']['size'] ) ? sanitize_text_field( $_FILES['file']['size'] ) : '';
50
-
51
- // Check if CSV file size is less than or equal to max upload size.
52
- if ( $file_size <= $max_upload_size ) {
53
- if ( ! ini_get( 'auto_detect_line_endings' ) ) {
54
- ini_set( 'auto_detect_line_endings', '1' );
55
- }
56
-
57
- $statuses = ES_Common::get_statuses_key_name_map();
58
- $es_email_status = ig_es_get_post_data( 'es_email_status' );
59
-
60
- $status = '';
61
- if ( in_array( $es_email_status, array_keys( $statuses ) ) ) {
62
- $status = $es_email_status;
63
- }
64
-
65
- if ( ! empty( $status ) ) {
66
-
67
- $lists = ES()->lists_db->get_id_name_map();
68
-
69
- $list_id = ig_es_get_post_data( 'list_id' );
70
-
71
- if ( ! in_array( $list_id, array_keys( $lists ) ) ) {
72
- $list_id = '';
73
- }
74
-
75
- if ( ! empty( $list_id ) ) {
76
-
77
- $delimiter = $this->get_delimiter( $tmp_file );
78
-
79
- $handle = fopen( $tmp_file, 'r' );
80
-
81
- // Get Headers
82
- $headers = array_map( 'trim', fgetcsv( $handle, 0, $delimiter ) );
83
-
84
- // Remove BOM characters from the first item.
85
- if ( isset( $headers[0] ) ) {
86
- $headers[0] = ig_es_remove_utf8_bom( $headers[0] );
87
  }
88
-
89
- $existing_contacts_email_id_map = ES()->contacts_db->get_email_id_map();
90
-
91
- $existing_contacts = array();
92
- if ( count( $existing_contacts_email_id_map ) > 0 ) {
93
- $existing_contacts = array_keys( $existing_contacts_email_id_map );
94
- $existing_contacts = array_map( 'strtolower', $existing_contacts );
95
  }
96
-
97
- $invalid_emails_count = 0;
98
- $imported_subscribers_count = 0;
99
- $existing_contacts_count = 0;
100
- $emails = array();
101
-
102
- $values = array();
103
- $place_holders = array();
104
- $contacts_data = array();
105
- $current_date_time = ig_get_current_date_time();
106
-
107
- $headers_column_count = count( $headers );
108
- while ( ( $data = fgetcsv( $handle, 0, $delimiter ) ) !== false ) {
109
-
110
- $data = array_map( 'trim', $data );
111
- $data_column_count = count( $data );
112
-
113
- // Verify if number of headers columns are equal to number of data columns.
114
- if ( $headers_column_count !== $data_column_count ) {
115
- $invalid_emails_count ++;
116
- continue;
117
  }
118
-
119
- $data = array_combine( $headers, $data );
120
-
121
- $email = isset( $data['Email'] ) ? strtolower( sanitize_email( trim( $data['Email'] ) ) ) : '';
122
-
123
- if ( empty( $email ) || ! filter_var( $email, FILTER_VALIDATE_EMAIL ) ) {
124
- $invalid_emails_count ++;
125
- continue;
126
- }
127
-
128
- if ( ! in_array( $email, $existing_contacts ) ) {
129
-
130
- // Convert emoji characters to equivalent HTML entities to avoid WordPress sanitization error in SQL query while bulk inserting contacts.
131
- $name = isset( $data['Name'] ) ? ES_Common::handle_emoji_characters( sanitize_text_field( trim( $data['Name'] ) ) ) : '';
132
- $first_name = isset( $data['First Name'] ) ? ES_Common::handle_emoji_characters( sanitize_text_field( trim( $data['First Name'] ) ) ) : '';
133
- $last_name = isset( $data['Last Name'] ) ? ES_Common::handle_emoji_characters( sanitize_text_field( trim( $data['Last Name'] ) ) ) : '';
134
-
135
- // If we don't get the first_name & last_name, consider Name field.
136
- // If name empty, get the name from Email
137
- if ( empty( $first_name ) && empty( $last_name ) ) {
138
-
139
- if ( empty( $name ) ) {
140
- $name = ES_Common::get_name_from_email( $email );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
141
  }
142
 
143
- $names = ES_Common::prepare_first_name_last_name( $name );
144
- $first_name = sanitize_text_field( $names['first_name'] );
145
- $last_name = sanitize_text_field( $names['last_name'] );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
146
  }
147
-
148
- $guid = ES_Common::generate_guid();
149
-
150
- $contacts_data[ $imported_subscribers_count ]['first_name'] = $first_name;
151
- $contacts_data[ $imported_subscribers_count ]['last_name'] = $last_name;
152
- $contacts_data[ $imported_subscribers_count ]['email'] = $email;
153
- $contacts_data[ $imported_subscribers_count ]['source'] = 'import';
154
- $contacts_data[ $imported_subscribers_count ]['status'] = 'verified';
155
- $contacts_data[ $imported_subscribers_count ]['hash'] = $guid;
156
- $contacts_data[ $imported_subscribers_count ]['created_at'] = $current_date_time;
157
-
158
- $existing_contacts[] = $email;
159
-
160
- $emails[] = $email;
161
-
162
- $imported_subscribers_count ++;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
163
  } else {
164
- $existing_contacts_count ++;
165
- }
166
- }
167
-
168
- $message = '';
169
- $response_status = 'error';
170
-
171
- if ( count( $emails ) > 0 ) {
172
-
173
- $response_status = 'success';
174
-
175
- ES()->contacts_db->bulk_insert( $contacts_data );
176
-
177
- $contact_ids = ES()->contacts_db->get_contact_ids_by_emails( $emails );
178
- if ( count( $contact_ids ) > 0 ) {
179
- ES()->lists_contacts_db->remove_contacts_from_lists( $contact_ids, $list_id );
180
- ES()->lists_contacts_db->do_import_contacts_into_list( $list_id, $contact_ids, $status, 1, $current_date_time );
181
  }
182
- /* translators: %s: Total imported contacts */
183
- $message = sprintf( __( 'Total %d contacts have been imported successfully!', 'email-subscribers' ), $imported_subscribers_count );
184
-
185
  }
186
-
187
- if ( $existing_contacts_count > 0 ) {
188
- $message .= ' ';
189
- /* translators: %s: Exisiting contacts count */
190
- $message .= sprintf( __( '%d contact(s) are already exists.', 'email-subscribers' ), $existing_contacts_count );
191
- }
192
-
193
- if ( $invalid_emails_count > 0 ) {
194
- $message .= ' ';
195
- /* translators: %s: Invalid contacts count */
196
- $message .= sprintf( __( '%d contact(s) are invalid.', 'email-subscribers' ), $invalid_emails_count );
197
- }
198
-
199
- fclose( $handle );
200
-
201
- ES_Common::show_message( $message, $response_status );
202
-
203
  } else {
204
- $message = __( 'Error: Please Select List', 'email-subscribers' );
 
205
  ES_Common::show_message( $message, 'error' );
206
  }
207
  } else {
208
- $message = __( 'Error: Please select status', 'email-subscribers' );
209
  ES_Common::show_message( $message, 'error' );
210
  }
211
  } else {
212
- /* translators: %s: Max upload file size */
213
- $message = sprintf( __( 'The file you are trying to upload is larger than %s. Please upload a smaller file.', 'email-subscribers' ), esc_html( size_format( $max_upload_size ) ) );
 
 
 
 
 
 
 
 
 
 
 
 
214
  ES_Common::show_message( $message, 'error' );
215
  }
216
- } else {
217
- $message = __( 'Error: Please Upload only CSV File', 'email-subscribers' );
218
- ES_Common::show_message( $message, 'error' );
219
- }
220
- } else {
221
- if ( ! empty( $_FILES['file']['error'] ) ) {
222
- switch ( $_FILES['file']['error'] ) {
223
- case 1: //uploaded file exceeds the upload_max_filesize directive in php.ini
224
- /* translators: %s: Max upload file size */
225
- $message = sprintf( __( 'The file you are trying to upload is larger than %s. Please upload a smaller file.', 'email-subscribers' ), esc_html( size_format( $max_upload_size ) ) );
226
- break;
227
- default: // a default error, just in case! :)
228
- $message = __( 'There was a problem with your upload.', 'email-subscribers' );
229
- break;
230
- }
231
  } else {
232
  $message = __( 'Error: Please Upload File', 'email-subscribers' );
 
233
  }
234
-
235
- ES_Common::show_message( $message, 'error' );
236
  }
237
- } else {
238
- $message = __( 'Error: Please Upload File', 'email-subscribers' );
239
- ES_Common::show_message( $message, 'error' );
240
  }
241
  }
242
 
@@ -250,8 +258,8 @@ class ES_Import_Subscribers {
250
  ?>
251
 
252
  <div class="tool-box">
253
- <div class="meta-box-sortables ui-sortable bg-white shadow-md ml-4 mt-6 rounded-lg">
254
- <form class="ml-5 mr-4 text-left pt-4 mt-2 item-center" method="post" name="form_addemail" id="form_addemail" action="#" enctype="multipart/form-data">
255
  <table class="max-w-full form-table">
256
  <tbody>
257
 
@@ -329,21 +337,20 @@ class ES_Import_Subscribers {
329
 
330
  ?>
331
 
332
- <div class="wrap max-w-full mt-1 font-sans">
333
- <header class="ml-4 wp-heading-inline">
334
-
335
- <div class="mt-2">
336
- <h2 class="text-2xl font-medium text-gray-800 sm:leading-9 sm:truncate">
337
  <span class="text-base font-normal leading-7 text-indigo-600 sm:leading-9 sm:truncate"> <a href="admin.php?page=es_subscribers"><?php esc_html_e( 'Audience', 'email-subscribers' ); ?> </a> </span> <svg fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" stroke="currentColor" viewBox="0 0 24 24" class="w-4 h-4 mt-1 inline-block align-middle"><path d="M9 5l7 7-7 7"></path></svg> <?php esc_html_e( 'Import Contacts', 'email-subscribers' ); ?>
 
 
 
338
  <?php
339
  ES_Common::prepare_main_header_navigation( $audience_tab_main_navigation );
340
  ?>
341
- </div>
342
- </h2>
343
-
344
- </header>
345
 
346
- <div class="ml-4"><hr class="wp-header-end"></div>
347
  <?php $this->import_callback(); ?>
348
  </div>
349
 
25
  */
26
  public function import_callback() {
27
 
28
+ // Check if nonce value is not empty.
29
+ if ( ! empty( $_POST['import_contacts'] ) ) {
30
+ // Verify nonce value.
31
+ if ( ! wp_verify_nonce( sanitize_text_field( $_POST['import_contacts'] ), 'import-contacts' ) ) {
 
 
32
  $message = __( 'Sorry, you do not have permission to import contacts.', 'email-subscribers' );
33
  ES_Common::show_message( $message, 'error' );
34
+ } else {
35
+ require_once ABSPATH . 'wp-admin/includes/upgrade.php';
36
+
37
+ $submit = ig_es_get_data( $_POST, 'submit', '', true );
38
+ if ( $submit ) {
39
+
40
+ if ( isset( $_FILES['file'] ) ) {
41
+
42
+ $max_upload_size = $this->get_max_upload_size();
43
+ if ( isset( $_FILES['file']['tmp_name'] ) && is_uploaded_file( sanitize_text_field( $_FILES['file']['tmp_name'] ) ) ) {
44
+
45
+ $tmp_file = sanitize_text_field( $_FILES['file']['tmp_name'] );
46
+ $file = isset( $_FILES['file']['name'] ) ? sanitize_text_field( $_FILES['file']['name'] ) : '';
47
+
48
+ $ext = strtolower( substr( $file, strrpos( $file, '.' ), ( strlen( $file ) - strrpos( $file, '.' ) ) ) );
49
+
50
+ if ( '.csv' == $ext ) {
51
+ $file_size = isset( $_FILES['file']['size'] ) ? sanitize_text_field( $_FILES['file']['size'] ) : '';
52
+
53
+ // Check if CSV file size is less than or equal to max upload size.
54
+ if ( $file_size <= $max_upload_size ) {
55
+ if ( ! ini_get( 'auto_detect_line_endings' ) ) {
56
+ ini_set( 'auto_detect_line_endings', '1' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
57
  }
58
+
59
+ $statuses = ES_Common::get_statuses_key_name_map();
60
+ $es_email_status = ig_es_get_data( $_POST, 'es_email_status', '', true );
61
+
62
+ $status = '';
63
+ if ( in_array( $es_email_status, array_keys( $statuses ) ) ) {
64
+ $status = $es_email_status;
65
  }
66
+
67
+ if ( ! empty( $status ) ) {
68
+
69
+ $lists = ES()->lists_db->get_id_name_map();
70
+ $list_id = ig_es_get_data( $_POST, 'list_id', '', true );
71
+
72
+ if ( ! in_array( $list_id, array_keys( $lists ) ) ) {
73
+ $list_id = '';
 
 
 
 
 
 
 
 
 
 
 
 
 
74
  }
75
+
76
+ if ( ! empty( $list_id ) ) {
77
+
78
+ $delimiter = $this->get_delimiter( $tmp_file );
79
+
80
+ $handle = fopen( $tmp_file, 'r' );
81
+
82
+ // Get Headers.
83
+ $headers = array_map( 'trim', fgetcsv( $handle, 0, $delimiter ) );
84
+
85
+ // Remove BOM characters from the first item.
86
+ if ( isset( $headers[0] ) ) {
87
+ $headers[0] = ig_es_remove_utf8_bom( $headers[0] );
88
+ }
89
+
90
+ $existing_contacts_email_id_map = ES()->contacts_db->get_email_id_map();
91
+
92
+ $existing_contacts = array();
93
+ if ( count( $existing_contacts_email_id_map ) > 0 ) {
94
+ $existing_contacts = array_keys( $existing_contacts_email_id_map );
95
+ $existing_contacts = array_map( 'strtolower', $existing_contacts );
96
+ }
97
+
98
+ $invalid_emails_count = 0;
99
+ $imported_subscribers_count = 0;
100
+ $existing_contacts_count = 0;
101
+ $emails = array();
102
+
103
+ $values = array();
104
+ $place_holders = array();
105
+ $contacts_data = array();
106
+ $current_date_time = ig_get_current_date_time();
107
+
108
+ $headers_column_count = count( $headers );
109
+ $use_mb = function_exists( 'mb_convert_encoding' );
110
+ while ( ( $data = fgetcsv( $handle, 0, $delimiter ) ) !== false ) {
111
+
112
+ $data = array_map( 'trim', $data );
113
+ $data_column_count = count( $data );
114
+
115
+ // Verify if number of headers columns are equal to number of data columns.
116
+ if ( $headers_column_count !== $data_column_count ) {
117
+ $invalid_emails_count ++;
118
+ continue;
119
+ }
120
+
121
+ foreach ( $data as $data_index => $data_value ) {
122
+ $data[ $data_index ] = ig_es_covert_to_utf8_encoding( $data_value, $use_mb );
123
  }
124
 
125
+ $data = array_combine( $headers, $data );
126
+
127
+ $email = isset( $data['Email'] ) ? strtolower( sanitize_email( trim( $data['Email'] ) ) ) : '';
128
+
129
+ if ( empty( $email ) || ! filter_var( $email, FILTER_VALIDATE_EMAIL ) ) {
130
+ $invalid_emails_count ++;
131
+ continue;
132
+ }
133
+
134
+ if ( ! in_array( $email, $existing_contacts ) ) {
135
+
136
+ // Convert emoji characters to equivalent HTML entities to avoid WordPress sanitization error in SQL query while bulk inserting contacts.
137
+ $name = isset( $data['Name'] ) ? ES_Common::handle_emoji_characters( sanitize_text_field( trim( $data['Name'] ) ) ) : '';
138
+ $first_name = isset( $data['First Name'] ) ? ES_Common::handle_emoji_characters( sanitize_text_field( trim( $data['First Name'] ) ) ) : '';
139
+ $last_name = isset( $data['Last Name'] ) ? ES_Common::handle_emoji_characters( sanitize_text_field( trim( $data['Last Name'] ) ) ) : '';
140
+
141
+ // If we don't get the first_name & last_name, consider Name field.
142
+ // If name empty, get the name from Email.
143
+ if ( empty( $first_name ) && empty( $last_name ) ) {
144
+
145
+ if ( empty( $name ) ) {
146
+ $name = ES_Common::get_name_from_email( $email );
147
+ }
148
+
149
+ $names = ES_Common::prepare_first_name_last_name( $name );
150
+ $first_name = sanitize_text_field( $names['first_name'] );
151
+ $last_name = sanitize_text_field( $names['last_name'] );
152
+ }
153
+
154
+ $guid = ES_Common::generate_guid();
155
+
156
+ $contacts_data[ $imported_subscribers_count ]['first_name'] = $first_name;
157
+ $contacts_data[ $imported_subscribers_count ]['last_name'] = $last_name;
158
+ $contacts_data[ $imported_subscribers_count ]['email'] = $email;
159
+ $contacts_data[ $imported_subscribers_count ]['source'] = 'import';
160
+ $contacts_data[ $imported_subscribers_count ]['status'] = 'verified';
161
+ $contacts_data[ $imported_subscribers_count ]['hash'] = $guid;
162
+ $contacts_data[ $imported_subscribers_count ]['created_at'] = $current_date_time;
163
+
164
+ $existing_contacts[] = $email;
165
+
166
+ $emails[] = $email;
167
+
168
+ $imported_subscribers_count ++;
169
+ } else {
170
+ $existing_contacts_count ++;
171
+ }
172
  }
173
+
174
+ $message = '';
175
+ $response_status = 'error';
176
+
177
+ if ( count( $emails ) > 0 ) {
178
+
179
+ $response_status = 'success';
180
+
181
+ ES()->contacts_db->bulk_insert( $contacts_data );
182
+
183
+ $contact_ids = ES()->contacts_db->get_contact_ids_by_emails( $emails );
184
+ if ( count( $contact_ids ) > 0 ) {
185
+ ES()->lists_contacts_db->remove_contacts_from_lists( $contact_ids, $list_id );
186
+ ES()->lists_contacts_db->do_import_contacts_into_list( $list_id, $contact_ids, $status, 1, $current_date_time );
187
+ }
188
+ /* translators: %s: Total imported contacts */
189
+ $message = sprintf( __( 'Total %d contacts have been imported successfully!', 'email-subscribers' ), $imported_subscribers_count );
190
+
191
+ }
192
+
193
+ if ( $existing_contacts_count > 0 ) {
194
+ $message .= ' ';
195
+ /* translators: %s: Exisiting contacts count */
196
+ $message .= sprintf( __( '%d contact(s) are already exists.', 'email-subscribers' ), $existing_contacts_count );
197
+ }
198
+
199
+ if ( $invalid_emails_count > 0 ) {
200
+ $message .= ' ';
201
+ /* translators: %s: Invalid contacts count */
202
+ $message .= sprintf( __( '%d contact(s) are invalid.', 'email-subscribers' ), $invalid_emails_count );
203
+ }
204
+
205
+ fclose( $handle );
206
+
207
+ ES_Common::show_message( $message, $response_status );
208
+
209
  } else {
210
+ $message = __( 'Error: Please Select List', 'email-subscribers' );
211
+ ES_Common::show_message( $message, 'error' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
212
  }
213
+ } else {
214
+ $message = __( 'Error: Please select status', 'email-subscribers' );
215
+ ES_Common::show_message( $message, 'error' );
216
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
217
  } else {
218
+ /* translators: %s: Max upload file size */
219
+ $message = sprintf( __( 'The file you are trying to upload is larger than %s. Please upload a smaller file.', 'email-subscribers' ), esc_html( size_format( $max_upload_size ) ) );
220
  ES_Common::show_message( $message, 'error' );
221
  }
222
  } else {
223
+ $message = __( 'Error: Please Upload only CSV File', 'email-subscribers' );
224
  ES_Common::show_message( $message, 'error' );
225
  }
226
  } else {
227
+ if ( ! empty( $_FILES['file']['error'] ) ) {
228
+ switch ( $_FILES['file']['error'] ) {
229
+ case 1: //uploaded file exceeds the upload_max_filesize directive in php.ini
230
+ /* translators: %s: Max upload file size */
231
+ $message = sprintf( __( 'The file you are trying to upload is larger than %s. Please upload a smaller file.', 'email-subscribers' ), esc_html( size_format( $max_upload_size ) ) );
232
+ break;
233
+ default: // a default error, just in case! :)
234
+ $message = __( 'There was a problem with your upload.', 'email-subscribers' );
235
+ break;
236
+ }
237
+ } else {
238
+ $message = __( 'Error: Please Upload File', 'email-subscribers' );
239
+ }
240
+
241
  ES_Common::show_message( $message, 'error' );
242
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
243
  } else {
244
  $message = __( 'Error: Please Upload File', 'email-subscribers' );
245
+ ES_Common::show_message( $message, 'error' );
246
  }
 
 
247
  }
 
 
 
248
  }
249
  }
250
 
258
  ?>
259
 
260
  <div class="tool-box">
261
+ <div class="meta-box-sortables ui-sortable bg-white shadow-md mt-6 rounded-lg">
262
+ <form class="ml-7 mr-4 text-left pt-4 mt-2 item-center" method="post" name="form_addemail" id="form_addemail" action="#" enctype="multipart/form-data">
263
  <table class="max-w-full form-table">
264
  <tbody>
265
 
337
 
338
  ?>
339
 
340
+ <div class="flex">
341
+ <div>
342
+ <h2 class="text-2xl font-medium text-gray-800 sm:leading-9 sm:truncate pr-4">
 
 
343
  <span class="text-base font-normal leading-7 text-indigo-600 sm:leading-9 sm:truncate"> <a href="admin.php?page=es_subscribers"><?php esc_html_e( 'Audience', 'email-subscribers' ); ?> </a> </span> <svg fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" stroke="currentColor" viewBox="0 0 24 24" class="w-4 h-4 mt-1 inline-block align-middle"><path d="M9 5l7 7-7 7"></path></svg> <?php esc_html_e( 'Import Contacts', 'email-subscribers' ); ?>
344
+ </h2>
345
+ </div>
346
+ <div class="mt-1">
347
  <?php
348
  ES_Common::prepare_main_header_navigation( $audience_tab_main_navigation );
349
  ?>
350
+ </div>
351
+ </div>
 
 
352
 
353
+ <div><hr class="wp-header-end"></div>
354
  <?php $this->import_callback(); ?>
355
  </div>
356
 
lite/includes/classes/class-es-lists-table.php CHANGED
@@ -67,7 +67,7 @@ class ES_Lists_Table extends WP_List_Table {
67
  $action = ig_es_get_request_data( 'action' );
68
 
69
  ?>
70
- <div class="wrap">
71
  <?php
72
  if ( 'new' === $action ) {
73
  $this->es_new_lists_callback();
@@ -77,26 +77,32 @@ class ES_Lists_Table extends WP_List_Table {
77
  } else {
78
  ?>
79
 
80
- <h1 class=" wp-heading-inline "><span class="text-base font-normal leading-7 text-indigo-600 sm:leading-9 sm:truncate"><a href="admin.php?page=es_subscribers"><?php esc_html_e( 'Audience', 'email-subscribers' ); ?> </a>
81
- </span> <svg fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" stroke="currentColor" viewBox="0 0 24 24" class="w-4 h-4 mt-1 inline-block align-middle"><path d="M9 5l7 7-7 7"></path></svg><span class="text-2xl font-medium leading-7 text-gray-900 sm:leading-9 sm:truncate"> <?php esc_html_e('Lists', 'email-subscribers'); ?></span> <a href="admin.php?page=es_lists&action=new" class="pt-2 ig-es-title-button px-2 py-2 mx-2"><?php esc_html_e('Add New', 'email-subscribers'); ?></a></h1>
82
- <br>
83
-
84
- <div id="poststuff" class="es-items-lists es-lists-table">
85
- <div id="post-body" class="metabox-holder column-1">
86
- <div id="post-body-content">
87
- <div class="meta-box-sortables ui-sortable">
88
- <form method="post">
89
- <?php
90
- $this->prepare_items();
91
- $this->display();
92
- ?>
93
- </form>
94
- </div>
95
- </div>
 
 
 
 
96
  </div>
97
- <br class="clear">
98
  </div>
99
  </div>
 
 
 
100
  <?php
101
  }
102
  }
@@ -247,7 +253,7 @@ class ES_Lists_Table extends WP_List_Table {
247
 
248
  ?>
249
 
250
- <div class="wrap max-w-full mt-8 font-sans">
251
  <header class="wp-heading-inline">
252
  <div class="md:flex md:items-center md:justify-between justify-center">
253
  <div class="flex-1 min-w-0">
@@ -286,7 +292,7 @@ class ES_Lists_Table extends WP_List_Table {
286
  <div class="ml-16 mb-4 h-10 mr-4 mt-4">
287
  <div class="h-10 relative">
288
 
289
- <input class="form-input block border-gray-400 w-full pl-3 pr-12 focus:bg-gray-100 sm:text-sm sm:leading-5" placeholder="Enter list name" id="name" name="list_name" value="<?php echo esc_attr( $list_name ); ?>"/>
290
  </div>
291
  </div>
292
  </div>
@@ -471,7 +477,8 @@ class ES_Lists_Table extends WP_List_Table {
471
  break;
472
 
473
  case 'export':
474
- return "<a href='admin.php?page=download_report&report=users&status=select_list&list_id={$item['id']}'><svg fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24' class='w-8 h-8 text-indigo-600 hover:text-indigo-500 active:text-indigo-600'><path d='M12 10v6m0 0l-3-3m3 3l3-3m2 8H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z'></path></svg></a>";
 
475
  break;
476
 
477
  default:
@@ -599,7 +606,7 @@ class ES_Lists_Table extends WP_List_Table {
599
  $this->process_bulk_action();
600
  $this->search_box( ig_es_get_request_data( 's' ), 'list-search-input' );
601
 
602
- $per_page = $this->get_items_per_page( self::$option_per_page, 10 );
603
  $current_page = $this->get_pagenum();
604
  $total_items = $this->get_lists( 0, 0, true );
605
 
67
  $action = ig_es_get_request_data( 'action' );
68
 
69
  ?>
70
+ <div class="wrap pt-3 font-sans">
71
  <?php
72
  if ( 'new' === $action ) {
73
  $this->es_new_lists_callback();
77
  } else {
78
  ?>
79
 
80
+ <div class="flex">
81
+ <div>
82
+ <h2 class="text-2xl font-medium text-gray-800 sm:leading-9 sm:truncate pr-4">
83
+ <span class="text-base font-normal leading-7 text-indigo-600 sm:leading-9 sm:truncate"> <a href="admin.php?page=es_subscribers"><?php esc_html_e( 'Audience', 'email-subscribers' ); ?> </a> </span> <svg fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" stroke="currentColor" viewBox="0 0 24 24" class="w-4 h-4 mt-1 inline-block align-middle"><path d="M9 5l7 7-7 7"></path></svg> <?php esc_html_e( 'Lists', 'email-subscribers' ); ?>
84
+ </h2>
85
+ </div>
86
+ <div class="mt-1"> <a href="admin.php?page=es_lists&action=new" class="ig-es-title-button ml-2"><?php esc_html_e('Add New', 'email-subscribers'); ?></a>
87
+ </div>
88
+ </div>
89
+ <div id="poststuff" class="es-items-lists es-lists-table">
90
+ <div id="post-body" class="metabox-holder column-1">
91
+ <div id="post-body-content">
92
+ <div class="meta-box-sortables ui-sortable">
93
+ <form method="get">
94
+ <input type="hidden" name="page" value="es_lists" />
95
+ <?php
96
+ $this->prepare_items();
97
+ $this->display();
98
+ ?>
99
+ </form>
100
  </div>
 
101
  </div>
102
  </div>
103
+ <br class="clear">
104
+ </div>
105
+ </div>
106
  <?php
107
  }
108
  }
253
 
254
  ?>
255
 
256
+ <div class="max-w-full mt-8 font-sans">
257
  <header class="wp-heading-inline">
258
  <div class="md:flex md:items-center md:justify-between justify-center">
259
  <div class="flex-1 min-w-0">
292
  <div class="ml-16 mb-4 h-10 mr-4 mt-4">
293
  <div class="h-10 relative">
294
 
295
+ <input class="form-input block border-gray-400 w-full pl-3 pr-12 focus:bg-gray-100 sm:text-sm sm:leading-5" placeholder="<?php echo esc_html__( 'Enter list name', 'email-subscribers' ); ?>" id="name" name="list_name" value="<?php echo esc_attr( $list_name ); ?>"/>
296
  </div>
297
  </div>
298
  </div>
477
  break;
478
 
479
  case 'export':
480
+ $export_nonce = wp_create_nonce( 'ig-es-subscriber-export-nonce' );
481
+ return "<a href='admin.php?page=download_report&report=users&status=select_list&list_id={$item['id']}&export-nonce={$export_nonce}'><svg fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24' class='w-8 h-8 text-indigo-600 hover:text-indigo-500 active:text-indigo-600'><path d='M12 10v6m0 0l-3-3m3 3l3-3m2 8H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z'></path></svg></a>";
482
  break;
483
 
484
  default:
606
  $this->process_bulk_action();
607
  $this->search_box( ig_es_get_request_data( 's' ), 'list-search-input' );
608
 
609
+ $per_page = $this->get_items_per_page( self::$option_per_page, 25 );
610
  $current_page = $this->get_pagenum();
611
  $total_items = $this->get_lists( 0, 0, true );
612
 
lite/includes/classes/class-es-mailer.php CHANGED
@@ -493,7 +493,7 @@ if ( ! class_exists( 'ES_Mailer' ) ) {
493
  }
494
 
495
  if ( empty( $subject ) ) {
496
- $subject = $this->get_test_email_subject();
497
  }
498
 
499
  if ( empty( $content ) ) {
@@ -571,15 +571,17 @@ if ( ! class_exists( 'ES_Mailer' ) ) {
571
 
572
  $sender_data = array();
573
  $campaign_type = '';
574
- if ( ! empty( $campaign_id ) ) {
575
  $campaign = ES()->campaigns_db->get( $campaign_id );
576
  if ( ! empty( $campaign ) ) {
577
  $campaign_type = $campaign['type'];
578
  if ( 'newsletter' === $campaign_type ) {
579
- $from_name = ! empty( $campaign['from_name'] ) ? $campaign['from_name'] : '';
580
- $from_email = ! empty( $campaign['from_email'] ) ? $campaign['from_email'] : '';
581
- $sender_data['from_name'] = $from_name;
582
- $sender_data['from_email'] = $from_email;
 
 
583
  }
584
  }
585
  }
@@ -686,8 +688,9 @@ if ( ! class_exists( 'ES_Mailer' ) ) {
686
  $sender_email = '';
687
  // If sender data is passed .i.g. set in the campaign then use it.
688
  if ( ! empty( $sender_data ) ) {
689
- $sender_name = ! empty( $sender_data['from_name'] ) ? $sender_data['from_name'] : '';
690
- $sender_email = ! empty( $sender_data['from_email'] ) ? $sender_data['from_email'] : '';
 
691
  }
692
 
693
  // If sender name is not passed then fetch it from ES settings.
@@ -700,6 +703,7 @@ if ( ! class_exists( 'ES_Mailer' ) ) {
700
  $sender_email = $this->get_from_email();
701
  }
702
 
 
703
  if ( empty( $reply_to_email ) ) {
704
  $reply_to_email = $this->get_from_email();
705
  }
493
  }
494
 
495
  if ( empty( $subject ) ) {
496
+ $subject = $this->get_test_email_subject( $email );
497
  }
498
 
499
  if ( empty( $content ) ) {
571
 
572
  $sender_data = array();
573
  $campaign_type = '';
574
+ if ( ! empty( $campaign_id ) ) {
575
  $campaign = ES()->campaigns_db->get( $campaign_id );
576
  if ( ! empty( $campaign ) ) {
577
  $campaign_type = $campaign['type'];
578
  if ( 'newsletter' === $campaign_type ) {
579
+ $from_name = ! empty( $campaign['from_name'] ) ? $campaign['from_name'] : '';
580
+ $from_email = ! empty( $campaign['from_email'] ) ? $campaign['from_email'] : '';
581
+ $reply_to_email = ! empty( $campaign['reply_to_email'] ) ? $campaign['reply_to_email']: '';
582
+ $sender_data['from_name'] = $from_name;
583
+ $sender_data['from_email'] = $from_email;
584
+ $sender_data['reply_to_email'] = $reply_to_email;
585
  }
586
  }
587
  }
688
  $sender_email = '';
689
  // If sender data is passed .i.g. set in the campaign then use it.
690
  if ( ! empty( $sender_data ) ) {
691
+ $sender_name = ! empty( $sender_data['from_name'] ) ? $sender_data['from_name'] : '';
692
+ $sender_email = ! empty( $sender_data['from_email'] ) ? $sender_data['from_email']: '';
693
+ $reply_to_email = ! empty( $sender_data['reply_to_email'] ) ? $sender_data['reply_to_email'] : '';
694
  }
695
 
696
  // If sender name is not passed then fetch it from ES settings.
703
  $sender_email = $this->get_from_email();
704
  }
705
 
706
+ // If reply to email is not passed the fetch it from ES settings.
707
  if ( empty( $reply_to_email ) ) {
708
  $reply_to_email = $this->get_from_email();
709
  }
lite/includes/classes/class-es-newsletters.php CHANGED
@@ -58,36 +58,44 @@ class ES_Newsletters {
58
  public function process_broadcast_submission() {
59
 
60
  global $wpdb;
 
61
  $submitted = ig_es_get_request_data( 'ig_es_broadcast_submitted' );
62
  $broadcast_data = ig_es_get_request_data( 'broadcast_data', array(), false );
63
-
64
  if ( 'submitted' === $submitted ) {
65
- $list_id = ! empty( $broadcast_data['list_ids'] ) ? $broadcast_data['list_ids'] : '';
66
- $template_id = ! empty( $broadcast_data['template_id'] ) ? $broadcast_data['template_id'] : '';
67
- $subject = ! empty( $broadcast_data['subject'] ) ? $broadcast_data['subject'] : '';
68
-
69
- // Check if user has added required data for creating broadcast.
70
- if ( ! empty( $broadcast_data['subject'] ) && ! empty( $broadcast_data['body'] ) && ! empty( $list_id ) && ! empty( $subject ) ) {
71
- $broadcast_data['base_template_id'] = $template_id;
72
- $broadcast_data['list_ids'] = $list_id;
73
- $broadcast_data['status'] = IG_ES_CAMPAIGN_STATUS_SCHEDULED;
74
- $meta = ! empty( $broadcast_data['meta'] ) ? $broadcast_data['meta'] : array();
75
- $meta['scheduling_option'] = ! empty( $broadcast_data['scheduling_option'] ) ? $broadcast_data['scheduling_option'] : 'schedule_now';
76
- $meta['es_schedule_date'] = ! empty( $broadcast_data['es_schedule_date'] ) ? $broadcast_data['es_schedule_date'] : '';
77
- $meta['es_schedule_time'] = ! empty( $broadcast_data['es_schedule_time'] ) ? $broadcast_data['es_schedule_time'] : '';
78
- $meta['pre_header'] = ! empty( $broadcast_data['pre_header'] ) ? $broadcast_data['pre_header'] : '';
79
- $broadcast_data['meta'] = maybe_serialize( $meta );
80
-
81
- self::es_send_email_callback( $broadcast_data );
82
-
83
- if ( 'schedule_now' === $meta['scheduling_option'] ) {
84
- ES()->init_action_scheduler_queue_runner( 'ig_es_trigger_broadcast_processing' );
85
- }
 
 
 
86
 
87
- $campaign_url = admin_url( 'admin.php?page=es_campaigns&action=broadcast_created' );
88
 
89
- wp_safe_redirect( $campaign_url );
90
- exit();
 
 
 
 
91
  }
92
  }
93
  }
@@ -116,7 +124,6 @@ class ES_Newsletters {
116
  'type' => 'error',
117
  );
118
  } elseif ( empty( $broadcast_data['body'] ) ) {
119
- // if ( empty( $template_id) ) {
120
  $message = __( 'Please add message body or select template', 'email-subscribers' );
121
  $message_data = array(
122
  'message' => $message,
@@ -140,7 +147,7 @@ class ES_Newsletters {
140
  if ( ! empty( $broadcast_id ) ) {
141
 
142
  $broadcast_query = $wpdb->prepare( ' id = %d LIMIT 0, 1', $broadcast_id );
143
- $broadcasts = ES()->campaigns_db->get_by_conditions( $broadcast_query);
144
 
145
  $broadcast = array_shift( $broadcasts );
146
  $broadcast_data = array(
@@ -155,7 +162,6 @@ class ES_Newsletters {
155
  'template_id' => $broadcast['base_template_id'],
156
  'status' => $broadcast['status'],
157
  'meta' => maybe_unserialize( $broadcast['meta'] ),
158
-
159
  );
160
  }
161
 
@@ -216,9 +222,11 @@ class ES_Newsletters {
216
  }
217
  }
218
 
 
219
  $select_list_attr = ES()->is_pro() ? 'multiple="multiple"' : '';
220
  $select_list_name = ES()->is_pro() ? 'broadcast_data[list_ids][]' : 'broadcast_data[list_ids]';
221
  $select_list_class = ES()->is_pro() ? 'ig-es-form-multiselect' : 'form-select';
 
222
  $allowedtags = ig_es_allowed_html_tags_in_esc();
223
  ?>
224
 
@@ -233,6 +241,7 @@ class ES_Newsletters {
233
  <form action="#" method="POST" id="broadcast_form">
234
  <input type="hidden" id="broadcast_id" name="broadcast_data[id]" value="<?php echo esc_attr( $broadcast_id ); ?>"/>
235
  <input type="hidden" id="broadcast_status" name="broadcast_data[status]" value="<?php echo esc_attr( $broadcast_status ); ?>"/>
 
236
  <fieldset class="block es_fieldset">
237
  <div class="mx-auto wp-heading-inline max-w-7xl">
238
  <header class="mx-auto max-w-7xl">
@@ -267,9 +276,8 @@ class ES_Newsletters {
267
  <div id="broadcast_button" class="inline-block text-left ">
268
  <button type="button"
269
  class="inline-flex justify-center w-full py-2 text-sm font-medium leading-5 text-indigo-600 transition duration-150 ease-in-out border border-indigo-500 rounded-md cursor-pointer select-none next_btn hover:text-indigo-500 hover:shadow-md focus:outline-none focus:shadow-outline-indigo focus:shadow-lg hover:border-indigo-600 md:px-2 lg:px-3 xl:px-4">
270
- <?php
271
- echo esc_html__( 'Next',
272
- 'email-subscribers' );
273
  ?>
274
  <svg fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 20 20" class="w-3 h-3 my-1 ml-2 -mr-1 text-indigo-600">
275
  <path d="M9 5l7 7-7 7"></path>
58
  public function process_broadcast_submission() {
59
 
60
  global $wpdb;
61
+
62
  $submitted = ig_es_get_request_data( 'ig_es_broadcast_submitted' );
63
  $broadcast_data = ig_es_get_request_data( 'broadcast_data', array(), false );
64
+
65
  if ( 'submitted' === $submitted ) {
66
+ $broadcast_nonce = ig_es_get_request_data( 'ig_es_broadcast_nonce' );
67
+ // Verify nonce.
68
+ if ( wp_verify_nonce( $broadcast_nonce, 'ig-es-broadcast-nonce' ) ) {
69
+ $list_id = ! empty( $broadcast_data['list_ids'] ) ? $broadcast_data['list_ids'] : '';
70
+ $template_id = ! empty( $broadcast_data['template_id'] ) ? $broadcast_data['template_id'] : '';
71
+ $subject = ! empty( $broadcast_data['subject'] ) ? $broadcast_data['subject'] : '';
72
+
73
+ // Check if user has added required data for creating broadcast.
74
+ if ( ! empty( $broadcast_data['subject'] ) && ! empty( $broadcast_data['body'] ) && ! empty( $list_id ) && ! empty( $subject ) ) {
75
+ $broadcast_data['base_template_id'] = $template_id;
76
+ $broadcast_data['list_ids'] = $list_id;
77
+ $broadcast_data['status'] = IG_ES_CAMPAIGN_STATUS_SCHEDULED;
78
+ $meta = ! empty( $broadcast_data['meta'] ) ? $broadcast_data['meta'] : array();
79
+ $meta['scheduling_option'] = ! empty( $broadcast_data['scheduling_option'] ) ? $broadcast_data['scheduling_option'] : 'schedule_now';
80
+ $meta['es_schedule_date'] = ! empty( $broadcast_data['es_schedule_date'] ) ? $broadcast_data['es_schedule_date'] : '';
81
+ $meta['es_schedule_time'] = ! empty( $broadcast_data['es_schedule_time'] ) ? $broadcast_data['es_schedule_time'] : '';
82
+ $meta['pre_header'] = ! empty( $broadcast_data['pre_header'] ) ? $broadcast_data['pre_header'] : '';
83
+ $broadcast_data['meta'] = maybe_serialize( $meta );
84
+
85
+ self::es_send_email_callback( $broadcast_data );
86
+
87
+ if ( 'schedule_now' === $meta['scheduling_option'] ) {
88
+ ES()->init_action_scheduler_queue_runner( 'ig_es_trigger_broadcast_processing' );
89
+ }
90
 
91
+ $campaign_url = admin_url( 'admin.php?page=es_campaigns&action=broadcast_created' );
92
 
93
+ wp_safe_redirect( $campaign_url );
94
+ exit();
95
+ }
96
+ } else {
97
+ $message = __( 'Sorry, you are not allowed to add/edit broadcast.', 'email-subscribers' );
98
+ ES_Common::show_message( $message, 'error' );
99
  }
100
  }
101
  }
124
  'type' => 'error',
125
  );
126
  } elseif ( empty( $broadcast_data['body'] ) ) {
 
127
  $message = __( 'Please add message body or select template', 'email-subscribers' );
128
  $message_data = array(
129
  'message' => $message,
147
  if ( ! empty( $broadcast_id ) ) {
148
 
149
  $broadcast_query = $wpdb->prepare( ' id = %d LIMIT 0, 1', $broadcast_id );
150
+ $broadcasts = ES()->campaigns_db->get_by_conditions( $broadcast_query );
151
 
152
  $broadcast = array_shift( $broadcasts );
153
  $broadcast_data = array(
162
  'template_id' => $broadcast['base_template_id'],
163
  'status' => $broadcast['status'],
164
  'meta' => maybe_unserialize( $broadcast['meta'] ),
 
165
  );
166
  }
167
 
222
  }
223
  }
224
 
225
+ // Allow multiselect for lists field in the pro version by changing list field's class,name and adding multiple attribute.
226
  $select_list_attr = ES()->is_pro() ? 'multiple="multiple"' : '';
227
  $select_list_name = ES()->is_pro() ? 'broadcast_data[list_ids][]' : 'broadcast_data[list_ids]';
228
  $select_list_class = ES()->is_pro() ? 'ig-es-form-multiselect' : 'form-select';
229
+
230
  $allowedtags = ig_es_allowed_html_tags_in_esc();
231
  ?>
232
 
241
  <form action="#" method="POST" id="broadcast_form">
242
  <input type="hidden" id="broadcast_id" name="broadcast_data[id]" value="<?php echo esc_attr( $broadcast_id ); ?>"/>
243
  <input type="hidden" id="broadcast_status" name="broadcast_data[status]" value="<?php echo esc_attr( $broadcast_status ); ?>"/>
244
+ <?php wp_nonce_field( 'ig-es-broadcast-nonce', 'ig_es_broadcast_nonce' ); ?>
245
  <fieldset class="block es_fieldset">
246
  <div class="mx-auto wp-heading-inline max-w-7xl">
247
  <header class="mx-auto max-w-7xl">
276
  <div id="broadcast_button" class="inline-block text-left ">
277
  <button type="button"
278
  class="inline-flex justify-center w-full py-2 text-sm font-medium leading-5 text-indigo-600 transition duration-150 ease-in-out border border-indigo-500 rounded-md cursor-pointer select-none next_btn hover:text-indigo-500 hover:shadow-md focus:outline-none focus:shadow-outline-indigo focus:shadow-lg hover:border-indigo-600 md:px-2 lg:px-3 xl:px-4">
279
+ <?php
280
+ echo esc_html__( 'Next', 'email-subscribers' );
 
281
  ?>
282
  <svg fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 20 20" class="w-3 h-3 my-1 ml-2 -mr-1 text-indigo-600">
283
  <path d="M9 5l7 7-7 7"></path>
lite/includes/classes/class-es-post-notifications.php CHANGED
@@ -18,7 +18,7 @@ class ES_Post_Notifications_Table {
18
  $action = ig_es_get_request_data( 'action' );
19
 
20
  ?>
21
- <div class="wrap">
22
  <?php
23
 
24
  if ( 'edit' === $action ) {
@@ -28,7 +28,7 @@ class ES_Post_Notifications_Table {
28
  $this->es_newnotification_callback();
29
  }
30
  ?>
31
- </div>
32
  <?php
33
  }
34
 
@@ -37,54 +37,62 @@ class ES_Post_Notifications_Table {
37
  $submitted = ig_es_get_request_data( 'submitted' );
38
  if ( 'submitted' === $submitted ) {
39
 
40
- $list_id = ig_es_get_request_data( 'list_id' );
41
- $template_id = ig_es_get_request_data( 'template_id' );
42
- $cat = ig_es_get_request_data( 'es_note_cat' );
43
- $es_note_cat_parent = ig_es_get_request_data( 'es_note_cat_parent' );
44
- $cat = ( ! empty( $es_note_cat_parent ) && '{a}All{a}' == $es_note_cat_parent ) ? array( $es_note_cat_parent ) : $cat;
45
-
46
- if ( empty( $list_id ) ) {
47
- $message = __( 'Please select list.', 'email-subscribers' );
48
- ES_Common::show_message( $message, 'error' );
49
- $this->prepare_post_notification_form();
50
-
51
- return;
52
- }
53
-
54
- if ( empty( $cat ) ) {
55
- $message = __( 'Please select categories.', 'email-subscribers' );
56
- ES_Common::show_message( $message, 'error' );
57
- $this->prepare_post_notification_form();
58
-
59
- return;
60
- }
61
-
62
- $type = 'post_notification';
63
- $title = get_the_title( $template_id );
64
-
65
- $data = array(
66
- 'categories' => ES_Common::convert_categories_array_to_string( $cat ),
67
- 'list_ids' => $list_id,
68
- 'base_template_id' => $template_id,
69
- 'status' => 1,
70
- 'type' => $type,
71
- 'name' => $title,
72
- 'slug' => sanitize_title( $title ),
73
- );
74
-
75
- $data = apply_filters( 'ig_es_post_notification_data', $data );
76
- if ( empty( $data['base_template_id'] ) ) {
77
- $message = __( 'Please select template.', 'email-subscribers' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
78
  ES_Common::show_message( $message, 'error' );
79
- $this->prepare_post_notification_form();
80
-
81
- return;
82
  }
83
- $this->save_list( $data );
84
- $type = ucwords( str_replace( '_', ' ', $data['type'] ) );
85
- /* translators: %s: Campaign Type */
86
- $message = sprintf( __( '%s has been added successfully!', 'email-subscribers' ), $type );
87
- ES_Common::show_message( $message, 'success' );
88
  }
89
 
90
  $this->prepare_post_notification_form();
@@ -176,55 +184,64 @@ class ES_Post_Notifications_Table {
176
 
177
  $notification_query = $wpdb->prepare( ' id = %d LIMIT 0, 1', $id );
178
  $notifications = ES()->campaigns_db->get_by_conditions( $notification_query );
 
179
 
180
  $submitted = ig_es_get_request_data( 'submitted' );
181
  if ( 'submitted' === $submitted ) {
182
- $categories = ig_es_get_request_data( 'es_note_cat', array() );
183
-
184
- // all categories selected
185
- $parent_category_option = ig_es_get_request_data( 'es_note_cat_parent' );
186
- if ( '{a}All{a}' === $parent_category_option ) {
187
- array_unshift( $categories, $parent_category_option );
188
- }
189
-
190
- $data = array(
191
- 'categories' => ES_Common::convert_categories_array_to_string( $categories ),
192
- 'list_ids' => ig_es_get_request_data( 'list_id' ),
193
- 'base_template_id' => ig_es_get_request_data( 'template_id' ),
194
- 'status' => ig_es_get_request_data( 'status' ),
195
- );
196
-
197
- $title = '';
198
- if ( ! empty( $data['base_template_id'] ) ) {
199
- $title = get_the_title( $data['base_template_id'] );
200
- }
201
- $data['name'] = $title;
202
-
203
- $data = apply_filters( 'ig_es_post_notification_data', $data );
204
- $data['type'] = ! empty( $data['type'] ) ? $data['type'] : 'post_notification';
205
- //check tempalte id
206
- if ( empty( $data['base_template_id'] ) ) {
207
- $message = __( 'Please select template.', 'email-subscribers' );
208
- ES_Common::show_message( $message, 'error' );
209
- $this->prepare_post_notification_form( $id, $data );
210
-
211
- return;
212
- }
213
- // check categories
214
- if ( empty( $categories ) ) {
215
- $message = __( 'Please select Categories.', 'email-subscribers' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
216
  ES_Common::show_message( $message, 'error' );
217
- $this->prepare_post_notification_form( $id, $data );
218
-
219
- return;
220
  }
221
- $this->save_list( $data, $id );
222
-
223
- $data['categories'] = ES_Common::convert_categories_string_to_array( $data['categories'], true );
224
- $type = ucwords( str_replace( '_', ' ', $data['type'] ) );
225
- /* translators: %s: Campaign type */
226
- $message = sprintf( __( '%s has been updated successfully!', 'email-subscribers' ), $type );
227
- ES_Common::show_message( $message, 'success' );
228
  } else {
229
 
230
  $notification = array_shift( $notifications );
@@ -267,155 +284,155 @@ class ES_Post_Notifications_Table {
267
  $allowedtags = ig_es_allowed_html_tags_in_esc();
268
  ?>
269
 
270
- <div class="wrap max-w-full mt-1 font-sans">
271
- <header class="wp-heading-inline">
272
- <div class="sm:grid sm:grid-cols lg:grid lg:grid-cols-2 max-w-full">
273
- <div class="mt-2">
274
- <h2 class="text-2xl font-medium mt-2 text-gray-900 sm:leading-9 sm:truncate">
275
- <span class="text-base font-normal leading-7 text-indigo-600 sm:leading-9 sm:truncate"> <a href="admin.php?page=es_campaigns"><?php esc_html_e( 'Campaigns ', 'email-subscribers' ); ?></a></span>
276
- <svg fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" stroke="currentColor" viewBox="0 0 24 24" class="w-4 h-4 inline-block align-middle">
277
- <path d="M9 5l7 7-7 7"></path>
278
- </svg>
279
 
280
  <?php echo esc_html( $heading ); ?>
281
- </h2>
282
- </div>
283
- <div class="py-2 md:mt-0">
284
- <div class="flex flex-row sm:justify-start md:justify-end mt-2">
285
- <div>
286
  <?php if ( 'edit' === $action ) { ?>
287
- <a href="admin.php?page=es_notifications&action=new" class="ig-es-title-button px-4 py-2 mx-2"><?php esc_html_e( 'Add New', 'email-subscribers' ); ?></a>
288
  <?php } ?>
289
- <a href="edit.php?post_type=es_template" class="ig-es-imp-button px-4 py-2"><?php esc_html_e( 'Manage Templates', 'email-subscribers' ); ?></a>
290
- </div>
291
- </div>
292
- </div>
293
- </div>
294
- </header>
295
- <div class="">
296
- <hr class="wp-header-end">
297
- </div>
298
-
299
- <div class="bg-white shadow-md rounded-lg">
300
- <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 esc_attr( $action ); ?>&list=<?php echo esc_attr( $id ); ?>&_wpnonce=<?php echo esc_attr( $nonce ); ?>">
301
-
302
- <table class="max-w-full form-table">
303
- <tbody>
304
 
305
  <?php do_action( 'es_before_post_notification_settings', $id ); ?>
306
 
307
- <tr class="border-b border-gray-100">
308
- <th scope="row" class="w-3/12 pt-3 pb-8 text-left">
309
- <label for="tag-link"><span class="block ml-6 pr-4 text-sm font-medium text-gray-600 pb-2">
310
  <?php esc_html_e( 'Select List', 'email-subscribers' ); ?></span>
311
- <p class="italic text-xs font-normal text-gray-400 mt-2 ml-6 leading-snug"><?php esc_html_e( 'Contacts from the selected list will be notified about new post notification.', 'email-subscribers' ); ?></p></label>
312
- </th>
313
- <td class="w-9/12 pb-3 ">
314
- <div class="flex">
315
- <div class="w-2/4 inline-flex ml-12 relative">
316
- <select <?php echo esc_attr( $select_list_attr ); ?> class="absolute shadow-sm border border-gray-400 w-2/3 <?php echo esc_attr( $select_list_class ); ?>" name="<?php echo esc_attr( $select_list_name ); ?>" id="ig_es_post_notification_list_ids">
317
  <?php
318
  $lists_dropdown = ES_Common::prepare_list_dropdown_options( $list_id );
319
  echo wp_kses( $lists_dropdown, $allowedtags );
320
  ?>
321
- </select>
322
- </div>
323
 
324
  <?php do_action( 'ig_es_add_multilist_options' ); ?>
325
- </div>
326
- </td>
327
- </tr>
328
- <tr class="border-b border-gray-100">
329
- <th scope="row" class="w-3/12 pt-3 pb-8 text-left">
330
- <label for="tag-link"><span class="block ml-6 pr-4 text-sm font-medium text-gray-600 pb-2">
331
  <?php esc_html_e( 'Select template', 'email-subscribers' ); ?></span>
332
- <p class="italic text-xs font-normal text-gray-400 mt-2 ml-6 leading-snug"><?php esc_html_e( 'Content of the selected template will be sent out as post notification.', 'email-subscribers' ); ?></p>
333
- </label>
334
- </th>
335
- <td class="w-9/12 pb-3">
336
- <select class="relative form-select shadow-sm border border-gray-400 w-1/3 ml-12" name="template_id" id="base_template_id">
337
  <?php
338
  $templates = ES_Common::prepare_templates_dropdown_options( 'post_notification', $template_id );
339
  echo wp_kses( $templates, $allowedtags );
340
  ?>
341
- </select>
342
- <div class="es-preview" style="float: right;width: 25%;">
343
- <div class="es-templ-img"></div>
344
- </div>
345
- </td>
346
- </tr>
347
  <?php do_action( 'es_after_post_notification_template', $id ); ?>
348
  <?php if ( ! $is_new ) { ?>
349
- <tr class="border-b border-gray-100">
350
- <th scope="row" class="w-3/12 pt-3 pb-8 text-left">
351
- <label for="tag-link"><span class="block ml-6 pr-4 pt-2 text-sm font-medium text-gray-600 pb-2">
352
  <?php esc_html_e( 'Select Status', 'email-subscribers' ); ?>
353
- </label>
354
- </th>
355
- <td class="w-9/12 py-3">
356
- <label for="status" class="ml-12 inline-flex items-center cursor-pointer"><span class="relative">
357
  <input id="status" type="checkbox" class="absolute es-check-toggle opacity-0 w-0 h-0"
358
- name="status" value="1" <?php checked( $status, '1' ); ?> />
359
 
360
  <span class="es-mail-toggle-line inline-block w-10 h-6 bg-gray-300 rounded-full shadow-inner"></span>
361
  <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>
362
  </span></label>
363
- </td>
364
- </tr>
365
  <?php } ?>
366
- <tr class="border-b border-gray-100">
367
- <th scope="row" class="pt-3 pb-8 w-3/12 text-left">
368
- <label for="tag-link"><span class="block ml-6 pr-4 text-sm font-medium text-gray-600 pb-2"><?php esc_html_e( 'Select Post Category', 'email-subscribers' ); ?></span>
369
- <p class="italic text-xs font-normal text-gray-400 mt-2 ml-6 leading-snug"><?php esc_html_e( 'Notification will be sent out when any post from selected categories will be published.', 'email-subscribers' ); ?></p></label>
370
- </th>
371
- <td class="pt-3 w-9/12" style="vertical-align: top;">
372
- <table border="0" cellspacing="0" class="ml-4 pt-3">
373
- <tbody>
374
  <?php
375
  $categories_lists = ES_Common::prepare_categories_html( $cat );
376
  echo wp_kses( $categories_lists, $allowedtags );
377
  ?>
378
- </tbody>
379
- </table>
380
- </td>
381
- </tr>
382
- <tr class="border-b border-gray-100">
383
- <th scope="row" class="pt-3 pb-8 w-3/12 text-left">
384
- <label for="tag-link"><span class="block ml-6 pr-4 text-sm font-medium text-gray-600 pb-2">
385
  <?php esc_html_e( 'Select custom post type(s)', 'email-subscribers' ); ?></span>
386
- <p class="italic text-xs font-normal text-gray-400 mt-2 ml-6 leading-snug"><?php esc_html_e( '(Optional) Select custom post type for which you want to send notification.', 'email-subscribers' ); ?></p></label>
387
 
388
- </th>
389
- <td class="w-9/12 pt-3 pb-8">
390
- <table border="0" cellspacing="0">
391
- <tbody>
392
  <?php
393
  $custom_post_type = '';
394
  $custom_post_type_list = ES_Common::prepare_custom_post_type_checkbox( $cat );
395
  echo wp_kses( $custom_post_type_list, $allowedtags );
396
  ?>
397
- </tbody>
398
- </table>
399
- </td>
400
- </tr>
401
  <?php do_action( 'es_after_post_notification_settings', $id ); ?>
402
- <tr>
403
- <td><input type="hidden" name="submitted" value="submitted"></td>
404
- </tr>
405
- </tbody>
406
- </table>
407
- <div>
408
  <?php
409
  $submit_button_text = $is_new ? __( 'Save Campaign', 'email-subscribers' ) : __( 'Save Changes', 'email-subscribers' );
410
  ?>
411
- <p class="submit"><input type="submit" name="submit" id="ig_es_campaign_post_notification_submit_button" class="cursor-pointer align-middle ig-es-primary-button px-4 py-2 ml-6 mr-2" value="<?php echo esc_attr( $submit_button_text ); ?>"/>
412
- <a href="admin.php?page=es_campaigns" class="cursor-pointer align-middle rounded-md border border-indigo-600 hover:shadow-md focus:outline-none focus:shadow-outline-indigo text-sm leading-5 font-medium transition ease-in-out duration-150 px-4 my-2 py-2 mx-2 "><?php esc_html_e( 'Cancel', 'email-subscribers' ); ?></a></p>
413
- </div>
414
 
415
- </form>
416
 
417
- </div>
418
- </div>
419
 
420
  <?php
421
 
@@ -437,11 +454,11 @@ class ES_Post_Notifications_Table {
437
 
438
  public function search_box( $text, $input_id ) {
439
  ?>
440
- <p class="search-box">
441
- <label class="screen-reader-text" for="<?php echo esc_attr( $input_id ); ?>"><?php echo esc_html( $text ); ?>:</label>
442
- <input type="search" id="<?php echo esc_attr( $input_id ); ?>" name="s" value="<?php _admin_search_query(); ?>"/>
443
  <?php submit_button( 'Search Notifications', 'button', false, false, array( 'id' => 'search-submit' ) ); ?>
444
- </p>
445
  <?php
446
  }
447
 
18
  $action = ig_es_get_request_data( 'action' );
19
 
20
  ?>
21
+ <div class="wrap font-sans">
22
  <?php
23
 
24
  if ( 'edit' === $action ) {
28
  $this->es_newnotification_callback();
29
  }
30
  ?>
31
+ </div>
32
  <?php
33
  }
34
 
37
  $submitted = ig_es_get_request_data( 'submitted' );
38
  if ( 'submitted' === $submitted ) {
39
 
40
+ // Get nonce field value.
41
+ $nonce = ig_es_get_request_data( '_wpnonce' );
42
+ // Verify nonce.
43
+ if ( wp_verify_nonce( $nonce, 'es_post_notification' ) ) {
44
+ $list_id = ig_es_get_request_data( 'list_id' );
45
+ $template_id = ig_es_get_request_data( 'template_id' );
46
+ $cat = ig_es_get_request_data( 'es_note_cat' );
47
+ $es_note_cat_parent = ig_es_get_request_data( 'es_note_cat_parent' );
48
+ $cat = ( ! empty( $es_note_cat_parent ) && '{a}All{a}' == $es_note_cat_parent ) ? array( $es_note_cat_parent ) : $cat;
49
+
50
+ if ( empty( $list_id ) ) {
51
+ $message = __( 'Please select list.', 'email-subscribers' );
52
+ ES_Common::show_message( $message, 'error' );
53
+ $this->prepare_post_notification_form();
54
+
55
+ return;
56
+ }
57
+
58
+ if ( empty( $cat ) ) {
59
+ $message = __( 'Please select categories.', 'email-subscribers' );
60
+ ES_Common::show_message( $message, 'error' );
61
+ $this->prepare_post_notification_form();
62
+
63
+ return;
64
+ }
65
+
66
+ $type = 'post_notification';
67
+ $title = get_the_title( $template_id );
68
+
69
+ $data = array(
70
+ 'categories' => ES_Common::convert_categories_array_to_string( $cat ),
71
+ 'list_ids' => $list_id,
72
+ 'base_template_id' => $template_id,
73
+ 'status' => 1,
74
+ 'type' => $type,
75
+ 'name' => $title,
76
+ 'slug' => sanitize_title( $title ),
77
+ );
78
+
79
+ $data = apply_filters( 'ig_es_post_notification_data', $data );
80
+ if ( empty( $data['base_template_id'] ) ) {
81
+ $message = __( 'Please select template.', 'email-subscribers' );
82
+ ES_Common::show_message( $message, 'error' );
83
+ $this->prepare_post_notification_form();
84
+
85
+ return;
86
+ }
87
+ $this->save_list( $data );
88
+ $type = ucwords( str_replace( '_', ' ', $data['type'] ) );
89
+ /* translators: %s: Campaign Type */
90
+ $message = sprintf( __( '%s has been added successfully!', 'email-subscribers' ), $type );
91
+ ES_Common::show_message( $message, 'success' );
92
+ } else {
93
+ $message = __( 'Sorry, you are not allowed to add post notification.', 'email-subscribers' );
94
  ES_Common::show_message( $message, 'error' );
 
 
 
95
  }
 
 
 
 
 
96
  }
97
 
98
  $this->prepare_post_notification_form();
184
 
185
  $notification_query = $wpdb->prepare( ' id = %d LIMIT 0, 1', $id );
186
  $notifications = ES()->campaigns_db->get_by_conditions( $notification_query );
187
+ $data = array();
188
 
189
  $submitted = ig_es_get_request_data( 'submitted' );
190
  if ( 'submitted' === $submitted ) {
191
+ // Get nonce field value.
192
+ $nonce = ig_es_get_request_data( '_wpnonce' );
193
+ // Verify nonce.
194
+ if ( wp_verify_nonce( $nonce, 'es_post_notification' ) ) {
195
+ $categories = ig_es_get_request_data( 'es_note_cat', array() );
196
+
197
+ // all categories selected
198
+ $parent_category_option = ig_es_get_request_data( 'es_note_cat_parent' );
199
+ if ( '{a}All{a}' === $parent_category_option ) {
200
+ array_unshift( $categories, $parent_category_option );
201
+ }
202
+
203
+ $data = array(
204
+ 'categories' => ES_Common::convert_categories_array_to_string( $categories ),
205
+ 'list_ids' => ig_es_get_request_data( 'list_id' ),
206
+ 'base_template_id' => ig_es_get_request_data( 'template_id' ),
207
+ 'status' => ig_es_get_request_data( 'status' ),
208
+ );
209
+
210
+ $title = '';
211
+ if ( ! empty( $data['base_template_id'] ) ) {
212
+ $title = get_the_title( $data['base_template_id'] );
213
+ }
214
+ $data['name'] = $title;
215
+
216
+ $data = apply_filters( 'ig_es_post_notification_data', $data );
217
+ $data['type'] = ! empty( $data['type'] ) ? $data['type'] : 'post_notification';
218
+ //check tempalte id
219
+ if ( empty( $data['base_template_id'] ) ) {
220
+ $message = __( 'Please select template.', 'email-subscribers' );
221
+ ES_Common::show_message( $message, 'error' );
222
+ $this->prepare_post_notification_form( $id, $data );
223
+
224
+ return;
225
+ }
226
+ // check categories
227
+ if ( empty( $categories ) ) {
228
+ $message = __( 'Please select Categories.', 'email-subscribers' );
229
+ ES_Common::show_message( $message, 'error' );
230
+ $this->prepare_post_notification_form( $id, $data );
231
+
232
+ return;
233
+ }
234
+ $this->save_list( $data, $id );
235
+
236
+ $data['categories'] = ES_Common::convert_categories_string_to_array( $data['categories'], true );
237
+ $type = ucwords( str_replace( '_', ' ', $data['type'] ) );
238
+ /* translators: %s: Campaign type */
239
+ $message = sprintf( __( '%s has been updated successfully!', 'email-subscribers' ), $type );
240
+ ES_Common::show_message( $message, 'success' );
241
+ } else {
242
+ $message = __( 'Sorry, you are not allowed to update post notification.', 'email-subscribers' );
243
  ES_Common::show_message( $message, 'error' );
 
 
 
244
  }
 
 
 
 
 
 
 
245
  } else {
246
 
247
  $notification = array_shift( $notifications );
284
  $allowedtags = ig_es_allowed_html_tags_in_esc();
285
  ?>
286
 
287
+ <div class="max-w-full mt-1 font-sans">
288
+ <header class="wp-heading-inline">
289
+ <div class="sm:grid sm:grid-cols lg:grid lg:grid-cols-2 max-w-full">
290
+ <div class="mt-2">
291
+ <h2 class="text-2xl font-medium mt-2 text-gray-900 sm:leading-9 sm:truncate">
292
+ <span class="text-base font-normal leading-7 text-indigo-600 sm:leading-9 sm:truncate"> <a href="admin.php?page=es_campaigns"><?php esc_html_e( 'Campaigns ', 'email-subscribers' ); ?></a></span>
293
+ <svg fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" stroke="currentColor" viewBox="0 0 24 24" class="w-4 h-4 inline-block align-middle">
294
+ <path d="M9 5l7 7-7 7"></path>
295
+ </svg>
296
 
297
  <?php echo esc_html( $heading ); ?>
298
+ </h2>
299
+ </div>
300
+ <div class="py-2 md:mt-0">
301
+ <div class="flex flex-row sm:justify-start md:justify-end mt-2">
302
+ <div>
303
  <?php if ( 'edit' === $action ) { ?>
304
+ <a href="admin.php?page=es_notifications&action=new" class="ig-es-title-button px-4 py-2 mx-2"><?php esc_html_e( 'Add New', 'email-subscribers' ); ?></a>
305
  <?php } ?>
306
+ <a href="edit.php?post_type=es_template" class="ig-es-imp-button px-4 py-2"><?php esc_html_e( 'Manage Templates', 'email-subscribers' ); ?></a>
307
+ </div>
308
+ </div>
309
+ </div>
310
+ </div>
311
+ </header>
312
+ <div class="">
313
+ <hr class="wp-header-end">
314
+ </div>
315
+
316
+ <div class="bg-white shadow-md rounded-lg">
317
+ <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 esc_attr( $action ); ?>&list=<?php echo esc_attr( $id ); ?>&_wpnonce=<?php echo esc_attr( $nonce ); ?>">
318
+
319
+ <table class="max-w-full form-table">
320
+ <tbody>
321
 
322
  <?php do_action( 'es_before_post_notification_settings', $id ); ?>
323
 
324
+ <tr class="border-b border-gray-100">
325
+ <th scope="row" class="w-3/12 pt-3 pb-8 text-left">
326
+ <label for="tag-link"><span class="block ml-6 pr-4 text-sm font-medium text-gray-600 pb-2">
327
  <?php esc_html_e( 'Select List', 'email-subscribers' ); ?></span>
328
+ <p class="italic text-xs font-normal text-gray-400 mt-2 ml-6 leading-snug"><?php esc_html_e( 'Contacts from the selected list will be notified about new post notification.', 'email-subscribers' ); ?></p></label>
329
+ </th>
330
+ <td class="w-9/12 pb-3 ">
331
+ <div class="flex">
332
+ <div class="w-2/4 inline-flex ml-12 relative">
333
+ <select <?php echo esc_attr( $select_list_attr ); ?> class="absolute shadow-sm border border-gray-400 w-2/3 <?php echo esc_attr( $select_list_class ); ?>" name="<?php echo esc_attr( $select_list_name ); ?>" id="ig_es_post_notification_list_ids">
334
  <?php
335
  $lists_dropdown = ES_Common::prepare_list_dropdown_options( $list_id );
336
  echo wp_kses( $lists_dropdown, $allowedtags );
337
  ?>
338
+ </select>
339
+ </div>
340
 
341
  <?php do_action( 'ig_es_add_multilist_options' ); ?>
342
+ </div>
343
+ </td>
344
+ </tr>
345
+ <tr class="border-b border-gray-100">
346
+ <th scope="row" class="w-3/12 pt-3 pb-8 text-left">
347
+ <label for="tag-link"><span class="block ml-6 pr-4 text-sm font-medium text-gray-600 pb-2">
348
  <?php esc_html_e( 'Select template', 'email-subscribers' ); ?></span>
349
+ <p class="italic text-xs font-normal text-gray-400 mt-2 ml-6 leading-snug"><?php esc_html_e( 'Content of the selected template will be sent out as post notification.', 'email-subscribers' ); ?></p>
350
+ </label>
351
+ </th>
352
+ <td class="w-9/12 pb-3">
353
+ <select class="relative form-select shadow-sm border border-gray-400 w-1/3 ml-12" name="template_id" id="base_template_id">
354
  <?php
355
  $templates = ES_Common::prepare_templates_dropdown_options( 'post_notification', $template_id );
356
  echo wp_kses( $templates, $allowedtags );
357
  ?>
358
+ </select>
359
+ <div class="es-preview" style="float: right;width: 25%;">
360
+ <div class="es-templ-img"></div>
361
+ </div>
362
+ </td>
363
+ </tr>
364
  <?php do_action( 'es_after_post_notification_template', $id ); ?>
365
  <?php if ( ! $is_new ) { ?>
366
+ <tr class="border-b border-gray-100">
367
+ <th scope="row" class="w-3/12 pt-3 pb-8 text-left">
368
+ <label for="tag-link"><span class="block ml-6 pr-4 pt-2 text-sm font-medium text-gray-600 pb-2">
369
  <?php esc_html_e( 'Select Status', 'email-subscribers' ); ?>
370
+ </label>
371
+ </th>
372
+ <td class="w-9/12 py-3">
373
+ <label for="status" class="ml-12 inline-flex items-center cursor-pointer"><span class="relative">
374
  <input id="status" type="checkbox" class="absolute es-check-toggle opacity-0 w-0 h-0"
375
+ name="status" value="1" <?php checked( $status, '1' ); ?> />
376
 
377
  <span class="es-mail-toggle-line inline-block w-10 h-6 bg-gray-300 rounded-full shadow-inner"></span>
378
  <span class="es-mail-toggle-dot absolute transition-all duration-300 ease-in-out block w-4 h-4 mt-1 ml-1 bg-white rounded-full shadow inset-y-0 left-0 focus-within:shadow-outline"></span>
379
  </span></label>
380
+ </td>
381
+ </tr>
382
  <?php } ?>
383
+ <tr class="border-b border-gray-100">
384
+ <th scope="row" class="pt-3 pb-8 w-3/12 text-left">
385
+ <label for="tag-link"><span class="block ml-6 pr-4 text-sm font-medium text-gray-600 pb-2"><?php esc_html_e( 'Select Post Category', 'email-subscribers' ); ?></span>
386
+ <p class="italic text-xs font-normal text-gray-400 mt-2 ml-6 leading-snug"><?php esc_html_e( 'Notification will be sent out when any post from selected categories will be published.', 'email-subscribers' ); ?></p></label>
387
+ </th>
388
+ <td class="pt-3 w-9/12" style="vertical-align: top;">
389
+ <table border="0" cellspacing="0" class="ml-4 pt-3">
390
+ <tbody>
391
  <?php
392
  $categories_lists = ES_Common::prepare_categories_html( $cat );
393
  echo wp_kses( $categories_lists, $allowedtags );
394
  ?>
395
+ </tbody>
396
+ </table>
397
+ </td>
398
+ </tr>
399
+ <tr class="border-b border-gray-100">
400
+ <th scope="row" class="pt-3 pb-8 w-3/12 text-left">
401
+ <label for="tag-link"><span class="block ml-6 pr-4 text-sm font-medium text-gray-600 pb-2">
402
  <?php esc_html_e( 'Select custom post type(s)', 'email-subscribers' ); ?></span>
403
+ <p class="italic text-xs font-normal text-gray-400 mt-2 ml-6 leading-snug"><?php esc_html_e( '(Optional) Select custom post type for which you want to send notification.', 'email-subscribers' ); ?></p></label>
404
 
405
+ </th>
406
+ <td class="w-9/12 pt-3 pb-8">
407
+ <table border="0" cellspacing="0">
408
+ <tbody>
409
  <?php
410
  $custom_post_type = '';
411
  $custom_post_type_list = ES_Common::prepare_custom_post_type_checkbox( $cat );
412
  echo wp_kses( $custom_post_type_list, $allowedtags );
413
  ?>
414
+ </tbody>
415
+ </table>
416
+ </td>
417
+ </tr>
418
  <?php do_action( 'es_after_post_notification_settings', $id ); ?>
419
+ <tr>
420
+ <td><input type="hidden" name="submitted" value="submitted"></td>
421
+ </tr>
422
+ </tbody>
423
+ </table>
424
+ <div>
425
  <?php
426
  $submit_button_text = $is_new ? __( 'Save Campaign', 'email-subscribers' ) : __( 'Save Changes', 'email-subscribers' );
427
  ?>
428
+ <p class="submit"><input type="submit" name="submit" id="ig_es_campaign_post_notification_submit_button" class="cursor-pointer align-middle ig-es-primary-button px-4 py-2 ml-6 mr-2" value="<?php echo esc_attr( $submit_button_text ); ?>"/>
429
+ <a href="admin.php?page=es_campaigns" class="cursor-pointer align-middle rounded-md border border-indigo-600 hover:shadow-md focus:outline-none focus:shadow-outline-indigo text-sm leading-5 font-medium transition ease-in-out duration-150 px-4 my-2 py-2 mx-2 "><?php esc_html_e( 'Cancel', 'email-subscribers' ); ?></a></p>
430
+ </div>
431
 
432
+ </form>
433
 
434
+ </div>
435
+ </div>
436
 
437
  <?php
438
 
454
 
455
  public function search_box( $text, $input_id ) {
456
  ?>
457
+ <p class="search-box">
458
+ <label class="screen-reader-text" for="<?php echo esc_attr( $input_id ); ?>"><?php echo esc_html( $text ); ?>:</label>
459
+ <input type="search" id="<?php echo esc_attr( $input_id ); ?>" name="s" value="<?php _admin_search_query(); ?>"/>
460
  <?php submit_button( 'Search Notifications', 'button', false, false, array( 'id' => 'search-submit' ) ); ?>
461
+ </p>
462
  <?php
463
  }
464
 
lite/includes/classes/class-es-reports-table.php CHANGED
@@ -52,31 +52,41 @@ class ES_Reports_Table extends WP_List_Table {
52
  $this->view_list( $list );
53
  } else {
54
  ?>
55
- <div class="wrap">
56
- <h1 class="wp-heading-inline"><span class="text-2xl font-medium leading-7 text-gray-900 sm:leading-9 sm:truncate"><?php esc_html_e( 'Reports', 'email-subscribers' ); ?></span></h1>
57
- <?php
58
- $emails_to_be_sent = ES_DB_Sending_Queue::get_total_emails_to_be_sent();
59
- if ( $emails_to_be_sent > 0 ) {
60
- $cron_url = ES()->cron->url( true );
61
- /* translators: %s: Cron url */
62
- $content = sprintf( __( "<a href='%s' class='px-4 py-2 ig-es-imp-button'>Send Queued Emails Now</a>", 'email-subscribers' ), $cron_url );
63
- } else {
64
- $content = sprintf( __( "<span class='ig-es-send-queue-emails button-disabled'>Send Queued Emails Now</span>", 'email-subscribers' ) );
65
- $content .= sprintf( __( "<br /><span class='es-helper'>No emails found in queue</span>", 'email-subscribers' ) );
66
- }
67
- ?>
68
-
69
- <span class="ig-es-process-queue"><?php echo wp_kses_post( $content ); ?></span>
70
-
71
-
72
- <div id="poststuff" class="es-items-lists">
 
 
 
 
 
 
 
 
 
73
  <div id="post-body" class="metabox-holder column-1">
74
  <div id="post-body-content">
75
  <div class="meta-box-sortables ui-sortable">
76
- <form method="post">
 
77
  <?php
78
  $this->prepare_items();
79
- $this->display();
80
  ?>
81
  </form>
82
  </div>
52
  $this->view_list( $list );
53
  } else {
54
  ?>
55
+ <div class="wrap pt-3 font-sans">
56
+ <header class="wp-heading-inline">
57
+ <div class="flex">
58
+ <div class="flex-1 min-w-0">
59
+ <h2 class="text-3xl font-bold leading-9 text-gray-700 sm:truncate"><?php esc_html_e( 'Reports', 'email-subscribers' ); ?>
60
+ </h2>
61
+ </div>
62
+ <?php
63
+ $emails_to_be_sent = ES_DB_Sending_Queue::get_total_emails_to_be_sent();
64
+ if ( $emails_to_be_sent > 0 ) {
65
+ $cron_url = ES()->cron->url( true );
66
+ /* translators: %s: Cron url */
67
+ $content = sprintf( __( "<a href='%s' class='px-3 py-2 ig-es-imp-button'>Send Queued Emails Now</a>", 'email-subscribers' ), $cron_url );
68
+ } else {
69
+ $content = sprintf( __( "<span class='ig-es-send-queue-emails px-3 button-disabled'>Send Queued Emails Now</span>", 'email-subscribers' ) );
70
+ $content .= sprintf( __( "<br /><span class='es-helper pl-6'>No emails found in queue</span>", 'email-subscribers' ) );
71
+ }
72
+ ?>
73
+ <div class="flex flex-row">
74
+ <div>
75
+ <span class="ig-es-process-queue"><?php echo wp_kses_post( $content ); ?></span>
76
+ </div>
77
+ </div>
78
+ </div>
79
+ </header>
80
+ <div><hr class="wp-header-end"></div>
81
+ <div id="poststuff" class="es-items-lists mt-3">
82
  <div id="post-body" class="metabox-holder column-1">
83
  <div id="post-body-content">
84
  <div class="meta-box-sortables ui-sortable">
85
+ <form method="get">
86
+ <input type="hidden" name="page" value="es_reports" />
87
  <?php
88
  $this->prepare_items();
89
+ $this->display();
90
  ?>
91
  </form>
92
  </div>
lite/includes/classes/class-es-templates-table.php CHANGED
@@ -98,11 +98,15 @@ class ES_Templates_Table {
98
  return;
99
  }
100
 
101
- $es_template_type = ig_es_get_post_data( 'es_template_type' );
102
 
103
- if ( ! empty( $es_template_type ) ) {
104
- update_post_meta( $post_id, 'es_template_type', $es_template_type );
 
 
 
105
  }
 
106
  }
107
 
108
 
@@ -127,7 +131,7 @@ class ES_Templates_Table {
127
  if ( 'es_template' == $screen->post_type ) {
128
  ?>
129
  <script type="text/javascript">
130
- jQuery('<a href="admin.php?page=es_campaigns" class="text-sm rounded-md border border-indigo-600 px-2 py-2 leading-5 font-medium mx-2 hover:border-indigo-500 hover:bg-gray-100">Campaigns</a>').insertBefore(".wp-header-end");
131
  </script>
132
  <?php
133
  }
98
  return;
99
  }
100
 
101
+ if ( ! empty( $_POST['_wpnonce'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['_wpnonce'] ) ), 'update-post_' . $post_id ) ) {
102
 
103
+ $es_template_type = ig_es_get_data( $_POST, 'es_template_type', '', true );
104
+
105
+ if ( ! empty( $es_template_type ) ) {
106
+ update_post_meta( $post_id, 'es_template_type', $es_template_type );
107
+ }
108
  }
109
+
110
  }
111
 
112
 
131
  if ( 'es_template' == $screen->post_type ) {
132
  ?>
133
  <script type="text/javascript">
134
+ jQuery('<a style="top:-3px;position: relative" href="admin.php?page=es_campaigns" class="ig-es-title-button ml-2 mb-4">Campaigns</a>').insertBefore(".wp-header-end");
135
  </script>
136
  <?php
137
  }
lite/includes/classes/class-es-tools.php CHANGED
@@ -34,11 +34,13 @@ class ES_Tools {
34
  */
35
  public function send_test_email() {
36
 
 
 
37
  $response = array();
38
 
39
  $email = sanitize_email( ig_es_get_request_data( 'es_test_email' ) );
40
 
41
- $subject = ig_es_get_post_data( 'subject', '' );
42
  $content = wp_kses_post( ig_es_get_request_data( 'content', '', false ) );
43
 
44
  if ( ! empty( $email ) ) {
34
  */
35
  public function send_test_email() {
36
 
37
+ check_ajax_referer( 'ig-es-admin-ajax-nonce', 'security' );
38
+
39
  $response = array();
40
 
41
  $email = sanitize_email( ig_es_get_request_data( 'es_test_email' ) );
42
 
43
+ $subject = ig_es_get_data( $_POST, 'subject', '', true );
44
  $content = wp_kses_post( ig_es_get_request_data( 'content', '', false ) );
45
 
46
  if ( ! empty( $email ) ) {
lite/includes/es-core-functions.php CHANGED
@@ -784,13 +784,16 @@ if ( ! function_exists( 'ig_es_allowed_html_tags_in_esc' ) ) {
784
  'xmlns' => true,
785
  'class' => true,
786
  'stroke-linecap' => true,
787
- 'stroke-linejoin' => true,
788
  ),
789
  'path' => array(
790
  'd' => true,
791
  'fill' => true,
792
  'class' => true,
 
 
793
  ),
 
794
  'main' => array(
795
  'align' => true,
796
  'dir' => true,
@@ -875,3 +878,39 @@ if ( ! function_exists( 'ig_es_remove_utf8_bom' ) ) {
875
  return $string;
876
  }
877
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
784
  'xmlns' => true,
785
  'class' => true,
786
  'stroke-linecap' => true,
787
+ 'fill' => true,
788
  ),
789
  'path' => array(
790
  'd' => true,
791
  'fill' => true,
792
  'class' => true,
793
+ 'fill-rule' => true,
794
+ 'clip-rule' => true,
795
  ),
796
+
797
  'main' => array(
798
  'align' => true,
799
  'dir' => true,
878
  return $string;
879
  }
880
  }
881
+
882
+ if ( ! function_exists( 'ig_es_covert_to_utf8_encoding' ) ) {
883
+
884
+ /**
885
+ * Function to convert existing string to its UTF-8 equivalent string.
886
+ *
887
+ * @param string $data String to handle.
888
+ * @param bool $use_mb Flag to determine whether we should use mb_* functions while detecting and converting the encoding.
889
+ *
890
+ * @return string $data
891
+ *
892
+ * @since 4.5.6
893
+ */
894
+ function ig_es_covert_to_utf8_encoding( $data = '', $use_mb = false ) {
895
+
896
+ // Check if we can use mb_* functions.
897
+ if ( $use_mb ) {
898
+ // Detect character encoding. detecting order is 1.UTF-8 2. ISO-8859-1.
899
+ $encoding = mb_detect_encoding( $data, 'UTF-8, ISO-8859-1', true );
900
+ // Convert to UTF-8 encoding from detected encoding.
901
+ if ( $encoding ) {
902
+ $data = mb_convert_encoding( $data, 'UTF-8', $encoding );
903
+ } else {
904
+ // If we can't detect the encoding then also make sure we have a valid UTF-8 encoded string.
905
+ $data = mb_convert_encoding( $data, 'UTF-8', 'UTF-8' );
906
+ }
907
+ } else {
908
+ // Remove invalid UTF-8 characters.
909
+ $data = wp_check_invalid_utf8( $data, true );
910
+ }
911
+
912
+ return $data;
913
+ }
914
+ }
915
+
916
+
lite/includes/feedback/class-ig-feedback.php CHANGED
@@ -456,7 +456,8 @@ if ( ! class_exists( 'IG_Feedback_V_1_2_3' ) ) {
456
  is_dev_mode: '<?php echo esc_js( $this->is_dev_mode ); ?>',
457
  set_transient: '<?php echo esc_js( $params['set_transient'] ); ?>'
458
  //system_info: enable_system_info
459
- }
 
460
  };
461
 
462
  return jQuery.post(ajaxurl, data);
@@ -687,7 +688,8 @@ if ( ! class_exists( 'IG_Feedback_V_1_2_3' ) ) {
687
  set_transient: '<?php echo esc_js( $params['set_transient'] ); ?>',
688
  meta_info: meta,
689
  system_info: system_info
690
- }
 
691
  };
692
 
693
  return jQuery.post(ajaxurl, data);
@@ -954,7 +956,8 @@ if ( ! class_exists( 'IG_Feedback_V_1_2_3' ) ) {
954
  set_transient: '<?php echo esc_js( $params['set_transient'] ); ?>',
955
  meta_info: meta,
956
  system_info: system_info
957
- }
 
958
  };
959
 
960
  return jQuery.post(ajaxurl, data);
@@ -1191,7 +1194,8 @@ if ( ! class_exists( 'IG_Feedback_V_1_2_3' ) ) {
1191
  set_cookie: '',
1192
  meta_info: meta,
1193
  system_info: system_info
1194
- }
 
1195
  };
1196
 
1197
  var submitSurvey = $.post(ajaxurl, data);
@@ -1649,7 +1653,9 @@ if ( ! class_exists( 'IG_Feedback_V_1_2_3' ) ) {
1649
  */
1650
  public function submit_feedback() {
1651
 
1652
- $data = ig_es_get_post_data();
 
 
1653
 
1654
  $data['site'] = esc_url( home_url() );
1655
 
456
  is_dev_mode: '<?php echo esc_js( $this->is_dev_mode ); ?>',
457
  set_transient: '<?php echo esc_js( $params['set_transient'] ); ?>'
458
  //system_info: enable_system_info
459
+ },
460
+ security: ig_es_js_data.security
461
  };
462
 
463
  return jQuery.post(ajaxurl, data);
688
  set_transient: '<?php echo esc_js( $params['set_transient'] ); ?>',
689
  meta_info: meta,
690
  system_info: system_info
691
+ },
692
+ security: ig_es_js_data.security
693
  };
694
 
695
  return jQuery.post(ajaxurl, data);
956
  set_transient: '<?php echo esc_js( $params['set_transient'] ); ?>',
957
  meta_info: meta,
958
  system_info: system_info
959
+ },
960
+ security: ig_es_js_data.security
961
  };
962
 
963
  return jQuery.post(ajaxurl, data);
1194
  set_cookie: '',
1195
  meta_info: meta,
1196
  system_info: system_info
1197
+ },
1198
+ security: ig_es_js_data.security
1199
  };
1200
 
1201
  var submitSurvey = $.post(ajaxurl, data);
1653
  */
1654
  public function submit_feedback() {
1655
 
1656
+ check_ajax_referer( 'ig-es-admin-ajax-nonce', 'security' );
1657
+
1658
+ $data = wp_unslash( $_POST );
1659
 
1660
  $data['site'] = esc_url( home_url() );
1661
 
lite/includes/pro-features.php CHANGED
@@ -668,7 +668,7 @@ function ig_es_add_captcha_option( $form_data ) {
668
  </div>
669
 
670
  <div class="w-3/6 mt-3.5 pr-4">
671
- <div class="inline-flex rounded-md bg-teal-50 px-2 pt-1 w-full">
672
  <div class="px-2 pt-2 pb-2">
673
  <div class="flex">
674
  <div class="flex-shrink-0">
@@ -956,11 +956,11 @@ function ig_es_view_additional_reports_data() {
956
  </div>
957
  </div>
958
  <div class="pt-4 text-center">
959
- <a href="<?php echo esc_attr( $pricing_url ); ?>" class="rounded-md border border-transparent px-3 py-2 bg-white text-sm leading-7 font-medium text-white bg-indigo-600 transition ease-in-out duration-150 mt-2"><?php esc_html_e('Upgrade', 'email-subscribers'); ?></a>
960
  </div>
961
  </div>
962
  </div>
963
- <div class="wrap max-w-7xl cursor-default campaign_open_blur">
964
  <div class="flex items-center justify-between">
965
  <div class="flex-shrink-0">
966
  <span class="text-xl font-medium leading-7 tracking-wide text-gray-600"><?php esc_html_e('Report', 'email-subscribers'); ?><svg class="ml-3 align-middle w-5 h-5 text-indigo-600 inline-block" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 24 24" stroke="currentColor"><path d="M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"></path></svg></span>
@@ -1155,7 +1155,7 @@ function ig_es_view_additional_reports_data() {
1155
  $graph_open_data = array (
1156
  array(
1157
  'title' => __( 'Device Info', 'email-subscribers' ),
1158
- 'graph_img' => 'lite/public/images/device_opens.png"',
1159
  ),
1160
 
1161
  array(
668
  </div>
669
 
670
  <div class="w-3/6 mt-3.5 pr-4">
671
+ <div class="inline-flex rounded-md bg-teal-50 px-2 pt-1 mb-3.5 w-full">
672
  <div class="px-2 pt-2 pb-2">
673
  <div class="flex">
674
  <div class="flex-shrink-0">
956
  </div>
957
  </div>
958
  <div class="pt-4 text-center">
959
+ <a href="<?php echo esc_attr( $pricing_url ); ?>" target="_blank" class="rounded-md border border-transparent px-3 py-2 bg-white text-sm leading-7 font-medium text-white bg-indigo-600 transition ease-in-out duration-150 mt-2"><?php esc_html_e('Upgrade', 'email-subscribers'); ?></a>
960
  </div>
961
  </div>
962
  </div>
963
+ <div class="wrap max-w-7xl cursor-default campaign_open_blur font-sans">
964
  <div class="flex items-center justify-between">
965
  <div class="flex-shrink-0">
966
  <span class="text-xl font-medium leading-7 tracking-wide text-gray-600"><?php esc_html_e('Report', 'email-subscribers'); ?><svg class="ml-3 align-middle w-5 h-5 text-indigo-600 inline-block" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 24 24" stroke="currentColor"><path d="M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"></path></svg></span>
1155
  $graph_open_data = array (
1156
  array(
1157
  'title' => __( 'Device Info', 'email-subscribers' ),
1158
+ 'graph_img' => 'lite/public/images/device_opens.png',
1159
  ),
1160
 
1161
  array(
lite/includes/workflows/admin/class-es-workflow-admin-edit.php CHANGED
@@ -176,22 +176,35 @@ class ES_Workflow_Admin_Edit {
176
  $workflow_id = self::$workflow ? self::$workflow->get_id() : '';
177
  $workflow_title = self::$workflow ? self::$workflow->get_title() : '';
178
  $workflows_page_url = menu_page_url( 'es_workflows', false );
 
 
 
 
 
 
 
179
  ?>
180
- <div class="wrap">
181
- <h1 class="wp-heading-inline">
182
- <?php esc_html_e( 'Add New Workflow', 'email-subscribers' ); ?>
183
- <a href="<?php echo esc_url( $workflows_page_url ); ?>"
184
- class="inline-flex justify-center rounded-md border border-transparent px-2.5 py-0.5 bg-white text-sm leading-5 font-medium text-white hover:text-white focus:text-white bg-indigo-600 hover:bg-indigo-500 focus:outline-none focus:shadow-outline-blue transition ease-in-out duration-150">
185
- <?php esc_html_e( 'Workflows', 'email-subscribers' ); ?>
186
- </a>
187
- </h1>
 
 
 
 
 
 
188
  <form method="post" action="#">
189
  <input type="hidden" id="workflow_id" name="workflow_id" value="<?php echo ! empty( $workflow_id ) ? esc_attr( $workflow_id ) : ''; ?>">
190
  <?php
191
- /* Workflow nonce */
192
  wp_nonce_field( 'ig-es-workflow', 'ig-es-workflow-nonce', false );
193
 
194
- /* Used to save closed metaboxes and their order */
195
  wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false );
196
  wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false );
197
  ?>
176
  $workflow_id = self::$workflow ? self::$workflow->get_id() : '';
177
  $workflow_title = self::$workflow ? self::$workflow->get_title() : '';
178
  $workflows_page_url = menu_page_url( 'es_workflows', false );
179
+
180
+ $action = ig_es_get_request_data( 'action' );
181
+ if ( 'new' === $action ) {
182
+ $title = __( ' Add New Workflow', 'email-subscribers' );
183
+ } else {
184
+ $title = __( ' Edit Workflow', 'email-subscribers' );
185
+ }
186
  ?>
187
+ <div>
188
+ <h2 class="text-2xl leading-7 text-gray-900 sm:leading-9 sm:truncate">
189
+ <span class="text-base font-normal leading-7 text-indigo-600 sm:leading-9 sm:truncate">
190
+ <a href="<?php echo esc_url( $workflows_page_url ); ?>"><?php esc_html_e('Workflows', 'email-subscribers'); ?></a>
191
+ </span>
192
+ <svg class="w-6 h-6 mt-2 inline-block" fill="currentColor" viewBox="0 0 24 24">
193
+ <path
194
+ fill-rule="evenodd"
195
+ 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"
196
+ clip-rule="evenodd"
197
+ ></path>
198
+ </svg>
199
+ <?php echo esc_html( $title ); ?>
200
+ </h2>
201
  <form method="post" action="#">
202
  <input type="hidden" id="workflow_id" name="workflow_id" value="<?php echo ! empty( $workflow_id ) ? esc_attr( $workflow_id ) : ''; ?>">
203
  <?php
204
+ // Workflow nonce.
205
  wp_nonce_field( 'ig-es-workflow', 'ig-es-workflow-nonce', false );
206
 
207
+ // Used to save closed metaboxes and their order.
208
  wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false );
209
  wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false );
210
  ?>
lite/includes/workflows/class-es-workflows-table.php CHANGED
@@ -90,6 +90,7 @@ class ES_Workflows_Table extends WP_List_Table {
90
  * @since 4.4.1
91
  */
92
  public function render() {
 
93
  $action = ig_es_get_request_data( 'action' );
94
  $workflow_id = ig_es_get_request_data( 'id' );
95
 
@@ -127,7 +128,7 @@ class ES_Workflows_Table extends WP_List_Table {
127
  ES_Common::show_message( $message, $status );
128
  }
129
  ?>
130
- <div class="wrap">
131
  <?php
132
  if ( 'new' === $action ) {
133
  ES_Workflow_Admin_Edit::load_workflow();
@@ -150,20 +151,28 @@ class ES_Workflows_Table extends WP_List_Table {
150
  */
151
  public function load_workflow_list() {
152
  ?>
153
- <h1 class=" wp-heading-inline"><span class="text-2xl font-medium leading-7 text-gray-900 sm:leading-9 sm:truncate"><?php esc_html_e( 'Workflows', 'email-subscribers' ); ?>
154
- </span>
155
- <a href="admin.php?page=es_workflows&action=new"
156
- class="px-2 py-2 pt-2 mx-2 ig-es-title-button"><?php esc_html_e( 'Add New', 'email-subscribers' ); ?></a>
157
- <?php do_action( 'ig_es_after_workflow_type_buttons' ); ?>
158
- </h1>
159
- <div id="poststuff" class="es-items-lists">
 
 
 
 
 
 
 
160
  <div id="post-body" class="metabox-holder column-1">
161
  <div id="post-body-content">
162
  <div class="meta-box-sortables ui-sortable">
163
- <form method="post">
 
164
  <?php
165
- $this->prepare_items();
166
- $this->display();
167
  ?>
168
  </form>
169
  </div>
90
  * @since 4.4.1
91
  */
92
  public function render() {
93
+
94
  $action = ig_es_get_request_data( 'action' );
95
  $workflow_id = ig_es_get_request_data( 'id' );
96
 
128
  ES_Common::show_message( $message, $status );
129
  }
130
  ?>
131
+ <div class="wrap pt-3 font-sans">
132
  <?php
133
  if ( 'new' === $action ) {
134
  ES_Workflow_Admin_Edit::load_workflow();
151
  */
152
  public function load_workflow_list() {
153
  ?>
154
+ <div class="flex">
155
+ <div>
156
+ <h2 class="wp-heading-inline text-3xl pb-1 font-bold text-gray-700 sm:leading-9 sm:truncate pr-4">
157
+ <?php esc_html_e( 'Workflows', 'email-subscribers' ); ?>
158
+ </h2>
159
+ </div>
160
+ <div class="mt-1">
161
+ <a href="admin.php?page=es_workflows&action=new" class="px-3 py-1 ml-2 leading-5 align-middle ig-es-title-button">
162
+ <?php esc_html_e( 'Add New', 'email-subscribers' ); ?></a>
163
+ <?php do_action( 'ig_es_after_workflow_type_buttons' ); ?>
164
+ </div>
165
+ </div>
166
+ <div><hr class="wp-header-end"></div>
167
+ <div id="poststuff" class="es-items-lists mt-4">
168
  <div id="post-body" class="metabox-holder column-1">
169
  <div id="post-body-content">
170
  <div class="meta-box-sortables ui-sortable">
171
+ <form method="get">
172
+ <input type="hidden" name="page" value="es_workflows" />
173
  <?php
174
+ $this->prepare_items();
175
+ $this->display();
176
  ?>
177
  </form>
178
  </div>
lite/includes/workflows/triggers/class-es-trigger-user-deleted.php CHANGED
@@ -29,7 +29,7 @@ class ES_Trigger_User_Deleted extends ES_Workflow_Trigger {
29
  */
30
  public function load_admin_details() {
31
  $this->title = __( 'User Deleted', 'email-subscribers' );
32
- $this->description = __( 'Fires when user deleted from WordPress .', 'email-subscribers' );
33
  $this->group = __( 'User', 'email-subscribers' );
34
  }
35
 
29
  */
30
  public function load_admin_details() {
31
  $this->title = __( 'User Deleted', 'email-subscribers' );
32
+ $this->description = __( 'Fires when user deleted from WordPress.', 'email-subscribers' );
33
  $this->group = __( 'User', 'email-subscribers' );
34
  }
35
 
lite/public/class-email-subscribers-public.php CHANGED
@@ -193,13 +193,26 @@ class Email_Subscribers_Public {
193
  } elseif ( 'unsubscribe' === $option ) {
194
  $unsubscribed = 1;
195
 
196
- $submitted = ig_es_get_post_data( 'submitted' );
197
- $unsubscribe_lists = ig_es_get_post_data( 'unsubscribe_lists', array() );
198
  $list_selected = ig_es_get_request_data( 'list_selected' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
199
 
200
  $message = get_option( 'ig_es_unsubscribe_success_message' );
201
-
202
-
203
  if ( ES()->is_starter() && empty( $submitted ) && empty( $unsubscribe_lists ) && ! $list_selected ) {
204
  do_action( 'ig_es_update_subscriber', $db_id );
205
  }
@@ -397,6 +410,7 @@ class Email_Subscribers_Public {
397
 
398
  <div class="ig_es_form_wrapper">
399
  <form action="<?php echo esc_attr( $action ); ?>" method="post" id="">
 
400
  <div class="ig_es_form_heading"><?php echo esc_html__( 'Are you sure you want to unsubscribe?', 'email-subscribers' ); ?></div>
401
  <input type="hidden" name="submitted" value="submitted">
402
  <input class="ig_es_submit" type="submit" name="unsubscribe" value="Yes">
193
  } elseif ( 'unsubscribe' === $option ) {
194
  $unsubscribed = 1;
195
 
196
+ $submitted = '';
197
+ $unsubscribe_lists = array();
198
  $list_selected = ig_es_get_request_data( 'list_selected' );
199
+
200
+ // Check if nonce value is not empty.
201
+ if ( ! empty( $_POST['ig_es_unsubscribe_nonce'] ) ) {
202
+ // Verify nonce value.
203
+ if ( wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['ig_es_unsubscribe_nonce'] ) ), 'ig-es-unsubscribe-nonce' ) ) {
204
+ $submitted = ig_es_get_data( $_POST, 'submitted', '', true );
205
+ if ( ! empty( $submitted ) ) {
206
+ $unsubscribe_lists = ig_es_get_data( $_POST, 'unsubscribe_lists', array() );
207
+ }
208
+ } else {
209
+ echo esc_html__( 'Sorry, you are not allowed to access this page.', 'email-subscribers' );
210
+ die();
211
+ }
212
+ }
213
 
214
  $message = get_option( 'ig_es_unsubscribe_success_message' );
215
+
 
216
  if ( ES()->is_starter() && empty( $submitted ) && empty( $unsubscribe_lists ) && ! $list_selected ) {
217
  do_action( 'ig_es_update_subscriber', $db_id );
218
  }
410
 
411
  <div class="ig_es_form_wrapper">
412
  <form action="<?php echo esc_attr( $action ); ?>" method="post" id="">
413
+ <?php wp_nonce_field( 'ig-es-unsubscribe-nonce', 'ig_es_unsubscribe_nonce' ); ?>
414
  <div class="ig_es_form_heading"><?php echo esc_html__( 'Are you sure you want to unsubscribe?', 'email-subscribers' ); ?></div>
415
  <input type="hidden" name="submitted" value="submitted">
416
  <input class="ig_es_submit" type="submit" name="unsubscribe" value="Yes">
readme.txt CHANGED
@@ -6,7 +6,7 @@ Tags: email marketing, subscription, autoresponder, post notification, welcome e
6
  Requires at least: 3.9
7
  Tested up to: 5.5.1
8
  Requires PHP: 5.6
9
- Stable tag: 4.5.5
10
  License: GPLv3
11
  License URI: http://www.gnu.org/licenses
12
 
@@ -304,6 +304,13 @@ Refer [here](https://www.icegram.com/documentation/es-faq/).
304
 
305
  == Changelog ==
306
 
 
 
 
 
 
 
 
307
  **4.5.5 (02.09.2020)**
308
 
309
  * Update: Improve onboarding
6
  Requires at least: 3.9
7
  Tested up to: 5.5.1
8
  Requires PHP: 5.6
9
+ Stable tag: 4.5.6
10
  License: GPLv3
11
  License URI: http://www.gnu.org/licenses
12
 
304
 
305
  == Changelog ==
306
 
307
+ **4.5.6 (09.09.2020)**
308
+
309
+ * Update: Improved UI
310
+ * Update: Improved securities
311
+ * Update: Improved Import contacts functionality
312
+ * Update: Now, pagination also works with search parameter
313
+
314
  **4.5.5 (02.09.2020)**
315
 
316
  * Update: Improve onboarding