Email Subscribers & Newsletters - Version 5.4.4

Version Description

  • Update: New keyword structure for campaigns

=

Download this release

Release Info

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

Code changes from version 5.4.3 to 5.4.4

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.3
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.3' );
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.4
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.4' );
191
  }
192
 
193
  // Plugin Folder Path.
lite/admin/class-email-subscribers-admin.php CHANGED
@@ -811,13 +811,14 @@ class Email_Subscribers_Admin {
811
  } else {
812
 
813
  $es_display_notices = array(
814
- 'connect_icegram_notification',
815
- 'show_review_notice',
816
- 'custom_admin_notice',
817
- 'output_custom_notices',
818
- 'ig_es_fail_php_version_notice',
819
- 'show_reconnect_notification',
820
- 'show_tracker_notice',
 
821
  );
822
  }
823
 
@@ -1585,6 +1586,14 @@ class Email_Subscribers_Admin {
1585
  'LASTNAME' => $last_name,
1586
  'EMAIL' => $useremail
1587
  ) );
 
 
 
 
 
 
 
 
1588
  $allowedtags = ig_es_allowed_html_tags_in_esc();
1589
  add_filter( 'safe_style_css', 'ig_es_allowed_css_style' );
1590
 
811
  } else {
812
 
813
  $es_display_notices = array(
814
+ 'connect_icegram_notification',
815
+ 'show_review_notice',
816
+ 'custom_admin_notice',
817
+ 'output_custom_notices',
818
+ 'ig_es_fail_php_version_notice',
819
+ 'show_reconnect_notification',
820
+ 'show_tracker_notice',
821
+ 'show_new_keyword_notice'
822
  );
823
  }
824
 
1586
  'LASTNAME' => $last_name,
1587
  'EMAIL' => $useremail
1588
  ) );
1589
+
1590
+ $es_template_body = ES_Common::replace_keywords_with_fallback( $es_template_body, array(
1591
+ 'subscriber.first_name' => $first_name,
1592
+ 'subscriber.name' => $username,
1593
+ 'subscriber.last_name' => $last_name,
1594
+ 'subscriber.email' => $useremail
1595
+ ) );
1596
+
1597
  $allowedtags = ig_es_allowed_html_tags_in_esc();
1598
  add_filter( 'safe_style_css', 'ig_es_allowed_css_style' );
1599
 
lite/admin/class-es-campaign-admin.php CHANGED
@@ -67,6 +67,8 @@ if ( ! class_exists( 'ES_Campaign_Admin' ) ) {
67
  add_action( 'wp_ajax_ig_es_draft_campaign', array( $this, 'draft_campaign' ) );
68
  add_action( 'wp_ajax_ig_es_get_campaign_preview', array( $this, 'get_campaign_preview' ) );
69
  add_action( 'wp_ajax_ig_es_save_as_template', array( $this, 'save_as_template' ) );
 
 
70
  }
71
 
72
  public function setup_campaign() {
@@ -818,6 +820,14 @@ if ( ! class_exists( 'ES_Campaign_Admin' ) ) {
818
  'EMAIL' => $useremail
819
  ) );
820
 
 
 
 
 
 
 
 
 
821
  $campaign_type = $campaign_data['type'];
822
 
823
  $campaign_data['body'] = $campaign_body;
