Email Subscribers & Newsletters - Version 5.4.18

Version Description

  • New: Rest API support for add/delete/edit subscriber
  • Fix: Gutenberg form block issue with ClassicPress plugin

=

Download this release

Release Info

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

Code changes from version 5.4.17 to 5.4.18

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: 5.4.17
7
  * Author: Icegram
8
  * Author URI: https://www.icegram.com/
9
  * Requires at least: 3.9
@@ -187,7 +187,7 @@ if ( 'premium' === $ig_es_plan ) {
187
  /* ***************************** Initial Compatibility Work (End) ******************* */
188
 
189
  if ( ! defined( 'ES_PLUGIN_VERSION' ) ) {
190
- define( 'ES_PLUGIN_VERSION', '5.4.17' );
191
  }
192
 
193
  // 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: 5.4.18
7
  * Author: Icegram
8
  * Author URI: https://www.icegram.com/
9
  * Requires at least: 3.9
187
  /* ***************************** Initial Compatibility Work (End) ******************* */
188
 
189
  if ( ! defined( 'ES_PLUGIN_VERSION' ) ) {
190
+ define( 'ES_PLUGIN_VERSION', '5.4.18' );
191
  }
192
 
193
  // Plugin Folder Path.
lite/admin/class-email-subscribers-admin.php CHANGED
@@ -236,6 +236,8 @@ class Email_Subscribers_Admin {
236
 
237
  if ( 'es_settings' === $get_page ) {
238
  $ig_es_js_data['popular_domains'] = ES_Common::get_popular_domains();
 
 
239
  }
240
 
241
  wp_localize_script( $this->email_subscribers, 'ig_es_js_data', $ig_es_js_data );
236
 
237
  if ( 'es_settings' === $get_page ) {
238
  $ig_es_js_data['popular_domains'] = ES_Common::get_popular_domains();
239
+ $ig_es_js_data['i18n_data']['delete_rest_api_confirmation'] = __( 'Are you sure you want to delete this key? This action cannot be undone.', 'email-subscribers' );
240
+ $ig_es_js_data['i18n_data']['select_user'] = __( 'Please select a user.', 'email-subscribers' );
241
  }
242
 
243
  wp_localize_script( $this->email_subscribers, 'ig_es_js_data', $ig_es_js_data );
lite/admin/class-es-admin.php CHANGED
@@ -458,23 +458,12 @@ if ( ! class_exists( 'ES_Admin' ) ) {
458
  });
459
  }
460
  jQuery(document).on('es_drag_and_drop_editor_loaded',()=>{
461
- let dropdown = jQuery('#ig-es-dnd-merge-tags #ig-es-dnd-tags-dropdown').clone();
462
-
463
- jQuery('#ig-es-dnd-merge-tags-wrapper').append(dropdown);
464
- jQuery('#ig-es-dnd-merge-tags #ig-es-dnd-tags-dropdown').remove();
465
- jQuery(document).on("click", function (event) {
466
- var $trigger = jQuery("#ig-es-dnd-add-merge-tag-button");
467
- if ($trigger !== event.target && !$trigger.has(event.target).length) {
468
- //jQuery("#ig-es-dnd-merge-tags-wrapper #ig-es-dnd-tags-dropdown").hide();
469
- }
470
- });
471
-
472
- // Toggle Dropdown
473
- jQuery('#ig-es-dnd-add-merge-tag-button').click(function () {
474
- jQuery('#ig-es-dnd-merge-tags-wrapper #ig-es-dnd-tags-dropdown').toggle();
475
- });
476
-
477
- ig_es_add_dnd_rte_tags( '<?php echo esc_js( $template_type ); ?>' );
478
  });
479
  });
480
  </script>
458
  });
459
  }
460
  jQuery(document).on('es_drag_and_drop_editor_loaded',()=>{
461
+ window.esVisualEditor.on('change:changesCount', (editorModel, changesCount) => {
462
+ if (changesCount > 0) {
463
+ ig_es_sync_dnd_editor_content('#campaign-dnd-editor-data');
464
+ }
465
+ });
466
+ ig_es_add_dnd_rte_tags( '<?php echo esc_js( $template_type ); ?>' );
 
 
 
 
 
 
 
 
 
 
 
467
  });
468
  });
469
  </script>
lite/admin/class-es-gb-subscription-form-block.php CHANGED
@@ -60,6 +60,11 @@ class ES_GB_Subscription_Form_Block {
60
 
61
  public function register_gb_subscription_form_block() {
62
 
 
 
 
 
 
63
  register_block_type(
64
  'email-subscribers/subscription-form-block',
65
  array(
60
 
61
  public function register_gb_subscription_form_block() {
62
 
63
+ if ( ! function_exists( 'register_block_type' ) ) {
64
+ // Block editor is not available.
65
+ return;
66
+ }
67
+
68
  register_block_type(
69
  'email-subscribers/subscription-form-block',
70
  array(
lite/admin/class-es-rest-api-admin.php ADDED
@@ -0,0 +1,121 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // Exit if accessed directly
4
+ if ( ! defined( 'ABSPATH' ) ) {
5
+ exit;
6
+ }
7
+
8
+ /**
9
+ * Class to allow admin to manage REST API Keys(creating,revoking,deleting API keys)
10
+ *
11
+ * @since 5.4.18
12
+ */
13
+ class ES_Rest_API_Admin {
14
+
15
+ public static function init() {
16
+ self::register_hooks();
17
+ }
18
+
19
+ public static function register_hooks() {
20
+
21
+ add_action( 'wp_ajax_ig_es_generate_rest_api_key', array( __CLASS__, 'handle_generate_rest_api_key_request' ) );
22
+ add_action( 'wp_ajax_ig_es_delete_rest_api_key', array( __CLASS__, 'handle_delete_rest_api_key_request' ) );
23
+ }
24
+
25
+ public static function handle_generate_rest_api_key_request() {
26
+ check_ajax_referer( 'ig-es-admin-ajax-nonce', 'security' );
27
+ $response = array();
28
+ $user_id = ig_es_get_request_data( 'user_id', 0 );
29
+ if ( empty( $user_id ) ) {
30
+ $response['status'] = 'error';
31
+ $response['message'] = __( 'Please select a user.', 'email-subscribers' );
32
+ }
33
+
34
+ $user = get_user_by( 'id', absint( $user_id ) );
35
+ if ( ! $user ) {
36
+ $response['status'] = 'error';
37
+ $response['message'] = __( 'Selected user doesn\'t exists. Please select a different user.', 'email-subscribers' );
38
+ } else {
39
+ $generated_api_key = self::generate_rest_api_key( $user_id );
40
+ if ( $generated_api_key ) {
41
+ $rest_api_keys = get_user_meta( $user_id, 'ig_es_rest_api_keys', true );
42
+ $rest_api_keys = ! empty( $rest_api_keys ) ? $rest_api_keys : array();
43
+ $rest_api_keys[] = $generated_api_key;
44
+ update_user_meta( $user_id, 'ig_es_rest_api_keys', $rest_api_keys );
45
+ $response['status'] = 'success';
46
+ /* Translators: %s: new API key */
47
+ $message = sprintf( __( 'Here is your new API key: %s.', 'email-subscribers' ), '<code class="es-code">' . $generated_api_key . '</code>' );
48
+ $message .= '<br/>' . __( 'Be sure to save this in a safe location. You will not be able to retrieve it later on.', 'email-subscribers' );
49
+
50
+ $response['message'] = $message;
51
+ }
52
+ }
53
+
54
+ wp_send_json( $response );
55
+ }
56
+
57
+ /**
58
+ * Generate a new REST API key from the user email
59
+ */
60
+ public static function generate_rest_api_key( $user_id = 0 ) {
61
+
62
+ if ( empty( $user_id ) ) {
63
+ return false;
64
+ }
65
+
66
+ $user = get_userdata( $user_id );
67
+
68
+ if ( ! $user ) {
69
+ return false;
70
+ }
71
+
72
+ $user_email = $user->user_email;
73
+ $auth_key = defined( 'AUTH_KEY' ) ? AUTH_KEY : '';
74
+
75
+ $generated_api_key = hash( 'md5', $user_email . $auth_key . gmdate( 'U' ) );
76
+
77
+ return $generated_api_key;
78
+ }
79
+
80
+ public static function handle_delete_rest_api_key_request() {
81
+ check_ajax_referer( 'ig-es-admin-ajax-nonce', 'security' );
82
+ $response = array();
83
+ $user_id = ig_es_get_request_data( 'user_id', 0 );
84
+ if ( empty( $user_id ) ) {
85
+ $response['status'] = 'error';
86
+ $response['message'] = __( 'User missing.', 'email-subscribers' );
87
+ }
88
+
89
+ $user = get_user_by( 'id', absint( $user_id ) );
90
+ if ( ! $user ) {
91
+ $response['status'] = 'error';
92
+ $response['message'] = __( 'User missing.', 'email-subscribers' );
93
+ } else {
94
+ $api_index = ig_es_get_request_data( 'api_index', 0 );
95
+ $api_key_deleted = self::delete_rest_api_key( $user_id, $api_index );
96
+ if ( $api_key_deleted ) {
97
+ $response['status'] = 'success';
98
+ }
99
+ }
100
+
101
+ wp_send_json( $response );
102
+ }
103
+
104
+ public static function delete_rest_api_key( $user_id, $index = 0 ) {
105
+ $rest_api_keys = get_user_meta( $user_id, 'ig_es_rest_api_keys', true );
106
+ unset( $rest_api_keys[ $index ] );
107
+
108
+ if ( empty( $rest_api_keys ) ) {
109
+ $success = delete_user_meta( $user_id, 'ig_es_rest_api_keys' );
110
+ } else {
111
+ $success = update_user_meta( $user_id, 'ig_es_rest_api_keys', $rest_api_keys );
112
+ }
113
+
114
+ if ( true === $success ) {
115
+ return true;
116
+ }
117
+ return false;
118
+ }
119
+ }
120
+
121
+ ES_Rest_API_Admin::init();
lite/admin/css/email-subscribers-admin.css CHANGED
@@ -79,6 +79,13 @@ a:focus {
79
  text-align: center;
80
  }
81
 
 
 
 
 
 
 
 
82
 
83
  .help-info-content {
84
  background: #FFF;
79
  text-align: center;
80
  }
81
 
82
+ #es-settings-menu #menu-nav li svg {
83
+ stroke-width: 2;
84
+ }
85
+
86
+ tr#ig-es-no-api-keys-message:not(:only-child) {
87
+ display:none;
88
+ }
89
 
90
  .help-info-content {
91
  background: #FFF;
lite/admin/js/email-subscribers-admin.js CHANGED
@@ -1543,6 +1543,99 @@
1543
  }
1544
  });
1545
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1546
  // Workflow JS
1547
  IG_ES_Workflows = {
1548
 
@@ -3794,6 +3887,7 @@ function ig_es_sync_dnd_editor_content( data_field_id ) {
3794
  jQuery(data_field_id).val(dnd_editor_data.data);
3795
  }
3796
  }
 
3797
 
3798
  function ig_es_load_iframe_preview( parent_selector, iframe_html ) {
3799
  jQuery( parent_selector + ' iframe').remove();
1543
  }
1544
  });
1545
 
1546
+ // Create rest API key for selected user
1547
+ jQuery('#ig-es-generate-rest-api-key').click(function(e){
1548
+ e.preventDefault();
1549
+ let user_id = jQuery('#ig-es-rest-api-user-id').val();
1550
+ let message_class = '';
1551
+ if ( '' === user_id ) {
1552
+ message_class = 'text-red-600';
1553
+ jQuery('#response-messages').removeClass('hidden').find('div').attr('class', message_class).html(ig_es_js_data.i18n_data.select_user);
1554
+ return;
1555
+ }
1556
+
1557
+ let btn_elem = $(this);
1558
+
1559
+ jQuery.ajax({
1560
+ type:'POST',
1561
+ url:ajaxurl,
1562
+ data:{
1563
+ action:'ig_es_generate_rest_api_key',
1564
+ user_id: user_id,
1565
+ security:ig_es_js_data.security,
1566
+ },
1567
+ dataType:'json',
1568
+ beforeSend:function(){
1569
+ jQuery(btn_elem).addClass('loading');
1570
+ },
1571
+ success:function(response){
1572
+ if( response.status ){
1573
+ let status = response.status;
1574
+ let message = response.message;
1575
+ jQuery('.rest-api-response').removeClass('hidden').addClass(status).html(message);
1576
+ message_class = '';
1577
+ jQuery('#response-messages').removeClass('hidden').find('div').attr('class', message_class).html(message);
1578
+ } else{
1579
+ message_class = 'text-red-600';
1580
+ jQuery('#response-messages').removeClass('hidden').find('div').attr('class', message_class).html(ig_es_js_data.i18n_data.ajax_error_message);
1581
+ }
1582
+ },
1583
+ error:function(err){
1584
+ alert(ig_es_js_data.i18n_data.ajax_error_message);
1585
+ },
1586
+ }).always(function(){
1587
+ jQuery(btn_elem).removeClass('loading');
1588
+ });
1589
+
1590
+ });
1591
+
1592
+ // Delete rest API key for selected user
1593
+ jQuery('.ig-es-delete-rest-api-key').click(function(e){
1594
+ e.preventDefault();
1595
+ let delete_rest_api = confirm( ig_es_js_data.i18n_data.delete_rest_api_confirmation );
1596
+ if ( ! delete_rest_api ) {
1597
+ return;
1598
+ }
1599
+ let rest_api_row = jQuery(this).closest('.ig-es-rest-api-row');
1600
+ let user_id = jQuery(rest_api_row).data('user-id');
1601
+ let api_index = jQuery(rest_api_row).data('api-index');
1602
+
1603
+ let btn_elem = $(this);
1604
+
1605
+ jQuery.ajax({
1606
+ type:'POST',
1607
+ url:ajaxurl,
1608
+ data:{
1609
+ action:'ig_es_delete_rest_api_key',
1610
+ user_id: user_id,
1611
+ api_index: api_index,
1612
+ security:ig_es_js_data.security,
1613
+ },
1614
+ dataType:'json',
1615
+ beforeSend:function(){
1616
+ jQuery(btn_elem).addClass('loading');
1617
+ },
1618
+ success:function(response){
1619
+ if( response.status ){
1620
+ let status = response.status;
1621
+ if ( 'success' === status ) {
1622
+ jQuery(rest_api_row).remove();
1623
+ } else {
1624
+ alert( response.message );
1625
+ }
1626
+ } else{
1627
+ alert( ig_es_js_data.i18n_data.ajax_error_message );
1628
+ }
1629
+ },
1630
+ error:function(err){
1631
+ alert( ig_es_js_data.i18n_data.ajax_error_message );
1632
+ },
1633
+ }).always(function(){
1634
+ jQuery(btn_elem).removeClass('loading');
1635
+ });
1636
+
1637
+ });
1638
+
1639
  // Workflow JS
1640
  IG_ES_Workflows = {
1641
 
3887
  jQuery(data_field_id).val(dnd_editor_data.data);
3888
  }
3889
  }
