Version Description
- New: Prefill name and email fields in the subscription form for logged-in users
=
Download this release
Release Info
Developer | Icegram |
Plugin | Email Subscribers & Newsletters |
Version | 4.8.6 |
Comparing to | |
See all releases |
Code changes from version 4.8.5 to 4.8.6
- email-subscribers.php +2 -2
- lite/admin/images/halloween2021.png +0 -0
- lite/admin/images/halloween_2020.png +0 -0
- lite/includes/class-email-subscribers.php +28 -3
- lite/includes/notices/class-es-admin-notices.php +4 -4
- lite/includes/notices/views/ig-es-halloween-offer.php +18 -0
- lite/includes/notices/views/trial-to-premium-offer.php +3 -10
- lite/languages/email-subscribers.pot +4 -4
- lite/public/partials/class-es-shortcode.php +9 -0
- readme.txt +7 -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: 4.8.
|
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', '4.8.
|
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: 4.8.6
|
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', '4.8.6' );
|
191 |
}
|
192 |
|
193 |
// Plugin Folder Path.
|
lite/admin/images/halloween2021.png
ADDED
Binary file
|
lite/admin/images/halloween_2020.png
DELETED
Binary file
|
lite/includes/class-email-subscribers.php
CHANGED
@@ -322,10 +322,10 @@ if ( ! class_exists( 'Email_Subscribers' ) ) {
|
|
322 |
|
323 |
if ( $show_offer ) {
|
324 |
$args['url'] = 'https://www.icegram.com/';
|
325 |
-
$args['include'] = ES_PLUGIN_DIR . 'lite/includes/notices/views/ig-es-
|
326 |
-
ES_Admin_Notices::add_custom_notice( '
|
327 |
} else {
|
328 |
-
ES_Admin_Notices::remove_notice( '
|
329 |
}
|
330 |
|
331 |
$screen_id = $this->get_current_screen_id();
|
@@ -1977,5 +1977,30 @@ if ( ! class_exists( 'Email_Subscribers' ) ) {
|
|
1977 |
$message = ob_get_clean();
|
1978 |
return $message;
|
1979 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1980 |
}
|
1981 |
}
|
322 |
|
323 |
if ( $show_offer ) {
|
324 |
$args['url'] = 'https://www.icegram.com/';
|
325 |
+
$args['include'] = ES_PLUGIN_DIR . 'lite/includes/notices/views/ig-es-halloween-offer.php';
|
326 |
+
ES_Admin_Notices::add_custom_notice( 'halloween_offer_2021', $args );
|
327 |
} else {
|
328 |
+
ES_Admin_Notices::remove_notice( 'halloween_offer_2021' );
|
329 |
}
|
330 |
|
331 |
$screen_id = $this->get_current_screen_id();
|
1977 |
$message = ob_get_clean();
|
1978 |
return $message;
|
1979 |
}
|
1980 |
+
|
1981 |
+
/**
|
1982 |
+
* Check if offer period
|
1983 |
+
*
|
1984 |
+
* @return boolean
|
1985 |
+
*
|
1986 |
+
* @since 4.8.6
|
1987 |
+
*/
|
1988 |
+
public function is_offer_period( $offer_name = '' ) {
|
1989 |
+
|
1990 |
+
$is_offer_period = false;
|
1991 |
+
if ( ! empty( $offer_name ) ) {
|
1992 |
+
$current_utc_time = time();
|
1993 |
+
$current_ist_time = $current_utc_time + ( 5.5 * HOUR_IN_SECONDS ); // Add IST offset to get IST time
|
1994 |
+
|
1995 |
+
if ( 'halloween' === $offer_name ) {
|
1996 |
+
$offer_start_time = strtotime( '2021-10-27 12:00:00' ); // Offer start time in IST
|
1997 |
+
$offer_end_time = strtotime( '2021-11-02 12:00:00' ); // Offer end time in IST
|
1998 |
+
}
|
1999 |
+
|
2000 |
+
$is_offer_period = $current_ist_time >= $offer_start_time && $current_ist_time <= $offer_end_time;
|
2001 |
+
}
|
2002 |
+
|
2003 |
+
return $is_offer_period;
|
2004 |
+
}
|
2005 |
}
|
2006 |
}
|
lite/includes/notices/class-es-admin-notices.php
CHANGED
@@ -212,9 +212,9 @@ class ES_Admin_Notices {
|
|
212 |
|
213 |
$es_dismiss_admin_notice = ig_es_get_request_data( 'es_dismiss_admin_notice' );
|
214 |
$option_name = ig_es_get_request_data( 'option_name' );
|
215 |
-
if ( '1'
|
216 |
update_option( 'ig_es_' . $option_name, 'yes', false );
|
217 |
-
if ( in_array( $option_name, array( 'redirect_upsale_notice', 'dismiss_upsale_notice', 'dismiss_star_notice', 'star_notice_done', 'trial_to_premium_notice' ) ) ) {
|
218 |
update_option( 'ig_es_' . $option_name . '_date', ig_get_current_date_time(), false );
|
219 |
}
|
220 |
|
@@ -236,8 +236,8 @@ class ES_Admin_Notices {
|
|
236 |
}
|
237 |
}
|
238 |
|
239 |
-
//
|
240 |
-
if ( '
|
241 |
$url = 'https://www.icegram.com/email-subscribers-pricing/?utm_source=in_app&utm_medium=es_banner&utm_campaign=' . $option_name;
|
242 |
header( "Location: {$url}" );
|
243 |
exit();
|
212 |
|
213 |
$es_dismiss_admin_notice = ig_es_get_request_data( 'es_dismiss_admin_notice' );
|
214 |
$option_name = ig_es_get_request_data( 'option_name' );
|
215 |
+
if ( '1' === $es_dismiss_admin_notice && ! empty( $option_name ) ) {
|
216 |
update_option( 'ig_es_' . $option_name, 'yes', false );
|
217 |
+
if ( in_array( $option_name, array( 'redirect_upsale_notice', 'dismiss_upsale_notice', 'dismiss_star_notice', 'star_notice_done', 'trial_to_premium_notice' ), true ) ) {
|
218 |
update_option( 'ig_es_' . $option_name . '_date', ig_get_current_date_time(), false );
|
219 |
}
|
220 |
|
236 |
}
|
237 |
}
|
238 |
|
239 |
+
// Halloween 2021 offer
|
240 |
+
if ( 'offer_halloween_2021' === $option_name ) {
|
241 |
$url = 'https://www.icegram.com/email-subscribers-pricing/?utm_source=in_app&utm_medium=es_banner&utm_campaign=' . $option_name;
|
242 |
header( "Location: {$url}" );
|
243 |
exit();
|
lite/includes/notices/views/ig-es-halloween-offer.php
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<style type="text/css">
|
2 |
+
.ig_es_offer {
|
3 |
+
width:55%;
|
4 |
+
margin: 0 auto;
|
5 |
+
text-align: center;
|
6 |
+
padding-top: 1.2em;
|
7 |
+
}
|
8 |
+
|
9 |
+
</style>
|
10 |
+
<?php
|
11 |
+
|
12 |
+
if ( ( get_option( 'ig_es_offer_halloween_2021' ) !== 'yes' ) && ES()->is_offer_period( 'halloween' ) ) {
|
13 |
+
?>
|
14 |
+
<div class="ig_es_offer">
|
15 |
+
<a target="_blank" href="?es_dismiss_admin_notice=1&option_name=offer_halloween_2021"><img src="<?php echo esc_url ( ES_PLUGIN_URL ); ?>/lite/admin/images/halloween2021.png"/></a>
|
16 |
+
</div>
|
17 |
+
|
18 |
+
<?php } ?>
|
lite/includes/notices/views/trial-to-premium-offer.php
CHANGED
@@ -42,10 +42,7 @@ $day_or_days = _n( 'day', 'days', $remaining_trial_days, 'email-subscri
|
|
42 |
|
43 |
$discount_messages = array(
|
44 |
'halloween' => array(
|
45 |
-
'message' => __( 'Get flat <strong>
|
46 |
-
),
|
47 |
-
'bfcm' => array(
|
48 |
-
'message' => __( 'Get flat <strong>20%</strong> discount on annual plan and <strong>35%</strong> discount on lifetime plan if you upgrade now!<br/><strong>No coupon code</strong> required. Discount will be applied automatically.', 'email-subscribers' ),
|
49 |
),
|
50 |
);
|
51 |
|
@@ -53,12 +50,8 @@ $offer_type_to_show = 'trial';
|
|
53 |
|
54 |
$offers_date_ranges = array(
|
55 |
'halloween' => array(
|
56 |
-
'start_date' => '
|
57 |
-
'end_date' => '
|
58 |
-
),
|
59 |
-
'bfcm' => array(
|
60 |
-
'start_date' => '2020-11-25',
|
61 |
-
'end_date' => '2020-12-02',
|
62 |
),
|
63 |
);
|
64 |
|
42 |
|
43 |
$discount_messages = array(
|
44 |
'halloween' => array(
|
45 |
+
'message' => __( 'Get flat <strong>30%</strong> discount on annual plan if you upgrade now!<br/><strong>No coupon code</strong> required. Discount will be applied automatically.', 'email-subscribers' ),
|
|
|
|
|
|
|
46 |
),
|
47 |
);
|
48 |
|
50 |
|
51 |
$offers_date_ranges = array(
|
52 |
'halloween' => array(
|
53 |
+
'start_date' => '2021-10-27',
|
54 |
+
'end_date' => '2021-11-02',
|
|
|
|
|
|
|
|
|
55 |
),
|
56 |
);
|
57 |
|
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 4.8.
|
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: 2021-10-
|
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"
|
@@ -4569,11 +4569,11 @@ msgstr ""
|
|
4569 |
msgid "Unsubscribe"
|
4570 |
msgstr ""
|
4571 |
|
4572 |
-
#: lite/public/partials/class-es-shortcode.php:
|
4573 |
msgid "Loading"
|
4574 |
msgstr ""
|
4575 |
|
4576 |
-
#: lite/public/partials/class-es-shortcode.php:
|
4577 |
msgid "Select list(s)"
|
4578 |
msgstr ""
|
4579 |
|
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 4.8.6\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: 2021-10-20T06:00:37+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"
|
4569 |
msgid "Unsubscribe"
|
4570 |
msgstr ""
|
4571 |
|
4572 |
+
#: lite/public/partials/class-es-shortcode.php:330
|
4573 |
msgid "Loading"
|
4574 |
msgstr ""
|
4575 |
|
4576 |
+
#: lite/public/partials/class-es-shortcode.php:345
|
4577 |
msgid "Select list(s)"
|
4578 |
msgstr ""
|
4579 |
|
lite/public/partials/class-es-shortcode.php
CHANGED
@@ -196,6 +196,15 @@ class ES_Shortcode {
|
|
196 |
$selected_list_ids = array_column( $selected_lists, 'id' );
|
197 |
}
|
198 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
199 |
}
|
200 |
|
201 |
//replace total contact
|
196 |
$selected_list_ids = array_column( $selected_lists, 'id' );
|
197 |
}
|
198 |
}
|
199 |
+
} else {
|
200 |
+
if ( is_user_logged_in() ) {
|
201 |
+
$prefill_form = apply_filters( 'ig_es_prefill_subscription_form', 'yes' );
|
202 |
+
if ( 'yes' === $prefill_form ) {
|
203 |
+
$current_user = wp_get_current_user();
|
204 |
+
$submitted_email = $current_user->user_email;
|
205 |
+
$submitted_name = $current_user->user_firstname . ' ' . $current_user->user_lastname;
|
206 |
+
}
|
207 |
+
}
|
208 |
}
|
209 |
|
210 |
//replace total contact
|
readme.txt
CHANGED
@@ -6,7 +6,7 @@ Tags: email marketing, subscription, autoresponder, post notification, welcome e
|
|
6 |
Requires at least: 3.9
|
7 |
Tested up to: 5.8.1
|
8 |
Requires PHP: 5.6
|
9 |
-
Stable tag: 4.8.
|
10 |
License: GPLv3
|
11 |
License URI: http://www.gnu.org/licenses
|
12 |
|
@@ -310,13 +310,16 @@ Refer [here](https://www.icegram.com/documentation/es-faq/).
|
|
310 |
|
311 |
== Upgrade Notice ==
|
312 |
|
313 |
-
= 4.8.
|
314 |
|
315 |
-
*
|
316 |
-
* Fix: PHP warning while saving contact through admin side
|
317 |
|
318 |
== Changelog ==
|
319 |
|
|
|
|
|
|
|
|
|
320 |
**4.8.5 (14.10.2021)**
|
321 |
|
322 |
* Update: Support for Amazon SES batch email API **[PRO]**
|
6 |
Requires at least: 3.9
|
7 |
Tested up to: 5.8.1
|
8 |
Requires PHP: 5.6
|
9 |
+
Stable tag: 4.8.6
|
10 |
License: GPLv3
|
11 |
License URI: http://www.gnu.org/licenses
|
12 |
|
310 |
|
311 |
== Upgrade Notice ==
|
312 |
|
313 |
+
= 4.8.6 =
|
314 |
|
315 |
+
* New: Prefill name and email fields in the subscription form for logged-in users
|
|
|
316 |
|
317 |
== Changelog ==
|
318 |
|
319 |
+
**4.8.6 (21.10.2021)**
|
320 |
+
|
321 |
+
* New: Prefill name and email fields in the subscription form for logged-in users
|
322 |
+
|
323 |
**4.8.5 (14.10.2021)**
|
324 |
|
325 |
* Update: Support for Amazon SES batch email API **[PRO]**
|