Version Description
Download this release
Release Info
Developer | Icegram |
Plugin | Email Subscribers & Newsletters |
Version | 4.6.12.1 |
Comparing to | |
See all releases |
Code changes from version 4.6.12 to 4.6.12.1
email-subscribers.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Email Subscribers & Newsletters
|
4 |
* Plugin URI: https://www.icegram.com/
|
5 |
* Description: Add subscription forms on website, send HTML newsletters & automatically notify subscribers about new blog posts once it is published.
|
6 |
-
* Version: 4.6.12
|
7 |
* Author: Icegram
|
8 |
* Author URI: https://www.icegram.com/
|
9 |
* Requires at least: 3.9
|
@@ -178,7 +178,7 @@ if ( 'premium' === $ig_es_plan ) {
|
|
178 |
/* ***************************** Initial Compatibility Work (End) ******************* */
|
179 |
|
180 |
if ( ! defined( 'ES_PLUGIN_VERSION' ) ) {
|
181 |
-
define( 'ES_PLUGIN_VERSION', '4.6.12' );
|
182 |
}
|
183 |
|
184 |
// 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.6.12.1
|
7 |
* Author: Icegram
|
8 |
* Author URI: https://www.icegram.com/
|
9 |
* Requires at least: 3.9
|
178 |
/* ***************************** Initial Compatibility Work (End) ******************* */
|
179 |
|
180 |
if ( ! defined( 'ES_PLUGIN_VERSION' ) ) {
|
181 |
+
define( 'ES_PLUGIN_VERSION', '4.6.12.1' );
|
182 |
}
|
183 |
|
184 |
// Plugin Folder Path.
|
lite/admin/class-ig-es-campaign-rules.php
CHANGED
@@ -381,7 +381,7 @@ if ( ! class_exists( 'IG_ES_Campaign_Rules' ) ) {
|
|
381 |
endif;
|
382 |
foreach ( $lists as $list_id => $list_name ) :
|
383 |
?>
|
384 |
-
<option value="<?php echo esc_attr( $list_id ); ?>" <?php echo ( in_array( $list_id, $value_arr ) ? 'selected="' . esc_attr( 'selected' ) . '"' : '' ); ?>><?php echo $list_name ? esc_html( $list_name ) : '[' . esc_html__( 'no title', '
|
385 |
<?php endforeach; ?>
|
386 |
</select>
|
387 |
<?php else : ?>
|
381 |
endif;
|
382 |
foreach ( $lists as $list_id => $list_name ) :
|
383 |
?>
|
384 |
+
<option value="<?php echo esc_attr( $list_id ); ?>" <?php echo ( in_array( $list_id, $value_arr ) ? 'selected="' . esc_attr( 'selected' ) . '"' : '' ); ?>><?php echo $list_name ? esc_html( $list_name ) : '[' . esc_html__( 'no title', 'email-subscribers' ) . ']'; ?></option>
|
385 |
<?php endforeach; ?>
|
386 |
</select>
|
387 |
<?php else : ?>
|
lite/includes/classes/class-es-handle-subscription.php
CHANGED
@@ -167,14 +167,7 @@ if ( ! class_exists( 'ES_Handle_Subscription' ) ) {
|
|
167 |
$list_ids = ig_es_get_request_data( 'list_ids', array() );
|
168 |
$list_hashes = array();
|
169 |
if ( ! empty( $list_ids ) ) {
|
170 |
-
$
|
171 |
-
if ( ! empty( $lists ) ) {
|
172 |
-
foreach ( $lists as $list ) {
|
173 |
-
if ( ! empty( $list ) && ! empty( $list['id'] ) ) {
|
174 |
-
$list_hashes[ $list['id'] ] = $list['hash'];
|
175 |
-
}
|
176 |
-
}
|
177 |
-
}
|
178 |
}
|
179 |
|
180 |
$response['list_hashes'] = $list_hashes;
|
167 |
$list_ids = ig_es_get_request_data( 'list_ids', array() );
|
168 |
$list_hashes = array();
|
169 |
if ( ! empty( $list_ids ) ) {
|
170 |
+
$list_hashes = ES()->lists_db->get_list_id_hash_map( $list_ids );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
171 |
}
|
172 |
|
173 |
$response['list_hashes'] = $list_hashes;
|
lite/includes/db/class-es-db-lists.php
CHANGED
@@ -442,5 +442,32 @@ class ES_DB_Lists extends ES_DB {
|
|
442 |
|
443 |
}
|
444 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
445 |
|
446 |
}
|
442 |
|
443 |
}
|
444 |
|
445 |
+
/**
|
446 |
+
* Get list id hash map
|
447 |
+
*
|
448 |
+
* @param array $list_ids
|
449 |
+
*
|
450 |
+
* @return array $list_hash_map
|
451 |
+
*
|
452 |
+
* @since 4.6.12.1
|
453 |
+
*/
|
454 |
+
public function get_list_id_hash_map( $list_ids = array() ) {
|
455 |
+
|
456 |
+
$list_hash_map = array();
|
457 |
+
|
458 |
+
if ( ! empty( $list_ids ) ) {
|
459 |
+
$lists = ES()->lists_db->get_lists_by_id( $list_ids );
|
460 |
+
if ( ! empty( $lists ) ) {
|
461 |
+
foreach ( $lists as $list ) {
|
462 |
+
if ( ! empty( $list ) && ! empty( $list['id'] ) ) {
|
463 |
+
$list_hash_map[ $list['id'] ] = $list['hash'];
|
464 |
+
}
|
465 |
+
}
|
466 |
+
}
|
467 |
+
}
|
468 |
+
|
469 |
+
return $list_hash_map;
|
470 |
+
}
|
471 |
+
|
472 |
|
473 |
}
|
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.6.12\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-03-
|
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"
|
@@ -355,6 +355,7 @@ msgid "Any campaign"
|
|
355 |
msgstr ""
|
356 |
|
357 |
#: lite/admin/class-ig-es-campaign-rules.php:364
|
|
|
358 |
msgid "no title"
|
359 |
msgstr ""
|
360 |
|
@@ -2282,59 +2283,59 @@ msgstr ""
|
|
2282 |
msgid "No Forms avaliable."
|
2283 |
msgstr ""
|
2284 |
|
2285 |
-
#: lite/includes/classes/class-es-handle-subscription.php:
|
2286 |
#: lite/public/class-email-subscribers-public.php:107
|
2287 |
msgid "Please enter email address"
|
2288 |
msgstr ""
|
2289 |
|
2290 |
-
#: lite/includes/classes/class-es-handle-subscription.php:
|
2291 |
#: lite/public/class-email-subscribers-public.php:108
|
2292 |
msgid "You need to wait for sometime before subscribing again"
|
2293 |
msgstr ""
|
2294 |
|
2295 |
-
#: lite/includes/classes/class-es-handle-subscription.php:
|
2296 |
#: lite/includes/upgrade/es-update-functions.php:750
|
2297 |
#: lite/public/class-email-subscribers-public.php:109
|
2298 |
msgid "Successfully Subscribed."
|
2299 |
msgstr ""
|
2300 |
|
2301 |
-
#: lite/includes/classes/class-es-handle-subscription.php:
|
2302 |
#: lite/public/class-email-subscribers-public.php:111
|
2303 |
msgid "Email Address already exists!"
|
2304 |
msgstr ""
|
2305 |
|
2306 |
-
#: lite/includes/classes/class-es-handle-subscription.php:
|
2307 |
#: lite/public/class-email-subscribers-public.php:112
|
2308 |
msgid "Oops.. Unexpected error occurred."
|
2309 |
msgstr ""
|
2310 |
|
2311 |
-
#: lite/includes/classes/class-es-handle-subscription.php:
|
2312 |
#: lite/public/class-email-subscribers-public.php:113
|
2313 |
msgid "Invalid email address"
|
2314 |
msgstr ""
|
2315 |
|
2316 |
-
#: lite/includes/classes/class-es-handle-subscription.php:
|
2317 |
msgid "Invalid name"
|
2318 |
msgstr ""
|
2319 |
|
2320 |
-
#: lite/includes/classes/class-es-handle-subscription.php:
|
2321 |
#: lite/public/class-email-subscribers-public.php:114
|
2322 |
msgid "Please try after some time"
|
2323 |
msgstr ""
|
2324 |
|
2325 |
-
#: lite/includes/classes/class-es-handle-subscription.php:
|
2326 |
msgid "Oops...unable to add subscriber"
|
2327 |
msgstr ""
|
2328 |
|
2329 |
-
#: lite/includes/classes/class-es-handle-subscription.php:
|
2330 |
msgid "You do not have permission to add subscriber"
|
2331 |
msgstr ""
|
2332 |
|
2333 |
-
#: lite/includes/classes/class-es-handle-subscription.php:
|
2334 |
msgid "Please select the list"
|
2335 |
msgstr ""
|
2336 |
|
2337 |
-
#: lite/includes/classes/class-es-handle-subscription.php:
|
2338 |
msgid "Invalid Captcha"
|
2339 |
msgstr ""
|
2340 |
|
@@ -4162,7 +4163,7 @@ msgstr ""
|
|
4162 |
msgid "Unsubscribe"
|
4163 |
msgstr ""
|
4164 |
|
4165 |
-
#: lite/public/partials/class-es-shortcode.php:
|
4166 |
msgid "Select list(s)"
|
4167 |
msgstr ""
|
4168 |
|
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.6.12.1\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-03-05T13:43:32+05:30\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"
|
355 |
msgstr ""
|
356 |
|
357 |
#: lite/admin/class-ig-es-campaign-rules.php:364
|
358 |
+
#: lite/admin/class-ig-es-campaign-rules.php:384
|
359 |
msgid "no title"
|
360 |
msgstr ""
|
361 |
|
2283 |
msgid "No Forms avaliable."
|
2284 |
msgstr ""
|
2285 |
|
2286 |
+
#: lite/includes/classes/class-es-handle-subscription.php:520
|
2287 |
#: lite/public/class-email-subscribers-public.php:107
|
2288 |
msgid "Please enter email address"
|
2289 |
msgstr ""
|
2290 |
|
2291 |
+
#: lite/includes/classes/class-es-handle-subscription.php:521
|
2292 |
#: lite/public/class-email-subscribers-public.php:108
|
2293 |
msgid "You need to wait for sometime before subscribing again"
|
2294 |
msgstr ""
|
2295 |
|
2296 |
+
#: lite/includes/classes/class-es-handle-subscription.php:522
|
2297 |
#: lite/includes/upgrade/es-update-functions.php:750
|
2298 |
#: lite/public/class-email-subscribers-public.php:109
|
2299 |
msgid "Successfully Subscribed."
|
2300 |
msgstr ""
|
2301 |
|
2302 |
+
#: lite/includes/classes/class-es-handle-subscription.php:523
|
2303 |
#: lite/public/class-email-subscribers-public.php:111
|
2304 |
msgid "Email Address already exists!"
|
2305 |
msgstr ""
|
2306 |
|
2307 |
+
#: lite/includes/classes/class-es-handle-subscription.php:524
|
2308 |
#: lite/public/class-email-subscribers-public.php:112
|
2309 |
msgid "Oops.. Unexpected error occurred."
|
2310 |
msgstr ""
|
2311 |
|
2312 |
+
#: lite/includes/classes/class-es-handle-subscription.php:525
|
2313 |
#: lite/public/class-email-subscribers-public.php:113
|
2314 |
msgid "Invalid email address"
|
2315 |
msgstr ""
|
2316 |
|
2317 |
+
#: lite/includes/classes/class-es-handle-subscription.php:526
|
2318 |
msgid "Invalid name"
|
2319 |
msgstr ""
|
2320 |
|
2321 |
+
#: lite/includes/classes/class-es-handle-subscription.php:527
|
2322 |
#: lite/public/class-email-subscribers-public.php:114
|
2323 |
msgid "Please try after some time"
|
2324 |
msgstr ""
|
2325 |
|
2326 |
+
#: lite/includes/classes/class-es-handle-subscription.php:528
|
2327 |
msgid "Oops...unable to add subscriber"
|
2328 |
msgstr ""
|
2329 |
|
2330 |
+
#: lite/includes/classes/class-es-handle-subscription.php:529
|
2331 |
msgid "You do not have permission to add subscriber"
|
2332 |
msgstr ""
|
2333 |
|
2334 |
+
#: lite/includes/classes/class-es-handle-subscription.php:530
|
2335 |
msgid "Please select the list"
|
2336 |
msgstr ""
|
2337 |
|
2338 |
+
#: lite/includes/classes/class-es-handle-subscription.php:531
|
2339 |
msgid "Invalid Captcha"
|
2340 |
msgstr ""
|
2341 |
|
4163 |
msgid "Unsubscribe"
|
4164 |
msgstr ""
|
4165 |
|
4166 |
+
#: lite/public/partials/class-es-shortcode.php:280
|
4167 |
msgid "Select list(s)"
|
4168 |
msgstr ""
|
4169 |
|
lite/public/partials/class-es-shortcode.php
CHANGED
@@ -183,14 +183,27 @@ class ES_Shortcode {
|
|
183 |
// Lists
|
184 |
if ( ! empty( $list_ids ) && $show_list ) {
|
185 |
$lists_id_name_map = ES()->lists_db->get_list_id_name_map();
|
186 |
-
$
|
|
|
187 |
} elseif ( ! empty( $list_ids ) && ! $show_list ) {
|
188 |
$list_html = '';
|
189 |
-
|
190 |
-
|
|
|
|
|
|
|
|
|
|
|
191 |
}
|
192 |
} elseif ( is_numeric( $list ) ) {
|
193 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
194 |
} else {
|
195 |
$list_data = ES()->lists_db->get_list_by_name( $list );
|
196 |
if ( empty( $list_data ) ) {
|
@@ -199,7 +212,14 @@ class ES_Shortcode {
|
|
199 |
$list_id = $list_data['id'];
|
200 |
}
|
201 |
|
202 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
203 |
}
|
204 |
|
205 |
// Form html
|
@@ -256,7 +276,7 @@ class ES_Shortcode {
|
|
256 |
<?php
|
257 |
}
|
258 |
|
259 |
-
public static function prepare_lists_checkboxes( $lists, $list_ids = array(), $columns = 3, $selected_lists = array(), $contact_id = 0, $name = 'lists[]' ) {
|
260 |
$lists_html = '<div><p><b class="font-medium text-gray-500 pb-2">' . __( 'Select list(s)', 'email-subscribers' ) . '*</b></p><table class="ig-es-form-list-selection"><tr>';
|
261 |
$i = 0;
|
262 |
|
@@ -270,14 +290,22 @@ class ES_Shortcode {
|
|
270 |
}
|
271 |
$status_span = '';
|
272 |
if ( in_array( $list_id, $list_ids ) ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
273 |
if ( in_array( $list_id, $selected_lists ) ) {
|
274 |
if ( ! empty( $contact_id ) ) {
|
275 |
$status_span = '<span class="es_list_contact_status ' . $list_contact_status_map[ $list_id ] . '" title="' . ucwords( $list_contact_status_map[ $list_id ] ) . '">';
|
276 |
}
|
277 |
$lists_html .= '<td class="pt-4">';
|
278 |
-
$lists_html .= $status_span . '<label><input type="checkbox" class="pl-6 form-checkbox" name="' . $name . '" checked="checked" value="' . $
|
279 |
} else {
|
280 |
-
$lists_html .= '<td class="pt-4"><label><input type="checkbox" class="pl-6 form-checkbox " name="' . $name . '" value="' . $
|
281 |
}
|
282 |
$i ++;
|
283 |
}
|
183 |
// Lists
|
184 |
if ( ! empty( $list_ids ) && $show_list ) {
|
185 |
$lists_id_name_map = ES()->lists_db->get_list_id_name_map();
|
186 |
+
$lists_id_hash_map = ES()->lists_db->get_list_id_hash_map( $list_ids );
|
187 |
+
$list_html = self::prepare_lists_checkboxes( $lists_id_name_map, $list_ids, 1, array(), 0, 'lists[]', $lists_id_hash_map );
|
188 |
} elseif ( ! empty( $list_ids ) && ! $show_list ) {
|
189 |
$list_html = '';
|
190 |
+
$lists = ES()->lists_db->get_lists_by_id( $list_ids );
|
191 |
+
if ( ! empty( $lists ) ) {
|
192 |
+
foreach ( $lists as $list ) {
|
193 |
+
if ( ! empty( $list ) && ! empty( $list['hash'] ) ) {
|
194 |
+
$list_html .= '<input type="hidden" name="lists[]" value="' . $list['hash'] . '" />';
|
195 |
+
}
|
196 |
+
}
|
197 |
}
|
198 |
} elseif ( is_numeric( $list ) ) {
|
199 |
+
$lists = ES()->lists_db->get_lists_by_id( $list );
|
200 |
+
$list_html = '';
|
201 |
+
if ( ! empty( $lists ) ) {
|
202 |
+
$list_hash = ! empty( $lists[0]['hash'] ) ? $lists[0]['hash'] : '';
|
203 |
+
if ( ! empty( $list_hash ) ) {
|
204 |
+
$list_html = '<input type="hidden" name="lists[]" value="' . $list_hash . '" />';
|
205 |
+
}
|
206 |
+
}
|
207 |
} else {
|
208 |
$list_data = ES()->lists_db->get_list_by_name( $list );
|
209 |
if ( empty( $list_data ) ) {
|
212 |
$list_id = $list_data['id'];
|
213 |
}
|
214 |
|
215 |
+
$lists = ES()->lists_db->get_lists_by_id( $list_id );
|
216 |
+
$list_html = '';
|
217 |
+
if ( ! empty( $lists ) ) {
|
218 |
+
$list_hash = ! empty( $lists[0]['hash'] ) ? $lists[0]['hash'] : '';
|
219 |
+
if ( ! empty( $list_hash ) ) {
|
220 |
+
$list_html = '<input type="hidden" name="lists[]" value="' . $list_hash . '" />';
|
221 |
+
}
|
222 |
+
}
|
223 |
}
|
224 |
|
225 |
// Form html
|
276 |
<?php
|
277 |
}
|
278 |
|
279 |
+
public static function prepare_lists_checkboxes( $lists, $list_ids = array(), $columns = 3, $selected_lists = array(), $contact_id = 0, $name = 'lists[]', $lists_id_hash_map = array() ) {
|
280 |
$lists_html = '<div><p><b class="font-medium text-gray-500 pb-2">' . __( 'Select list(s)', 'email-subscribers' ) . '*</b></p><table class="ig-es-form-list-selection"><tr>';
|
281 |
$i = 0;
|
282 |
|
290 |
}
|
291 |
$status_span = '';
|
292 |
if ( in_array( $list_id, $list_ids ) ) {
|
293 |
+
|
294 |
+
// Check if list hash has been passed for given list id, if yes then use list hash, else use list id
|
295 |
+
if ( ! empty( $lists_id_hash_map[ $list_id ] ) ) {
|
296 |
+
$list_value = $lists_id_hash_map[ $list_id ];
|
297 |
+
} else {
|
298 |
+
$list_value = $list_id;
|
299 |
+
}
|
300 |
+
|
301 |
if ( in_array( $list_id, $selected_lists ) ) {
|
302 |
if ( ! empty( $contact_id ) ) {
|
303 |
$status_span = '<span class="es_list_contact_status ' . $list_contact_status_map[ $list_id ] . '" title="' . ucwords( $list_contact_status_map[ $list_id ] ) . '">';
|
304 |
}
|
305 |
$lists_html .= '<td class="pt-4">';
|
306 |
+
$lists_html .= $status_span . '<label><input type="checkbox" class="pl-6 form-checkbox" name="' . $name . '" checked="checked" value="' . $list_value . '" /><span class="pl-1 pr-6 text-gray-500 text-sm font-normal">' . $list_name . '</span></label></td>';
|
307 |
} else {
|
308 |
+
$lists_html .= '<td class="pt-4"><label><input type="checkbox" class="pl-6 form-checkbox " name="' . $name . '" value="' . $list_value . '" /><span class="pl-1 pr-6 text-gray-500 text-sm font-normal">' . $list_name . '</span></label></td>';
|
309 |
}
|
310 |
$i ++;
|
311 |
}
|
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.6.2
|
8 |
Requires PHP: 5.6
|
9 |
-
Stable tag: 4.6.12
|
10 |
License: GPLv3
|
11 |
License URI: http://www.gnu.org/licenses
|
12 |
|
@@ -304,6 +304,10 @@ Refer [here](https://www.icegram.com/documentation/es-faq/).
|
|
304 |
|
305 |
== Changelog ==
|
306 |
|
|
|
|
|
|
|
|
|
307 |
**4.6.12 (04.03.2021)**
|
308 |
|
309 |
* New: Filter recipients using new campaign rules for 'is in List' and 'is not in List'[PRO] while sending broadcast
|
6 |
Requires at least: 3.9
|
7 |
Tested up to: 5.6.2
|
8 |
Requires PHP: 5.6
|
9 |
+
Stable tag: 4.6.12.1
|
10 |
License: GPLv3
|
11 |
License URI: http://www.gnu.org/licenses
|
12 |
|
304 |
|
305 |
== Changelog ==
|
306 |
|
307 |
+
**4.6.12.1 (05.03.2021)**
|
308 |
+
|
309 |
+
* Fix: Subscription issue with [Icegram](https://wordpress.org/plugins/icegram) plugin
|
310 |
+
|
311 |
**4.6.12 (04.03.2021)**
|
312 |
|
313 |
* New: Filter recipients using new campaign rules for 'is in List' and 'is not in List'[PRO] while sending broadcast
|