3890
+ window.ig_es_sync_dnd_editor_content = ig_es_sync_dnd_editor_content;
3891
 
3892
  function ig_es_load_iframe_preview( parent_selector, iframe_html ) {
3893
  jQuery( parent_selector + ' iframe').remove();
lite/includes/class-email-subscribers.php CHANGED
@@ -923,6 +923,9 @@ if ( ! class_exists( 'Email_Subscribers' ) ) {
923
  'lite/includes/workflows/triggers/class-es-trigger-campaign-failed.php',
924
  'lite/includes/workflows/class-es-workflow-triggers.php',
925
 
 
 
 
926
  // Abstracts workflow actions
927
  'lite/includes/workflows/actions/abstracts/class-ig-es-action-send-email-abstract.php',
928
 
@@ -980,6 +983,8 @@ if ( ! class_exists( 'Email_Subscribers' ) ) {
980
  'lite/admin/class-es-form-admin.php',
981
  'lite/admin/class-es-gb-subscription-form-block.php',
982
 
 
 
983
  'starter/starter-class-email-subscribers.php',
984
  'pro/pro-class-email-subscribers.php',
985
 
923
  'lite/includes/workflows/triggers/class-es-trigger-campaign-failed.php',
924
  'lite/includes/workflows/class-es-workflow-triggers.php',
925
 
926
+ // rest api
927
+ 'lite/includes/rest-api/class-es-rest-api-handler.php',
928
+
929
  // Abstracts workflow actions
930
  'lite/includes/workflows/actions/abstracts/class-ig-es-action-send-email-abstract.php',
931
 
983
  'lite/admin/class-es-form-admin.php',
984
  'lite/admin/class-es-gb-subscription-form-block.php',
985
 
986
+ 'lite/admin/class-es-rest-api-admin.php',
987
+
988
  'starter/starter-class-email-subscribers.php',
989
  'pro/pro-class-email-subscribers.php',
990
 
lite/includes/class-es-common.php CHANGED
@@ -2816,4 +2816,39 @@ class ES_Common {
2816
  return $attachment_url;
2817
  }
2818
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2819
  }
2816
  return $attachment_url;
2817
  }
2818
 
2819
+ /**
2820
+ * Get list status(subscribed or unconfirmed) based on optin type(single optin or double optin)
2821
+ *
2822
+ * @since 5.4.18
2823
+ *
2824
+ * @return string
2825
+ */
2826
+ public static function get_list_status_from_optin_type() {
2827
+ $es_optin_type = get_option( 'ig_es_optin_type' );
2828
+
2829
+ if ( in_array( $es_optin_type, array( 'double_opt_in', 'double_optin' ), true ) ) {
2830
+ $status = 'unconfirmed';
2831
+ } else {
2832
+ $status = 'subscribed';
2833
+ }
2834
+
2835
+ return $status;
2836
+ }
2837
+
2838
+ /**
2839
+ * Check if WordPress has REST API support or not
2840
+ *
2841
+ * @since 5.4.18
2842
+ *
2843
+ * @return bool
2844
+ */
2845
+ public static function is_rest_api_supported() {
2846
+ global $wp_version;
2847
+
2848
+ if ( version_compare( $wp_version, '4.4.0', '<' ) ) {
2849
+ return false;
2850
+ }
2851
+
2852
+ return true;
2853
+ }
2854
  }
lite/includes/classes/class-es-admin-settings.php CHANGED
@@ -160,6 +160,14 @@ class ES_Admin_Settings {
160
  'name' => __( 'Security', 'email-subscribers' ),
161
  ),
162
  );
 
 
 
 
 
 
 
 
163
  $es_settings_tabs = apply_filters( 'ig_es_settings_tabs', $es_settings_tabs );
164
  ?>
165
  <div id="es-settings-menu" class="w-1/5 pt-4 leading-normal text-gray-800 border-r border-gray-100">
@@ -545,13 +553,6 @@ class ES_Admin_Settings {
545
  'default' => '',
546
  'rows' => 3,
547
  ),
548
- 'allow_api' => array(
549
- 'id' => 'ig_es_allow_api',
550
- 'name' => __( 'Allow subscriptions through API', 'email-subscribers' ),
551
- 'info' => __( 'Enable subscriptions API to add subscribers through third-party sites or apps.', 'email-subscribers' ),
552
- 'type' => 'checkbox',
553
- 'default' => 'yes'
554
- ),
555
  );
556
 
557
  $security_settings = apply_filters( 'ig_es_registered_security_settings', $security_settings );
@@ -563,6 +564,30 @@ class ES_Admin_Settings {
563
  'security_settings' => $security_settings,
564
  );
565
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
566
  return apply_filters( 'ig_es_registered_settings', $es_settings );
567
  }
568
 
@@ -1057,11 +1082,9 @@ class ES_Admin_Settings {
1057
  }
1058
 
1059
  /**
1060
- * Render User Permission Settings
1061
- *
1062
- * @return false|string
1063
  *
1064
- * @since 4.2.0
1065
  */
1066
  public static function get_workflow_migration_notice_html() {
1067
  ob_start();
@@ -1083,4 +1106,102 @@ class ES_Admin_Settings {
1083
  $html = ob_get_clean();
1084
  return $html;
1085
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1086
  }
160
  'name' => __( 'Security', 'email-subscribers' ),
161
  ),
162
  );
163
+ if ( ES_Common::is_rest_api_supported() ) {
164
+ $es_settings_tabs['rest_api_settings'] = array(
165
+ 'icon' => '<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" class="w-6 h-6 inline -mt-1.5" style="stroke-width:2">
166
+ <path stroke-linecap="round" stroke-linejoin="round" d="M13.5 16.875h3.375m0 0h3.375m-3.375 0V13.5m0 3.375v3.375M6 10.5h2.25a2.25 2.25 0 002.25-2.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v2.25A2.25 2.25 0 006 10.5zm0 9.75h2.25A2.25 2.25 0 0010.5 18v-2.25a2.25 2.25 0 00-2.25-2.25H6a2.25 2.25 0 00-2.25 2.25V18A2.25 2.25 0 006 20.25zm9.75-9.75H18a2.25 2.25 0 002.25-2.25V6A2.25 2.25 0 0018 3.75h-2.25A2.25 2.25 0 0013.5 6v2.25a2.25 2.25 0 002.25 2.25z" />
167
+ </svg>',
168
+ 'name' => __( 'REST API', 'email-subscribers' ),
169
+ );
170
+ }
171
  $es_settings_tabs = apply_filters( 'ig_es_settings_tabs', $es_settings_tabs );
172
  ?>
173
  <div id="es-settings-menu" class="w-1/5 pt-4 leading-normal text-gray-800 border-r border-gray-100">
553
  'default' => '',
554
  'rows' => 3,
555
  ),
 
 
 
 
 
 
 
556
  );
557
 
558
  $security_settings = apply_filters( 'ig_es_registered_security_settings', $security_settings );
564
  'security_settings' => $security_settings,
565
  );
566
 
567
+ if ( ES_Common::is_rest_api_supported() ) {
568
+
569
+ $rest_api_endpoint = get_rest_url( null, 'email-subscribers/v1/subscribers' );
570
+ $rest_api_settings = array(
571
+ 'allow_api' => array(
572
+ 'id' => 'ig_es_allow_api',
573
+ 'name' => __( 'Enable REST API', 'email-subscribers' ),
574
+ 'info' => __( 'Enable REST API to add/edit/delete subscribers through third-party sites or apps.', 'email-subscribers' ),
575
+ 'type' => 'checkbox',
576
+ 'default' => 'yes',
577
+ /* translators: REST API endpoint */
578
+ 'desc' => sprintf( __( 'REST endpoint: %s', 'email-subscribers'), '<code class="es-code">' . $rest_api_endpoint . '</code>' )
579
+ ),
580
+ 'api_key_access_section' => array(
581
+ 'id' => 'ig_es_api_keys_section',
582
+ 'name' => __( 'REST API Keys', 'email-subscribers' ),
583
+ 'type' => 'html',
584
+ 'html' => self::render_rest_api_keys_section(),
585
+ ),
586
+ );
587
+
588
+ $es_settings['rest_api_settings'] = $rest_api_settings;
589
+ }
590
+
591
  return apply_filters( 'ig_es_registered_settings', $es_settings );
592
  }
593
 
1082
  }
1083
 
1084
  /**
1085
+ * Get HTML for workflow migration
 
 
1086
  *
1087
+ * @return string
1088
  */
1089
  public static function get_workflow_migration_notice_html() {
1090
  ob_start();
1106
  $html = ob_get_clean();
1107
  return $html;
1108
  }
1109
+
1110
+ public static function render_rest_api_keys_section() {
1111
+ ob_start();
1112
+ $rest_api_keys = get_option( 'ig_es_rest_api_keys', array() );
1113
+
1114
+ $rest_api_users_ids = get_users( array(
1115
+ 'meta_key' => 'ig_es_rest_api_keys',
1116
+ 'fields' => 'ID'
1117
+ ) );
1118
+ ?>
1119
+ <div id="ig-es-rest-api-section">
1120
+ <table class="min-w-full rounded-lg">
1121
+ <thead>
1122
+ <tr class="bg-blue-50 text-xs leading-4 font-medium text-gray-500 uppercase tracking-wider">
1123
+ <th class="px-5 py-4"><?php echo esc_html__( 'Key', 'email-subscribers' ); ?></th>
1124
+ <th class="px-2 py-4 text-center"><?php echo esc_html__( 'Username', 'email-subscribers' ); ?></th>
1125
+ <th class="px-2 py-4 text-center"><?php echo esc_html__( 'Actions', 'email-subscribers' ); ?></th>
1126
+ </tr>
1127
+ </thead>
1128
+ <tbody class="bg-blue-50">
1129
+ <?php
1130
+ if ( ! empty( $rest_api_users_ids ) ) {
1131
+ foreach ( $rest_api_users_ids as $user_id ) {
1132
+ $user = get_userdata( $user_id );
1133
+ if ( ! $user ) {
1134
+ continue;
1135
+ }
1136
+ $rest_api_keys = get_user_meta( $user_id, 'ig_es_rest_api_keys', true );
1137
+ if ( ! empty( $rest_api_keys ) ) {
1138
+ foreach ( $rest_api_keys as $index => $rest_api_key ) {
1139
+ $key_start = substr( $rest_api_key, 0, 4 );
1140
+ $key_end = substr( $rest_api_key, strlen( $rest_api_key ) - 4, 4 );
1141
+ ?>
1142
+ <tr class="ig-es-rest-api-row border-b border-gray-200 text-xs leading-4 font-medium" data-user-id="<?php echo esc_attr( $user_id ); ?>" data-api-index="<?php echo esc_attr( $index ); ?>">
1143
+ <td class="px-5 py-4 text-center"><?php echo esc_html( $key_start ); ?>***********<?php echo esc_html( $key_end ); ?></td>
1144
+ <td class="px-2 py-4 text-center"><?php echo esc_html( $user->data->user_login ); ?></td>
1145
+ <td class="px-2 py-4 text-center">
1146
+ <a class="ig-es-delete-rest-api-key inline-block" href="#">
1147
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6">
1148
+ <path stroke-linecap="round" stroke-linejoin="round" d="M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0" />
1149
+ </svg>
1150
+ </a>
1151
+ </td>
1152
+ </tr>
1153
+ <?php
1154
+ }
1155
+ }
1156
+ ?>
1157
+ <?php
1158
+ }
1159
+ }
1160
+ ?>
1161
+ <tr id="ig-es-no-api-keys-message" class="border-b border-gray-200 text-xs leading-4 font-medium">
1162
+ <td colspan="3" class="px-5 py-4 text-center">
1163
+ <?php echo esc_html__( 'No API keys found.', 'email-subscribers' ); ?>
1164
+ </td>
1165
+ </tr>
1166
+ </tbody>
1167
+ </table>
1168
+ <div id="ig-es-create-new-rest-api-container" class="mt-2">
1169
+ <?php
1170
+ $admin_users = get_users(
1171
+ array(
1172
+ 'role' => 'administrator'
1173
+ )
1174
+ );
1175
+ ?>
1176
+ <select id="ig-es-rest-api-user-id">
1177
+ <option value=""><?php echo esc_html__( 'Please select a user', 'email-subscribers' ); ?></option>
1178
+ <?php
1179
+ foreach ( $admin_users as $user ) {
1180
+ ?>
1181
+ <option value="<?php echo esc_attr( $user->ID ); ?>"><?php echo esc_html( $user->data->user_email ); ?></option>
1182
+ <?php
1183
+ }
1184
+ ?>
1185
+ </select>
1186
+ <button type="button" id="ig-es-generate-rest-api-key" class="ig-es-title-button ml-2 align-middle ig-es-inline-loader">
1187
+ <span>
1188
+ <?php echo esc_html__( 'Generate new key', 'email-subscribers' ); ?>
1189
+ </span>
1190
+ <svg class="es-btn-loader animate-spin h-4 w-4 text-indigo"
1191
+ xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
1192
+ <circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor"
1193
+ stroke-width="4"></circle>
1194
+ <path class="opacity-75" fill="currentColor"
1195
+ d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path>
1196
+ </svg>
1197
+ </button>
1198
+ <div id="response-messages" class="p-2 mt-2 hidden">
1199
+ <div class="message"></div>
1200
+ </div>
1201
+ </div>
1202
+ </div>
1203
+ <?php
1204
+ $html = ob_get_clean();
1205
+ return $html;
1206
+ }
1207
  }