@@ -1155,40 +1165,40 @@ if ( ! class_exists( 'ES_Campaign_Admin' ) ) {
1155
  <div class="campaign-keyword-wrapper mt-1 p-4 w-full border border-gray-300">
1156
  <!-- Start-IG-Code -->
1157
  <p id="post_notification" class="pb-2 border-b border-gray-300">
1158
- <a href="https://www.icegram.com/documentation/es-what-are-the-available-keywords-in-the-post-notifications/?utm_source=es&amp;utm_medium=in_app&amp;utm_campaign=view_docs_help_page" target="_blank"><?php esc_html_e( 'Available Keywords', 'email-subscribers' ); ?></a> <?php esc_html_e( 'for Post Notification: ', 'email-subsribers' ); ?>
1159
- <span class="ig-es-workflow-variable-outer inline-block px-2 py-2 mr-2 mb-2 text-xs font-bold bg-gray-100 hover:bg-gray-300 rounded-md ">{{FIRSTNAME | fallback:'there'}}</span>
1160
- <span class="ig-es-workflow-variable-outer inline-block px-2 py-2 mr-2 mb-2 text-xs font-bold bg-gray-100 hover:bg-gray-300 rounded-md ">{{LASTNAME}}</span>
1161
- <span class="ig-es-workflow-variable-outer inline-block px-2 py-2 mr-2 mb-2 text-xs font-bold bg-gray-100 hover:bg-gray-300 rounded-md ">{{NAME | fallback:'there'}}</span>
1162
- <span class="ig-es-workflow-variable-outer inline-block px-2 py-2 mr-2 mb-2 text-xs font-bold bg-gray-100 hover:bg-gray-300 rounded-md ">{{EMAIL}}</span>
1163
  <span class="ig-es-workflow-variable-outer inline-block px-2 py-2 mr-2 mb-2 text-xs font-bold bg-gray-100 hover:bg-gray-300 rounded-md ">{{DATE}}</span>
1164
- <span class="ig-es-workflow-variable-outer inline-block px-2 py-2 mr-2 mb-2 text-xs font-bold bg-gray-100 hover:bg-gray-300 rounded-md ">{{POSTTITLE}}</span>
1165
- <span class="ig-es-workflow-variable-outer inline-block px-2 py-2 mr-2 mb-2 text-xs font-bold bg-gray-100 hover:bg-gray-300 rounded-md ">{{POSTIMAGE}}</span>
1166
- <span class="ig-es-workflow-variable-outer inline-block px-2 py-2 mr-2 mb-2 text-xs font-bold bg-gray-100 hover:bg-gray-300 rounded-md ">{{POSTEXCERPT}}</span>
1167
- <span class="ig-es-workflow-variable-outer inline-block px-2 py-2 mr-2 mb-2 text-xs font-bold bg-gray-100 hover:bg-gray-300 rounded-md ">{{POSTDESC}}</span>
1168
- <span class="ig-es-workflow-variable-outer inline-block px-2 py-2 mr-2 mb-2 text-xs font-bold bg-gray-100 hover:bg-gray-300 rounded-md ">{{POSTAUTHOR}}</span>
1169
- <span class="ig-es-workflow-variable-outer inline-block px-2 py-2 mr-2 mb-2 text-xs font-bold bg-gray-100 hover:bg-gray-300 rounded-md ">{{POSTAUTHORAVATAR}}</span>
1170
- <span class="ig-es-workflow-variable-outer inline-block px-2 py-2 mr-2 mb-2 text-xs font-bold bg-gray-100 hover:bg-gray-300 rounded-md ">{{POSTAUTHORAVATARLINK-ONLY}}</span>
1171
- <span class="ig-es-workflow-variable-outer inline-block px-2 py-2 mr-2 mb-2 text-xs font-bold bg-gray-100 hover:bg-gray-300 rounded-md ">{{POSTLINK}}</span>
1172
- <span class="ig-es-workflow-variable-outer inline-block px-2 py-2 mr-2 mb-2 text-xs font-bold bg-gray-100 hover:bg-gray-300 rounded-md ">{{POSTLINK-WITHTITLE}}</span>
1173
- <span class="ig-es-workflow-variable-outer inline-block px-2 py-2 mr-2 mb-2 text-xs font-bold bg-gray-100 hover:bg-gray-300 rounded-md ">{{POSTLINK-ONLY}}</span>
1174
- <span class="ig-es-workflow-variable-outer inline-block px-2 py-2 mr-2 mb-2 text-xs font-bold bg-gray-100 hover:bg-gray-300 rounded-md ">{{POSTFULL}}</span>
1175
  </p>
1176
  <!-- End-IG-Code -->
1177
  <p id="newsletter" class="py-2 border-b border-gray-300">
1178
- <a href="https://www.icegram.com/documentation/es-what-are-the-available-keywords-in-the-newsletters/?utm_source=es&amp;utm_medium=in_app&amp;utm_campaign=view_docs_help_page" target="_blank"><?php esc_html_e( 'Available Keywords', 'email-subscribers' ); ?></a> <?php esc_html_e( 'for Broadcast:', 'email-subscribers' ); ?>
1179
- <span class="ig-es-workflow-variable-outer inline-block px-2 py-2 mr-2 mb-2 text-xs font-bold bg-gray-100 hover:bg-gray-300 rounded-md ">{{FIRSTNAME | fallback:'there'}}</span>
1180
- <span class="ig-es-workflow-variable-outer inline-block px-2 py-2 mr-2 mb-2 text-xs font-bold bg-gray-100 hover:bg-gray-300 rounded-md ">{{LASTNAME}}</span>
1181
- <span class="ig-es-workflow-variable-outer inline-block px-2 py-2 mr-2 mb-2 text-xs font-bold bg-gray-100 hover:bg-gray-300 rounded-md ">{{NAME | fallback:'there'}}</span>
1182
- <span class="ig-es-workflow-variable-outer inline-block px-2 py-2 mr-2 mb-2 text-xs font-bold bg-gray-100 hover:bg-gray-300 rounded-md ">{{EMAIL}}</span>
1183
  </p>
1184
  <!-- Start-IG-Code -->
1185
  <div id="post_digest" class="pt-2 pb-0">
1186
  <span style="font-size: 0.8em; margin-left: 0.3em; padding: 2px; background: #e66060; color: #fff; border-radius: 2px; ">Pro</span>&nbsp;
1187
  <a href="https://www.icegram.com/send-post-digest-using-email-subscribers-plugin/?utm_source=es&amp;utm_medium=in_app&amp;utm_campaign=view_post_digest_post" target="_blank"><?php esc_html_e( 'Available Keywords', 'email-subscribers' ); ?></a> <?php esc_html_e( 'for Post Digest:', 'email-subscribers' ); ?>
1188
- <span class="ig-es-workflow-variable-outer inline-block px-2 py-2 mr-2 mb-2 text-xs font-bold bg-gray-100 hover:bg-gray-300 rounded-md ">{{FIRSTNAME | fallback:'there'}}</span>
1189
- <span class="ig-es-workflow-variable-outer inline-block px-2 py-2 mr-2 mb-2 text-xs font-bold bg-gray-100 hover:bg-gray-300 rounded-md ">{{LASTNAME}}</span>
1190
- <span class="ig-es-workflow-variable-outer inline-block px-2 py-2 mr-2 mb-2 text-xs font-bold bg-gray-100 hover:bg-gray-300 rounded-md ">{{NAME | fallback:'there'}}</span>
1191
- <div class="post_digest_block"> {{POSTDIGEST}} <br/><?php esc_html_e( 'Any keywords related Post Notification', 'email-subscribers' ); ?> <br/>{{/POSTDIGEST}} </div>
1192
  </div>
1193
  </div>
1194
  <!-- End-IG-Code -->
@@ -1253,6 +1263,38 @@ if ( ! class_exists( 'ES_Campaign_Admin' ) ) {
1253
 
1254
  return $response;
1255
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1256
  }
1257
 
1258
  }
67
  add_action( 'wp_ajax_ig_es_draft_campaign', array( $this, 'draft_campaign' ) );
68
  add_action( 'wp_ajax_ig_es_get_campaign_preview', array( $this, 'get_campaign_preview' ) );
69
  add_action( 'wp_ajax_ig_es_save_as_template', array( $this, 'save_as_template' ) );
70
+
71
+ add_action( 'admin_notices', array( $this, 'show_new_keyword_notice' ) );
72
  }
73
 
74
  public function setup_campaign() {
820
  'EMAIL' => $useremail
821
  ) );
822
 
823
+
824
+ $campaign_body = ES_Common::replace_keywords_with_fallback( $campaign_body, array(
825
+ 'subscriber.first_name' => $first_name,
826
+ 'subscriber.name' => $username,
827
+ 'subscriber.last_name' => $last_name,
828
+ 'subscriber.email' => $useremail
829
+ ) );
830
+
831
  $campaign_type = $campaign_data['type'];
832
 
833
  $campaign_data['body'] = $campaign_body;
1165
  <div class="campaign-keyword-wrapper mt-1 p-4 w-full border border-gray-300">
1166
  <!-- Start-IG-Code -->
1167
  <p id="post_notification" class="pb-2 border-b border-gray-300">
1168
+ <a href="https://www.icegram.com/documentation/what-keywords-can-be-used-while-designing-the-campaign/?utm_source=es&amp;utm_medium=in_app&amp;utm_campaign=view_docs_help_page" target="_blank"><?php esc_html_e( 'Available Keywords', 'email-subscribers' ); ?></a> <?php esc_html_e( 'for Post Notification: ', 'email-subsribers' ); ?>
1169
+ <span class="ig-es-workflow-variable-outer inline-block px-2 py-2 mr-2 mb-2 text-xs font-bold bg-gray-100 hover:bg-gray-300 rounded-md ">{{subscriber.first_name | fallback:'there'}}</span>
1170
+ <span class="ig-es-workflow-variable-outer inline-block px-2 py-2 mr-2 mb-2 text-xs font-bold bg-gray-100 hover:bg-gray-300 rounded-md ">{{subscriber.last_name}}</span>
1171
+ <span class="ig-es-workflow-variable-outer inline-block px-2 py-2 mr-2 mb-2 text-xs font-bold bg-gray-100 hover:bg-gray-300 rounded-md ">{{subscriber.name | fallback:'there'}}</span>
1172
+ <span class="ig-es-workflow-variable-outer inline-block px-2 py-2 mr-2 mb-2 text-xs font-bold bg-gray-100 hover:bg-gray-300 rounded-md ">{{subscriber.email}}</span>
1173
  <span class="ig-es-workflow-variable-outer inline-block px-2 py-2 mr-2 mb-2 text-xs font-bold bg-gray-100 hover:bg-gray-300 rounded-md ">{{DATE}}</span>