lite/includes/classes/class-es-reports-data.php CHANGED
@@ -295,9 +295,9 @@ if ( ! class_exists( 'ES_Reports_Data' ) ) {
295
  $click_percentage_growth = 100;
296
  }
297
 
298
- $reports_data['open_percentage_growth'] = $open_percentage_growth > 0 ? number_format_i18n( $open_percentage_growth, 2 ) : $open_percentage_growth;
299
  $reports_data['open_before_two_months'] = number_format_i18n( $open_before_two_months );
300
- $reports_data['click_percentage_growth'] = $click_percentage_growth > 0 ? number_format_i18n( $click_percentage_growth, 2 ) : $click_percentage_growth;
301
  $reports_data['click_before_two_months'] = number_format_i18n( $click_before_two_months );
302
 
303
  $start_time = strtotime( '-' . $days . ' days', time() );
295
  $click_percentage_growth = 100;
296
  }
297
 
298
+ $reports_data['open_percentage_growth'] = number_format_i18n( $open_percentage_growth, 2 );
299
  $reports_data['open_before_two_months'] = number_format_i18n( $open_before_two_months );
300
+ $reports_data['click_percentage_growth'] = number_format_i18n( $click_percentage_growth, 2 );
301
  $reports_data['click_before_two_months'] = number_format_i18n( $click_before_two_months );
302
 
303
  $start_time = strtotime( '-' . $days . ' days', time() );
lite/includes/db/class-es-db.php CHANGED
@@ -559,6 +559,7 @@ abstract class ES_DB {
559
  return false;
560
  }
561
 
 
562
  if ( false === $wpbd->query( "DELETE FROM $this->table_name WHERE $where" ) ) {
563
  return false;
564
  }
559
  return false;
560
  }
561
 
562
+ $query = "DELETE FROM $this->table_name WHERE $where";
563
  if ( false === $wpbd->query( "DELETE FROM $this->table_name WHERE $where" ) ) {
564
  return false;
565
  }
lite/includes/rest-api/class-es-rest-api-handler.php ADDED
@@ -0,0 +1,438 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class to handle REST API Request
4
+ *
5
+ * @since 5.4.17
6
+ * @version 1.0
7
+ * @package Email Subscribers
8
+ */
9
+
10
+ defined( 'ABSPATH' ) || exit;
11
+
12
+ if ( ! class_exists( 'ES_Rest_Api_Handler' ) ) {
13
+ /**
14
+ * Class to handle REST API in the plugin
15
+ *
16
+ * @since 5.4.17
17
+ */
18
+ class ES_Rest_Api_Handler {
19
+
20
+ public static function init() {
21
+ self::register_hooks();
22
+ }
23
+
24
+ public static function register_hooks() {
25
+ add_action( 'rest_api_init', array( __CLASS__, 'register_rest_api_routes' ) );
26
+ }
27
+
28
+ /**
29
+ * Handle subscribers through REST API in the plugin
30
+ */
31
+ public static function register_rest_api_routes() {
32
+
33
+ register_rest_route( 'email-subscribers/v1', '/subscribers', [
34
+ 'methods' => WP_REST_Server::CREATABLE,
35
+ 'callback' => array( __CLASS__, 'add_subscribers' ),
36
+ 'permission_callback' => array( __CLASS__, 'check_permission' )
37
+ ]);
38
+
39
+ register_rest_route( 'email-subscribers/v1', '/subscribers', [
40
+ 'methods' => WP_REST_Server::EDITABLE,
41
+ 'callback' => array( __CLASS__, 'edit_subscribers' ),
42
+ 'permission_callback' => array( __CLASS__, 'check_permission' )
43
+ ]);
44
+
45
+ register_rest_route( 'email-subscribers/v1', '/subscribers', [
46
+ 'methods' => WP_REST_Server::DELETABLE,
47
+ 'callback' => array( __CLASS__, 'delete_subscribers' ),
48
+ 'permission_callback' => array( __CLASS__, 'check_permission' )
49
+ ]);
50
+
51
+ }
52
+
53
+ /**
54
+ * Check permission
55
+ *
56
+ * @param WP_REST_Request $request
57
+ *
58
+ * @return bool
59
+ */
60
+ public static function check_permission( WP_REST_Request $request ) {
61
+
62
+ $rest_api_enabled = 'yes' === get_option( 'ig_es_allow_api', 'no' );
63
+
64
+ if ( ! $rest_api_enabled ) {
65
+ return false;
66
+ }
67
+
68
+ $rest_api_key = $request->get_header( 'password' );
69
+ $rest_api_username = $request->get_header( 'username' );
70
+
71
+ if ( ! $rest_api_key || ! $rest_api_username ) {
72
+ return false;
73
+ }
74
+
75
+ $user = get_user_by( 'slug', $rest_api_username );
76
+ if ( ! $user ) {
77
+ return false;
78
+ }
79
+
80
+ $user_id = $user->ID;
81
+
82
+ $rest_api_keys = get_user_meta( $user_id, 'ig_es_rest_api_keys', true );
83
+ if ( ! in_array( $rest_api_key, $rest_api_keys, true ) ) {
84
+ return false;
85
+ }
86
+
87
+ return true;
88
+ }
89
+
90
+ /**
91
+ * Add subscribers through REST API.
92
+ *
93
+ * @since 5.4.17
94
+ * @param $request
95
+ * @return $response
96
+ *
97
+ */
98
+ public static function add_subscribers( $request ) {
99
+
100
+ $response = ['message_text' => 'something is missing'];
101
+ $params = $request->get_json_params();
102
+
103
+ if ( ! isset( $params['email'] ) ) {
104
+ $message = [
105
+ 'message_text' => 'Email is missing.',
106
+ 'message' => 'email_missing',
107
+ 'success' => false,
108
+ ];
109
+
110
+ $response = new WP_REST_Response( $message, 200 );
111
+ return $response;
112
+ }
113
+
114
+
115
+ $email = sanitize_email( $params['email'] );
116
+
117
+
118
+ if ( ! is_email( $email ) ) {
119
+ $message = [
120
+ 'message_text' => 'Email is invalid.',
121
+ 'message' => 'invalid_email',
122
+ 'success' => false,
123
+ ];
124
+
125
+ $response = new WP_REST_Response( $message, 200 );
126
+ return $response;
127
+ }
128
+
129
+ $contact_id = ES()->contacts_db->get_contact_id_by_email( $email );
130
+ if ( $contact_id ) {
131
+ $message = [
132
+ 'message_text' => 'Email already exists.',
133
+ 'message' => 'email_exists',
134
+ 'success' => false,
135
+ ];
136
+
137
+ $response = new WP_REST_Response( $message, 200 );
138
+ return $response;
139
+ }
140
+
141
+ $first_name = isset( $params['first_name'] ) ? sanitize_text_field( $params['first_name'] ) : '';
142
+ $last_name = isset( $params['last_name'] ) ? sanitize_text_field( $params['last_name'] ) : '';
143
+ $guid = ES_Common::generate_guid();
144
+
145
+ $contact_data = array();
146
+ $contact_data['first_name'] = $first_name;
147
+ $contact_data['last_name'] = $last_name;
148
+ $contact_data['source'] = 'rest_api';
149
+ $contact_data['email'] = $email;
150
+ $contact_data['status'] = 'verified';
151
+ $contact_data['hash'] = $guid;
152
+ $contact_data['created_at'] = ig_get_current_date_time();
153
+ $contact_data['updated_at'] = null;
154
+ $contact_data['meta'] = null;
155
+
156
+ $contact_id = ES()->contacts_db->insert( $contact_data );
157
+ $contact_data['contact_id'] = $contact_id;
158
+ $list_status = ! empty( $params['list_status'] ) ? $params['list_status'] : ES_Common::get_list_status_from_optin_type();
159
+ $optin_type = 'subscribed' === $list_status ? IG_SINGLE_OPTIN : IG_DOUBLE_OPTIN;
160
+ $subscribed_at = 'subscribed' === $list_status ? ig_get_current_date_time() : '';
161
+
162
+ $list_contact_data = [
163
+ 'contact_id' => $contact_id,
164
+ 'status' => $list_status,
165
+ 'optin_type' => $optin_type,
166
+ 'subscribed_at' => $subscribed_at,
167
+ 'subscribed_ip' => '',
168
+ ];
169
+
170
+ if ( ! empty( $params['list_ids'] ) ) {
171
+
172
+ $list_ids = $params['list_ids'];
173
+
174
+ $list_contact_added = ES()->lists_contacts_db->add_contact_to_lists( $list_contact_data, $list_ids );
175
+
176
+ if ( $list_contact_added ) {
177
+ $message = [
178
+ 'message_text' => 'Contact has been inserted with list successfully!',
179
+ 'message' => 'contact_added_with_list',
180
+ 'success' => true,
181
+ 'contact_data' => $contact_data,
182
+ ];
183
+
184
+ $response = new WP_REST_Response( $message, 200 );
185
+ return $response;
186
+ } else {
187
+ $message = [
188
+ 'message_text' => 'Contact not inserted with list!',
189
+ 'message' => 'contact_not_added_with_list',
190
+ 'success' => false,
191
+ ];
192
+
193
+ $response = new WP_REST_Response( $message );
194
+ return $response;
195
+ }
196
+ }
197
+
198
+ if ( $contact_id ) {
199
+ $message = [
200
+ 'message_text' => 'Contact has been inserted successfully!',
201
+ 'message' => 'contact_added',
202
+ 'success' => true,
203
+ 'contact_data' => $contact_data,
204
+ ];
205
+
206
+ $response = new WP_REST_Response( $message, 200 );
207
+ return $response;
208
+ } else {
209
+ $message = [
210
+ 'message_text' => 'Contact not inserted!',
211
+ 'message' => 'contact_not_added',
212
+ 'success' => false,
213
+ ];
214
+
215
+ $response = new WP_REST_Response( $message );
216
+ return $response;
217
+ }
218
+
219
+ }
220
+
221
+
222
+ /**
223
+ * Edit subscribers contact_data through REST API.
224
+ *
225
+ * @since 5.4.17
226
+ * @param $request
227
+ * @return $response
228
+ *
229
+ */
230
+ public static function edit_subscribers( $request ) {
231
+
232
+ $params = $request->get_json_params();
233
+
234
+ if ( ! isset( $params['contact_id'] ) ) {
235
+ $message = [
236
+ 'message_text' => 'Contact id isn\'t passed.',
237
+ 'message' => 'missing_contact_id',
238
+ 'success' => false,
239
+ ];
240
+
241
+ $response = new WP_REST_Response( $message, 200 );
242
+ return $response;
243
+ }
244
+
245
+ $contact_id = $params['contact_id'];
246
+ if ( isset( $params['first_name'], $params['last_name'] ) ) {
247
+ $contact_id = sanitize_text_field( $params['contact_id'] );
248
+
249
+ $contact_data = array();
250
+ if ( isset( $params['first_name'] ) ) {
251
+ $first_name = sanitize_text_field( $params['first_name'] );
252
+ $contact_data['first_name'] = $first_name;
253
+ }
254
+
255
+ if ( isset( $params['last_name'] ) ) {
256
+ $last_name = sanitize_text_field( $params['last_name'] );
257
+ $contact_data['last_name'] = $last_name;
258
+ }
259
+
260
+ if ( isset( $params['email'] ) ) {
261
+ $email = sanitize_email( $params['email'] );
262
+ if ( ! is_email( $email ) ) {
263
+ $message = [
264
+ 'message_text' => 'Email is not valid.',
265
+ 'message' => 'invalid_email',
266
+ 'success' => false
267
+ ];
268
+ $response = new WP_REST_Response( $message, 200 );
269
+ return $response;
270
+ }
271
+ $contact_data['email'] = $email;
272
+ }
273
+
274
+ if ( ! empty( $contact_data ) ) {
275
+ $updated = ES()->contacts_db->update( $contact_id, $contact_data );
276
+ if ( $updated ) {
277
+ $message = [
278
+ 'message_text' => 'Contact has been updated successfully!',
279
+ 'message' => 'contact_updated',
280
+ 'success' => true,
281
+ 'contact_data' => $contact_data,
282
+ ];
283
+
284
+ $response = new WP_REST_Response( $message, 200 );
285
+ return $response;
286
+ } else {
287
+ $message = [
288
+ 'message_text' => 'Failed to update contact.',
289
+ 'message' => 'contact_update_failed',
290
+ 'success' => false,
291
+ ];
292
+
293
+ $response = new WP_REST_Response( $message );
294
+ return $response;
295
+ }
296
+
297
+
298
+ }
299
+
300
+ }
301
+
302
+ if ( ! empty( $params['list_ids'] ) ) {
303
+ $list_ids = $params['list_ids'];
304
+
305
+ $list_status = ! empty( $params['list_status'] ) ? $params['list_status'] : ES_Common::get_list_status_from_optin_type();
306
+ $optin_type = 'subscribed' === $list_status ? IG_SINGLE_OPTIN : IG_DOUBLE_OPTIN;
307
+ $subscribed_at = 'subscribed' === $list_status ? ig_get_current_date_time() : '';
308
+
309
+ $list_contact_data = [
310
+ 'contact_id' => $contact_id,
311
+ 'status' => $list_status,
312
+ 'optin_type' => $optin_type,
313
+ 'subscribed_at' => $subscribed_at,
314
+ 'subscribed_ip' => '',
315
+ ];
316
+
317
+ $list_contact_updated = ES()->lists_contacts_db->add_contact_to_lists( $list_contact_data, $list_ids );
318
+
319
+ if ( $list_contact_updated ) {
320
+ $message = [
321
+ 'message_text' => 'Contact has been updated corresponding to specific list!',
322
+ 'message' => 'contact_updated_corr_to_list',
323
+ 'success' => true,
324
+ ];
325
+
326
+ $response = new WP_REST_Response( $message, 200 );
327
+ return $response;
328
+ } else {
329
+ $message = [
330
+ 'message_text' => 'Contact not updated corresponding to specific list!',
331
+ 'message' => 'contact_not_updated_corr_to_list',
332
+ 'success' => false,
333
+ ];
334
+
335
+ $response = new WP_REST_Response( $message );
336
+ return $response;
337
+ }
338
+
339
+ }
340
+
341
+ }
342
+
343
+
344
+ /**
345
+ * Delete subscribers through REST API.
346
+ *
347
+ * @since 5.4.17
348
+ * @param $request
349
+ * @return $response
350
+ *
351
+ */
352
+ public static function delete_subscribers( $request ) {
353
+
354
+ $response = ['message_text' => 'Contact id is missing!'];
355
+ $params = $request->get_json_params();
356
+
357
+ if ( ! isset( $params['contact_id'] ) || empty( $params['contact_id'] ) ) {
358
+ return $response;
359
+ }
360
+
361
+ $contact_id = sanitize_text_field( $params['contact_id'] );
362
+
363
+ $contact = ES()->contacts_db->get( $contact_id );
364
+ if ( empty ( $contact ) ) {
365
+ $message = [
366
+ 'message_text' => 'Contact does not exists.',
367
+ 'message' => 'contact_not_exists',
368
+ 'success' => false,
369
+ ];
370
+
371
+ $response = new WP_REST_Response( $message, 200 );
372
+ return $response;
373
+ }
374
+
375
+ if ( isset( $params['list_id'] ) ) {
376
+ $list_ids = [];
377
+ $list_ids[] = sanitize_text_field( $params['list_id'] );
378
+
379
+ $list_contact_ids = [$contact_id];
380
+
381
+ $list_contact_deleted = ES()->lists_contacts_db->remove_contacts_from_lists( $list_contact_ids, $list_ids );
382
+
383
+ if ( $list_contact_deleted ) {
384
+ $message = [
385
+ 'message_text' => 'Contact has been deleted corresponding to specific list!',
386
+ 'message' => 'contact_deleted_corr_to_list',
387
+ 'success' => true,
388
+ ];
389
+
390
+ $response = new WP_REST_Response( $message, 200 );
391
+ return $response;
392
+ } else {
393
+ $message = [
394
+ 'message_text' => 'Contact not deleted corresponding to specific list!',
395
+ 'message' => 'contact_not_deleted_corr_to_list',
396
+ 'success' => false,
397
+ ];
398
+
399
+ $response = new WP_REST_Response( $message );
400
+ return $response;
401
+ }
402
+
403
+ }
404
+
405
+ if ( $contact_id ) {
406
+
407
+ $deleted = ES()->contacts_db->delete( $contact_id );
408
+
409
+ if ( $deleted ) {
410
+ $message = [
411
+ 'message_text' => 'Contact has been deleted successfully!',
412
+ 'message' => 'contact_deleted',
413
+ 'success' => true,
414
+ ];
415
+
416
+ $response = new WP_REST_Response( $message, 200 );
417
+ return $response;
418
+ } else {
419
+ $message = [
420
+ 'message_text' => 'Contact not deleted!',
421
+ 'message' => 'contact_not_deleted',
422
+ 'success' => false,
423
+ ];
424
+
425
+ $response = new WP_REST_Response( $message );
426
+ return $response;
427
+ }
428
+ }
429
+
430
+ }
431
+
432
+
433
+ }
434
+
435
+ ES_Rest_Api_Handler::init();
436
+ }
437
+
438
+
lite/language.php CHANGED
@@ -64,6 +64,8 @@ __( 'SMTP Error : Unable to send test email', 'email-subscribers' ),
64
  __( 'Server Busy : Please try again later', 'email-subscribers' ),