1174
+ <span class="ig-es-workflow-variable-outer inline-block px-2 py-2 mr-2 mb-2 text-xs font-bold bg-gray-100 hover:bg-gray-300 rounded-md ">{{post.title}}</span>
1175
+ <span class="ig-es-workflow-variable-outer inline-block px-2 py-2 mr-2 mb-2 text-xs font-bold bg-gray-100 hover:bg-gray-300 rounded-md ">{{post.image}}</span>
1176
+ <span class="ig-es-workflow-variable-outer inline-block px-2 py-2 mr-2 mb-2 text-xs font-bold bg-gray-100 hover:bg-gray-300 rounded-md ">{{post.excerpt}}</span>
1177
+ <span class="ig-es-workflow-variable-outer inline-block px-2 py-2 mr-2 mb-2 text-xs font-bold bg-gray-100 hover:bg-gray-300 rounded-md ">{{post.description}}</span>
1178
+ <span class="ig-es-workflow-variable-outer inline-block px-2 py-2 mr-2 mb-2 text-xs font-bold bg-gray-100 hover:bg-gray-300 rounded-md ">{{post.author}}</span>
1179
+ <span class="ig-es-workflow-variable-outer inline-block px-2 py-2 mr-2 mb-2 text-xs font-bold bg-gray-100 hover:bg-gray-300 rounded-md ">{{post.author_avatar}}</span>
1180
+ <span class="ig-es-workflow-variable-outer inline-block px-2 py-2 mr-2 mb-2 text-xs font-bold bg-gray-100 hover:bg-gray-300 rounded-md ">{{post.author_avatar_link}}</span>
1181
+ <span class="ig-es-workflow-variable-outer inline-block px-2 py-2 mr-2 mb-2 text-xs font-bold bg-gray-100 hover:bg-gray-300 rounded-md ">{{post.link}}</span>
1182
+ <span class="ig-es-workflow-variable-outer inline-block px-2 py-2 mr-2 mb-2 text-xs font-bold bg-gray-100 hover:bg-gray-300 rounded-md ">{{post.link_with_title}}</span>
1183
+ <span class="ig-es-workflow-variable-outer inline-block px-2 py-2 mr-2 mb-2 text-xs font-bold bg-gray-100 hover:bg-gray-300 rounded-md ">{{post.link_only}}</span>
1184
+ <span class="ig-es-workflow-variable-outer inline-block px-2 py-2 mr-2 mb-2 text-xs font-bold bg-gray-100 hover:bg-gray-300 rounded-md ">{{post.full}}</span>
1185
  </p>
1186
  <!-- End-IG-Code -->
1187
  <p id="newsletter" class="py-2 border-b border-gray-300">
1188
+ <a href="https://www.icegram.com/documentation/what-keywords-can-be-used-while-designing-the-campaign/?utm_source=es&amp;utm_medium=in_app&amp;utm_campaign=view_docs_help_page" target="_blank"><?php esc_html_e( 'Available Keywords', 'email-subscribers' ); ?></a> <?php esc_html_e( 'for Broadcast:', 'email-subscribers' ); ?>
1189
+ <span class="ig-es-workflow-variable-outer inline-block px-2 py-2 mr-2 mb-2 text-xs font-bold bg-gray-100 hover:bg-gray-300 rounded-md ">{{subscriber.first_name | fallback:'there'}}</span>
1190
+ <span class="ig-es-workflow-variable-outer inline-block px-2 py-2 mr-2 mb-2 text-xs font-bold bg-gray-100 hover:bg-gray-300 rounded-md ">{{subscriber.last_name}}</span>
1191
+ <span class="ig-es-workflow-variable-outer inline-block px-2 py-2 mr-2 mb-2 text-xs font-bold bg-gray-100 hover:bg-gray-300 rounded-md ">{{subscriber.name | fallback:'there'}}</span>
1192
+ <span class="ig-es-workflow-variable-outer inline-block px-2 py-2 mr-2 mb-2 text-xs font-bold bg-gray-100 hover:bg-gray-300 rounded-md ">{{subscriber.email}}</span>
1193
  </p>
1194
  <!-- Start-IG-Code -->
1195
  <div id="post_digest" class="pt-2 pb-0">
1196
  <span style="font-size: 0.8em; margin-left: 0.3em; padding: 2px; background: #e66060; color: #fff; border-radius: 2px; ">Pro</span>&nbsp;
1197
  <a href="https://www.icegram.com/send-post-digest-using-email-subscribers-plugin/?utm_source=es&amp;utm_medium=in_app&amp;utm_campaign=view_post_digest_post" target="_blank"><?php esc_html_e( 'Available Keywords', 'email-subscribers' ); ?></a> <?php esc_html_e( 'for Post Digest:', 'email-subscribers' ); ?>
1198
+ <span class="ig-es-workflow-variable-outer inline-block px-2 py-2 mr-2 mb-2 text-xs font-bold bg-gray-100 hover:bg-gray-300 rounded-md ">{{subscriber.first_name | fallback:'there'}}</span>
1199
+ <span class="ig-es-workflow-variable-outer inline-block px-2 py-2 mr-2 mb-2 text-xs font-bold bg-gray-100 hover:bg-gray-300 rounded-md ">{{subscriber.last_name}}</span>
1200
+ <span class="ig-es-workflow-variable-outer inline-block px-2 py-2 mr-2 mb-2 text-xs font-bold bg-gray-100 hover:bg-gray-300 rounded-md ">{{subscriber.name | fallback:'there'}}</span>
1201
+ <div class="post_digest_block"> {{post.digest}} <br/><?php esc_html_e( 'Any keywords related Post Notification', 'email-subscribers' ); ?> <br/>{{/post.digest}} </div>
1202
  </div>
1203
  </div>
1204
  <!-- End-IG-Code -->
1263
 
1264
  return $response;
1265
  }
1266
+
1267
+ public function show_new_keyword_notice() {
1268
+ $notice_pages = array( 'es_notifications', 'es_templates', 'es_newsletters', 'es_sequence' );
1269
+ $current_page = ig_es_get_request_data( 'page' );
1270
+ $is_notice_page = in_array( $current_page, $notice_pages, true );
1271
+ if ( ! $is_notice_page ) {
1272
+ return;
1273
+ }
1274
+
1275
+ $action = ig_es_get_request_data( 'action' );
1276
+ $campaign_actions = array( 'new', 'edit' );
1277
+ $allowed_action = in_array( $action, $campaign_actions, true );
1278
+ if ( ! $allowed_action ) {
1279
+ return;
1280
+ }
1281
+
1282
+ $new_keyword_notice_shown = get_option( 'ig_es_new_keyword_notice_shown', 'no' );
1283
+ if ( 'no' === $new_keyword_notice_shown ) {
1284
+ $new_keyword_doc_url = 'https://www.icegram.com/documentation/what-keywords-can-be-used-while-designing-the-campaign/?utm_source=es&utm_medium=in_app&utm_campaign=new_keyword_notice';
1285
+ ?>
1286
+ <div class="notice notice-success is-dismissible">
1287
+ <p>
1288
+ <?php
1289
+ /* translators: %s: link to new keyword doc */
1290
+ echo sprintf( esc_html__( '%1$s[Update]%2$s: Improved keyword structure. Made it easy to use in campaign. Checkout %3$shere%4$s.', 'email-subscribers' ),'<strong>','</strong>', '<a href="' . esc_url( $new_keyword_doc_url ) . '" target="_blank">', '</a>');
1291
+ ?>
1292
+ </p>
1293
+ </div>
1294
+ <?php
1295
+ update_option( 'ig_es_new_keyword_notice_shown', 'yes', false );
1296
+ }
1297
+ }
1298
  }
1299
 
1300
  }
lite/admin/partials/help.php CHANGED
@@ -93,12 +93,12 @@ $articles = array(
93
  ),
94
  array(
95
  'title' => 'Keywords in the Broadcast',
96
- 'link' => 'https://www.icegram.com/documentation/es-what-are-the-available-keywords-in-the-newsletters/?utm_source=es&utm_medium=in_app&utm_campaign=view_docs_help_page',
97
  'class' => 'font-medium text-blue-500 hover:text-blue-700',
98
  ),
99
  array(
100
  'title' => 'Keywords in the Post Notifications',
101
- 'link' => 'https://www.icegram.com/documentation/es-what-are-the-available-keywords-in-the-post-notifications/?utm_source=es&utm_medium=in_app&utm_campaign=view_docs_help_page',
102
  'class' => 'font-medium text-blue-500 hover:text-blue-700',
103
  ),
104
  );
93
  ),
94
  array(
95
  'title' => 'Keywords in the Broadcast',
96
+ 'link' => 'https://www.icegram.com/documentation/what-keywords-can-be-used-while-designing-the-campaign/?utm_source=es&utm_medium=in_app&utm_campaign=view_docs_help_page',
97
  'class' => 'font-medium text-blue-500 hover:text-blue-700',
98
  ),
99
  array(
100
  'title' => 'Keywords in the Post Notifications',
101
+ 'link' => 'https://www.icegram.com/documentation/what-keywords-can-be-used-while-designing-the-campaign/?utm_source=es&utm_medium=in_app&utm_campaign=view_docs_help_page',
102
  'class' => 'font-medium text-blue-500 hover:text-blue-700',
103
  ),
104
  );