65
  __( 'Headers verified successfully', 'email-subscribers' ),
66
  __( 'Want to select contacts on all pages?', 'email-subscribers' ),
 
 
67
  __( 'Dashboard', 'email-subscribers' ),
68
  __( 'Audience', 'email-subscribers' ),
69
  __( 'Lists', 'email-subscribers' ),
@@ -192,6 +194,11 @@ __( 'Untitled Form', 'email-subscribers' ),
192
  __( 'Design', 'email-subscribers' ),
193
  __( 'Form Preview', 'email-subscribers' ),
194
  __( 'Copy', 'email-subscribers' ),
 
 
 
 
 
195
  __( 'Recipients', 'email-subscribers' ),
196
  __( 'Add recipients', 'email-subscribers' ),
197
  __( 'or', 'email-subscribers' ),
@@ -534,6 +541,7 @@ __( 'General', 'email-subscribers' ),
534
  __( 'Notifications', 'email-subscribers' ),
535
  __( 'Email Sending', 'email-subscribers' ),
536
  __( 'Security', 'email-subscribers' ),
 
537
  __( 'Your emails might land in spam if you use above email address..', 'email-subscribers' ),
538
  /* translators: %s: Site domain */
539
  __( 'Consider using email address matching your site domain like %s', 'email-subscribers' ),
@@ -599,8 +607,11 @@ __( 'Pepipost API key', 'email-subscribers' ),
599
  __( 'Select a mailer to send mail', 'email-subscribers' ),
600
  __( 'Blocked domain(s)', 'email-subscribers' ),
601
  __( 'Seeing spam signups from particular domains? Enter domains names (one per line) that you want to block here.', 'email-subscribers' ),
602
- __( 'Allow subscriptions through API', 'email-subscribers' ),
603
- __( 'Enable subscriptions API to add subscribers through third-party sites or apps.', 'email-subscribers' ),
 
 
 
604
  __( 'Save Settings', 'email-subscribers' ),
605
  __( 'Signup for Pepipost', 'email-subscribers' ),
606
  __( 'How to find', 'email-subscribers' ),
@@ -616,6 +627,12 @@ __( 'Help us to improve Email Subscribers by opting in to share non-sensitive pl
616
  __( 'Now you can control all your notifications through workflows.', 'email-subscribers' ),
617
  /* translators: 1. Anchor start tag 2. Anchor end tag */
618
  __( 'Click %1$shere%2$s to go to workflows.', 'email-subscribers' ),
 
 
 
 
 
 
619
  __( 'Report', 'email-subscribers' ),
620
  __( 'Post Notification', 'email-subscribers' ),
621
  __( 'Type: ', 'email-subscribers' ),
@@ -1188,7 +1205,6 @@ __( ' Edit Workflow', 'email-subscribers' ),
1188
  __( 'Add title', 'email-subscribers' ),
1189
  __( 'Trigger', 'email-subscribers' ),
1190
  __( 'Rules', 'email-subscribers' ),
1191
- __( 'Actions', 'email-subscribers' ),
1192
  __( 'Placeholders', 'email-subscribers' ),
1193
  /* translators: 1. Email Subscriber name 3. Supported plugin name */
1194
  __( 'Connect %1$s and %2$s', 'email-subscribers' ),
@@ -1745,6 +1761,7 @@ __( 'Resume', 'email-subscribers' ),
1745
  __( 'Pause campaign', 'email-subscribers' ),
1746
  __( 'Resume campaign', 'email-subscribers' ),
1747
  __( 'Email Authentication', 'email-subscribers' ),
 
1748
  __( 'Auth Header Name', 'email-subscribers' ),
1749
  __( 'Result', 'email-subscribers' ),
1750
  __( 'Raw Headers', 'email-subscribers' ),
64
  __( 'Server Busy : Please try again later', 'email-subscribers' ),
65
  __( 'Headers verified successfully', 'email-subscribers' ),
66
  __( 'Want to select contacts on all pages?', 'email-subscribers' ),
67
+ __( 'Are you sure you want to delete this key? This action cannot be undone.', 'email-subscribers' ),
68
+ __( 'Please select a user.', 'email-subscribers' ),
69
  __( 'Dashboard', 'email-subscribers' ),
70
  __( 'Audience', 'email-subscribers' ),
71
  __( 'Lists', 'email-subscribers' ),
194
  __( 'Design', 'email-subscribers' ),
195
  __( 'Form Preview', 'email-subscribers' ),
196
  __( 'Copy', 'email-subscribers' ),
197
+ __( 'Selected user doesn\'t exists. Please select a different user.', 'email-subscribers' ),
198
+ /* Translators: %s: new API key */
199
+ __( 'Here is your new API key: %s.', 'email-subscribers' ),
200
+ __( 'Be sure to save this in a safe location. You will not be able to retrieve it later on.', 'email-subscribers' ),
201
+ __( 'User missing.', 'email-subscribers' ),
202
  __( 'Recipients', 'email-subscribers' ),
203
  __( 'Add recipients', 'email-subscribers' ),
204
  __( 'or', 'email-subscribers' ),
541
  __( 'Notifications', 'email-subscribers' ),
542
  __( 'Email Sending', 'email-subscribers' ),
543
  __( 'Security', 'email-subscribers' ),
544
+ __( 'REST API', 'email-subscribers' ),
545
  __( 'Your emails might land in spam if you use above email address..', 'email-subscribers' ),
546
  /* translators: %s: Site domain */
547
  __( 'Consider using email address matching your site domain like %s', 'email-subscribers' ),
607
  __( 'Select a mailer to send mail', 'email-subscribers' ),
608
  __( 'Blocked domain(s)', 'email-subscribers' ),
609
  __( 'Seeing spam signups from particular domains? Enter domains names (one per line) that you want to block here.', 'email-subscribers' ),
610
+ __( 'Enable REST API', 'email-subscribers' ),
611
+ __( 'Enable REST API to add/edit/delete subscribers through third-party sites or apps.', 'email-subscribers' ),
612
+ /* translators: REST API endpoint */
613
+ __( 'REST endpoint: %s', 'email-subscribers' ),
614
+ __( 'REST API Keys', 'email-subscribers' ),
615
  __( 'Save Settings', 'email-subscribers' ),
616
  __( 'Signup for Pepipost', 'email-subscribers' ),
617
  __( 'How to find', 'email-subscribers' ),
627
  __( 'Now you can control all your notifications through workflows.', 'email-subscribers' ),
628
  /* translators: 1. Anchor start tag 2. Anchor end tag */
629
  __( 'Click %1$shere%2$s to go to workflows.', 'email-subscribers' ),
630
+ __( 'Key', 'email-subscribers' ),
631
+ __( 'Username', 'email-subscribers' ),
632
+ __( 'Actions', 'email-subscribers' ),
633
+ __( 'No API keys found.', 'email-subscribers' ),
634
+ __( 'Please select a user', 'email-subscribers' ),
635
+ __( 'Generate new key', 'email-subscribers' ),
636
  __( 'Report', 'email-subscribers' ),
637
  __( 'Post Notification', 'email-subscribers' ),
638
  __( 'Type: ', 'email-subscribers' ),
1205
  __( 'Add title', 'email-subscribers' ),
1206
  __( 'Trigger', 'email-subscribers' ),
1207
  __( 'Rules', 'email-subscribers' ),
 
1208
  __( 'Placeholders', 'email-subscribers' ),
1209
  /* translators: 1. Email Subscriber name 3. Supported plugin name */
1210
  __( 'Connect %1$s and %2$s', 'email-subscribers' ),
1761
  __( 'Pause campaign', 'email-subscribers' ),
1762
  __( 'Resume campaign', 'email-subscribers' ),
1763
  __( 'Email Authentication', 'email-subscribers' ),
1764
+ __( 'Click on Verify Email to check for Email Authentication Headers', 'email-subscribers' ),
1765
  __( 'Auth Header Name', 'email-subscribers' ),
1766
  __( 'Result', 'email-subscribers' ),
1767
  __( 'Raw Headers', 'email-subscribers' ),
lite/languages/email-subscribers.pot CHANGED
@@ -2,14 +2,14 @@
2
  # This file is distributed under the same license as the Email Subscribers & Newsletters plugin.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Email Subscribers & Newsletters 5.4.17\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/email-subscribers\n"
7
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
8
  "Language-Team: LANGUAGE <LL@li.org>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "POT-Creation-Date: 2022-10-19T12:09:52+02:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.4.0\n"
15
  "X-Domain: email-subscribers\n"
@@ -29,7 +29,7 @@ msgstr ""
29
 
30
  #. Author of the plugin
31
  #: lite/admin/partials/help.php:28
32
- #: lite/includes/class-email-subscribers.php:1535
33
  msgid "Icegram"
34
  msgstr ""
35
 
@@ -224,12 +224,21 @@ msgstr ""
224
  msgid "Want to select contacts on all pages?"
225
  msgstr ""
226
 
227
- #: lite/admin/class-email-subscribers-admin.php:315
 
 
 
 
 
 
 
 
 
228
  #: lite/admin/partials/dashboard.php:167
229
  msgid "Dashboard"
230
  msgstr ""
231
 
232
- #: lite/admin/class-email-subscribers-admin.php:320
233
  #: lite/admin/partials/dashboard.php:174
234
  #: lite/includes/classes/class-es-contacts-table.php:238
235
  #: lite/includes/pro-features.php:205
@@ -237,7 +246,7 @@ msgstr ""
237
  msgid "Audience"
238
  msgstr ""
239
 
240
- #: lite/admin/class-email-subscribers-admin.php:324
241
  #: lite/admin/class-es-form-admin.php:232
242
  #: lite/admin/class-es-form-admin.php:519
243
  #: lite/includes/classes/class-es-lists-table.php:34
@@ -245,7 +254,7 @@ msgstr ""
245
  msgid "Lists"
246
  msgstr ""
247
 
248
- #: lite/admin/class-email-subscribers-admin.php:330
249
  #: lite/admin/class-es-form-admin.php:397
250
  #: lite/includes/classes/class-es-form-widget.php:77
251
  #: lite/includes/classes/class-es-forms-table.php:39
@@ -256,7 +265,7 @@ msgstr ""
256
  msgid "Forms"
257
  msgstr ""
258
 
259
- #: lite/admin/class-email-subscribers-admin.php:336
260
  #: lite/admin/class-es-campaign-admin.php:597
261
  #: lite/admin/partials/gallery.php:10
262
  #: lite/includes/classes/class-es-campaigns-table.php:124
@@ -268,11 +277,11 @@ msgstr ""
268
  msgid "Campaigns"
269
  msgstr ""
270
 
271
- #: lite/admin/class-email-subscribers-admin.php:340
272
  msgid "Post Notifications"
273
  msgstr ""
274
 
275
- #: lite/admin/class-email-subscribers-admin.php:342
276
  #: lite/admin/class-es-campaign-admin.php:568
277
  #: lite/includes/classes/class-es-campaign-report.php:56
278
  #: lite/includes/classes/class-es-campaigns-table.php:357
@@ -286,7 +295,7 @@ msgstr ""
286
  msgid "Broadcast"
287
  msgstr ""
288
 
289
- #: lite/admin/class-email-subscribers-admin.php:343
290
  #: lite/includes/classes/class-es-newsletters.php:426
291
  #: lite/includes/classes/class-es-reports-table.php:595
292
  #: lite/includes/classes/class-es-templates-table.php:149
@@ -295,17 +304,17 @@ msgstr ""
295
  msgid "Template Preview"
296
  msgstr ""
297
 
298
- #: lite/admin/class-email-subscribers-admin.php:348
299
  msgid "Gallery"
300
  msgstr ""
301
 
302
- #: lite/admin/class-email-subscribers-admin.php:352
303
  #: lite/admin/dist/main.js:1
304
  #: lite/admin/js/src/views/EditorChoicePopup.js:10
305
  msgid "Template"
306
  msgstr ""
307
 
308
- #: lite/admin/class-email-subscribers-admin.php:352
309
  #: lite/admin/partials/dashboard.php:618
310
  #: lite/includes/class-email-subscribers-activator.php:49
311
  #: lite/includes/class-email-subscribers-activator.php:50
@@ -313,7 +322,7 @@ msgstr ""
313
  msgid "Templates"
314
  msgstr ""
315
 
316
- #: lite/admin/class-email-subscribers-admin.php:358
317
  #: lite/includes/pro-features.php:210
318
  #: lite/includes/workflows/admin/class-es-workflow-admin-edit.php:341
319
  #: lite/includes/workflows/class-es-workflows-table.php:53
@@ -323,7 +332,7 @@ msgstr ""
323
  msgid "Workflows"
324
  msgstr ""
325
 
326
- #: lite/admin/class-email-subscribers-admin.php:367
327
  #: lite/admin/partials/dashboard.php:614
328
  #: lite/includes/classes/class-es-campaign-report.php:17
329
  #: lite/includes/classes/class-es-reports-table.php:17
@@ -337,32 +346,32 @@ msgstr ""
337
  msgid "Reports"
338
  msgstr ""
339
 
340
- #: lite/admin/class-email-subscribers-admin.php:371
341
  #: lite/admin/class-es-form-admin.php:412
342
  #: lite/admin/partials/dashboard.php:622
343
  #: lite/includes/classes/class-es-admin-settings.php:136
344
  msgid "Settings"
345
  msgstr ""
346
 
347
- #: lite/admin/class-email-subscribers-admin.php:376
348
  msgid "Go To Icegram"
349
  msgstr ""
350
 
351
  #. translators: 1. WordPress URL 2. Email Subscribers version 3. Icegram site URL
352
- #: lite/admin/class-email-subscribers-admin.php:962
353
  msgid "<span id=\"footer-thankyou\">Thank you for creating with <a href=\"%1$s\" target=\"_blank\">WordPress</a> | Email Subscribers <b>%2$s</b>. Developed by team <a href=\"%3$s\" target=\"_blank\">Icegram</a></span>"
354
  msgstr ""
355
 
356
- #: lite/admin/class-email-subscribers-admin.php:990
357
- #: lite/admin/class-email-subscribers-admin.php:1812
358
- #: lite/admin/class-email-subscribers-admin.php:1835
359
  msgid "Something went wrong"
360
  msgstr ""
361
 
362
  #. translators: %s: Pricing page URL
363
- #: lite/admin/class-email-subscribers-admin.php:1462
364
  #: lite/includes/class-email-subscribers-activator.php:61
365
- #: lite/includes/class-email-subscribers.php:1532
366
  #: lite/includes/classes/class-email-subscribers-pricing.php:781
367
  #: lite/includes/classes/class-es-form-widget.php:11
368
  #: lite/includes/classes/class-es-old-widget.php:13
@@ -372,11 +381,11 @@ msgstr ""
372
  msgid "Email Subscribers"
373
  msgstr ""
374
 
375
- #: lite/admin/class-email-subscribers-admin.php:1504
376
  msgid "Last 30 days"
377
  msgstr ""
378
 
379
- #: lite/admin/class-email-subscribers-admin.php:1513
380
  #: lite/includes/class-es-common.php:362
381
  #: lite/includes/classes/class-es-contacts-table.php:356
382
  #: lite/includes/classes/class-es-import-subscribers.php:867
@@ -387,7 +396,7 @@ msgstr ""
387
  msgid "Subscribed"
388
  msgstr ""
389
 
390
- #: lite/admin/class-email-subscribers-admin.php:1521
391
  #: lite/admin/partials/dashboard.php:284
392
  #: lite/includes/class-es-common.php:364
393
  #: lite/includes/classes/class-es-campaign-report.php:262
@@ -401,24 +410,24 @@ msgstr ""
401
  msgid "Unsubscribed"
402
  msgstr ""
403
 
404
- #: lite/admin/class-email-subscribers-admin.php:1529
405
  #: lite/includes/pro-features.php:1339
406
  msgid "Avg Open Rate"
407
  msgstr ""
408
 
409
- #: lite/admin/class-email-subscribers-admin.php:1537
410
  msgid "Messages Sent"
411
  msgstr ""
412
 
413
- #: lite/admin/class-email-subscribers-admin.php:1548
414
  msgid "Last Campaign"
415
  msgstr ""
416
 
417
- #: lite/admin/class-email-subscribers-admin.php:1584
418
  msgid "Sent to"
419
  msgstr ""
420
 
421
- #: lite/admin/class-email-subscribers-admin.php:1596
422
  #: lite/admin/partials/dashboard.php:360
423
  #: lite/admin/partials/dashboard.php:378
424
  #: lite/admin/partials/dashboard.php:539
@@ -432,25 +441,25 @@ msgstr ""
432
  msgid "Opens"
433
  msgstr ""
434
 
435
- #: lite/admin/class-email-subscribers-admin.php:1610
436
  msgid "No campaigns sent yet"
437
  msgstr ""
438
 
439
- #: lite/admin/class-email-subscribers-admin.php:1618
440
  msgid "Latest Blog Posts from Icegram"
441
  msgstr ""
442
 
443
- #: lite/admin/class-email-subscribers-admin.php:1735
444
  msgid "Please publish it or save it as a draft."
445
  msgstr ""
446
 
447
  #. translators: %s: link to new keyword doc
448
- #: lite/admin/class-email-subscribers-admin.php:1791
449
  msgid "There seems to be some issue in sending your emails. You may have to check your %1$semail sending setting%2$s."
450
  msgstr ""
451
 
452
  #: lite/admin/class-es-admin.php:110
453
- #: lite/admin/class-es-admin.php:988
454
  msgid "Please add a subject."
455
  msgstr ""
456
 
@@ -506,22 +515,22 @@ msgstr ""
506
  msgid "Message"
507
  msgstr ""
508
 
509
- #: lite/admin/class-es-admin.php:609
510
  #: lite/includes/classes/class-es-templates-table.php:167
511
  msgid "Template type"
512
  msgstr ""
513
 
514
- #: lite/admin/class-es-admin.php:631
515
  msgid "Preview image"
516
  msgstr ""
517
 
518
- #: lite/admin/class-es-admin.php:636
519
  msgid "Add image"
520
  msgstr ""
521
 
522
- #: lite/admin/class-es-admin.php:870
523
- #: lite/admin/class-es-admin.php:890
524
- #: lite/admin/class-es-admin.php:899
525
  #: lite/admin/class-es-campaign-admin.php:1557
526
  #: lite/admin/class-es-campaign-admin.php:1577
527
  #: lite/admin/class-es-campaign-admin.php:1586
@@ -532,25 +541,25 @@ msgstr ""
532
  msgid "Available Keywords"
533
  msgstr ""
534
 
535
- #: lite/admin/class-es-admin.php:890
536
  #: lite/admin/class-es-campaign-admin.php:1577
537
  #: lite/includes/classes/class-es-templates-table.php:73
538
  msgid "for Broadcast:"
539
  msgstr ""
540
 
541
- #: lite/admin/class-es-admin.php:899
542
  #: lite/admin/class-es-campaign-admin.php:1586
543
  #: lite/includes/classes/class-es-templates-table.php:78
544
  msgid "for Post Digest:"
545
  msgstr ""
546
 
547
- #: lite/admin/class-es-admin.php:903
548
  #: lite/admin/class-es-campaign-admin.php:1590
549
  #: lite/includes/classes/class-es-templates-table.php:79
550
  msgid "Any keywords related Post Notification"
551
  msgstr ""
552
 
553
- #: lite/admin/class-es-admin.php:984
554
  #: lite/includes/workflows/class-es-workflows-table.php:237
555
  #: lite/admin/dist/main.js:1
556
  #: lite/admin/js/src/views/GalleryItemsPage.js:77
@@ -628,8 +637,8 @@ msgstr ""
628
  #: lite/admin/class-es-campaign-admin.php:395
629
  #: lite/admin/class-es-campaign-admin.php:418
630
  #: lite/admin/class-es-form-admin.php:182
631
- #: lite/includes/classes/class-es-admin-settings.php:224
632
- #: lite/includes/classes/class-es-admin-settings.php:227
633
  #: lite/includes/classes/class-es-campaigns-table.php:626
634
  #: lite/includes/classes/class-es-forms-table.php:808
635
  #: lite/includes/classes/class-es-lists-table.php:637
@@ -652,7 +661,7 @@ msgstr ""
652
  #: lite/admin/class-es-campaign-admin.php:407
653
  #: lite/admin/class-es-form-admin.php:165
654
  #: lite/admin/class-ig-es-campaign-rules.php:672
655
- #: lite/includes/classes/class-es-admin-settings.php:233
656
  #: lite/includes/classes/class-es-campaign-report.php:436
657
  #: lite/includes/classes/class-es-contacts-table.php:838
658
  #: lite/includes/classes/class-es-export-subscribers.php:339
@@ -939,6 +948,24 @@ msgstr ""
939
  msgid "Copy"
940
  msgstr ""
941
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
942
  #: lite/admin/class-ig-es-campaign-rules.php:185
943
  msgid "Recipients"
944
  msgstr ""
@@ -1854,16 +1881,16 @@ msgid "OK, I Got it!"
1854
  msgstr ""
1855
 
1856
  #. translators: 1: Error message 2: File name 3: Line number
1857
- #: lite/includes/class-email-subscribers.php:1325
1858
  msgid "%1$s in %2$s on line %3$s"
1859
  msgstr ""
1860
 
1861
- #: lite/includes/class-email-subscribers.php:1545
1862
  msgid "Icegram WC"
1863
  msgstr ""
1864
 
1865
  #. translators: %1$s - constant that was used
1866
- #: lite/includes/class-email-subscribers.php:2020
1867
  msgid "Value was set using constant %1$s"
1868
  msgstr ""
1869
 
@@ -2392,317 +2419,355 @@ msgstr ""
2392
  msgid "Security"
2393
  msgstr ""
2394
 
2395
- #: lite/includes/classes/class-es-admin-settings.php:202
 
 
 
 
2396
  msgid "Your emails might land in spam if you use above email address.."
2397
  msgstr ""
2398
 
2399
  #. translators: %s: Site domain
2400
- #: lite/includes/classes/class-es-admin-settings.php:206
2401
  msgid "Consider using email address matching your site domain like %s"
2402
  msgstr ""
2403
 
2404
- #: lite/includes/classes/class-es-admin-settings.php:212
2405
  msgid "The \"from\" email address for all emails."
2406
  msgstr ""
2407
 
2408
- #: lite/includes/classes/class-es-admin-settings.php:220
2409
  msgid "Sender"
2410
  msgstr ""
2411
 
2412
- #: lite/includes/classes/class-es-admin-settings.php:225
2413
  msgid "The \"from\" name people will see when they receive emails."
2414
  msgstr ""
2415
 
2416
- #: lite/includes/classes/class-es-admin-settings.php:236
2417
  msgid "Email Address"
2418
  msgstr ""
2419
 
2420
- #: lite/includes/classes/class-es-admin-settings.php:244
2421
  msgid "Admin emails"
2422
  msgstr ""
2423
 
2424
- #: lite/includes/classes/class-es-admin-settings.php:245
2425
  msgid "Who should be notified about system events like \"someone subscribed\", \"campaign sent\" etc?"
2426
  msgstr ""
2427
 
2428
- #: lite/includes/classes/class-es-admin-settings.php:247
2429
  msgid "You can enter multiple email addresses - separate them with comma"
2430
  msgstr ""
2431
 
2432
- #: lite/includes/classes/class-es-admin-settings.php:253
2433
  msgid "Opt-in type"
2434
  msgstr ""
2435
 
2436
- #: lite/includes/classes/class-es-admin-settings.php:255
2437
  msgid "Single = confirm subscribers as they subscribe.<br> Double = send a confirmation email and require clicking on a link to confirm subscription."
2438
  msgstr ""
2439
 
2440
- #: lite/includes/classes/class-es-admin-settings.php:264
2441
  msgid "Image size"
2442
  msgstr ""
2443
 
2444
  #. translators: %s: Keyword
2445
- #: lite/includes/classes/class-es-admin-settings.php:269
2446
  msgid "%s keyword will use this image size. Use full size only if your template design needs it. Thumbnail should work well otherwise."
2447
  msgstr ""
2448
 
2449
- #: lite/includes/classes/class-es-admin-settings.php:276
2450
  msgid "Enable AJAX subscription form submission"
2451
  msgstr ""
2452
 
2453
- #: lite/includes/classes/class-es-admin-settings.php:277
2454
  msgid "Enabling this will let users to submit their subscription form without page reload using AJAX call."
2455
  msgstr ""
2456
 
2457
- #: lite/includes/classes/class-es-admin-settings.php:284
2458
  msgid "Track opens"
2459
  msgstr ""
2460
 
2461
- #: lite/includes/classes/class-es-admin-settings.php:285
2462
  msgid "Do you want to track when people view your emails? (We recommend keeping it enabled)"
2463
  msgstr ""
2464
 
2465
- #: lite/includes/classes/class-es-admin-settings.php:297
2466
  msgid "Subscription success message"
2467
  msgstr ""
2468
 
2469
- #: lite/includes/classes/class-es-admin-settings.php:298
2470
  msgid "This message will show when a visitor successfully subscribes using the form."
2471
  msgstr ""
2472
 
2473
- #: lite/includes/classes/class-es-admin-settings.php:309
2474
  msgid "Unsubscribe text in email footer:"
2475
  msgstr ""
2476
 
2477
- #: lite/includes/classes/class-es-admin-settings.php:310
2478
  msgid "All emails will include this text in the footer so people can unsubscribe if they want."
2479
  msgstr ""
2480
 
2481
  #. translators: %s: List of Keywords
2482
- #: lite/includes/classes/class-es-admin-settings.php:312
2483
  msgid "Use %s keyword to add unsubscribe link."
2484
  msgstr ""
2485
 
2486
- #: lite/includes/classes/class-es-admin-settings.php:317
2487
  msgid "Double opt-in subscription messages:"
2488
  msgstr ""
2489
 
2490
- #: lite/includes/classes/class-es-admin-settings.php:318
2491
  msgid "Page and messages to show when people click on the link in a subscription confirmation email."
2492
  msgstr ""
2493
 
2494
- #: lite/includes/classes/class-es-admin-settings.php:325
2495
  msgid "You have been subscribed successfully!"
2496
  msgstr ""
2497
 
2498
- #: lite/includes/classes/class-es-admin-settings.php:327
2499
  msgid "Message on successful subscription"
2500
  msgstr ""
2501
 
2502
- #: lite/includes/classes/class-es-admin-settings.php:328
2503
  msgid "Show this message if contact is successfully subscribed from double opt-in (confirmation) email"
2504
  msgstr ""
2505
 
2506
- #: lite/includes/classes/class-es-admin-settings.php:336
2507
  msgid "Oops.. Your request couldn't be completed. This email address seems to be already subscribed / blocked."
2508
  msgstr ""
2509
 
2510
- #: lite/includes/classes/class-es-admin-settings.php:338
2511
  msgid "Message when subscription fails"
2512
  msgstr ""
2513
 
2514
- #: lite/includes/classes/class-es-admin-settings.php:339
2515
  msgid "Show this message if any error occured after clicking confirmation link from double opt-in (confirmation) email."
2516
  msgstr ""
2517
 
2518
- #: lite/includes/classes/class-es-admin-settings.php:347
2519
  msgid "Unsubscribe messages"
2520
  msgstr ""
2521
 
2522
- #: lite/includes/classes/class-es-admin-settings.php:348
2523
  msgid "Page and messages to show when people click on the unsubscribe link in an email's footer."
2524
  msgstr ""
2525
 
2526
- #: lite/includes/classes/class-es-admin-settings.php:356
2527
  msgid "Thank You, You have been successfully unsubscribed. You will no longer hear from us."
2528
  msgstr ""
2529
 
2530
- #: lite/includes/classes/class-es-admin-settings.php:358
2531
  msgid "Message on unsubscribe success"
2532
  msgstr ""
2533
 
2534
- #: lite/includes/classes/class-es-admin-settings.php:359
2535
  msgid "Once contact clicks on unsubscribe link, he/she will be redirected to a page where this message will be shown."
2536
  msgstr ""
2537
 
2538
- #: lite/includes/classes/class-es-admin-settings.php:367
2539
  msgid "Oops.. There was some technical error. Please try again later or contact us."
2540
  msgstr ""
2541
 
2542
- #: lite/includes/classes/class-es-admin-settings.php:369
2543
  msgid "Message when unsubscribe fails"
2544
  msgstr ""
2545
 
2546
- #: lite/includes/classes/class-es-admin-settings.php:370
2547
  msgid "Show this message if any error occured after clicking on unsubscribe link."
2548
  msgstr ""
2549
 
2550
- #: lite/includes/classes/class-es-admin-settings.php:378
2551
  msgid "Share Icegram"
2552
  msgstr ""
2553
 
2554
- #: lite/includes/classes/class-es-admin-settings.php:387
2555
  msgid "Delete plugin data on uninstall"
2556
  msgstr ""
2557
 
2558
- #: lite/includes/classes/class-es-admin-settings.php:388
2559
  msgid "Be careful with this! When enabled, it will remove all lists, campaigns and other data if you uninstall the plugin."
2560
  msgstr ""
2561
 
2562
- #: lite/includes/classes/class-es-admin-settings.php:415
2563
  msgid "<br><span class=\"ml-6\">Cron last hit time : <b>"
2564
  msgstr ""
2565
 
2566
- #: lite/includes/classes/class-es-admin-settings.php:422
2567
  msgid "<span class=\"es-send-success es-icon\"></span> We will take care of it. You don't need to visit this URL manually."
2568
  msgstr ""
2569
 
2570
  #. translators: %s: Link to Icegram documentation
2571
- #: lite/includes/classes/class-es-admin-settings.php:425
2572
  msgid "You need to visit this URL to send email notifications. Know <a href='%s' target='_blank'>how to run this in background</a>"
2573
  msgstr ""
2574
 
2575
- #: lite/includes/classes/class-es-admin-settings.php:428
2576
  msgid "How to configure Email Sending"
2577
  msgstr ""
2578
 
2579
- #: lite/includes/classes/class-es-admin-settings.php:444
2580
  msgid "Cron URL"
2581
  msgstr ""
2582
 
2583
- #: lite/includes/classes/class-es-admin-settings.php:453
2584
  msgid "Disable Wordpress Cron"
2585
  msgstr ""
2586
 
2587
- #: lite/includes/classes/class-es-admin-settings.php:454
2588
  msgid "Enable this option if you do not want Email Subscribers to use WP Cron to send emails."
2589
  msgstr ""
2590
 
2591
- #: lite/includes/classes/class-es-admin-settings.php:459
2592
  msgid "Send emails at most every"
2593
  msgstr ""
2594
 
2595
- #: lite/includes/classes/class-es-admin-settings.php:462
2596
  msgid "Optional if a real cron service is used"
2597
  msgstr ""
2598
 
2599
- #: lite/includes/classes/class-es-admin-settings.php:472
2600
  msgid "Maximum emails to send in an hour"
2601
  msgstr ""
2602
 
2603
- #: lite/includes/classes/class-es-admin-settings.php:473
2604
  msgid "Total emails your host can send in an hour.<br>Total emails sent in current hour: <b>"
2605
  msgstr ""
2606
 
2607
- #: lite/includes/classes/class-es-admin-settings.php:482
2608
  msgid "Maximum emails to send at once"
2609
  msgstr ""
2610
 
2611
- #: lite/includes/classes/class-es-admin-settings.php:483
2612
  msgid "Maximum emails you want to send on every cron request."
2613
  msgstr ""
2614
 
2615
- #: lite/includes/classes/class-es-admin-settings.php:494
2616
  msgid "Send test email"
2617
  msgstr ""
2618
 
2619
- #: lite/includes/classes/class-es-admin-settings.php:495
2620
  msgid "Enter email address to send test email."
2621
  msgstr ""
2622
 
2623
- #: lite/includes/classes/class-es-admin-settings.php:503
2624
  msgid "Select Mailer"
2625
  msgstr ""
2626
 
2627
- #: lite/includes/classes/class-es-admin-settings.php:515
2628
- #: lite/includes/classes/class-es-admin-settings.php:867
2629
  msgid "Pepipost API key"
2630
  msgstr ""
2631
 
2632
- #: lite/includes/classes/class-es-admin-settings.php:532
2633
  msgid "Select a mailer to send mail"
2634
  msgstr ""
2635
 
2636
- #: lite/includes/classes/class-es-admin-settings.php:542
2637
  msgid "Blocked domain(s)"
2638
  msgstr ""
2639
 
2640
- #: lite/includes/classes/class-es-admin-settings.php:544
2641
  msgid "Seeing spam signups from particular domains? Enter domains names (one per line) that you want to block here."
2642
  msgstr ""
2643
 
2644
- #: lite/includes/classes/class-es-admin-settings.php:550
2645
- msgid "Allow subscriptions through API"
 
 
 
 
 
 
 
 
 
2646
  msgstr ""
2647
 
2648
- #: lite/includes/classes/class-es-admin-settings.php:551
2649
- msgid "Enable subscriptions API to add subscribers through third-party sites or apps."
2650
  msgstr ""
2651
 
2652
- #: lite/includes/classes/class-es-admin-settings.php:762
2653
  msgid "Save Settings"
2654
  msgstr ""
2655
 
2656
- #: lite/includes/classes/class-es-admin-settings.php:866
2657
  msgid "Signup for Pepipost"
2658
  msgstr ""
2659
 
2660
- #: lite/includes/classes/class-es-admin-settings.php:867
2661
  msgid "How to find"
2662
  msgstr ""
2663
 
2664
- #: lite/includes/classes/class-es-admin-settings.php:868
2665
  msgid "Why to choose Pepipost"
2666
  msgstr ""
2667
 
2668
- #: lite/includes/classes/class-es-admin-settings.php:892
2669
  msgid "Cron Info"
2670
  msgstr ""
2671
 
2672
- #: lite/includes/classes/class-es-admin-settings.php:959
2673
  msgid "Event"
2674
  msgstr ""
2675
 
2676
- #: lite/includes/classes/class-es-admin-settings.php:960
2677
  msgid "Interval"
2678
  msgstr ""
2679
 
2680
- #: lite/includes/classes/class-es-admin-settings.php:961
2681
  msgid "Next Execution"
2682
  msgstr ""
2683
 
2684
  #. translators: %s: Next scheduled time
2685
- #: lite/includes/classes/class-es-admin-settings.php:1007
2686
  msgid "In %s"
2687
  msgstr ""
2688
 
2689
- #: lite/includes/classes/class-es-admin-settings.php:1042
2690
  msgid "Plugin usage tracking"
2691
  msgstr ""
2692
 
2693
- #: lite/includes/classes/class-es-admin-settings.php:1045
2694
  msgid "Help us to improve Email Subscribers by opting in to share non-sensitive plugin usage data."
2695
  msgstr ""
2696
 
2697
- #: lite/includes/classes/class-es-admin-settings.php:1076
2698
  msgid "Now you can control all your notifications through workflows."
2699
  msgstr ""
2700
 
2701
  #. translators: 1. Anchor start tag 2. Anchor end tag
2702
- #: lite/includes/classes/class-es-admin-settings.php:1079
2703
  msgid "Click %1$shere%2$s to go to workflows."
2704
  msgstr ""
2705
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2706
  #: lite/includes/classes/class-es-campaign-report.php:16
2707
  #: lite/includes/classes/class-es-campaign-report.php:133
2708
  #: lite/includes/classes/class-es-campaigns-table.php:443
@@ -5199,10 +5264,6 @@ msgstr ""
5199
  msgid "Rules"
5200
  msgstr ""
5201
 
5202
- #: lite/includes/workflows/admin/class-es-workflow-admin-edit.php:401
5203
- msgid "Actions"
5204
- msgstr ""
5205
-
5206
  #: lite/includes/workflows/admin/class-es-workflow-admin-edit.php:403
5207
  msgid "Placeholders"
5208
  msgstr ""
@@ -7475,6 +7536,10 @@ msgstr ""
7475
  msgid "Email Authentication"
7476
  msgstr ""
7477
 
 
 
 
 
7478
  #: starter/starter-class-email-subscribers.php:1695
7479
  msgid "Auth Header Name"
7480
  msgstr ""
2
  # This file is distributed under the same license as the Email Subscribers & Newsletters plugin.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Email Subscribers & Newsletters 5.4.18\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/email-subscribers\n"
7
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
8
  "Language-Team: LANGUAGE <LL@li.org>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "POT-Creation-Date: 2022-11-02T12:08:32+01:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.4.0\n"
15
  "X-Domain: email-subscribers\n"
29
 
30
  #. Author of the plugin
31
  #: lite/admin/partials/help.php:28
32
+ #: lite/includes/class-email-subscribers.php:1540
33
  msgid "Icegram"
34
  msgstr ""
35
 
224
  msgid "Want to select contacts on all pages?"
225
  msgstr ""
226
 
227
+ #: lite/admin/class-email-subscribers-admin.php:239
228
+ msgid "Are you sure you want to delete this key? This action cannot be undone."
229
+ msgstr ""
230
+
231
+ #: lite/admin/class-email-subscribers-admin.php:240
232
+ #: lite/admin/class-es-rest-api-admin.php:31
233
+ msgid "Please select a user."
234
+ msgstr ""
235
+
236
+ #: lite/admin/class-email-subscribers-admin.php:317
237
  #: lite/admin/partials/dashboard.php:167
238
  msgid "Dashboard"
239
  msgstr ""
240
 
241
+ #: lite/admin/class-email-subscribers-admin.php:322
242
  #: lite/admin/partials/dashboard.php:174
243
  #: lite/includes/classes/class-es-contacts-table.php:238
244
  #: lite/includes/pro-features.php:205
246
  msgid "Audience"
247
  msgstr ""
248
 
249
+ #: lite/admin/class-email-subscribers-admin.php:326
250
  #: lite/admin/class-es-form-admin.php:232
251
  #: lite/admin/class-es-form-admin.php:519
252
  #: lite/includes/classes/class-es-lists-table.php:34
254
  msgid "Lists"
255
  msgstr ""
256
 
257
+ #: lite/admin/class-email-subscribers-admin.php:332
258
  #: lite/admin/class-es-form-admin.php:397
259
  #: lite/includes/classes/class-es-form-widget.php:77
260
  #: lite/includes/classes/class-es-forms-table.php:39
265
  msgid "Forms"
266
  msgstr ""
267
 
268
+ #: lite/admin/class-email-subscribers-admin.php:338
269
  #: lite/admin/class-es-campaign-admin.php:597
270
  #: lite/admin/partials/gallery.php:10
271
  #: lite/includes/classes/class-es-campaigns-table.php:124
277
  msgid "Campaigns"
278
  msgstr ""
279
 
280
+ #: lite/admin/class-email-subscribers-admin.php:342
281
  msgid "Post Notifications"
282
  msgstr ""
283
 
284
+ #: lite/admin/class-email-subscribers-admin.php:344
285
  #: lite/admin/class-es-campaign-admin.php:568
286
  #: lite/includes/classes/class-es-campaign-report.php:56
287
  #: lite/includes/classes/class-es-campaigns-table.php:357
295
  msgid "Broadcast"
296
  msgstr ""
297
 
298
+ #: lite/admin/class-email-subscribers-admin.php:345
299
  #: lite/includes/classes/class-es-newsletters.php:426
300
  #: lite/includes/classes/class-es-reports-table.php:595
301
  #: lite/includes/classes/class-es-templates-table.php:149
304
  msgid "Template Preview"
305
  msgstr ""
306
 
307
+ #: lite/admin/class-email-subscribers-admin.php:350
308
  msgid "Gallery"
309
  msgstr ""
310
 
311
+ #: lite/admin/class-email-subscribers-admin.php:354
312
  #: lite/admin/dist/main.js:1
313
  #: lite/admin/js/src/views/EditorChoicePopup.js:10
314
  msgid "Template"
315
  msgstr ""
316
 
317
+ #: lite/admin/class-email-subscribers-admin.php:354
318
  #: lite/admin/partials/dashboard.php:618
319
  #: lite/includes/class-email-subscribers-activator.php:49
320
  #: lite/includes/class-email-subscribers-activator.php:50
322
  msgid "Templates"
323
  msgstr ""
324
 
325
+ #: lite/admin/class-email-subscribers-admin.php:360
326
  #: lite/includes/pro-features.php:210
327
  #: lite/includes/workflows/admin/class-es-workflow-admin-edit.php:341
328
  #: lite/includes/workflows/class-es-workflows-table.php:53
332
  msgid "Workflows"
333
  msgstr ""
334
 
335
+ #: lite/admin/class-email-subscribers-admin.php:369
336
  #: lite/admin/partials/dashboard.php:614
337
  #: lite/includes/classes/class-es-campaign-report.php:17
338
  #: lite/includes/classes/class-es-reports-table.php:17
346
  msgid "Reports"
347
  msgstr ""
348
 
349
+ #: lite/admin/class-email-subscribers-admin.php:373
350
  #: lite/admin/class-es-form-admin.php:412
351
  #: lite/admin/partials/dashboard.php:622
352
  #: lite/includes/classes/class-es-admin-settings.php:136
353
  msgid "Settings"
354
  msgstr ""
355
 
356
+ #: lite/admin/class-email-subscribers-admin.php:378
357
  msgid "Go To Icegram"
358
  msgstr ""
359
 
360
  #. translators: 1. WordPress URL 2. Email Subscribers version 3. Icegram site URL
361
+ #: lite/admin/class-email-subscribers-admin.php:964
362
  msgid "<span id=\"footer-thankyou\">Thank you for creating with <a href=\"%1$s\" target=\"_blank\">WordPress</a> | Email Subscribers <b>%2$s</b>. Developed by team <a href=\"%3$s\" target=\"_blank\">Icegram</a></span>"
363
  msgstr ""
364
 
365
+ #: lite/admin/class-email-subscribers-admin.php:992
366
+ #: lite/admin/class-email-subscribers-admin.php:1814
367
+ #: lite/admin/class-email-subscribers-admin.php:1837
368
  msgid "Something went wrong"
369
  msgstr ""
370
 
371
  #. translators: %s: Pricing page URL
372
+ #: lite/admin/class-email-subscribers-admin.php:1464
373
  #: lite/includes/class-email-subscribers-activator.php:61
374
+ #: lite/includes/class-email-subscribers.php:1537
375
  #: lite/includes/classes/class-email-subscribers-pricing.php:781
376
  #: lite/includes/classes/class-es-form-widget.php:11
377
  #: lite/includes/classes/class-es-old-widget.php:13
381
  msgid "Email Subscribers"
382
  msgstr ""
383
 
384
+ #: lite/admin/class-email-subscribers-admin.php:1506
385
  msgid "Last 30 days"
386
  msgstr ""
387
 
388
+ #: lite/admin/class-email-subscribers-admin.php:1515
389
  #: lite/includes/class-es-common.php:362
390
  #: lite/includes/classes/class-es-contacts-table.php:356
391
  #: lite/includes/classes/class-es-import-subscribers.php:867
396
  msgid "Subscribed"
397
  msgstr ""
398
 
399
+ #: lite/admin/class-email-subscribers-admin.php:1523
400
  #: lite/admin/partials/dashboard.php:284
401
  #: lite/includes/class-es-common.php:364
402
  #: lite/includes/classes/class-es-campaign-report.php:262
410
  msgid "Unsubscribed"
411
  msgstr ""
412
 
413
+ #: lite/admin/class-email-subscribers-admin.php:1531
414
  #: lite/includes/pro-features.php:1339
415
  msgid "Avg Open Rate"
416
  msgstr ""
417
 
418
+ #: lite/admin/class-email-subscribers-admin.php:1539
419
  msgid "Messages Sent"
420
  msgstr ""
421
 
422
+ #: lite/admin/class-email-subscribers-admin.php:1550
423
  msgid "Last Campaign"
424
  msgstr ""
425
 
426
+ #: lite/admin/class-email-subscribers-admin.php:1586
427
  msgid "Sent to"
428
  msgstr ""
429
 
430
+ #: lite/admin/class-email-subscribers-admin.php:1598
431
  #: lite/admin/partials/dashboard.php:360
432
  #: lite/admin/partials/dashboard.php:378
433
  #: lite/admin/partials/dashboard.php:539
441
  msgid "Opens"
442
  msgstr ""
443
 
444
+ #: lite/admin/class-email-subscribers-admin.php:1612
445
  msgid "No campaigns sent yet"
446
  msgstr ""
447
 
448
+ #: lite/admin/class-email-subscribers-admin.php:1620
449
  msgid "Latest Blog Posts from Icegram"
450
  msgstr ""
451
 
452
+ #: lite/admin/class-email-subscribers-admin.php:1737
453
  msgid "Please publish it or save it as a draft."
454
  msgstr ""
455
 
456
  #. translators: %s: link to new keyword doc
457
+ #: lite/admin/class-email-subscribers-admin.php:1793
458
  msgid "There seems to be some issue in sending your emails. You may have to check your %1$semail sending setting%2$s."
459
  msgstr ""
460
 
461
  #: lite/admin/class-es-admin.php:110
462
+ #: lite/admin/class-es-admin.php:977
463
  msgid "Please add a subject."
464
  msgstr ""
465
 
515
  msgid "Message"
516
  msgstr ""
517
 
518
+ #: lite/admin/class-es-admin.php:598
519
  #: lite/includes/classes/class-es-templates-table.php:167
520
  msgid "Template type"
521
  msgstr ""
522
 
523
+ #: lite/admin/class-es-admin.php:620
524
  msgid "Preview image"
525
  msgstr ""
526
 
527
+ #: lite/admin/class-es-admin.php:625
528
  msgid "Add image"
529
  msgstr ""
530
 
531
+ #: lite/admin/class-es-admin.php:859
532
+ #: lite/admin/class-es-admin.php:879
533
+ #: lite/admin/class-es-admin.php:888
534
  #: lite/admin/class-es-campaign-admin.php:1557
535
  #: lite/admin/class-es-campaign-admin.php:1577
536
  #: lite/admin/class-es-campaign-admin.php:1586
541
  msgid "Available Keywords"
542
  msgstr ""
543
 
544
+ #: lite/admin/class-es-admin.php:879
545
  #: lite/admin/class-es-campaign-admin.php:1577
546
  #: lite/includes/classes/class-es-templates-table.php:73
547
  msgid "for Broadcast:"
548
  msgstr ""
549
 
550
+ #: lite/admin/class-es-admin.php:888
551
  #: lite/admin/class-es-campaign-admin.php:1586
552
  #: lite/includes/classes/class-es-templates-table.php:78
553
  msgid "for Post Digest:"
554
  msgstr ""
555
 
556
+ #: lite/admin/class-es-admin.php:892
557
  #: lite/admin/class-es-campaign-admin.php:1590
558
  #: lite/includes/classes/class-es-templates-table.php:79
559
  msgid "Any keywords related Post Notification"
560
  msgstr ""
561
 
562
+ #: lite/admin/class-es-admin.php:973
563
  #: lite/includes/workflows/class-es-workflows-table.php:237
564
  #: lite/admin/dist/main.js:1
565
  #: lite/admin/js/src/views/GalleryItemsPage.js:77
637
  #: lite/admin/class-es-campaign-admin.php:395
638
  #: lite/admin/class-es-campaign-admin.php:418
639
  #: lite/admin/class-es-form-admin.php:182
640
+ #: lite/includes/classes/class-es-admin-settings.php:232
641
+ #: lite/includes/classes/class-es-admin-settings.php:235
642
  #: lite/includes/classes/class-es-campaigns-table.php:626
643
  #: lite/includes/classes/class-es-forms-table.php:808
644
  #: lite/includes/classes/class-es-lists-table.php:637
661
  #: lite/admin/class-es-campaign-admin.php:407
662
  #: lite/admin/class-es-form-admin.php:165
663
  #: lite/admin/class-ig-es-campaign-rules.php:672
664
+ #: lite/includes/classes/class-es-admin-settings.php:241
665
  #: lite/includes/classes/class-es-campaign-report.php:436
666
  #: lite/includes/classes/class-es-contacts-table.php:838
667
  #: lite/includes/classes/class-es-export-subscribers.php:339
948
  msgid "Copy"
949
  msgstr ""
950
 
951
+ #: lite/admin/class-es-rest-api-admin.php:37
952
+ msgid "Selected user doesn't exists. Please select a different user."
953
+ msgstr ""
954
+
955
+ #. Translators: %s: new API key
956
+ #: lite/admin/class-es-rest-api-admin.php:47
957
+ msgid "Here is your new API key: %s."
958
+ msgstr ""
959
+
960
+ #: lite/admin/class-es-rest-api-admin.php:48
961
+ msgid "Be sure to save this in a safe location. You will not be able to retrieve it later on."
962
+ msgstr ""
963
+
964
+ #: lite/admin/class-es-rest-api-admin.php:86
965
+ #: lite/admin/class-es-rest-api-admin.php:92
966
+ msgid "User missing."
967
+ msgstr ""
968
+
969
  #: lite/admin/class-ig-es-campaign-rules.php:185
970
  msgid "Recipients"
971
  msgstr ""
1881
  msgstr ""
1882
 
1883
  #. translators: 1: Error message 2: File name 3: Line number
1884
+ #: lite/includes/class-email-subscribers.php:1330
1885
  msgid "%1$s in %2$s on line %3$s"
1886
  msgstr ""
1887
 
1888
+ #: lite/includes/class-email-subscribers.php:1550
1889
  msgid "Icegram WC"
1890
  msgstr ""
1891
 
1892
  #. translators: %1$s - constant that was used
1893
+ #: lite/includes/class-email-subscribers.php:2025
1894
  msgid "Value was set using constant %1$s"
1895
  msgstr ""
1896
 
2419
  msgid "Security"
2420
  msgstr ""
2421
 
2422
+ #: lite/includes/classes/class-es-admin-settings.php:168
2423
+ msgid "REST API"
2424
+ msgstr ""
2425
+
2426
+ #: lite/includes/classes/class-es-admin-settings.php:210
2427
  msgid "Your emails might land in spam if you use above email address.."
2428
  msgstr ""
2429
 
2430
  #. translators: %s: Site domain
2431
+ #: lite/includes/classes/class-es-admin-settings.php:214
2432
  msgid "Consider using email address matching your site domain like %s"
2433
  msgstr ""
2434
 
2435
+ #: lite/includes/classes/class-es-admin-settings.php:220
2436
  msgid "The \"from\" email address for all emails."
2437
  msgstr ""
2438
 
2439
+ #: lite/includes/classes/class-es-admin-settings.php:228
2440
  msgid "Sender"
2441
  msgstr ""
2442
 
2443
+ #: lite/includes/classes/class-es-admin-settings.php:233
2444
  msgid "The \"from\" name people will see when they receive emails."
2445
  msgstr ""
2446
 
2447
+ #: lite/includes/classes/class-es-admin-settings.php:244
2448
  msgid "Email Address"
2449
  msgstr ""
2450
 
2451
+ #: lite/includes/classes/class-es-admin-settings.php:252
2452
  msgid "Admin emails"
2453
  msgstr ""
2454
 
2455
+ #: lite/includes/classes/class-es-admin-settings.php:253
2456
  msgid "Who should be notified about system events like \"someone subscribed\", \"campaign sent\" etc?"
2457
  msgstr ""
2458
 
2459
+ #: lite/includes/classes/class-es-admin-settings.php:255
2460
  msgid "You can enter multiple email addresses - separate them with comma"
2461
  msgstr ""
2462
 
2463
+ #: lite/includes/classes/class-es-admin-settings.php:261
2464
  msgid "Opt-in type"
2465
  msgstr ""
2466
 
2467
+ #: lite/includes/classes/class-es-admin-settings.php:263
2468
  msgid "Single = confirm subscribers as they subscribe.<br> Double = send a confirmation email and require clicking on a link to confirm subscription."
2469
  msgstr ""
2470
 
2471
+ #: lite/includes/classes/class-es-admin-settings.php:272
2472
  msgid "Image size"
2473
  msgstr ""
2474
 
2475
  #. translators: %s: Keyword
2476
+ #: lite/includes/classes/class-es-admin-settings.php:277
2477
  msgid "%s keyword will use this image size. Use full size only if your template design needs it. Thumbnail should work well otherwise."
2478
  msgstr ""
2479
 
2480
+ #: lite/includes/classes/class-es-admin-settings.php:284
2481
  msgid "Enable AJAX subscription form submission"
2482
  msgstr ""
2483
 
2484
+ #: lite/includes/classes/class-es-admin-settings.php:285
2485
  msgid "Enabling this will let users to submit their subscription form without page reload using AJAX call."
2486
  msgstr ""
2487
 
2488
+ #: lite/includes/classes/class-es-admin-settings.php:292
2489
  msgid "Track opens"
2490
  msgstr ""
2491
 
2492
+ #: lite/includes/classes/class-es-admin-settings.php:293
2493
  msgid "Do you want to track when people view your emails? (We recommend keeping it enabled)"
2494
  msgstr ""
2495
 
2496
+ #: lite/includes/classes/class-es-admin-settings.php:305
2497
  msgid "Subscription success message"
2498
  msgstr ""
2499
 
2500
+ #: lite/includes/classes/class-es-admin-settings.php:306
2501
  msgid "This message will show when a visitor successfully subscribes using the form."
2502
  msgstr ""
2503
 
2504
+ #: lite/includes/classes/class-es-admin-settings.php:317
2505
  msgid "Unsubscribe text in email footer:"
2506
  msgstr ""
2507
 
2508
+ #: lite/includes/classes/class-es-admin-settings.php:318
2509
  msgid "All emails will include this text in the footer so people can unsubscribe if they want."
2510
  msgstr ""
2511
 
2512
  #. translators: %s: List of Keywords
2513
+ #: lite/includes/classes/class-es-admin-settings.php:320
2514
  msgid "Use %s keyword to add unsubscribe link."
2515
  msgstr ""
2516
 
2517
+ #: lite/includes/classes/class-es-admin-settings.php:325
2518
  msgid "Double opt-in subscription messages:"
2519
  msgstr ""
2520
 
2521
+ #: lite/includes/classes/class-es-admin-settings.php:326
2522
  msgid "Page and messages to show when people click on the link in a subscription confirmation email."
2523
  msgstr ""
2524
 
2525
+ #: lite/includes/classes/class-es-admin-settings.php:333
2526
  msgid "You have been subscribed successfully!"
2527
  msgstr ""
2528
 
2529
+ #: lite/includes/classes/class-es-admin-settings.php:335
2530
  msgid "Message on successful subscription"
2531
  msgstr ""
2532
 
2533
+ #: lite/includes/classes/class-es-admin-settings.php:336
2534
  msgid "Show this message if contact is successfully subscribed from double opt-in (confirmation) email"
2535
  msgstr ""
2536
 
2537
+ #: lite/includes/classes/class-es-admin-settings.php:344
2538
  msgid "Oops.. Your request couldn't be completed. This email address seems to be already subscribed / blocked."
2539
  msgstr ""
2540
 
2541
+ #: lite/includes/classes/class-es-admin-settings.php:346
2542
  msgid "Message when subscription fails"
2543
  msgstr ""
2544
 
2545
+ #: lite/includes/classes/class-es-admin-settings.php:347
2546
  msgid "Show this message if any error occured after clicking confirmation link from double opt-in (confirmation) email."
2547
  msgstr ""
2548
 
2549
+ #: lite/includes/classes/class-es-admin-settings.php:355
2550
  msgid "Unsubscribe messages"
2551
  msgstr ""
2552
 
2553
+ #: lite/includes/classes/class-es-admin-settings.php:356
2554
  msgid "Page and messages to show when people click on the unsubscribe link in an email's footer."
2555
  msgstr ""
2556
 
2557
+ #: lite/includes/classes/class-es-admin-settings.php:364
2558
  msgid "Thank You, You have been successfully unsubscribed. You will no longer hear from us."
2559
  msgstr ""
2560
 
2561
+ #: lite/includes/classes/class-es-admin-settings.php:366
2562
  msgid "Message on unsubscribe success"
2563
  msgstr ""
2564
 
2565
+ #: lite/includes/classes/class-es-admin-settings.php:367
2566
  msgid "Once contact clicks on unsubscribe link, he/she will be redirected to a page where this message will be shown."
2567
  msgstr ""
2568
 
2569
+ #: lite/includes/classes/class-es-admin-settings.php:375
2570
  msgid "Oops.. There was some technical error. Please try again later or contact us."
2571
  msgstr ""
2572
 
2573
+ #: lite/includes/classes/class-es-admin-settings.php:377
2574
  msgid "Message when unsubscribe fails"
2575
  msgstr ""
2576
 
2577
+ #: lite/includes/classes/class-es-admin-settings.php:378
2578
  msgid "Show this message if any error occured after clicking on unsubscribe link."
2579
  msgstr ""
2580
 
2581
+ #: lite/includes/classes/class-es-admin-settings.php:386
2582
  msgid "Share Icegram"
2583
  msgstr ""
2584
 
2585
+ #: lite/includes/classes/class-es-admin-settings.php:395
2586
  msgid "Delete plugin data on uninstall"
2587
  msgstr ""
2588
 
2589
+ #: lite/includes/classes/class-es-admin-settings.php:396
2590
  msgid "Be careful with this! When enabled, it will remove all lists, campaigns and other data if you uninstall the plugin."
2591
  msgstr ""
2592
 
2593
+ #: lite/includes/classes/class-es-admin-settings.php:423
2594
  msgid "<br><span class=\"ml-6\">Cron last hit time : <b>"
2595
  msgstr ""
2596
 
2597
+ #: lite/includes/classes/class-es-admin-settings.php:430
2598
  msgid "<span class=\"es-send-success es-icon\"></span> We will take care of it. You don't need to visit this URL manually."
2599
  msgstr ""
2600
 
2601
  #. translators: %s: Link to Icegram documentation
2602
+ #: lite/includes/classes/class-es-admin-settings.php:433
2603
  msgid "You need to visit this URL to send email notifications. Know <a href='%s' target='_blank'>how to run this in background</a>"
2604
  msgstr ""
2605
 
2606
+ #: lite/includes/classes/class-es-admin-settings.php:436
2607
  msgid "How to configure Email Sending"
2608
  msgstr ""
2609
 
2610
+ #: lite/includes/classes/class-es-admin-settings.php:452
2611
  msgid "Cron URL"
2612
  msgstr ""
2613
 
2614
+ #: lite/includes/classes/class-es-admin-settings.php:461
2615
  msgid "Disable Wordpress Cron"
2616
  msgstr ""
2617
 
2618
+ #: lite/includes/classes/class-es-admin-settings.php:462
2619
  msgid "Enable this option if you do not want Email Subscribers to use WP Cron to send emails."
2620
  msgstr ""
2621
 
2622
+ #: lite/includes/classes/class-es-admin-settings.php:467
2623
  msgid "Send emails at most every"
2624
  msgstr ""
2625
 
2626
+ #: lite/includes/classes/class-es-admin-settings.php:470
2627
  msgid "Optional if a real cron service is used"
2628
  msgstr ""
2629
 
2630
+ #: lite/includes/classes/class-es-admin-settings.php:480
2631
  msgid "Maximum emails to send in an hour"
2632
  msgstr ""
2633
 
2634
+ #: lite/includes/classes/class-es-admin-settings.php:481
2635
  msgid "Total emails your host can send in an hour.<br>Total emails sent in current hour: <b>"
2636
  msgstr ""
2637
 
2638
+ #: lite/includes/classes/class-es-admin-settings.php:490
2639
  msgid "Maximum emails to send at once"
2640
  msgstr ""
2641
 
2642
+ #: lite/includes/classes/class-es-admin-settings.php:491
2643
  msgid "Maximum emails you want to send on every cron request."
2644
  msgstr ""
2645
 
2646
+ #: lite/includes/classes/class-es-admin-settings.php:502
2647
  msgid "Send test email"
2648
  msgstr ""
2649
 
2650
+ #: lite/includes/classes/class-es-admin-settings.php:503
2651
  msgid "Enter email address to send test email."
2652
  msgstr ""
2653
 
2654
+ #: lite/includes/classes/class-es-admin-settings.php:511
2655
  msgid "Select Mailer"
2656
  msgstr ""
2657
 
2658
+ #: lite/includes/classes/class-es-admin-settings.php:523
2659
+ #: lite/includes/classes/class-es-admin-settings.php:892
2660
  msgid "Pepipost API key"
2661
  msgstr ""
2662
 
2663
+ #: lite/includes/classes/class-es-admin-settings.php:540
2664
  msgid "Select a mailer to send mail"
2665
  msgstr ""
2666
 
2667
+ #: lite/includes/classes/class-es-admin-settings.php:550
2668
  msgid "Blocked domain(s)"
2669
  msgstr ""
2670
 
2671
+ #: lite/includes/classes/class-es-admin-settings.php:552
2672
  msgid "Seeing spam signups from particular domains? Enter domains names (one per line) that you want to block here."
2673
  msgstr ""
2674
 
2675
+ #: lite/includes/classes/class-es-admin-settings.php:573
2676
+ msgid "Enable REST API"
2677
+ msgstr ""
2678
+
2679
+ #: lite/includes/classes/class-es-admin-settings.php:574
2680
+ msgid "Enable REST API to add/edit/delete subscribers through third-party sites or apps."
2681
+ msgstr ""
2682
+
2683
+ #. translators: REST API endpoint
2684
+ #: lite/includes/classes/class-es-admin-settings.php:578
2685
+ msgid "REST endpoint: %s"
2686
  msgstr ""
2687
 
2688
+ #: lite/includes/classes/class-es-admin-settings.php:582
2689
+ msgid "REST API Keys"
2690
  msgstr ""
2691
 
2692
+ #: lite/includes/classes/class-es-admin-settings.php:787
2693
  msgid "Save Settings"
2694
  msgstr ""
2695
 
2696
+ #: lite/includes/classes/class-es-admin-settings.php:891
2697
  msgid "Signup for Pepipost"
2698
  msgstr ""
2699
 
2700
+ #: lite/includes/classes/class-es-admin-settings.php:892
2701
  msgid "How to find"
2702
  msgstr ""
2703
 
2704
+ #: lite/includes/classes/class-es-admin-settings.php:893
2705
  msgid "Why to choose Pepipost"
2706
  msgstr ""
2707
 
2708
+ #: lite/includes/classes/class-es-admin-settings.php:917
2709
  msgid "Cron Info"
2710
  msgstr ""
2711
 
2712
+ #: lite/includes/classes/class-es-admin-settings.php:984
2713
  msgid "Event"
2714
  msgstr ""
2715
 
2716
+ #: lite/includes/classes/class-es-admin-settings.php:985
2717
  msgid "Interval"
2718
  msgstr ""
2719
 
2720
+ #: lite/includes/classes/class-es-admin-settings.php:986
2721
  msgid "Next Execution"
2722
  msgstr ""
2723
 
2724
  #. translators: %s: Next scheduled time
2725
+ #: lite/includes/classes/class-es-admin-settings.php:1032
2726
  msgid "In %s"
2727
  msgstr ""
2728
 
2729
+ #: lite/includes/classes/class-es-admin-settings.php:1067
2730
  msgid "Plugin usage tracking"
2731
  msgstr ""
2732
 
2733
+ #: lite/includes/classes/class-es-admin-settings.php:1070
2734
  msgid "Help us to improve Email Subscribers by opting in to share non-sensitive plugin usage data."
2735
  msgstr ""
2736
 
2737
+ #: lite/includes/classes/class-es-admin-settings.php:1099
2738
  msgid "Now you can control all your notifications through workflows."
2739
  msgstr ""
2740
 
2741
  #. translators: 1. Anchor start tag 2. Anchor end tag
2742
+ #: lite/includes/classes/class-es-admin-settings.php:1102
2743
  msgid "Click %1$shere%2$s to go to workflows."
2744
  msgstr ""
2745
 
2746
+ #: lite/includes/classes/class-es-admin-settings.php:1123
2747
+ msgid "Key"
2748
+ msgstr ""
2749
+
2750
+ #: lite/includes/classes/class-es-admin-settings.php:1124
2751
+ msgid "Username"
2752
+ msgstr ""
2753
+
2754
+ #: lite/includes/classes/class-es-admin-settings.php:1125
2755
+ #: lite/includes/workflows/admin/class-es-workflow-admin-edit.php:401
2756
+ msgid "Actions"
2757
+ msgstr ""
2758
+
2759
+ #: lite/includes/classes/class-es-admin-settings.php:1163
2760
+ msgid "No API keys found."
2761
+ msgstr ""
2762
+
2763
+ #: lite/includes/classes/class-es-admin-settings.php:1177
2764
+ msgid "Please select a user"
2765
+ msgstr ""
2766
+
2767
+ #: lite/includes/classes/class-es-admin-settings.php:1188
2768
+ msgid "Generate new key"
2769
+ msgstr ""
2770
+
2771
  #: lite/includes/classes/class-es-campaign-report.php:16
2772
  #: lite/includes/classes/class-es-campaign-report.php:133
2773
  #: lite/includes/classes/class-es-campaigns-table.php:443
5264
  msgid "Rules"
5265
  msgstr ""
5266
 
 
 
 
 
5267
  #: lite/includes/workflows/admin/class-es-workflow-admin-edit.php:403
5268
  msgid "Placeholders"
5269
  msgstr ""
7536
  msgid "Email Authentication"
7537
  msgstr ""
7538
 
7539
+ #: starter/starter-class-email-subscribers.php:1670
7540
+ msgid "Click on Verify Email to check for Email Authentication Headers"
7541
+ msgstr ""
7542
+
7543
  #: starter/starter-class-email-subscribers.php:1695
7544
  msgid "Auth Header Name"
7545
  msgstr ""
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: 6.0.2
8
  Requires PHP: 5.6
9
- Stable tag: 5.4.17
10
  License: GPLv3
11
  License URI: http://www.gnu.org/licenses
12
 
@@ -310,14 +310,18 @@ Refer [here](https://www.icegram.com/documentation/es-faq/).
310
 
311
  == Upgrade Notice ==
312
 
313
- = 5.4.17 =
314
 
315
- * New: Added Gutenberg block for subscription form
316
- * New: Added new workflow action to change subscriber's status in the list [PRO]
317
- * Enhancement: Small UI improvements
318
 
319
  == Changelog ==
320
 
 
 
 
 
 
321
  **5.4.17 (19.10.2022)**
322
 
323
  * New: Added Gutenberg block for subscription form
6
  Requires at least: 3.9
7
  Tested up to: 6.0.2
8
  Requires PHP: 5.6
9
+ Stable tag: 5.4.18
10
  License: GPLv3
11
  License URI: http://www.gnu.org/licenses
12
 
310
 
311
  == Upgrade Notice ==
312
 
313
+ = 5.4.18 =
314
 
315
+ * New: Rest API support for add/delete/edit subscriber
316
+ * Fix: Gutenberg form block issue with ClassicPress plugin
 
317
 
318
  == Changelog ==
319
 
320
+ **5.4.18 (02.11.2022)**
321
+
322
+ * New: Rest API support for add/delete/edit subscriber
323
+ * Fix: Gutenberg form block issue with ClassicPress plugin
324
+
325
  **5.4.17 (19.10.2022)**
326
 
327
  * New: Added Gutenberg block for subscription form