lite/includes/class-es-common.php CHANGED
@@ -208,12 +208,15 @@ class ES_Common {
208
  // total contacts
209
  $total_contacts = ES()->contacts_db->count_active_contacts_by_list_id();
210
  $content = str_replace( '{{TOTAL-CONTACTS}}', $total_contacts, $content );
 
211
  // blog title
212
  $blog_name = get_option( 'blogname' );
213
  $content = str_replace( '{{SITENAME}}', $blog_name, $content );
 
214
  // site url
215
  $site_url = home_url( '/' );
216
  $content = str_replace( '{{SITEURL}}', $site_url, $content );
 
217
 
218
  /*
219
  TODO: Enable it once Pre header issue fix
208
  // total contacts
209
  $total_contacts = ES()->contacts_db->count_active_contacts_by_list_id();
210
  $content = str_replace( '{{TOTAL-CONTACTS}}', $total_contacts, $content );
211
+ $content = str_replace( '{{site.total_contacts}}', $total_contacts, $content );
212
  // blog title
213
  $blog_name = get_option( 'blogname' );
214
  $content = str_replace( '{{SITENAME}}', $blog_name, $content );
215
+ $content = str_replace( '{{site.name}}', $blog_name, $content );
216
  // site url
217
  $site_url = home_url( '/' );
218
  $content = str_replace( '{{SITEURL}}', $site_url, $content );
219
+ $content = str_replace( '{{site.url}}', $site_url, $content );
220
 
221
  /*
222
  TODO: Enable it once Pre header issue fix
lite/includes/classes/class-es-contacts-table.php CHANGED
@@ -433,6 +433,7 @@ class ES_Contacts_Table extends ES_List_Table {
433
  'first_name' => $first_name,
434
  'last_name' => $last_name,
435
  'email' => $email,
 
436
  );
437
 
438
  $contact = apply_filters( 'es_set_additional_contact_data', $contact, $contact_data );
433
  'first_name' => $first_name,
434
  'last_name' => $last_name,
435
  'email' => $email,
436
+ 'status' => 'verified',
437
  );
438
 
439
  $contact = apply_filters( 'es_set_additional_contact_data', $contact, $contact_data );
lite/includes/classes/class-es-handle-post-notification.php CHANGED
@@ -189,9 +189,11 @@ class ES_Handle_Post_Notification {
189
 
190
  $post_title = html_entity_decode( $post_title, ENT_QUOTES, $blog_charset );
191
  $post_subject = str_replace( '{{POSTTITLE}}', $post_title, $notification_subject );
 
192
 
193
  $post_link = get_permalink( $post );
194
  $post_subject = str_replace( '{{POSTLINK}}', $post_link, $post_subject );
 
195
 
196
  return $post_subject;
197
 
@@ -203,11 +205,15 @@ class ES_Handle_Post_Notification {
203
  // Making $post as global using $GLOBALS['post'] key. Can't use 'post' key directly into $GLOBALS since PHPCS throws global variable assignment warning for 'post'.
204
  $GLOBALS[ $post_key ] = $post;
205
 
 
 
206
  $post_date = ES_Common::convert_date_to_wp_date( $post->post_modified );
207
  $es_templ_body = str_replace( '{{DATE}}', $post_date, $es_templ_body );
 
208
 
209
  $post_title = get_the_title( $post );
210
  $es_templ_body = str_replace( '{{POSTTITLE}}', $post_title, $es_templ_body );
 
211
  $post_link = get_permalink( $post_id );
212
 
213
  // Size of {{POSTIMAGE}}
@@ -235,6 +241,7 @@ class ES_Handle_Post_Notification {
235
  }
236
 
237
  $es_templ_body = str_replace( '{{POSTIMAGE}}', $post_thumbnail_link, $es_templ_body );
 
238
 
239
  $post_thumbnail_id = get_post_thumbnail_id( $post_id );
240
 
@@ -243,6 +250,7 @@ class ES_Handle_Post_Notification {
243
  }
244
 
245
  $es_templ_body = str_replace( '{{POSTIMAGE-URL}}', $post_thumbnail_url, $es_templ_body );
 
246
 
247
  // Get post description
248
  $post_description_length = 50;
@@ -255,12 +263,14 @@ class ES_Handle_Post_Notification {
255
  $post_description = implode( ' ', $words );
256
  }
257
  $es_templ_body = str_replace( '{{POSTDESC}}', $post_description, $es_templ_body );
 
258
 
259
  // Get post excerpt
260
  $post_excerpt = get_the_excerpt( $post );
261
  $post_excerpt = wpautop( $post_excerpt );
262
  $post_excerpt = wptexturize( $post_excerpt );
263
  $es_templ_body = str_replace( '{{POSTEXCERPT}}', $post_excerpt, $es_templ_body );
 
264
 
265
  $more_tag_data = get_extended( $post->post_content );
266
 
@@ -269,6 +279,7 @@ class ES_Handle_Post_Notification {
269
  $strip_excluded_tags = ig_es_get_strip_excluded_tags();
270
  $text_before_more_tag = strip_tags( strip_shortcodes( $text_before_more_tag ), implode( '', $strip_excluded_tags ) );
271
  $es_templ_body = str_replace( '{{POSTMORETAG}}', $text_before_more_tag, $es_templ_body );
 
272
 
273
  // get post author
274
  $post_author_id = $post->post_author;
@@ -276,9 +287,13 @@ class ES_Handle_Post_Notification {
276
  $post_author_avatar_url = get_avatar_url( $post_author_id );
277
  $author_avatar = '<img src="' . esc_attr( $post_author_avatar_url ) . '" alt="' . esc_attr( $post_author ) . '" width="auto" height="auto" />';
278
  $es_templ_body = str_replace( '{{POSTAUTHOR}}', $post_author, $es_templ_body );
 
279
  $es_templ_body = str_replace( '{{POSTLINK-ONLY}}', $post_link, $es_templ_body );
 
280
  $es_templ_body = str_replace( '{{POSTAUTHORAVATAR}}', $author_avatar, $es_templ_body );
 
281
  $es_templ_body = str_replace( '{{POSTAUTHORAVATARLINK-ONLY}}', $post_author_avatar_url, $es_templ_body );
 
282
 
283
  // Check if template has {{POSTCATS}} placeholder.
284
  if ( strpos( $es_templ_body, '{{POSTCATS}}' ) >= 0 ) {
@@ -302,19 +317,23 @@ class ES_Handle_Post_Notification {
302
  }
303
 
304
  $es_templ_body = str_replace( '{{POSTCATS}}', implode( ', ', $post_cats ), $es_templ_body );
 
305
  }
306
 
307
  if ( '' != $post_link ) {
308
  $post_link_with_title = "<a href='" . $post_link . "' target='_blank'>" . $post_title . '</a>';
309
  $es_templ_body = str_replace( '{{POSTLINK-WITHTITLE}}', $post_link_with_title, $es_templ_body );
 
310
  $post_link = "<a href='" . $post_link . "' target='_blank'>" . $post_link . '</a>';
311
  }
312
  $es_templ_body = str_replace( '{{POSTLINK}}', $post_link, $es_templ_body );
 
313
 
314
  // Get full post
315
  $post_full = $post->post_content;
316
  $post_full = wpautop( $post_full );
317
  $es_templ_body = str_replace( '{{POSTFULL}}', $post_full, $es_templ_body );
 
318
 
319
  // add pre header as post excerpt
320
  /*
189
 
190
  $post_title = html_entity_decode( $post_title, ENT_QUOTES, $blog_charset );
191
  $post_subject = str_replace( '{{POSTTITLE}}', $post_title, $notification_subject );
192
+ $post_subject = str_replace( '{{post.title}}', $post_title, $notification_subject );
193
 
194
  $post_link = get_permalink( $post );
195
  $post_subject = str_replace( '{{POSTLINK}}', $post_link, $post_subject );
196
+ $post_subject = str_replace( '{{post.link}}', $post_link, $post_subject );
197
 
198
  return $post_subject;
199
 
205
  // Making $post as global using $GLOBALS['post'] key. Can't use 'post' key directly into $GLOBALS since PHPCS throws global variable assignment warning for 'post'.
206
  $GLOBALS[ $post_key ] = $post;
207
 
208
+ //$es_templ_body = $this->workflow->variable_processor()->process_field( $value, $allow_html );
209
+
210
  $post_date = ES_Common::convert_date_to_wp_date( $post->post_modified );
211
  $es_templ_body = str_replace( '{{DATE}}', $post_date, $es_templ_body );
212
+ $es_templ_body = str_replace( '{{post.date}}', $post_date, $es_templ_body );
213
 
214
  $post_title = get_the_title( $post );
215
  $es_templ_body = str_replace( '{{POSTTITLE}}', $post_title, $es_templ_body );
216
+ $es_templ_body = str_replace( '{{post.title}}', $post_title, $es_templ_body );
217
  $post_link = get_permalink( $post_id );
218
 
219
  // Size of {{POSTIMAGE}}
241
  }
242
 
243
  $es_templ_body = str_replace( '{{POSTIMAGE}}', $post_thumbnail_link, $es_templ_body );
244
+ $es_templ_body = str_replace( '{{post.image}}', $post_thumbnail_link, $es_templ_body );
245
 
246
  $post_thumbnail_id = get_post_thumbnail_id( $post_id );
247
 
250
  }
251
 
252
  $es_templ_body = str_replace( '{{POSTIMAGE-URL}}', $post_thumbnail_url, $es_templ_body );
253
+ $es_templ_body = str_replace( '{{post.image_url}}', $post_thumbnail_url, $es_templ_body );
254
 
255
  // Get post description
256
  $post_description_length = 50;
263
  $post_description = implode( ' ', $words );
264
  }
265
  $es_templ_body = str_replace( '{{POSTDESC}}', $post_description, $es_templ_body );
266
+ $es_templ_body = str_replace( '{{post.description}}', $post_description, $es_templ_body );
267
 
268
  // Get post excerpt
269
  $post_excerpt = get_the_excerpt( $post );
270
  $post_excerpt = wpautop( $post_excerpt );
271
  $post_excerpt = wptexturize( $post_excerpt );
272
  $es_templ_body = str_replace( '{{POSTEXCERPT}}', $post_excerpt, $es_templ_body );
273
+ $es_templ_body = str_replace( '{{post.excerpt}}', $post_excerpt, $es_templ_body );
274
 
275
  $more_tag_data = get_extended( $post->post_content );
276
 
279
  $strip_excluded_tags = ig_es_get_strip_excluded_tags();
280
  $text_before_more_tag = strip_tags( strip_shortcodes( $text_before_more_tag ), implode( '', $strip_excluded_tags ) );
281
  $es_templ_body = str_replace( '{{POSTMORETAG}}', $text_before_more_tag, $es_templ_body );
282
+ $es_templ_body = str_replace( '{{post.more_tag}}', $text_before_more_tag, $es_templ_body );
283
 
284
  // get post author
285
  $post_author_id = $post->post_author;
287
  $post_author_avatar_url = get_avatar_url( $post_author_id );
288
  $author_avatar = '<img src="' . esc_attr( $post_author_avatar_url ) . '" alt="' . esc_attr( $post_author ) . '" width="auto" height="auto" />';
289
  $es_templ_body = str_replace( '{{POSTAUTHOR}}', $post_author, $es_templ_body );
290
+ $es_templ_body = str_replace( '{{post.author}}', $post_author, $es_templ_body );
291
  $es_templ_body = str_replace( '{{POSTLINK-ONLY}}', $post_link, $es_templ_body );
292
+ $es_templ_body = str_replace( '{{post.link_only}}', $post_link, $es_templ_body );
293
  $es_templ_body = str_replace( '{{POSTAUTHORAVATAR}}', $author_avatar, $es_templ_body );
294
+ $es_templ_body = str_replace( '{{post.author_avatar}}', $author_avatar, $es_templ_body );
295
  $es_templ_body = str_replace( '{{POSTAUTHORAVATARLINK-ONLY}}', $post_author_avatar_url, $es_templ_body );
296
+ $es_templ_body = str_replace( '{{post.author_avatar_url}}', $post_author_avatar_url, $es_templ_body );
297
 
298
  // Check if template has {{POSTCATS}} placeholder.
299
  if ( strpos( $es_templ_body, '{{POSTCATS}}' ) >= 0 ) {
317
  }
318
 
319
  $es_templ_body = str_replace( '{{POSTCATS}}', implode( ', ', $post_cats ), $es_templ_body );
320
+ $es_templ_body = str_replace( '{{post.cats}}', implode( ', ', $post_cats ), $es_templ_body );
321
  }
322
 
323
  if ( '' != $post_link ) {
324
  $post_link_with_title = "<a href='" . $post_link . "' target='_blank'>" . $post_title . '</a>';
325
  $es_templ_body = str_replace( '{{POSTLINK-WITHTITLE}}', $post_link_with_title, $es_templ_body );
326
+ $es_templ_body = str_replace( '{{post.link_with_title}}', $post_link_with_title, $es_templ_body );
327
  $post_link = "<a href='" . $post_link . "' target='_blank'>" . $post_link . '</a>';
328
  }
329
  $es_templ_body = str_replace( '{{POSTLINK}}', $post_link, $es_templ_body );
330
+ $es_templ_body = str_replace( '{{post.link}}', $post_link, $es_templ_body );
331
 
332
  // Get full post
333
  $post_full = $post->post_content;
334
  $post_full = wpautop( $post_full );
335
  $es_templ_body = str_replace( '{{POSTFULL}}', $post_full, $es_templ_body );
336
+ $es_templ_body = str_replace( '{{post.full}}', $post_full, $es_templ_body );
337
 
338
  // add pre header as post excerpt
339
  /*
lite/includes/classes/class-es-mailer.php CHANGED
@@ -1166,6 +1166,13 @@ if ( ! class_exists( 'ES_Mailer' ) ) {
1166
  'EMAIL' => $email
1167
  ) );
1168
 
 
 
 
 
 
 
 
1169
  // TODO: This is a quick workaround to handle <a href="{{LINK}}?utm_source=abc" >
1170
  // TODO: Implement some good solution
1171
 
@@ -1179,10 +1186,13 @@ if ( ! class_exists( 'ES_Mailer' ) ) {
1179
  $content = str_replace( '{{UNSUBSCRIBE-LINK}}', $unsubscribe_link, $content );
1180
 
1181
  $content = str_replace( '{{TOTAL-CONTACTS}}', $total_contacts, $content );
 
1182
  $content = str_replace( '{{GROUP}}', $list_name, $content );
1183
  $content = str_replace( '{{LIST}}', $list_name, $content );
1184
  $content = str_replace( '{{SITENAME}}', $blog_name, $content );
1185
  $content = str_replace( '{{SITEURL}}', $site_url, $content );
 
 
1186
 
1187
  return $content;
1188
  }
@@ -1213,6 +1223,8 @@ if ( ! class_exists( 'ES_Mailer' ) ) {
1213
  $content = str_replace( '{{LIST}}', $list_name, $content );
1214
  $content = str_replace( '{{SITENAME}}', $blog_name, $content );
1215
  $content = str_replace( '{{SITEURL}}', $site_url, $content );
 
 
1216
 
1217
  return $content;
1218
  }
1166
  'EMAIL' => $email
1167
  ) );
1168
 
1169
+ $content = ES_Common::replace_keywords_with_fallback( $content, array(
1170
+ 'subscriber.first_name' => $first_name,
1171
+ 'subscriber.name' => $name,
1172
+ 'subscriber.last_name' => $last_name,
1173
+ 'subscriber.email' => $email
1174
+ ) );
1175
+
1176
  // TODO: This is a quick workaround to handle <a href="{{LINK}}?utm_source=abc" >
1177
  // TODO: Implement some good solution
1178
 
1186
  $content = str_replace( '{{UNSUBSCRIBE-LINK}}', $unsubscribe_link, $content );
1187
 
1188
  $content = str_replace( '{{TOTAL-CONTACTS}}', $total_contacts, $content );
1189
+ $content = str_replace( '{{site.total_contacts}}', $total_contacts, $content );
1190
  $content = str_replace( '{{GROUP}}', $list_name, $content );
1191
  $content = str_replace( '{{LIST}}', $list_name, $content );
1192
  $content = str_replace( '{{SITENAME}}', $blog_name, $content );
1193
  $content = str_replace( '{{SITEURL}}', $site_url, $content );
1194
+ $content = str_replace( '{{site.name}}', $blog_name, $content );
1195
+ $content = str_replace( '{{site.url}}', $site_url, $content );
1196
 
1197
  return $content;
1198
  }
1223
  $content = str_replace( '{{LIST}}', $list_name, $content );
1224
  $content = str_replace( '{{SITENAME}}', $blog_name, $content );
1225
  $content = str_replace( '{{SITEURL}}', $site_url, $content );
1226
+ $content = str_replace( '{{site.name}}', $blog_name, $content );
1227
+ $content = str_replace( '{{site.url}}', $site_url, $content );
1228
 
1229
  return $content;
1230
  }
lite/includes/classes/class-es-post-notifications.php CHANGED
@@ -706,7 +706,7 @@ class ES_Post_Notifications_Table {
706
  */
707
  public function get_post_notification_default_subject( $subject, $campaign_data ) {
708
  if ( empty( $subject ) ) {
709
- $subject = __( 'New Post Published - {{POSTTITLE}}', 'email-subscribers' );
710
  }
711
  return $subject;
712
  }
@@ -728,13 +728,13 @@ class ES_Post_Notifications_Table {
728
  }
729
 
730
  public function get_classic_editor_default_content() {
731
- $default_content = __( 'Hello {{NAME}},', 'email-subscribers' ) . "\r\n\r\n";
732
- $default_content .= __( 'We have published a new blog article on our website', 'email-subscribers' ) . " : {{POSTTITLE}}\r\n";
733
- $default_content .= "{{POSTIMAGE}}\r\n\r\n";
734
- $default_content .= __( 'You can view it from this link', 'email-subscribers' ) . " : {{POSTLINK}}\r\n\r\n";
735
  $default_content .= __( 'Thanks & Regards', 'email-subscribers' ) . ",\r\n";
736
  $default_content .= __( 'Admin', 'email-subscribers' ) . "\r\n\r\n";
737
- $default_content .= __( 'You received this email because in the past you have provided us your email address : {{EMAIL}} to receive notifications when new updates are posted.', 'email-subscribers' );
738
  return $default_content;
739
  }
740
 
@@ -750,16 +750,16 @@ class ES_Post_Notifications_Table {
750
  </mj-section>
751
  <mj-section background-color="#FFFFFF">
752
  <mj-column width="100%">
753
- <mj-text line-height="26px">' . __( 'Hello {{NAME}},', 'email-subscribers' ) . '</mj-text>
754
- <mj-text line-height="26px">' . __( 'We have published a new blog article on our website', 'email-subscribers' ) . ' : {{POSTTITLE}}</mj-text>
755
- <mj-text line-height="26px">{{POSTIMAGE}}</mj-text>
756
- <mj-text line-height="26px">' . __( 'You can view it from this link', 'email-subscribers' ) . ' : {{POSTLINK}}</mj-text>
757
  </mj-column>
758
  </mj-section>
759
  <mj-section background-color="#f3f3f3">
760
  <mj-column width="100%">
761
  <mj-text align="center" line-height="26px">@2022,' . __( 'Your Brand Name', 'email-subscribers' ) . '.</mj-text>
762
- <mj-text align="center" line-height="26px">' . __( 'You received this email because in the past you have provided us your email address : {{EMAIL}} to receive notifications when new updates are posted.', 'email-subscribers' ) . __( 'If you wish to unsubscribe from our newsletter, click', 'email-subscribers' ) . ' <a data-gjs-type="link" href="{{UNSUBSCRIBE-LINK}}" >' . __( 'here', 'email-subscribers' ) . '</a>
763
  </mj-text>
764
  </mj-column>
765
  </mj-section>
706
  */
707
  public function get_post_notification_default_subject( $subject, $campaign_data ) {
708
  if ( empty( $subject ) ) {
709
+ $subject = __( 'New Post Published - {{post.title}}', 'email-subscribers' );
710
  }
711
  return $subject;
712
  }
728
  }
729
 
730
  public function get_classic_editor_default_content() {
731
+ $default_content = __( "Hello {{subscriber.name | fallback='there'}},", 'email-subscribers' ) . "\r\n\r\n";
732
+ $default_content .= __( 'We have published a new blog article on our website', 'email-subscribers' ) . " : {{post.title}}\r\n";
733
+ $default_content .= "{{post.image}}\r\n\r\n";
734
+ $default_content .= __( 'You can view it from this link', 'email-subscribers' ) . " : {{post.link}}\r\n\r\n";
735
  $default_content .= __( 'Thanks & Regards', 'email-subscribers' ) . ",\r\n";
736
  $default_content .= __( 'Admin', 'email-subscribers' ) . "\r\n\r\n";
737
+ $default_content .= __( 'You received this email because in the past you have provided us your email address : {{subscriber.email}} to receive notifications when new updates are posted.', 'email-subscribers' );
738
  return $default_content;
739
  }
740
 
750
  </mj-section>
751
  <mj-section background-color="#FFFFFF">
752
  <mj-column width="100%">
753
+ <mj-text line-height="26px">' . __( "Hello {{subscriber.name | fallback='there'}},", 'email-subscribers' ) . '</mj-text>
754
+ <mj-text line-height="26px">' . __( 'We have published a new blog article on our website', 'email-subscribers' ) . ' : {{post.title}}</mj-text>
755
+ <mj-text line-height="26px">{{post.image}}</mj-text>
756
+ <mj-text line-height="26px">' . __( 'You can view it from this link', 'email-subscribers' ) . ' : {{post.link}}</mj-text>
757
  </mj-column>
758
  </mj-section>
759
  <mj-section background-color="#f3f3f3">
760
  <mj-column width="100%">
761
  <mj-text align="center" line-height="26px">@2022,' . __( 'Your Brand Name', 'email-subscribers' ) . '.</mj-text>
762
+ <mj-text align="center" line-height="26px">' . __( 'You received this email because in the past you have provided us your email address : {{subscriber.email}} to receive notifications when new updates are posted.', 'email-subscribers' ) . __( 'If you wish to unsubscribe from our newsletter, click', 'email-subscribers' ) . ' <a data-gjs-type="link" href="{{UNSUBSCRIBE-LINK}}" >' . __( 'here', 'email-subscribers' ) . '</a>
763
  </mj-text>
764
  </mj-column>
765
  </mj-section>
lite/includes/classes/class-es-templates-table.php CHANGED
@@ -64,19 +64,19 @@ class ES_Templates_Table {
64
  ?>
65
  <!-- Start-IG-Code -->
66
  <p id="post_notification">
67
- <a href="https://www.icegram.com/documentation/es-what-are-the-available-keywords-in-the-post-notifications/?utm_source=es&amp;utm_medium=in_app&amp;utm_campaign=view_docs_help_page" target="_blank"><?php esc_html_e( 'Available Keywords', 'email-subscribers' ); ?></a> <?php esc_html_e( 'for Post Notification: ', 'email-subsribers' ); ?> {{FIRSTNAME}},
68
- {{LASTNAME}}, {{NAME}}, {{EMAIL}},
69
- {{DATE}}, {{POSTTITLE}}, {{POSTIMAGE}}, {{POSTEXCERPT}}, {{POSTDESC}},
70
- {{POSTAUTHOR}}, {{POSTAUTHORAVATAR}}, {{POSTAUTHORAVATARLINK-ONLY}}, {{POSTLINK}}, {{POSTLINK-WITHTITLE}}, {{POSTLINK-ONLY}}, {{POSTFULL}} </p>
71
  <!-- End-IG-Code -->
72
  <p id="newsletter">
73
- <a href="https://www.icegram.com/documentation/es-what-are-the-available-keywords-in-the-newsletters/?utm_source=es&amp;utm_medium=in_app&amp;utm_campaign=view_docs_help_page" target="_blank"><?php esc_html_e( 'Available Keywords', 'email-subscribers' ); ?></a> <?php esc_html_e( 'for Broadcast:', 'email-subscribers' ); ?> {{FIRSTNAME}}, {{LASTNAME}}, {{NAME}},
74
- {{EMAIL}} </p>
75
  <!-- Start-IG-Code -->
76
  <div id="post_digest">
77
  <span style="font-size: 0.8em; margin-left: 0.3em; padding: 2px; background: #e66060; color: #fff; border-radius: 2px; ">Pro</span>&nbsp;
78
  <a href="https://www.icegram.com/send-post-digest-using-email-subscribers-plugin/?utm_source=es&amp;utm_medium=in_app&amp;utm_campaign=view_post_digest_post" target="_blank"><?php esc_html_e( 'Available Keywords', 'email-subscribers' ); ?></a> <?php esc_html_e( 'for Post Digest:', 'email-subscribers' ); ?>
79
- {{FIRSTNAME}}, {{LASTNAME}}, {{NAME}}<div class="post_digest_block"> {{POSTDIGEST}} <br/><?php esc_html_e( 'Any keywords related Post Notification', 'email-subscribers' ); ?> <br/>{{/POSTDIGEST}} </div>
80
  </div>
81
  <!-- End-IG-Code -->
82
  <?php
64
  ?>
65
  <!-- Start-IG-Code -->
66
  <p id="post_notification">
67
+ <a href="https://www.icegram.com/documentation/what-keywords-can-be-used-while-designing-the-campaign/?utm_source=es&amp;utm_medium=in_app&amp;utm_campaign=view_docs_help_page" target="_blank"><?php esc_html_e( 'Available Keywords', 'email-subscribers' ); ?></a> <?php esc_html_e( 'for Post Notification: ', 'email-subsribers' ); ?> {{subscriber.first_name | fallback:'there'}},
68
+ {{subscriber.last_name}}, {{subscriber.name}}, {{subscriber.email}},
69
+ {{post.date}}, {{post.title}}, {{post.image}}, {{post.excerpt}}, {{post.description}},
70
+ {{post.author}}, {{post.author_avatar}}, {{post.author_avatar_url}}, {{post.link}}, {{post.link_with_title}}, {{post.link_only}}, {{post.full}} </p>
71
  <!-- End-IG-Code -->
72
  <p id="newsletter">
73
+ <a href="https://www.icegram.com/documentation/what-keywords-can-be-used-while-designing-the-campaign/?utm_source=es&amp;utm_medium=in_app&amp;utm_campaign=view_docs_help_page" target="_blank"><?php esc_html_e( 'Available Keywords', 'email-subscribers' ); ?></a> <?php esc_html_e( 'for Broadcast:', 'email-subscribers' ); ?> {{subscriber.first_name | fallback:'there'}}, {{subscriber.last_name}}, {{subscriber.name}},
74
+ {{subscriber.email}} </p>
75
  <!-- Start-IG-Code -->
76
  <div id="post_digest">
77
  <span style="font-size: 0.8em; margin-left: 0.3em; padding: 2px; background: #e66060; color: #fff; border-radius: 2px; ">Pro</span>&nbsp;
78
  <a href="https://www.icegram.com/send-post-digest-using-email-subscribers-plugin/?utm_source=es&amp;utm_medium=in_app&amp;utm_campaign=view_post_digest_post" target="_blank"><?php esc_html_e( 'Available Keywords', 'email-subscribers' ); ?></a> <?php esc_html_e( 'for Post Digest:', 'email-subscribers' ); ?>
79
+ {{subscriber.first_name | fallback:'there'}}, {{subscriber.last_name}}, {{subscriber.name}}<div class="post_digest_block"> {{post.digest}} <br/><?php esc_html_e( 'Any keywords related Post Notification', 'email-subscribers' ); ?> <br/>{{/post.digest}} </div>
80
  </div>
81
  <!-- End-IG-Code -->
82
  <?php
lite/includes/mailers/class-es-pepipost-mailer.php CHANGED
@@ -209,6 +209,15 @@ if ( ! class_exists( 'ES_Pepipost_Mailer' ) ) {
209
  * @since 4.7.5
210
  */
211
  public function convert_es_tags_to_mailer_tags( $string = '' ) {
 
 
 
 
 
 
 
 
 
212
  return ES_Common::replace_keywords_with_fallback( $string, array(
213
  'NAME' => '[%NAME%]',
214
  'FIRSTNAME' => '[%FIRSTNAME%]',
209
  * @since 4.7.5
210
  */
211
  public function convert_es_tags_to_mailer_tags( $string = '' ) {
212
+ $string = ES_Common::replace_keywords_with_fallback( $string, array(
213
+ 'subscriber.name' => '[%name%]',
214
+ 'subscriber.first_name' => '[%first_name%]',
215
+ 'subscriber.last_name' => '[%last_name%]',
216
+ 'subscriber.email' => '[%email%]',
217
+ 'subscriber.unsubscribe_link' => '[%unsubscribe_link%]',
218
+ 'subscriber.subscribe_link' => '[%subscribe_link%]',
219
+ ));
220
+
221
  return ES_Common::replace_keywords_with_fallback( $string, array(
222
  'NAME' => '[%NAME%]',
223
  'FIRSTNAME' => '[%FIRSTNAME%]',
lite/includes/mailers/class-es-wpmail-mailer.php CHANGED
@@ -49,7 +49,11 @@ if ( ! class_exists( 'ES_Wpmail_Mailer' ) ) {
49
  if ( ! $send_mail ) {
50
  global $phpmailer;
51
 
52
- $message = wp_strip_all_tags( $phpmailer->ErrorInfo );
 
 
 
 
53
 
54
  return $this->do_response( 'error', $message );
55
  }
49
  if ( ! $send_mail ) {
50
  global $phpmailer;
51
 
52
+ if ( is_object( $phpmailer ) && $phpmailer->ErrorInfo ) {
53
+ $message = wp_strip_all_tags( $phpmailer->ErrorInfo );
54
+ } else {
55
+ $message = __( 'WP Mail Error: Unknown', 'email-subscribers' );
56
+ }
57
 
58
  return $this->do_response( 'error', $message );
59
  }
lite/includes/workflows/actions/class-es-action-send-email.php CHANGED
@@ -117,6 +117,13 @@ if ( ! class_exists( 'ES_Action_Send_Email' ) ) {
117
  $email_content = $this->add_template_styling( $email_content, $email_heading, $email_template );
118
  $current_user = wp_get_current_user();
119
 
 
 
 
 
 
 
 
120
  return ES_Common::replace_keywords_with_fallback( $email_content, array(
121
  'EMAIL' => $current_user->user_email,
122
  'NAME' => $current_user->display_name,
117
  $email_content = $this->add_template_styling( $email_content, $email_heading, $email_template );
118
  $current_user = wp_get_current_user();
119
 
120
+ $email_content = ES_Common::replace_keywords_with_fallback( $email_content, array(
121
+ 'subscriber.first_name' => $current_user->first_name,
122
+ 'subscriber.name' => $current_user->display_name,
123
+ 'subscriber.last_name' => $current_user->last_name,
124
+ 'subscriber.email' => $current_user->user_email
125
+ ) );
126
+
127
  return ES_Common::replace_keywords_with_fallback( $email_content, array(
128
  'EMAIL' => $current_user->user_email,
129
  'NAME' => $current_user->display_name,
lite/includes/workflows/class-ig-es-variables-processor.php CHANGED
@@ -162,7 +162,6 @@ class IG_ES_Variables_Processor {
162
 
163
  /**
164
  * Certain variables can be excluded from processing.
165
- * Currently only {{ unsubscribe_url }}
166
  *
167
  * @param string $variable
168
  * @return bool
162
 
163
  /**
164
  * Certain variables can be excluded from processing.
 
165
  *
166
  * @param string $variable
167
  * @return bool
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
8
  Requires PHP: 5.6
9
- Stable tag: 5.4.3
10
  License: GPLv3
11
  License URI: http://www.gnu.org/licenses
12
 
@@ -310,12 +310,16 @@ Refer [here](https://www.icegram.com/documentation/es-faq/).
310
 
311
  == Upgrade Notice ==
312
 
313
- = 5.4.3 =
314
 
315
- * New: Send emails using Gmail API [Starter]
316
 
317
  == Changelog ==
318
 
 
 
 
 
319
  **5.4.3 (13.07.2022)**
320
 
321
  * New: Send emails using Gmail API [Starter]
6
  Requires at least: 3.9
7
  Tested up to: 6.0
8
  Requires PHP: 5.6
9
+ Stable tag: 5.4.4
10
  License: GPLv3
11
  License URI: http://www.gnu.org/licenses
12
 
310
 
311
  == Upgrade Notice ==
312
 
313
+ = 5.4.4 =
314
 
315
+ * Update: New keyword structure for campaigns
316
 
317
  == Changelog ==
318
 
319
+ **5.4.4 (19.07.2022)**
320
+
321
+ * Update: New keyword structure for campaigns
322
+
323
  **5.4.3 (13.07.2022)**
324
 
325
  * New: Send emails using Gmail API [Starter]