Version Description
Download this release
Release Info
Developer | Icegram |
Plugin | Email Subscribers & Newsletters |
Version | 4.6.4 |
Comparing to | |
See all releases |
Code changes from version 4.6.3 to 4.6.4
- email-subscribers.php +4 -2
- lite/admin/class-email-subscribers-admin.php +0 -1
- lite/admin/images/bfcm_2020.jpg +0 -0
- lite/admin/js/es-onboarding.js +4 -4
- lite/includes/class-email-subscribers-activator.php +0 -1
- lite/includes/class-email-subscribers-deactivator.php +0 -1
- lite/includes/class-email-subscribers-loader.php +0 -1
- lite/includes/class-email-subscribers.php +7 -4
- lite/includes/class-es-common.php +1 -1
- lite/includes/classes/class-es-admin-settings.php +0 -1
- lite/includes/classes/class-es-cron.php +18 -0
- lite/includes/classes/class-es-handle-post-notification.php +7 -0
- lite/includes/classes/class-es-import-subscribers.php +35 -12
- lite/includes/classes/class-es-newsletters.php +0 -1
- lite/includes/classes/class-es-queue.php +252 -66
- lite/includes/classes/class-es-tools.php +0 -1
- lite/includes/classes/class-ig-es-background-process-helper.php +0 -1
- lite/includes/db/class-es-db-lists-contacts.php +15 -11
- lite/includes/feedback/class-ig-feedback.php +0 -1
- lite/includes/feedback/class-ig-tracker.php +0 -1
- lite/includes/libraries/class-es-html2text.php +26 -25
- lite/includes/libraries/wp-js-editor/wp-js-editor.php +25 -25
- lite/includes/notices/class-es-admin-notices.php +3 -14
- lite/includes/notices/views/ig-es-bfcm-offer.php +19 -0
- lite/includes/notices/views/ig-es-halloween-offer.php +0 -17
- lite/includes/workflows/abstracts/class-es-workflow-action.php +0 -1
- lite/includes/workflows/abstracts/class-es-workflow-data-type.php +0 -1
- lite/includes/workflows/abstracts/class-es-workflow-registry.php +0 -1
- lite/includes/workflows/abstracts/class-es-workflow-trigger.php +0 -1
- lite/includes/workflows/actions/abstracts/class-ig-es-action-send-email-abstract.php +0 -1
- lite/includes/workflows/actions/class-es-action-add-to-list.php +0 -1
- lite/includes/workflows/actions/class-es-action-delete-contact.php +0 -1
- lite/includes/workflows/actions/class-es-action-update-contact.php +0 -1
- lite/includes/workflows/admin/class-es-workflow-admin-ajax.php +0 -1
- lite/includes/workflows/admin/class-es-workflow-admin-edit.php +0 -1
- lite/includes/workflows/admin/class-es-workflow-admin.php +0 -1
- lite/includes/workflows/admin/views/action-fields.php +0 -1
- lite/includes/workflows/admin/views/action.php +0 -1
- lite/includes/workflows/admin/views/meta-box-actions.php +0 -1
- lite/includes/workflows/admin/views/meta-box-options.php +0 -1
- lite/includes/workflows/admin/views/meta-box-save.php +0 -1
- lite/includes/workflows/admin/views/meta-box-timing.php +0 -1
- lite/includes/workflows/admin/views/meta-box-trigger.php +0 -1
- lite/includes/workflows/class-es-clean.php +0 -1
- lite/includes/workflows/class-es-workflow-actions.php +5 -2
- lite/includes/workflows/class-es-workflow-datetime.php +0 -1
- lite/includes/workflows/class-es-workflow-factory.php +0 -1
- lite/includes/workflows/class-es-workflow-loader.php +0 -1
- lite/includes/workflows/class-es-workflow-query.php +0 -1
- lite/includes/workflows/class-es-workflow-time-helper.php +0 -1
- lite/includes/workflows/class-es-workflow-triggers.php +5 -3
- lite/includes/workflows/class-es-workflows-table.php +0 -1
- lite/includes/workflows/data-types/abstracts/class-es-data-type-form-data.php +0 -1
- lite/includes/workflows/data-types/class-es-data-type-user.php +0 -1
- lite/includes/workflows/db/class-es-db-workflows-queue.php +0 -1
- lite/includes/workflows/db/class-es-db-workflows.php +0 -1
- lite/includes/workflows/fields/class-es-checkbox.php +0 -1
- lite/includes/workflows/fields/class-es-date.php +0 -1
- lite/includes/workflows/fields/class-es-field.php +0 -1
- lite/includes/workflows/fields/class-es-number.php +0 -1
- lite/includes/workflows/fields/class-es-select.php +0 -1
- lite/includes/workflows/fields/class-es-text.php +0 -1
- lite/includes/workflows/fields/class-es-time.php +0 -1
- lite/includes/workflows/fields/class-es-wp-editor.php +0 -1
- lite/includes/workflows/queue/class-es-workflow-queue-factory.php +0 -1
- lite/includes/workflows/queue/class-es-workflow-queue-handler.php +0 -1
- lite/includes/workflows/queue/class-es-workflow-queue-runner.php +0 -1
- lite/includes/workflows/triggers/abstracts/class-es-trigger-form-submitted.php +0 -1
- lite/includes/workflows/triggers/class-es-trigger-user-deleted.php +0 -1
- lite/includes/workflows/triggers/class-es-trigger-user-registered.php +0 -1
- lite/includes/workflows/triggers/class-es-trigger-user-updated.php +0 -1
- lite/includes/workflows/workflow-helper-functions.php +0 -1
- lite/public/class-email-subscribers-public.php +0 -1
- lite/public/partials/class-es-shortcode.php +2 -2
- readme.txt +9 -1
email-subscribers.php
CHANGED
@@ -3,11 +3,13 @@
|
|
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.
|
7 |
* Author: Icegram
|
8 |
* Author URI: https://www.icegram.com/
|
9 |
* Requires at least: 3.9
|
10 |
* Tested up to: 5.5.3
|
|
|
|
|
11 |
* Requires PHP: 5.6
|
12 |
* Text Domain: email-subscribers
|
13 |
* Domain Path: /lite/languages/
|
@@ -175,7 +177,7 @@ if ( 'premium' === $ig_es_plan ) {
|
|
175 |
/* ***************************** Initial Compatibility Work (End) ******************* */
|
176 |
|
177 |
if ( ! defined( 'ES_PLUGIN_VERSION' ) ) {
|
178 |
-
define( 'ES_PLUGIN_VERSION', '4.6.
|
179 |
}
|
180 |
|
181 |
// 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.4
|
7 |
* Author: Icegram
|
8 |
* Author URI: https://www.icegram.com/
|
9 |
* Requires at least: 3.9
|
10 |
* Tested up to: 5.5.3
|
11 |
+
* WC requires at least: 3.6.0
|
12 |
+
* WC tested up to: 4.6.2
|
13 |
* Requires PHP: 5.6
|
14 |
* Text Domain: email-subscribers
|
15 |
* Domain Path: /lite/languages/
|
177 |
/* ***************************** Initial Compatibility Work (End) ******************* */
|
178 |
|
179 |
if ( ! defined( 'ES_PLUGIN_VERSION' ) ) {
|
180 |
+
define( 'ES_PLUGIN_VERSION', '4.6.4' );
|
181 |
}
|
182 |
|
183 |
// Plugin Folder Path.
|
lite/admin/class-email-subscribers-admin.php
CHANGED
@@ -24,7 +24,6 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
24 |
*
|
25 |
* @package Email_Subscribers
|
26 |
* @subpackage Email_Subscribers/admin
|
27 |
-
* @author Your Name <email@example.com>
|
28 |
*/
|
29 |
class Email_Subscribers_Admin {
|
30 |
|
24 |
*
|
25 |
* @package Email_Subscribers
|
26 |
* @subpackage Email_Subscribers/admin
|
|
|
27 |
*/
|
28 |
class Email_Subscribers_Admin {
|
29 |
|
lite/admin/images/bfcm_2020.jpg
ADDED
Binary file
|
lite/admin/js/es-onboarding.js
CHANGED
@@ -49,7 +49,7 @@ jQuery(document).ready(function() {
|
|
49 |
success: function(data, status, xhr) {
|
50 |
let tasks = data.tasks;
|
51 |
|
52 |
-
if( ! jQuery.isEmptyObject( tasks ) ) {
|
53 |
for( let task_name in tasks ) {
|
54 |
if( tasks.hasOwnProperty( task_name ) ) {
|
55 |
time_increament += 500;
|
@@ -379,7 +379,7 @@ jQuery(document).ready(function() {
|
|
379 |
let ig_es_handle_onboard_task_response = function( task, response, show_error_as = 'inline' ) {
|
380 |
let task_html_elem = 'ig-es-onboard-' + task;
|
381 |
let tasks = response.tasks;
|
382 |
-
if( ! jQuery.isEmptyObject( tasks ) && tasks.hasOwnProperty( task ) ) {
|
383 |
if( tasks.hasOwnProperty( task ) ) {
|
384 |
let task_data = tasks[ task ];
|
385 |
let task_status = task_data.status;
|
@@ -435,7 +435,7 @@ jQuery(document).ready(function() {
|
|
435 |
let onboarding_tasks_done = ig_es_onboarding_data.ig_es_onboarding_tasks_done;
|
436 |
let onboarding_tasks_failed = ig_es_onboarding_data.ig_es_onboarding_tasks_failed;
|
437 |
let successful_email_tasks_count = 0;
|
438 |
-
if( ! jQuery.isEmptyObject( onboarding_tasks_done ) ) {
|
439 |
for( let task_group in onboarding_tasks_done ) {
|
440 |
jQuery(onboarding_tasks_done[task_group]).each(function(index, task_name){
|
441 |
if( 'email_delivery_check_tasks' === task_group ) {
|
@@ -447,7 +447,7 @@ jQuery(document).ready(function() {
|
|
447 |
}
|
448 |
|
449 |
let unsuccessful_email_tasks_count = 0;
|
450 |
-
if( ! jQuery.isEmptyObject( onboarding_tasks_failed ) ) {
|
451 |
for( let task_group in onboarding_tasks_failed ) {
|
452 |
jQuery(onboarding_tasks_failed[task_group]).each(function(index, task_name){
|
453 |
if( 'email_delivery_check_tasks' === task_group ) {
|
49 |
success: function(data, status, xhr) {
|
50 |
let tasks = data.tasks;
|
51 |
|
52 |
+
if( jQuery.isPlainObject( tasks ) && ! jQuery.isEmptyObject( tasks ) ) {
|
53 |
for( let task_name in tasks ) {
|
54 |
if( tasks.hasOwnProperty( task_name ) ) {
|
55 |
time_increament += 500;
|
379 |
let ig_es_handle_onboard_task_response = function( task, response, show_error_as = 'inline' ) {
|
380 |
let task_html_elem = 'ig-es-onboard-' + task;
|
381 |
let tasks = response.tasks;
|
382 |
+
if( jQuery.isPlainObject( tasks ) && ! jQuery.isEmptyObject( tasks ) && tasks.hasOwnProperty( task ) ) {
|
383 |
if( tasks.hasOwnProperty( task ) ) {
|
384 |
let task_data = tasks[ task ];
|
385 |
let task_status = task_data.status;
|
435 |
let onboarding_tasks_done = ig_es_onboarding_data.ig_es_onboarding_tasks_done;
|
436 |
let onboarding_tasks_failed = ig_es_onboarding_data.ig_es_onboarding_tasks_failed;
|
437 |
let successful_email_tasks_count = 0;
|
438 |
+
if( jQuery.isPlainObject( onboarding_tasks_done ) && ! jQuery.isEmptyObject( onboarding_tasks_done ) ) {
|
439 |
for( let task_group in onboarding_tasks_done ) {
|
440 |
jQuery(onboarding_tasks_done[task_group]).each(function(index, task_name){
|
441 |
if( 'email_delivery_check_tasks' === task_group ) {
|
447 |
}
|
448 |
|
449 |
let unsuccessful_email_tasks_count = 0;
|
450 |
+
if( jQuery.isPlainObject( onboarding_tasks_failed ) && ! jQuery.isEmptyObject( onboarding_tasks_failed ) ) {
|
451 |
for( let task_group in onboarding_tasks_failed ) {
|
452 |
jQuery(onboarding_tasks_failed[task_group]).each(function(index, task_name){
|
453 |
if( 'email_delivery_check_tasks' === task_group ) {
|
lite/includes/class-email-subscribers-activator.php
CHANGED
@@ -23,7 +23,6 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
23 |
* @since 4.0
|
24 |
* @package Email_Subscribers
|
25 |
* @subpackage Email_Subscribers/includes
|
26 |
-
* @author Your Name <email@example.com>
|
27 |
*/
|
28 |
class Email_Subscribers_Activator {
|
29 |
|
23 |
* @since 4.0
|
24 |
* @package Email_Subscribers
|
25 |
* @subpackage Email_Subscribers/includes
|
|
|
26 |
*/
|
27 |
class Email_Subscribers_Activator {
|
28 |
|
lite/includes/class-email-subscribers-deactivator.php
CHANGED
@@ -23,7 +23,6 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
23 |
* @since 4.0
|
24 |
* @package Email_Subscribers
|
25 |
* @subpackage Email_Subscribers/includes
|
26 |
-
* @author Your Name <email@example.com>
|
27 |
*/
|
28 |
class Email_Subscribers_Deactivator {
|
29 |
|
23 |
* @since 4.0
|
24 |
* @package Email_Subscribers
|
25 |
* @subpackage Email_Subscribers/includes
|
|
|
26 |
*/
|
27 |
class Email_Subscribers_Deactivator {
|
28 |
|
lite/includes/class-email-subscribers-loader.php
CHANGED
@@ -23,7 +23,6 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
23 |
*
|
24 |
* @package Email_Subscribers
|
25 |
* @subpackage Email_Subscribers/includes
|
26 |
-
* @author Your Name <email@example.com>
|
27 |
*/
|
28 |
class Email_Subscribers_Loader {
|
29 |
|
23 |
*
|
24 |
* @package Email_Subscribers
|
25 |
* @subpackage Email_Subscribers/includes
|
|
|
26 |
*/
|
27 |
class Email_Subscribers_Loader {
|
28 |
|
lite/includes/class-email-subscribers.php
CHANGED
@@ -31,7 +31,6 @@ if ( ! class_exists( 'Email_Subscribers' ) ) {
|
|
31 |
* @since 4.0
|
32 |
* @package Email_Subscribers
|
33 |
* @subpackage Email_Subscribers/includes
|
34 |
-
* @author Your Name <email@example.com>
|
35 |
*/
|
36 |
class Email_Subscribers {
|
37 |
/**
|
@@ -320,10 +319,10 @@ if ( ! class_exists( 'Email_Subscribers' ) ) {
|
|
320 |
|
321 |
if ( $show_offer ) {
|
322 |
$args['url'] = 'https://www.icegram.com/';
|
323 |
-
$args['include'] = ES_PLUGIN_DIR . 'lite/includes/notices/views/ig-es-
|
324 |
-
ES_Admin_Notices::add_custom_notice( '
|
325 |
} else {
|
326 |
-
ES_Admin_Notices::remove_notice( '
|
327 |
}
|
328 |
|
329 |
$screen_id = $this->get_current_screen_id();
|
@@ -831,6 +830,7 @@ if ( ! class_exists( 'Email_Subscribers' ) ) {
|
|
831 |
// Triggers from Starter version
|
832 |
'starter/workflows/triggers/class-es-trigger-comment-added.php',
|
833 |
'starter/workflows/triggers/class-es-trigger-cf7-submitted.php',
|
|
|
834 |
'starter/workflows/triggers/class-es-trigger-wc-order-completed.php',
|
835 |
'starter/workflows/triggers/class-es-trigger-edd-purchase-completed.php',
|
836 |
'starter/workflows/triggers/class-es-trigger-wpforms-submitted.php',
|
@@ -1293,7 +1293,10 @@ if ( ! class_exists( 'Email_Subscribers' ) ) {
|
|
1293 |
|
1294 |
require_once plugin_dir_path( __FILE__ ) . 'class-email-subscribers-activator.php';
|
1295 |
require_once plugin_dir_path( __FILE__ ) . 'class-email-subscribers-deactivator.php';
|
|
|
|
|
1296 |
require_once plugin_dir_path( __FILE__ ) . 'libraries/action-scheduler/action-scheduler.php';
|
|
|
1297 |
|
1298 |
self::$instance->email_subscribers = 'email-subscribers';
|
1299 |
|
31 |
* @since 4.0
|
32 |
* @package Email_Subscribers
|
33 |
* @subpackage Email_Subscribers/includes
|
|
|
34 |
*/
|
35 |
class Email_Subscribers {
|
36 |
/**
|
319 |
|
320 |
if ( $show_offer ) {
|
321 |
$args['url'] = 'https://www.icegram.com/';
|
322 |
+
$args['include'] = ES_PLUGIN_DIR . 'lite/includes/notices/views/ig-es-bfcm-offer.php';
|
323 |
+
ES_Admin_Notices::add_custom_notice( 'bfcm_offer_2020', $args );
|
324 |
} else {
|
325 |
+
ES_Admin_Notices::remove_notice( 'bfcm_offer_2020' );
|
326 |
}
|
327 |
|
328 |
$screen_id = $this->get_current_screen_id();
|
830 |
// Triggers from Starter version
|
831 |
'starter/workflows/triggers/class-es-trigger-comment-added.php',
|
832 |
'starter/workflows/triggers/class-es-trigger-cf7-submitted.php',
|
833 |
+
'starter/workflows/triggers/class-es-trigger-wc-order-created.php',
|
834 |
'starter/workflows/triggers/class-es-trigger-wc-order-completed.php',
|
835 |
'starter/workflows/triggers/class-es-trigger-edd-purchase-completed.php',
|
836 |
'starter/workflows/triggers/class-es-trigger-wpforms-submitted.php',
|
1293 |
|
1294 |
require_once plugin_dir_path( __FILE__ ) . 'class-email-subscribers-activator.php';
|
1295 |
require_once plugin_dir_path( __FILE__ ) . 'class-email-subscribers-deactivator.php';
|
1296 |
+
|
1297 |
+
// Start-IG-Code.
|
1298 |
require_once plugin_dir_path( __FILE__ ) . 'libraries/action-scheduler/action-scheduler.php';
|
1299 |
+
// End-IG-Code.
|
1300 |
|
1301 |
self::$instance->email_subscribers = 'email-subscribers';
|
1302 |
|
lite/includes/class-es-common.php
CHANGED
@@ -1784,7 +1784,7 @@ class ES_Common {
|
|
1784 |
|
1785 |
$timezone_format = _x( 'Y-m-d', 'timezone date format' );
|
1786 |
$ig_current_date = strtotime( date_i18n( $timezone_format ) ) ;
|
1787 |
-
if ( ( ( $ig_current_date < strtotime( '2020-
|
1788 |
?>
|
1789 |
<p class="mb-1 mt-3">
|
1790 |
<?php
|
1784 |
|
1785 |
$timezone_format = _x( 'Y-m-d', 'timezone date format' );
|
1786 |
$ig_current_date = strtotime( date_i18n( $timezone_format ) ) ;
|
1787 |
+
if ( ( ( $ig_current_date < strtotime( '2020-11-24' ) ) || ( $ig_current_date > strtotime( '2020-12-02' ) ) ) && self::can_show_coupon('PREMIUM10')) {
|
1788 |
?>
|
1789 |
<p class="mb-1 mt-3">
|
1790 |
<?php
|
lite/includes/classes/class-es-admin-settings.php
CHANGED
@@ -12,7 +12,6 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
12 |
*
|
13 |
* @package Email_Subscribers
|
14 |
* @subpackage Email_Subscribers/admin
|
15 |
-
* @author Your Name <email@example.com>
|
16 |
*/
|
17 |
class ES_Admin_Settings {
|
18 |
|
12 |
*
|
13 |
* @package Email_Subscribers
|
14 |
* @subpackage Email_Subscribers/admin
|
|
|
15 |
*/
|
16 |
class ES_Admin_Settings {
|
17 |
|
lite/includes/classes/class-es-cron.php
CHANGED
@@ -558,4 +558,22 @@ class ES_Cron {
|
|
558 |
return $message_text;
|
559 |
|
560 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
561 |
}
|
558 |
return $message_text;
|
559 |
|
560 |
}
|
561 |
+
|
562 |
+
/**
|
563 |
+
* Method to get list of cron jobs being used in the plugin
|
564 |
+
*
|
565 |
+
* @return array $es_cron_jobs List of cron jobs used in the plugin
|
566 |
+
*
|
567 |
+
* @since 4.6.4
|
568 |
+
*/
|
569 |
+
public function get_cron_jobs_list() {
|
570 |
+
|
571 |
+
$es_cron_jobs = array(
|
572 |
+
'ig_es_cron',
|
573 |
+
'ig_es_cron_worker',
|
574 |
+
'ig_es_cron_auto_responder',
|
575 |
+
);
|
576 |
+
|
577 |
+
return $es_cron_jobs;
|
578 |
+
}
|
579 |
}
|
lite/includes/classes/class-es-handle-post-notification.php
CHANGED
@@ -215,6 +215,13 @@ class ES_Handle_Post_Notification {
|
|
215 |
$post_excerpt = get_the_excerpt( $post );
|
216 |
$es_templ_body = str_replace( '{{POSTEXCERPT}}', $post_excerpt, $es_templ_body );
|
217 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
218 |
// get post author
|
219 |
$post_author_id = $post->post_author;
|
220 |
$post_author = get_the_author_meta( 'display_name', $post_author_id );
|
215 |
$post_excerpt = get_the_excerpt( $post );
|
216 |
$es_templ_body = str_replace( '{{POSTEXCERPT}}', $post_excerpt, $es_templ_body );
|
217 |
|
218 |
+
$more_tag_data = get_extended( $post->post_content );
|
219 |
+
|
220 |
+
// Get text before the more(<!--more-->) tag.
|
221 |
+
$text_before_more_tag = $more_tag_data['main'];
|
222 |
+
$text_before_more_tag = strip_tags( strip_shortcodes( $text_before_more_tag ) );
|
223 |
+
$es_templ_body = str_replace( '{{POSTMORETAG}}', $text_before_more_tag, $es_templ_body );
|
224 |
+
|
225 |
// get post author
|
226 |
$post_author_id = $post->post_author;
|
227 |
$post_author = get_the_author_meta( 'display_name', $post_author_id );
|
lite/includes/classes/class-es-import-subscribers.php
CHANGED
@@ -68,9 +68,18 @@ class ES_Import_Subscribers {
|
|
68 |
|
69 |
$lists = ES()->lists_db->get_id_name_map();
|
70 |
$list_id = ig_es_get_data( $_POST, 'list_id', '', true );
|
|
|
|
|
|
|
|
|
71 |
|
72 |
-
|
73 |
-
|
|
|
|
|
|
|
|
|
|
|
74 |
}
|
75 |
|
76 |
if ( ! empty( $list_id ) ) {
|
@@ -162,13 +171,13 @@ class ES_Import_Subscribers {
|
|
162 |
$contacts_data[ $imported_subscribers_count ]['created_at'] = $current_date_time;
|
163 |
|
164 |
$existing_contacts[] = $email;
|
165 |
-
|
166 |
-
$emails[] = $email;
|
167 |
-
|
168 |
$imported_subscribers_count ++;
|
169 |
} else {
|
170 |
$existing_contacts_count ++;
|
171 |
}
|
|
|
|
|
172 |
}
|
173 |
|
174 |
$message = '';
|
@@ -186,7 +195,7 @@ class ES_Import_Subscribers {
|
|
186 |
ES()->lists_contacts_db->do_import_contacts_into_list( $list_id, $contact_ids, $status, 1, $current_date_time );
|
187 |
}
|
188 |
/* translators: %s: Total imported contacts */
|
189 |
-
$message = sprintf( __( '%d contacts imported successfully!', 'email-subscribers' ), $imported_subscribers_count );
|
190 |
|
191 |
}
|
192 |
|
@@ -304,12 +313,26 @@ class ES_Import_Subscribers {
|
|
304 |
</label>
|
305 |
</th>
|
306 |
<td class="w-9/12 pb-3">
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
313 |
</td>
|
314 |
</tr>
|
315 |
</tbody>
|
68 |
|
69 |
$lists = ES()->lists_db->get_id_name_map();
|
70 |
$list_id = ig_es_get_data( $_POST, 'list_id', '', true );
|
71 |
+
|
72 |
+
if ( ! empty( $list_id ) && ! is_array( $list_id ) ) {
|
73 |
+
$list_id = array( $list_id );
|
74 |
+
}
|
75 |
|
76 |
+
$invalid_list_ids = array();
|
77 |
+
if ( ! empty( $list_id ) ) {
|
78 |
+
$invalid_list_ids = array_diff( $list_id, array_keys( $lists ) );
|
79 |
+
|
80 |
+
if ( ! empty( $invalid_list_ids ) ) {
|
81 |
+
$list_id = array();
|
82 |
+
}
|
83 |
}
|
84 |
|
85 |
if ( ! empty( $list_id ) ) {
|
171 |
$contacts_data[ $imported_subscribers_count ]['created_at'] = $current_date_time;
|
172 |
|
173 |
$existing_contacts[] = $email;
|
174 |
+
|
|
|
|
|
175 |
$imported_subscribers_count ++;
|
176 |
} else {
|
177 |
$existing_contacts_count ++;
|
178 |
}
|
179 |
+
|
180 |
+
$emails[] = $email;
|
181 |
}
|
182 |
|
183 |
$message = '';
|
195 |
ES()->lists_contacts_db->do_import_contacts_into_list( $list_id, $contact_ids, $status, 1, $current_date_time );
|
196 |
}
|
197 |
/* translators: %s: Total imported contacts */
|
198 |
+
$message = sprintf( __( '%d new contacts imported successfully!', 'email-subscribers' ), $imported_subscribers_count );
|
199 |
|
200 |
}
|
201 |
|
313 |
</label>
|
314 |
</th>
|
315 |
<td class="w-9/12 pb-3">
|
316 |
+
<?php
|
317 |
+
// Allow multiselect for lists field in the pro version by changing list field's class,name and adding multiple attribute.
|
318 |
+
if ( ES()->is_pro() ) {
|
319 |
+
$select_list_attr = 'multiple="multiple"';
|
320 |
+
$select_list_name = 'list_id[]';
|
321 |
+
$select_list_class = 'ig-es-form-multiselect';
|
322 |
+
} else {
|
323 |
+
$select_list_attr = '';
|
324 |
+
$select_list_name = 'list_id';
|
325 |
+
$select_list_class = 'form-select';
|
326 |
+
}
|
327 |
+
?>
|
328 |
+
<div class="ml-12">
|
329 |
+
<select name="<?php echo esc_attr( $select_list_name ); ?>" id="list_id" class="relative shadow-sm border border-gray-400 sm:w-32 lg:w-48 <?php echo esc_attr( $select_list_class ); ?>" <?php echo esc_attr( $select_list_attr ); ?>>
|
330 |
+
<?php
|
331 |
+
$lists_dropdown = ES_Common::prepare_list_dropdown_options();
|
332 |
+
echo wp_kses( $lists_dropdown , $allowedtags );
|
333 |
+
?>
|
334 |
+
</select>
|
335 |
+
</div>
|
336 |
</td>
|
337 |
</tr>
|
338 |
</tbody>
|
lite/includes/classes/class-es-newsletters.php
CHANGED
@@ -12,7 +12,6 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
12 |
*
|
13 |
* @package Email_Subscribers
|
14 |
* @subpackage Email_Subscribers/admin
|
15 |
-
* @author Your Name <email@example.com>
|
16 |
*/
|
17 |
class ES_Newsletters {
|
18 |
|
12 |
*
|
13 |
* @package Email_Subscribers
|
14 |
* @subpackage Email_Subscribers/admin
|
|
|
15 |
*/
|
16 |
class ES_Newsletters {
|
17 |
|
lite/includes/classes/class-es-queue.php
CHANGED
@@ -48,7 +48,7 @@ if ( ! class_exists( 'ES_Queue' ) ) {
|
|
48 |
// Ajax handler for running action scheduler task.
|
49 |
add_action( 'wp_ajax_ig_es_run_action_scheduler_task', array( 'IG_ES_Background_Process_Helper', 'run_action_scheduler_task' ) );
|
50 |
add_action( 'wp_ajax_nopriv_ig_es_run_action_scheduler_task', array( 'IG_ES_Background_Process_Helper', 'run_action_scheduler_task' ) );
|
51 |
-
|
52 |
// Ajax handler for triggering email queue sending.
|
53 |
add_action( 'wp_ajax_ig_es_trigger_mailing_queue_sending', array( $this, 'trigger_mailing_queue_sending' ) );
|
54 |
add_action( 'wp_ajax_nopriv_ig_es_trigger_mailing_queue_sending', array( $this, 'trigger_mailing_queue_sending' ) );
|
@@ -661,80 +661,116 @@ if ( ! class_exists( 'ES_Queue' ) ) {
|
|
661 |
|
662 |
if ( ! is_null( $notification_guid ) ) {
|
663 |
|
664 |
-
$
|
665 |
-
if ( ! empty( $campaign_id ) ) {
|
666 |
-
$campaign_type = ES()->campaigns_db->get_campaign_type_by_id( $campaign_id );
|
667 |
-
}
|
668 |
-
|
669 |
-
if ( 'newsletter' === $campaign_type ) {
|
670 |
-
ES()->campaigns_db->update_status( $campaign_id, IG_ES_CAMPAIGN_STATUS_QUEUED );
|
671 |
-
}
|
672 |
-
|
673 |
-
ES_DB_Mailing_Queue::update_sent_status( $notification_guid, 'Sending' );
|
674 |
-
|
675 |
-
// Get subscribers from the sending_queue table based on fetched guid
|
676 |
-
$emails_data = ES_DB_Sending_Queue::get_emails_to_be_sent_by_hash( $notification_guid, $es_c_croncount );
|
677 |
-
$total_emails = count( $emails_data );
|
678 |
-
// Found Subscribers to send notification?
|
679 |
-
if ( $total_emails > 0 ) {
|
680 |
-
$ids = array();
|
681 |
-
$emails = array();
|
682 |
-
foreach ( $emails_data as $email ) {
|
683 |
-
$ids[] = $email['id'];
|
684 |
-
$emails[] = $email['email'];
|
685 |
-
}
|
686 |
-
|
687 |
-
$merge_tags = array(
|
688 |
-
'guid' => $notification_guid,
|
689 |
-
'message_id' => $message_id,
|
690 |
-
'campaign_id' => $campaign_id,
|
691 |
-
);
|
692 |
|
693 |
-
|
694 |
-
|
|
|
695 |
|
696 |
-
|
|
|
697 |
|
698 |
-
|
699 |
-
|
700 |
|
701 |
-
|
702 |
-
|
703 |
-
|
704 |
-
ES_DB_Mailing_Queue::update_sent_status( $notification_guid, 'Sent' );
|
705 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
706 |
if ( 'newsletter' === $campaign_type ) {
|
707 |
-
ES()->campaigns_db->update_status( $campaign_id,
|
708 |
-
} elseif ( 'post_digest' === $campaign_type ) {
|
709 |
-
$campaign_meta = ES()->campaigns_db->get_campaign_meta_by_id( $campaign_id );
|
710 |
-
if ( ! empty( $campaign_meta['post_ids'] ) ) {
|
711 |
-
// Empty the post ids since they have already been sent in this campaign notification.
|
712 |
-
$campaign_meta['post_ids'] = array();
|
713 |
-
ES()->campaigns_db->update_campaign_meta( $campaign_id, $campaign_meta );
|
714 |
-
}
|
715 |
}
|
716 |
|
717 |
-
|
718 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
719 |
}
|
720 |
-
|
721 |
-
// TODO: Implement better solution
|
722 |
-
set_transient( 'ig_es_total_emails_sent', $total_emails, MINUTE_IN_SECONDS );
|
723 |
-
set_transient( 'ig_es_remaining_email_count', $remaining_emails_to_be_sent, MINUTE_IN_SECONDS );
|
724 |
-
|
725 |
-
$response['total_emails_sent'] = $total_emails;
|
726 |
-
$response['es_remaining_email_count'] = $remaining_emails_to_be_sent;
|
727 |
-
$response['message'] = 'EMAILS_SENT';
|
728 |
-
$response['status'] = 'SUCCESS';
|
729 |
-
// update last cron run time
|
730 |
-
update_option( 'ig_es_last_cron_run', time() );
|
731 |
-
|
732 |
} else {
|
733 |
-
$response['
|
734 |
-
$response['message']
|
735 |
-
$response['status'] = 'SUCCESS';
|
736 |
-
ES_DB_Mailing_Queue::update_sent_status( $notification_guid, 'Sent' );
|
737 |
}
|
|
|
738 |
} else {
|
739 |
$response['es_remaining_email_count'] = 0;
|
740 |
$response['message'] = 'NOTIFICATION_NOT_FOUND';
|
@@ -894,6 +930,30 @@ if ( ! class_exists( 'ES_Queue' ) ) {
|
|
894 |
$mailing_queue_status = 'In Queue';
|
895 |
// Update status to 'In Queue' so that cron(ES Cron/WP Cron) can pick it up.
|
896 |
ES_DB_Mailing_Queue::update_sent_status( $mailing_queue_hash, $mailing_queue_status );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
897 |
} else {
|
898 |
/**
|
899 |
* If all subscribers batches are not processed(i.e. there are still emails to be added in the sending_queue table)
|
@@ -913,11 +973,11 @@ if ( ! class_exists( 'ES_Queue' ) ) {
|
|
913 |
}
|
914 |
}
|
915 |
}
|
916 |
-
|
917 |
/**
|
918 |
* Method to trigger email sending through 'ig_es_cron_worker' cron worker.
|
919 |
*
|
920 |
-
* @since 4.6.
|
921 |
*/
|
922 |
public function trigger_mailing_queue_sending() {
|
923 |
|
@@ -928,6 +988,132 @@ if ( ! class_exists( 'ES_Queue' ) ) {
|
|
928 |
do_action( 'ig_es_cron_worker' );
|
929 |
}
|
930 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
931 |
}
|
932 |
}
|
933 |
|
48 |
// Ajax handler for running action scheduler task.
|
49 |
add_action( 'wp_ajax_ig_es_run_action_scheduler_task', array( 'IG_ES_Background_Process_Helper', 'run_action_scheduler_task' ) );
|
50 |
add_action( 'wp_ajax_nopriv_ig_es_run_action_scheduler_task', array( 'IG_ES_Background_Process_Helper', 'run_action_scheduler_task' ) );
|
51 |
+
|
52 |
// Ajax handler for triggering email queue sending.
|
53 |
add_action( 'wp_ajax_ig_es_trigger_mailing_queue_sending', array( $this, 'trigger_mailing_queue_sending' ) );
|
54 |
add_action( 'wp_ajax_nopriv_ig_es_trigger_mailing_queue_sending', array( $this, 'trigger_mailing_queue_sending' ) );
|
661 |
|
662 |
if ( ! is_null( $notification_guid ) ) {
|
663 |
|
664 |
+
$cron_job = 'ig_es_cron_worker';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
665 |
|
666 |
+
$cron_job_data = array(
|
667 |
+
'campaign_id' => $campaign_id,
|
668 |
+
);
|
669 |
|
670 |
+
// Check if admin has forcefully triggered the email sending.
|
671 |
+
$triggered_by_admin = ig_es_get_request_data( 'self', 0 );
|
672 |
|
673 |
+
// If admin has forcefully triggered the email sending, then unlock the cron job.
|
674 |
+
$force_unlock = '1' === $triggered_by_admin ? true : false;
|
675 |
|
676 |
+
if ( $this->should_unlock_cron_job( $cron_job, $force_unlock ) ) {
|
677 |
+
$this->unlock_cron_job( $cron_job );
|
678 |
+
}
|
|
|
679 |
|
680 |
+
// Check if cron job is not already locked before sending campaign emails
|
681 |
+
if ( ! $this->is_cron_job_locked( $cron_job ) ) {
|
682 |
+
|
683 |
+
// Try to lock cron job.
|
684 |
+
$locking_status = $this->lock_cron_job( $cron_job, $cron_job_data );
|
685 |
+
if ( 'locked' === $locking_status ) {
|
686 |
+
|
687 |
+
register_shutdown_function( array( $this, 'unlock_cron_job' ), $cron_job );
|
688 |
+
|
689 |
+
$campaign_type = '';
|
690 |
+
if ( ! empty( $campaign_id ) ) {
|
691 |
+
$campaign_type = ES()->campaigns_db->get_campaign_type_by_id( $campaign_id );
|
692 |
+
}
|
693 |
+
|
694 |
if ( 'newsletter' === $campaign_type ) {
|
695 |
+
ES()->campaigns_db->update_status( $campaign_id, IG_ES_CAMPAIGN_STATUS_QUEUED );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
696 |
}
|
697 |
|
698 |
+
|
699 |
+
|
700 |
+
ES_DB_Mailing_Queue::update_sent_status( $notification_guid, 'Sending' );
|
701 |
+
|
702 |
+
// Get subscribers from the sending_queue table based on fetched guid
|
703 |
+
$emails_data = ES_DB_Sending_Queue::get_emails_to_be_sent_by_hash( $notification_guid, $es_c_croncount );
|
704 |
+
$total_emails = count( $emails_data );
|
705 |
+
// Found Subscribers to send notification?
|
706 |
+
if ( $total_emails > 0 ) {
|
707 |
+
$ids = array();
|
708 |
+
$emails = array();
|
709 |
+
foreach ( $emails_data as $email ) {
|
710 |
+
$ids[] = $email['id'];
|
711 |
+
$emails[] = $email['email'];
|
712 |
+
}
|
713 |
+
|
714 |
+
$merge_tags = array(
|
715 |
+
'guid' => $notification_guid,
|
716 |
+
'message_id' => $message_id,
|
717 |
+
'campaign_id' => $campaign_id,
|
718 |
+
);
|
719 |
+
|
720 |
+
$subject = $notification['subject'];
|
721 |
+
$content = $notification['body'];
|
722 |
+
|
723 |
+
ES()->mailer->send( $subject, $content, $emails, $merge_tags );
|
724 |
+
|
725 |
+
$total_remaining_emails = ES_DB_Sending_Queue::get_total_emails_to_be_sent_by_hash( $notification_guid );
|
726 |
+
$remaining_emails_to_be_sent = ES_DB_Sending_Queue::get_total_emails_to_be_sent();
|
727 |
+
|
728 |
+
// No emails left for the $notification_guid??? Send admin notification for the
|
729 |
+
// Completion of a job
|
730 |
+
if ( 0 == $total_remaining_emails ) {
|
731 |
+
ES_DB_Mailing_Queue::update_sent_status( $notification_guid, 'Sent' );
|
732 |
+
|
733 |
+
if ( 'newsletter' === $campaign_type ) {
|
734 |
+
ES()->campaigns_db->update_status( $campaign_id, IG_ES_CAMPAIGN_STATUS_FINISHED );
|
735 |
+
} elseif ( 'post_digest' === $campaign_type ) {
|
736 |
+
$campaign_meta = ES()->campaigns_db->get_campaign_meta_by_id( $campaign_id );
|
737 |
+
if ( ! empty( $campaign_meta['post_ids'] ) ) {
|
738 |
+
// Empty the post ids since they have already been sent in this campaign notification.
|
739 |
+
$campaign_meta['post_ids'] = array();
|
740 |
+
ES()->campaigns_db->update_campaign_meta( $campaign_id, $campaign_meta );
|
741 |
+
}
|
742 |
+
}
|
743 |
+
|
744 |
+
// Send Cron Email to admins
|
745 |
+
ES()->mailer->send_cron_admin_email( $notification_guid );
|
746 |
+
}
|
747 |
+
|
748 |
+
// TODO: Implement better solution
|
749 |
+
set_transient( 'ig_es_total_emails_sent', $total_emails, MINUTE_IN_SECONDS );
|
750 |
+
set_transient( 'ig_es_remaining_email_count', $remaining_emails_to_be_sent, MINUTE_IN_SECONDS );
|
751 |
+
|
752 |
+
$response['total_emails_sent'] = $total_emails;
|
753 |
+
$response['es_remaining_email_count'] = $remaining_emails_to_be_sent;
|
754 |
+
$response['message'] = 'EMAILS_SENT';
|
755 |
+
$response['status'] = 'SUCCESS';
|
756 |
+
// update last cron run time
|
757 |
+
update_option( 'ig_es_last_cron_run', time() );
|
758 |
+
|
759 |
+
} else {
|
760 |
+
$response['es_remaining_email_count'] = 0;
|
761 |
+
$response['message'] = 'EMAILS_NOT_FOUND';
|
762 |
+
$response['status'] = 'SUCCESS';
|
763 |
+
ES_DB_Mailing_Queue::update_sent_status( $notification_guid, 'Sent' );
|
764 |
+
}
|
765 |
+
|
766 |
+
$this->unlock_cron_job( $cron_job );
|
767 |
}
|
768 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
769 |
} else {
|
770 |
+
$response['status'] = 'ERROR';
|
771 |
+
$response['message'] = 'CRON_LOCK_ENABLED';
|
|
|
|
|
772 |
}
|
773 |
+
|
774 |
} else {
|
775 |
$response['es_remaining_email_count'] = 0;
|
776 |
$response['message'] = 'NOTIFICATION_NOT_FOUND';
|
930 |
$mailing_queue_status = 'In Queue';
|
931 |
// Update status to 'In Queue' so that cron(ES Cron/WP Cron) can pick it up.
|
932 |
ES_DB_Mailing_Queue::update_sent_status( $mailing_queue_hash, $mailing_queue_status );
|
933 |
+
|
934 |
+
$campaign_type = '';
|
935 |
+
if ( ! empty( $campaign_id ) ) {
|
936 |
+
$campaign_type = ES()->campaigns_db->get_campaign_type_by_id( $campaign_id );
|
937 |
+
}
|
938 |
+
|
939 |
+
// If campaign_type is newsletter i.e. broadcast, then trigger email sending if its email sending time has come.
|
940 |
+
if ( 'newsletter' === $campaign_type ) {
|
941 |
+
$queue_start_at = $mailing_queue['start_at'];
|
942 |
+
|
943 |
+
$current_timestamp = time();
|
944 |
+
$sending_timestamp = strtotime( $queue_start_at );
|
945 |
+
|
946 |
+
// Check if campaign sending time has come.
|
947 |
+
if ( $sending_timestamp <= $current_timestamp ) {
|
948 |
+
$request_args = array(
|
949 |
+
'action' => 'ig_es_trigger_mailing_queue_sending',
|
950 |
+
'campaign_hash' => $mailing_queue_hash,
|
951 |
+
);
|
952 |
+
// Send an asynchronous request to trigger sending of campaign emails.
|
953 |
+
IG_ES_Background_Process_Helper::send_async_ajax_request( $request_args, true );
|
954 |
+
}
|
955 |
+
}
|
956 |
+
|
957 |
} else {
|
958 |
/**
|
959 |
* If all subscribers batches are not processed(i.e. there are still emails to be added in the sending_queue table)
|
973 |
}
|
974 |
}
|
975 |
}
|
976 |
+
|
977 |
/**
|
978 |
* Method to trigger email sending through 'ig_es_cron_worker' cron worker.
|
979 |
*
|
980 |
+
* @since 4.6.4
|
981 |
*/
|
982 |
public function trigger_mailing_queue_sending() {
|
983 |
|
988 |
do_action( 'ig_es_cron_worker' );
|
989 |
}
|
990 |
}
|
991 |
+
|
992 |
+
/**
|
993 |
+
* Method to set locking options for current cron job
|
994 |
+
*
|
995 |
+
* @param string $cron_job Job name
|
996 |
+
* @param array $cron_job_data Cron job data
|
997 |
+
*
|
998 |
+
* @since 4.6.4
|
999 |
+
*/
|
1000 |
+
public function lock_cron_job( $cron_job = '', $cron_job_data = array() ) {
|
1001 |
+
|
1002 |
+
$es_cron_jobs = ES()->cron->get_cron_jobs_list();
|
1003 |
+
|
1004 |
+
$locking_status = '';
|
1005 |
+
|
1006 |
+
if ( in_array( $cron_job, $es_cron_jobs, true ) ) {
|
1007 |
+
|
1008 |
+
$locked_cron_job_data = get_option( $cron_job . '_locked_data', false );
|
1009 |
+
if ( ! empty( $locked_cron_job_data ) ) {
|
1010 |
+
$locking_status = 'already_locked';
|
1011 |
+
} else {
|
1012 |
+
$locked_cron_job_data = array(
|
1013 |
+
'locked_at' => time(),
|
1014 |
+
'data' => $cron_job_data
|
1015 |
+
);
|
1016 |
+
$job_locked = update_option( $cron_job . '_locked_data', $locked_cron_job_data , false );
|
1017 |
+
if ( $job_locked ) {
|
1018 |
+
$locking_status = 'locked';
|
1019 |
+
} else {
|
1020 |
+
$locking_status = 'failed';
|
1021 |
+
}
|
1022 |
+
}
|
1023 |
+
|
1024 |
+
}
|
1025 |
+
|
1026 |
+
return $locking_status;
|
1027 |
+
}
|
1028 |
+
|
1029 |
+
/**
|
1030 |
+
* Method to set locking options for current cron job
|
1031 |
+
*
|
1032 |
+
* @param string $cron_job Cron Job name.
|
1033 |
+
*
|
1034 |
+
* @return bool $cron_job_locked Is cron job locked.
|
1035 |
+
*
|
1036 |
+
* @since 4.6.4
|
1037 |
+
*/
|
1038 |
+
public function is_cron_job_locked( $cron_job = '' ) {
|
1039 |
+
|
1040 |
+
$es_cron_jobs = ES()->cron->get_cron_jobs_list();
|
1041 |
+
|
1042 |
+
$cron_job_locked = false;
|
1043 |
+
|
1044 |
+
if ( in_array( $cron_job, $es_cron_jobs, true ) ) {
|
1045 |
+
|
1046 |
+
$locked_cron_job_data = get_option( $cron_job . '_locked_data', false );
|
1047 |
+
if ( ! empty( $locked_cron_job_data ) ) {
|
1048 |
+
$cron_job_locked = true;
|
1049 |
+
}
|
1050 |
+
}
|
1051 |
+
|
1052 |
+
return $cron_job_locked;
|
1053 |
+
}
|
1054 |
+
|
1055 |
+
/**
|
1056 |
+
* Method to delete locking options for current cron job
|
1057 |
+
*
|
1058 |
+
* @param string $cron_job Job name
|
1059 |
+
|
1060 |
+
* @return string $unlocking_status Cron job unlocking status
|
1061 |
+
*
|
1062 |
+
* @since 4.6.4
|
1063 |
+
*/
|
1064 |
+
public function unlock_cron_job( $cron_job = '' ) {
|
1065 |
+
|
1066 |
+
$es_cron_jobs = ES()->cron->get_cron_jobs_list();
|
1067 |
+
|
1068 |
+
$unlocking_status = '';
|
1069 |
+
|
1070 |
+
if ( in_array( $cron_job, $es_cron_jobs, true ) ) {
|
1071 |
+
$job_unlocked = delete_option( $cron_job . '_locked_data' );
|
1072 |
+
if ( $job_unlocked ) {
|
1073 |
+
$unlocking_status = 'unlocked';
|
1074 |
+
} else {
|
1075 |
+
$unlocking_status = 'failed';
|
1076 |
+
}
|
1077 |
+
}
|
1078 |
+
|
1079 |
+
return $unlocking_status;
|
1080 |
+
}
|
1081 |
+
|
1082 |
+
/**
|
1083 |
+
* Should Unlock Cron?
|
1084 |
+
*
|
1085 |
+
* @param string $cron_job Cron job name
|
1086 |
+
* @param bool $force Should unlock the cron job forcefully.
|
1087 |
+
*
|
1088 |
+
* @return bool $should_unlock Should unlock the cron.
|
1089 |
+
*
|
1090 |
+
* @since 4.6.4
|
1091 |
+
*/
|
1092 |
+
public function should_unlock_cron_job( $cron_job = '', $force = false ) {
|
1093 |
+
|
1094 |
+
$should_unlock = false;
|
1095 |
+
|
1096 |
+
$es_cron_jobs = ES()->cron->get_cron_jobs_list();
|
1097 |
+
|
1098 |
+
if ( in_array( $cron_job, $es_cron_jobs, true ) ) {
|
1099 |
+
|
1100 |
+
if ( $force ) {
|
1101 |
+
$should_unlock = true;
|
1102 |
+
} else {
|
1103 |
+
$locked_cron_job_data = get_option( $cron_job . '_locked_data', false );
|
1104 |
+
if ( ! empty( $locked_cron_job_data ) ) {
|
1105 |
+
$locked_at = $locked_cron_job_data['locked_at'];
|
1106 |
+
|
1107 |
+
$time_lapsed = time() - $locked_at;
|
1108 |
+
|
1109 |
+
// Since maximum allowed cron execution duration is always equal to the set cron interval, check if time lapsed is more than the cron interval.
|
1110 |
+
$should_unlock = $time_lapsed > ES()->cron->get_cron_interval();
|
1111 |
+
}
|
1112 |
+
}
|
1113 |
+
}
|
1114 |
+
|
1115 |
+
return $should_unlock;
|
1116 |
+
}
|
1117 |
}
|
1118 |
}
|
1119 |
|
lite/includes/classes/class-es-tools.php
CHANGED
@@ -12,7 +12,6 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
12 |
*
|
13 |
* @package Email_Subscribers
|
14 |
* @subpackage Email_Subscribers/admin
|
15 |
-
* @author Your Name <email@example.com>
|
16 |
*/
|
17 |
class ES_Tools {
|
18 |
// class instance
|
12 |
*
|
13 |
* @package Email_Subscribers
|
14 |
* @subpackage Email_Subscribers/admin
|
|
|
15 |
*/
|
16 |
class ES_Tools {
|
17 |
// class instance
|
lite/includes/classes/class-ig-es-background-process-helper.php
CHANGED
@@ -2,7 +2,6 @@
|
|
2 |
/**
|
3 |
* Helper class for background processing
|
4 |
*
|
5 |
-
* @author Icegram
|
6 |
* @since 4.6.3
|
7 |
* @version 1.0.0
|
8 |
*
|
2 |
/**
|
3 |
* Helper class for background processing
|
4 |
*
|
|
|
5 |
* @since 4.6.3
|
6 |
* @version 1.0.0
|
7 |
*
|
lite/includes/db/class-es-db-lists-contacts.php
CHANGED
@@ -452,7 +452,7 @@ class ES_DB_Lists_Contacts extends ES_DB {
|
|
452 |
/**
|
453 |
* Add contacts into lists_contacts table
|
454 |
*
|
455 |
-
* @param
|
456 |
* @param array $contacts
|
457 |
* @param string $status
|
458 |
* @param int $optin_type
|
@@ -465,24 +465,28 @@ class ES_DB_Lists_Contacts extends ES_DB {
|
|
465 |
*
|
466 |
* @since 4.0.0
|
467 |
* @since 4.3.5 Used bulk_insert method
|
|
|
468 |
*/
|
469 |
-
public function do_import_contacts_into_list( $
|
470 |
if ( count( $contacts ) > 0 ) {
|
471 |
$values = array();
|
472 |
|
473 |
$key = 0;
|
474 |
foreach ( $contacts as $contact_id ) {
|
475 |
|
476 |
-
$
|
477 |
-
$values[ $key ]['list_id'] = $list_id;
|
478 |
-
$values[ $key ]['status'] = $status;
|
479 |
-
$values[ $key ]['optin_type'] = $optin_type;
|
480 |
-
$values[ $key ]['subscribed_at'] = $subscribed_at;
|
481 |
-
$values[ $key ]['subscribed_ip'] = $subscribed_ip;
|
482 |
-
$values[ $key ]['unsubscribed_at'] = $unsubscribed_at;
|
483 |
-
$values[ $key ]['unsubscribed_ip'] = $unsubscribed_ip;
|
484 |
|
485 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
486 |
}
|
487 |
|
488 |
return $this->bulk_insert( $values );
|
452 |
/**
|
453 |
* Add contacts into lists_contacts table
|
454 |
*
|
455 |
+
* @param array $list_ids
|
456 |
* @param array $contacts
|
457 |
* @param string $status
|
458 |
* @param int $optin_type
|
465 |
*
|
466 |
* @since 4.0.0
|
467 |
* @since 4.3.5 Used bulk_insert method
|
468 |
+
* @since 4.6.4 Added support for multiple lists.
|
469 |
*/
|
470 |
+
public function do_import_contacts_into_list( $list_ids = array(), $contacts = array(), $status = 'subscribed', $optin_type = 1, $subscribed_at = null, $subscribed_ip = null, $unsubscribed_at = null, $unsubscribed_ip = null ) {
|
471 |
if ( count( $contacts ) > 0 ) {
|
472 |
$values = array();
|
473 |
|
474 |
$key = 0;
|
475 |
foreach ( $contacts as $contact_id ) {
|
476 |
|
477 |
+
foreach ( $list_ids as $list_id ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
478 |
|
479 |
+
$values[ $key ]['contact_id'] = $contact_id;
|
480 |
+
$values[ $key ]['list_id'] = $list_id;
|
481 |
+
$values[ $key ]['status'] = $status;
|
482 |
+
$values[ $key ]['optin_type'] = $optin_type;
|
483 |
+
$values[ $key ]['subscribed_at'] = $subscribed_at;
|
484 |
+
$values[ $key ]['subscribed_ip'] = $subscribed_ip;
|
485 |
+
$values[ $key ]['unsubscribed_at'] = $unsubscribed_at;
|
486 |
+
$values[ $key ]['unsubscribed_ip'] = $unsubscribed_ip;
|
487 |
+
|
488 |
+
$key ++;
|
489 |
+
}
|
490 |
}
|
491 |
|
492 |
return $this->bulk_insert( $values );
|
lite/includes/feedback/class-ig-feedback.php
CHANGED
@@ -15,7 +15,6 @@ if ( ! class_exists( 'IG_Feedback_V_1_2_4' ) ) {
|
|
15 |
* @since 1.0.0
|
16 |
* @copyright Copyright (c) 2019, Icegram
|
17 |
* @license https://opensource.org/licenses/gpl-license GNU Public License
|
18 |
-
* @author Icegram
|
19 |
* @package feedback
|
20 |
*/
|
21 |
class IG_Feedback_V_1_2_4 {
|
15 |
* @since 1.0.0
|
16 |
* @copyright Copyright (c) 2019, Icegram
|
17 |
* @license https://opensource.org/licenses/gpl-license GNU Public License
|
|
|
18 |
* @package feedback
|
19 |
*/
|
20 |
class IG_Feedback_V_1_2_4 {
|
lite/includes/feedback/class-ig-tracker.php
CHANGED
@@ -15,7 +15,6 @@ if ( ! class_exists( 'IG_Tracker_V_1_2_4' ) ) {
|
|
15 |
* @class IG_Tracker_V_1_2_4
|
16 |
* @since 1.0.0
|
17 |
*
|
18 |
-
* @author Icegram
|
19 |
* @package feedback
|
20 |
*/
|
21 |
class IG_Tracker_V_1_2_4 {
|
15 |
* @class IG_Tracker_V_1_2_4
|
16 |
* @since 1.0.0
|
17 |
*
|
|
|
18 |
* @package feedback
|
19 |
*/
|
20 |
class IG_Tracker_V_1_2_4 {
|
lite/includes/libraries/class-es-html2text.php
CHANGED
@@ -77,7 +77,7 @@ class ES_Html2Text {
|
|
77 |
"\n\n", // <table> and </table>
|
78 |
"\n", // <tr> and </tr>
|
79 |
"\t\t\\1\n", // <td> and </td>
|
80 |
-
|
81 |
'[\\2]', // <img> with alt tag
|
82 |
);
|
83 |
|
@@ -201,7 +201,7 @@ class ES_Html2Text {
|
|
201 |
);
|
202 |
|
203 |
/**
|
204 |
-
*
|
205 |
*
|
206 |
* @param unknown $html (optional)
|
207 |
* @param unknown $fromFile (optional)
|
@@ -214,7 +214,7 @@ class ES_Html2Text {
|
|
214 |
|
215 |
|
216 |
/**
|
217 |
-
*
|
218 |
*
|
219 |
* @param string $html (optional) Source HTML
|
220 |
* @param array $options (optional) Set configuration options
|
@@ -256,7 +256,7 @@ class ES_Html2Text {
|
|
256 |
|
257 |
|
258 |
/**
|
259 |
-
*
|
260 |
*
|
261 |
* @deprecated
|
262 |
* @param unknown $html
|
@@ -265,7 +265,7 @@ class ES_Html2Text {
|
|
265 |
*/
|
266 |
public function set_html( $html, $from_file = false ) {
|
267 |
if ( $from_file ) {
|
268 |
-
throw new \InvalidArgumentException(
|
269 |
}
|
270 |
|
271 |
return $this->setHtml( $html );
|
@@ -287,7 +287,7 @@ class ES_Html2Text {
|
|
287 |
|
288 |
|
289 |
/**
|
290 |
-
*
|
291 |
*
|
292 |
* @deprecated
|
293 |
* @return unknown
|
@@ -298,17 +298,17 @@ class ES_Html2Text {
|
|
298 |
|
299 |
|
300 |
/**
|
301 |
-
*
|
302 |
*
|
303 |
* @deprecated
|
304 |
*/
|
305 |
public function print_text() {
|
306 |
-
print $this->getText();
|
307 |
}
|
308 |
|
309 |
|
310 |
/**
|
311 |
-
*
|
312 |
*
|
313 |
* @deprecated
|
314 |
* @return unknown
|
@@ -329,7 +329,7 @@ class ES_Html2Text {
|
|
329 |
|
330 |
|
331 |
/**
|
332 |
-
*
|
333 |
*
|
334 |
* @deprecated
|
335 |
* @param unknown $baseurl
|
@@ -375,7 +375,7 @@ class ES_Html2Text {
|
|
375 |
|
376 |
|
377 |
/**
|
378 |
-
*
|
379 |
*
|
380 |
* @param unknown $text (reference)
|
381 |
*/
|
@@ -423,7 +423,7 @@ class ES_Html2Text {
|
|
423 |
*/
|
424 |
protected function buildlinkList( $link, $display, $linkOverride = null ) {
|
425 |
$linkMethod = ( $linkOverride ) ? $linkOverride : $this->options['do_links'];
|
426 |
-
if (
|
427 |
return $display;
|
428 |
}
|
429 |
|
@@ -442,16 +442,17 @@ class ES_Html2Text {
|
|
442 |
$url .= $link;
|
443 |
}
|
444 |
|
445 |
-
if (
|
446 |
-
|
|
|
447 |
$index = count( $this->linkList );
|
448 |
$this->linkList[] = $url;
|
449 |
}
|
450 |
|
451 |
return $display . ' [' . ( $index + 1 ) . ']';
|
452 |
-
} elseif (
|
453 |
return $display . "\n[" . $url . ']';
|
454 |
-
} elseif (
|
455 |
return sprintf( '[url=%s]%s[/url]', $url, $display );
|
456 |
} else {
|
457 |
// link_method defaults to inline
|
@@ -461,7 +462,7 @@ class ES_Html2Text {
|
|
461 |
|
462 |
|
463 |
/**
|
464 |
-
*
|
465 |
*
|
466 |
* @param unknown $text (reference)
|
467 |
*/
|
@@ -512,11 +513,11 @@ class ES_Html2Text {
|
|
512 |
$diff = 0;
|
513 |
foreach ( $matches[0] as $m ) {
|
514 |
$m[1] = strlen( substr( $originalText, 0, $m[1] ) );
|
515 |
-
if ( $m[0][0]
|
516 |
$level--;
|
517 |
if ( $level < 0 ) {
|
518 |
$level = 0; // malformed HTML: go to next blockquote
|
519 |
-
} elseif (
|
520 |
$end = $m[1];
|
521 |
$len = $end - $taglen - $start;
|
522 |
// Get blockquote content
|
@@ -538,14 +539,14 @@ class ES_Html2Text {
|
|
538 |
$this->options['width'] = $pWidth;
|
539 |
// Replace content
|
540 |
$text = substr( $text, 0, $start - $diff )
|
541 |
-
|
542 |
-
|
543 |
|
544 |
$diff += $len + $taglen + strlen( $m[0] ) - strlen( $body );
|
545 |
unset( $body );
|
546 |
}
|
547 |
} else {
|
548 |
-
if (
|
549 |
$start = $m[1];
|
550 |
$taglen = strlen( $m[0] );
|
551 |
}
|
@@ -566,7 +567,7 @@ class ES_Html2Text {
|
|
566 |
switch ( strtolower( $matches[1] ) ) {
|
567 |
case 'p':
|
568 |
// Replace newlines with spaces.
|
569 |
-
$para = str_replace( "\n",
|
570 |
|
571 |
// Trim trailing and leading whitespace within the tag.
|
572 |
$para = trim( $para );
|
@@ -621,7 +622,7 @@ class ES_Html2Text {
|
|
621 |
|
622 |
// convert toupper only the text between HTML tags
|
623 |
foreach ( $chunks as $i => $chunk ) {
|
624 |
-
if ( $chunk[0]
|
625 |
$chunks[$i] = $this->strtoupper( $chunk );
|
626 |
}
|
627 |
}
|
@@ -645,4 +646,4 @@ class ES_Html2Text {
|
|
645 |
}
|
646 |
|
647 |
|
648 |
-
}
|
77 |
"\n\n", // <table> and </table>
|
78 |
"\n", // <tr> and </tr>
|
79 |
"\t\t\\1\n", // <td> and </td>
|
80 |
+
'', // <span class="_html2text_ignore">...</span>
|
81 |
'[\\2]', // <img> with alt tag
|
82 |
);
|
83 |
|
201 |
);
|
202 |
|
203 |
/**
|
204 |
+
* Legacy class constructor
|
205 |
*
|
206 |
* @param unknown $html (optional)
|
207 |
* @param unknown $fromFile (optional)
|
214 |
|
215 |
|
216 |
/**
|
217 |
+
* Class constructor
|
218 |
*
|
219 |
* @param string $html (optional) Source HTML
|
220 |
* @param array $options (optional) Set configuration options
|
256 |
|
257 |
|
258 |
/**
|
259 |
+
* Sets the given HTML.
|
260 |
*
|
261 |
* @deprecated
|
262 |
* @param unknown $html
|
265 |
*/
|
266 |
public function set_html( $html, $from_file = false ) {
|
267 |
if ( $from_file ) {
|
268 |
+
throw new \InvalidArgumentException( 'Argument from_file no longer supported' );
|
269 |
}
|
270 |
|
271 |
return $this->setHtml( $html );
|
287 |
|
288 |
|
289 |
/**
|
290 |
+
* Returns the text.
|
291 |
*
|
292 |
* @deprecated
|
293 |
* @return unknown
|
298 |
|
299 |
|
300 |
/**
|
301 |
+
* Prints the processed text.
|
302 |
*
|
303 |
* @deprecated
|
304 |
*/
|
305 |
public function print_text() {
|
306 |
+
print esc_html( $this->getText() );
|
307 |
}
|
308 |
|
309 |
|
310 |
/**
|
311 |
+
* Prints the text.
|
312 |
*
|
313 |
* @deprecated
|
314 |
* @return unknown
|
329 |
|
330 |
|
331 |
/**
|
332 |
+
* Sets base URL.
|
333 |
*
|
334 |
* @deprecated
|
335 |
* @param unknown $baseurl
|
375 |
|
376 |
|
377 |
/**
|
378 |
+
* Converts the given text.
|
379 |
*
|
380 |
* @param unknown $text (reference)
|
381 |
*/
|
423 |
*/
|
424 |
protected function buildlinkList( $link, $display, $linkOverride = null ) {
|
425 |
$linkMethod = ( $linkOverride ) ? $linkOverride : $this->options['do_links'];
|
426 |
+
if ( 'none' == $linkMethod ) {
|
427 |
return $display;
|
428 |
}
|
429 |
|
442 |
$url .= $link;
|
443 |
}
|
444 |
|
445 |
+
if ( 'table' == $linkMethod ) {
|
446 |
+
$index = array_search( $url, $this->linkList );
|
447 |
+
if ( false === $index ) {
|
448 |
$index = count( $this->linkList );
|
449 |
$this->linkList[] = $url;
|
450 |
}
|
451 |
|
452 |
return $display . ' [' . ( $index + 1 ) . ']';
|
453 |
+
} elseif ( 'nextline' == $linkMethod ) {
|
454 |
return $display . "\n[" . $url . ']';
|
455 |
+
} elseif ( 'bbcode' == $linkMethod ) {
|
456 |
return sprintf( '[url=%s]%s[/url]', $url, $display );
|
457 |
} else {
|
458 |
// link_method defaults to inline
|
462 |
|
463 |
|
464 |
/**
|
465 |
+
* Converts text from pre element.
|
466 |
*
|
467 |
* @param unknown $text (reference)
|
468 |
*/
|
513 |
$diff = 0;
|
514 |
foreach ( $matches[0] as $m ) {
|
515 |
$m[1] = strlen( substr( $originalText, 0, $m[1] ) );
|
516 |
+
if ( '<' == $m[0][0] && '/' == $m[0][1] ) {
|
517 |
$level--;
|
518 |
if ( $level < 0 ) {
|
519 |
$level = 0; // malformed HTML: go to next blockquote
|
520 |
+
} elseif ( 0 == $level ) {
|
521 |
$end = $m[1];
|
522 |
$len = $end - $taglen - $start;
|
523 |
// Get blockquote content
|
539 |
$this->options['width'] = $pWidth;
|
540 |
// Replace content
|
541 |
$text = substr( $text, 0, $start - $diff )
|
542 |
+
. $body
|
543 |
+
. substr( $text, $end + strlen( $m[0] ) - $diff );
|
544 |
|
545 |
$diff += $len + $taglen + strlen( $m[0] ) - strlen( $body );
|
546 |
unset( $body );
|
547 |
}
|
548 |
} else {
|
549 |
+
if ( 0 == $level ) {
|
550 |
$start = $m[1];
|
551 |
$taglen = strlen( $m[0] );
|
552 |
}
|
567 |
switch ( strtolower( $matches[1] ) ) {
|
568 |
case 'p':
|
569 |
// Replace newlines with spaces.
|
570 |
+
$para = str_replace( "\n", ' ', $matches[3] );
|
571 |
|
572 |
// Trim trailing and leading whitespace within the tag.
|
573 |
$para = trim( $para );
|
622 |
|
623 |
// convert toupper only the text between HTML tags
|
624 |
foreach ( $chunks as $i => $chunk ) {
|
625 |
+
if ( '<' != $chunk[0] ) {
|
626 |
$chunks[$i] = $this->strtoupper( $chunk );
|
627 |
}
|
628 |
}
|
646 |
}
|
647 |
|
648 |
|
649 |
+
}
|
lite/includes/libraries/wp-js-editor/wp-js-editor.php
CHANGED
@@ -6,24 +6,24 @@
|
|
6 |
* @since 4.4.1
|
7 |
*/
|
8 |
function ig_es_wp_js_editor_load_scripts() {
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
}
|
28 |
|
29 |
/**
|
@@ -31,10 +31,10 @@ function ig_es_wp_js_editor_load_scripts() {
|
|
31 |
*
|
32 |
* @since 4.4.1
|
33 |
*/
|
34 |
-
function ig_es_wp_js_editor_admin_scripts(){
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
}
|
39 |
|
40 |
/**
|
@@ -42,10 +42,10 @@ function ig_es_wp_js_editor_admin_scripts(){
|
|
42 |
*
|
43 |
* @since 4.4.1
|
44 |
*/
|
45 |
-
function ig_es_wp_js_editor_frontend_scripts(){
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
}
|
50 |
|
51 |
|
6 |
* @since 4.4.1
|
7 |
*/
|
8 |
function ig_es_wp_js_editor_load_scripts() {
|
9 |
+
|
10 |
+
if ( ! class_exists( '_WP_Editors' ) ) {
|
11 |
+
require( ABSPATH . WPINC . '/class-wp-editor.php' );
|
12 |
+
}
|
13 |
|
14 |
+
$editor_args = array(
|
15 |
+
'textarea_rows' => 40,
|
16 |
+
'editor_class' => 'wp-editor-content',
|
17 |
+
'media_buttons' => true,
|
18 |
+
'tinymce' => true,
|
19 |
+
'quicktags' => true,
|
20 |
+
);
|
21 |
+
?>
|
22 |
+
<script id="_wp-mce-editor-tpl" type="text/html">
|
23 |
+
<?php wp_editor( '', '__wp_mce_editor__', $editor_args ); ?>
|
24 |
+
</script>
|
25 |
+
<?php
|
26 |
+
wp_enqueue_script( 'ig_es_wp_js_editor', plugin_dir_url( __FILE__ ) . 'wp-js-editor.js', array( 'jquery' ), '1.0.0', true );
|
27 |
}
|
28 |
|
29 |
/**
|
31 |
*
|
32 |
* @since 4.4.1
|
33 |
*/
|
34 |
+
function ig_es_wp_js_editor_admin_scripts() {
|
35 |
+
if ( is_admin() ) {
|
36 |
+
add_action( 'admin_footer', 'ig_es_wp_js_editor_load_scripts', -1 );
|
37 |
+
}
|
38 |
}
|
39 |
|
40 |
/**
|
42 |
*
|
43 |
* @since 4.4.1
|
44 |
*/
|
45 |
+
function ig_es_wp_js_editor_frontend_scripts() {
|
46 |
+
if ( ! is_admin() ) {
|
47 |
+
add_action( 'wp_footer', 'ig_es_wp_js_editor_load_scripts', -1 );
|
48 |
+
}
|
49 |
}
|
50 |
|
51 |
|
lite/includes/notices/class-es-admin-notices.php
CHANGED
@@ -218,13 +218,6 @@ class ES_Admin_Notices {
|
|
218 |
update_option( 'ig_es_' . $option_name . '_date', ig_get_current_date_time(), false );
|
219 |
}
|
220 |
|
221 |
-
// Covid-19 Offer
|
222 |
-
if ( 'offer_covid_19' === $option_name ) {
|
223 |
-
$url = 'https://www.icegram.com/email-subscribers-pricing/?utm_source=in_app&utm_medium=es_banner&utm_campaign=' . $option_name;
|
224 |
-
header( "Location: {$url}" );
|
225 |
-
exit();
|
226 |
-
}
|
227 |
-
|
228 |
if ( 'star_notice_done' === $option_name ) {
|
229 |
header( 'Location: https://wordpress.org/support/plugin/email-subscribers/reviews/' );
|
230 |
exit();
|
@@ -243,13 +236,9 @@ class ES_Admin_Notices {
|
|
243 |
}
|
244 |
}
|
245 |
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
exit();
|
250 |
-
}
|
251 |
-
if ( 'offer_halloween_2020' === $option_name ) {
|
252 |
-
$url = 'https://www.icegram.com/?utm_source=in_app&utm_medium=es_banner&utm_campaign=' . $option_name;
|
253 |
header( "Location: {$url}" );
|
254 |
exit();
|
255 |
} else {
|
218 |
update_option( 'ig_es_' . $option_name . '_date', ig_get_current_date_time(), false );
|
219 |
}
|
220 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
221 |
if ( 'star_notice_done' === $option_name ) {
|
222 |
header( 'Location: https://wordpress.org/support/plugin/email-subscribers/reviews/' );
|
223 |
exit();
|
236 |
}
|
237 |
}
|
238 |
|
239 |
+
// BFCM 2020 offer
|
240 |
+
if ( 'offer_bfcm_2020' === $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();
|
244 |
} else {
|
lite/includes/notices/views/ig-es-bfcm-offer.php
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<style type="text/css">
|
2 |
+
.ig_es_offer {
|
3 |
+
width:70%;
|
4 |
+
margin: 0 auto;
|
5 |
+
text-align: center;
|
6 |
+
padding-top: 0.8em;
|
7 |
+
}
|
8 |
+
|
9 |
+
</style>
|
10 |
+
<?php
|
11 |
+
|
12 |
+
if ( ( get_option( 'ig_es_offer_bfcm_2020' ) !== 'yes' ) && ( $ig_current_date >= strtotime( '2020-11-24' ) ) && ( $ig_current_date <= strtotime( '2020-12-02' ) )) { ?>
|
13 |
+
<div class="wrap">
|
14 |
+
<div class="ig_es_offer">
|
15 |
+
<a target="_blank" href="?es_dismiss_admin_notice=1&option_name=offer_bfcm_2020"><img style="margin:0 auto" src="<?php echo esc_url ( ES_PLUGIN_URL ); ?>lite/admin/images/bfcm_2020.jpg"/></a>
|
16 |
+
</div>
|
17 |
+
</div>
|
18 |
+
|
19 |
+
<?php } ?>
|
lite/includes/notices/views/ig-es-halloween-offer.php
DELETED
@@ -1,17 +0,0 @@
|
|
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_2020' ) !== 'yes' ) && ( $ig_current_date >= strtotime( '2020-10-30' ) ) && ( $ig_current_date <= strtotime( '2020-11-02' ) )) { ?>
|
13 |
-
<div class="ig_es_offer">
|
14 |
-
<a target="_blank" href="?es_dismiss_admin_notice=1&option_name=offer_halloween_2020"><img src="<?php echo esc_url ( ES_PLUGIN_URL ); ?>/lite/admin/images/halloween_2020.png"/></a>
|
15 |
-
</div>
|
16 |
-
|
17 |
-
<?php } ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lite/includes/workflows/abstracts/class-es-workflow-action.php
CHANGED
@@ -2,7 +2,6 @@
|
|
2 |
/**
|
3 |
* Abstract class for actions.
|
4 |
*
|
5 |
-
* @author Icegram
|
6 |
* @since 4.4.1
|
7 |
* @version 1.0
|
8 |
* @package Email Subscribers
|
2 |
/**
|
3 |
* Abstract class for actions.
|
4 |
*
|
|
|
5 |
* @since 4.4.1
|
6 |
* @version 1.0
|
7 |
* @package Email Subscribers
|
lite/includes/workflows/abstracts/class-es-workflow-data-type.php
CHANGED
@@ -2,7 +2,6 @@
|
|
2 |
/**
|
3 |
* Workflow Data Types.
|
4 |
*
|
5 |
-
* @author Icegram
|
6 |
* @since 4.4.1
|
7 |
* @version 1.0
|
8 |
* @package Email Subscribers
|
2 |
/**
|
3 |
* Workflow Data Types.
|
4 |
*
|
|
|
5 |
* @since 4.4.1
|
6 |
* @version 1.0
|
7 |
* @package Email Subscribers
|
lite/includes/workflows/abstracts/class-es-workflow-registry.php
CHANGED
@@ -2,7 +2,6 @@
|
|
2 |
/**
|
3 |
* Abstract class for workflow actions, triggers and data type related functions.
|
4 |
*
|
5 |
-
* @author Icegram
|
6 |
* @since 4.4.1
|
7 |
* @version 1.0
|
8 |
* @package Email Subscribers
|
2 |
/**
|
3 |
* Abstract class for workflow actions, triggers and data type related functions.
|
4 |
*
|
|
|
5 |
* @since 4.4.1
|
6 |
* @version 1.0
|
7 |
* @package Email Subscribers
|
lite/includes/workflows/abstracts/class-es-workflow-trigger.php
CHANGED
@@ -2,7 +2,6 @@
|
|
2 |
/**
|
3 |
* Abstract class for triggers.
|
4 |
*
|
5 |
-
* @author Icegram
|
6 |
* @since 4.4.1
|
7 |
* @version 1.0
|
8 |
* @package Email Subscribers
|
2 |
/**
|
3 |
* Abstract class for triggers.
|
4 |
*
|
|
|
5 |
* @since 4.4.1
|
6 |
* @version 1.0
|
7 |
* @package Email Subscribers
|
lite/includes/workflows/actions/abstracts/class-ig-es-action-send-email-abstract.php
CHANGED
@@ -2,7 +2,6 @@
|
|
2 |
/**
|
3 |
* Abstract action class to send an email to provided email address.
|
4 |
*
|
5 |
-
* @author Icegram
|
6 |
* @since 4.5.3
|
7 |
* @version 1.0
|
8 |
* @package Email Subscribers
|
2 |
/**
|
3 |
* Abstract action class to send an email to provided email address.
|
4 |
*
|
|
|
5 |
* @since 4.5.3
|
6 |
* @version 1.0
|
7 |
* @package Email Subscribers
|
lite/includes/workflows/actions/class-es-action-add-to-list.php
CHANGED
@@ -2,7 +2,6 @@
|
|
2 |
/**
|
3 |
* Action to add contact to the selected list
|
4 |
*
|
5 |
-
* @author Icegram
|
6 |
* @since 4.4.1
|
7 |
* @version 1.0
|
8 |
* @package Email Subscribers
|
2 |
/**
|
3 |
* Action to add contact to the selected list
|
4 |
*
|
|
|
5 |
* @since 4.4.1
|
6 |
* @version 1.0
|
7 |
* @package Email Subscribers
|
lite/includes/workflows/actions/class-es-action-delete-contact.php
CHANGED
@@ -3,7 +3,6 @@
|
|
3 |
* Action to add contact to the selected list
|
4 |
*
|
5 |
* @since 4.4.1
|
6 |
-
* @author Icegram
|
7 |
* @version 1.0
|
8 |
* @package Email Subscribers
|
9 |
*/
|
3 |
* Action to add contact to the selected list
|
4 |
*
|
5 |
* @since 4.4.1
|
|
|
6 |
* @version 1.0
|
7 |
* @package Email Subscribers
|
8 |
*/
|
lite/includes/workflows/actions/class-es-action-update-contact.php
CHANGED
@@ -3,7 +3,6 @@
|
|
3 |
* Action to add contact to the selected list
|
4 |
*
|
5 |
* @since 4.4.1
|
6 |
-
* @author Icegram
|
7 |
* @version 1.0
|
8 |
* @package Email Subscribers
|
9 |
*/
|
3 |
* Action to add contact to the selected list
|
4 |
*
|
5 |
* @since 4.4.1
|
|
|
6 |
* @version 1.0
|
7 |
* @package Email Subscribers
|
8 |
*/
|
lite/includes/workflows/admin/class-es-workflow-admin-ajax.php
CHANGED
@@ -7,7 +7,6 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
7 |
/**
|
8 |
* Handles workflow admin ajax functionality
|
9 |
*
|
10 |
-
* @author Icegram
|
11 |
* @since 4.4.1
|
12 |
* @version 1.0
|
13 |
* @package Email Subscribers
|
7 |
/**
|
8 |
* Handles workflow admin ajax functionality
|
9 |
*
|
|
|
10 |
* @since 4.4.1
|
11 |
* @version 1.0
|
12 |
* @package Email Subscribers
|
lite/includes/workflows/admin/class-es-workflow-admin-edit.php
CHANGED
@@ -2,7 +2,6 @@
|
|
2 |
/**
|
3 |
* Workflow admin edit
|
4 |
*
|
5 |
-
* @author Icegram
|
6 |
* @since 4.4.1
|
7 |
* @version 1.0
|
8 |
* @package Email Subscribers
|
2 |
/**
|
3 |
* Workflow admin edit
|
4 |
*
|
|
|
5 |
* @since 4.4.1
|
6 |
* @version 1.0
|
7 |
* @package Email Subscribers
|
lite/includes/workflows/admin/class-es-workflow-admin.php
CHANGED
@@ -7,7 +7,6 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
7 |
/**
|
8 |
* Workflow admin
|
9 |
*
|
10 |
-
* @author Icegram
|
11 |
* @since 4.4.1
|
12 |
* @version 1.0
|
13 |
* @package Email Subscribers
|
7 |
/**
|
8 |
* Workflow admin
|
9 |
*
|
|
|
10 |
* @since 4.4.1
|
11 |
* @version 1.0
|
12 |
* @package Email Subscribers
|
lite/includes/workflows/admin/views/action-fields.php
CHANGED
@@ -2,7 +2,6 @@
|
|
2 |
/**
|
3 |
* Workflow single action fields
|
4 |
*
|
5 |
-
* @author Icegram
|
6 |
* @since 4.4.1
|
7 |
* @version 1.0
|
8 |
* @package Email Subscribers
|
2 |
/**
|
3 |
* Workflow single action fields
|
4 |
*
|
|
|
5 |
* @since 4.4.1
|
6 |
* @version 1.0
|
7 |
* @package Email Subscribers
|
lite/includes/workflows/admin/views/action.php
CHANGED
@@ -2,7 +2,6 @@
|
|
2 |
/**
|
3 |
* Workflow single action
|
4 |
*
|
5 |
-
* @author Icegram
|
6 |
* @since 4.4.1
|
7 |
* @version 1.0
|
8 |
* @package Email Subscribers
|
2 |
/**
|
3 |
* Workflow single action
|
4 |
*
|
|
|
5 |
* @since 4.4.1
|
6 |
* @version 1.0
|
7 |
* @package Email Subscribers
|
lite/includes/workflows/admin/views/meta-box-actions.php
CHANGED
@@ -2,7 +2,6 @@
|
|
2 |
/**
|
3 |
* Admin workflow actions metabox
|
4 |
*
|
5 |
-
* @author Icegram
|
6 |
* @since 4.4.1
|
7 |
* @version 1.0
|
8 |
* @package Email Subscribers
|
2 |
/**
|
3 |
* Admin workflow actions metabox
|
4 |
*
|
|
|
5 |
* @since 4.4.1
|
6 |
* @version 1.0
|
7 |
* @package Email Subscribers
|
lite/includes/workflows/admin/views/meta-box-options.php
CHANGED
@@ -2,7 +2,6 @@
|
|
2 |
/**
|
3 |
* Admin workflow options metabox
|
4 |
*
|
5 |
-
* @author Icegram
|
6 |
* @since 4.4.1
|
7 |
* @version 1.0
|
8 |
* @package Email Subscribers
|
2 |
/**
|
3 |
* Admin workflow options metabox
|
4 |
*
|
|
|
5 |
* @since 4.4.1
|
6 |
* @version 1.0
|
7 |
* @package Email Subscribers
|
lite/includes/workflows/admin/views/meta-box-save.php
CHANGED
@@ -2,7 +2,6 @@
|
|
2 |
/**
|
3 |
* Admin workflow save metabox
|
4 |
*
|
5 |
-
* @author Icegram
|
6 |
* @since 4.4.1
|
7 |
* @version 1.0
|
8 |
* @package Email Subscribers
|
2 |
/**
|
3 |
* Admin workflow save metabox
|
4 |
*
|
|
|
5 |
* @since 4.4.1
|
6 |
* @version 1.0
|
7 |
* @package Email Subscribers
|
lite/includes/workflows/admin/views/meta-box-timing.php
CHANGED
@@ -2,7 +2,6 @@
|
|
2 |
/**
|
3 |
* Admin workflow timing metabox
|
4 |
*
|
5 |
-
* @author Icegram
|
6 |
* @since 4.4.1
|
7 |
* @version 1.0
|
8 |
* @package Email Subscribers
|
2 |
/**
|
3 |
* Admin workflow timing metabox
|
4 |
*
|
|
|
5 |
* @since 4.4.1
|
6 |
* @version 1.0
|
7 |
* @package Email Subscribers
|
lite/includes/workflows/admin/views/meta-box-trigger.php
CHANGED
@@ -3,7 +3,6 @@
|
|
3 |
* Admin trigger metabox
|
4 |
*
|
5 |
* @since 4.4.1
|
6 |
-
* @author Icegram
|
7 |
* @version 1.0
|
8 |
* @package Email Subscribers
|
9 |
*/
|
3 |
* Admin trigger metabox
|
4 |
*
|
5 |
* @since 4.4.1
|
|
|
6 |
* @version 1.0
|
7 |
* @package Email Subscribers
|
8 |
*/
|
lite/includes/workflows/class-es-clean.php
CHANGED
@@ -2,7 +2,6 @@
|
|
2 |
/**
|
3 |
* Container class for sanitizer functions.
|
4 |
*
|
5 |
-
* @author Icegram
|
6 |
* @since 4.4.1
|
7 |
* @version 1.0
|
8 |
* @package Email Subscribers
|
2 |
/**
|
3 |
* Container class for sanitizer functions.
|
4 |
*
|
|
|
5 |
* @since 4.4.1
|
6 |
* @version 1.0
|
7 |
* @package Email Subscribers
|
lite/includes/workflows/class-es-workflow-actions.php
CHANGED
@@ -105,8 +105,11 @@ class ES_Workflow_Actions extends ES_Workflow_Registry {
|
|
105 |
* @since 4.4.1
|
106 |
* @var ES_Workflow_Action $action
|
107 |
*/
|
108 |
-
$
|
109 |
-
|
|
|
|
|
|
|
110 |
}
|
111 |
|
112 |
static::$loaded[ $action_name ] = $action;
|
105 |
* @since 4.4.1
|
106 |
* @var ES_Workflow_Action $action
|
107 |
*/
|
108 |
+
$action_class = $includes[ $action_name ];
|
109 |
+
if ( class_exists( $action_class ) ) {
|
110 |
+
$action = new $action_class();
|
111 |
+
$action->set_name( $action_name );
|
112 |
+
}
|
113 |
}
|
114 |
|
115 |
static::$loaded[ $action_name ] = $action;
|
lite/includes/workflows/class-es-workflow-datetime.php
CHANGED
@@ -2,7 +2,6 @@
|
|
2 |
/**
|
3 |
* Helper class for Workflow date time options
|
4 |
*
|
5 |
-
* @author Icegram
|
6 |
* @since 4.4.1
|
7 |
* @version 1.0
|
8 |
* @package Email Subscribers
|
2 |
/**
|
3 |
* Helper class for Workflow date time options
|
4 |
*
|
|
|
5 |
* @since 4.4.1
|
6 |
* @version 1.0
|
7 |
* @package Email Subscribers
|
lite/includes/workflows/class-es-workflow-factory.php
CHANGED
@@ -2,7 +2,6 @@
|
|
2 |
/**
|
3 |
* Load workflows based on ID
|
4 |
*
|
5 |
-
* @author Icegram
|
6 |
* @since 4.4.1
|
7 |
* @version 1.0
|
8 |
* @package Email Subscribers
|
2 |
/**
|
3 |
* Load workflows based on ID
|
4 |
*
|
|
|
5 |
* @since 4.4.1
|
6 |
* @version 1.0
|
7 |
* @package Email Subscribers
|
lite/includes/workflows/class-es-workflow-loader.php
CHANGED
@@ -2,7 +2,6 @@
|
|
2 |
/**
|
3 |
* Loads functionalities required for the workflows.
|
4 |
*
|
5 |
-
* @author Icegram
|
6 |
* @since 4.4.1
|
7 |
* @version 1.0
|
8 |
* @package Email Subscribers
|
2 |
/**
|
3 |
* Loads functionalities required for the workflows.
|
4 |
*
|
|
|
5 |
* @since 4.4.1
|
6 |
* @version 1.0
|
7 |
* @package Email Subscribers
|
lite/includes/workflows/class-es-workflow-query.php
CHANGED
@@ -2,7 +2,6 @@
|
|
2 |
/**
|
3 |
* Query workflows based on auguements.
|
4 |
*
|
5 |
-
* @author Icegram
|
6 |
* @since 4.4.1
|
7 |
* @version 1.0
|
8 |
* @package Email Subscribers
|
2 |
/**
|
3 |
* Query workflows based on auguements.
|
4 |
*
|
|
|
5 |
* @since 4.4.1
|
6 |
* @version 1.0
|
7 |
* @package Email Subscribers
|
lite/includes/workflows/class-es-workflow-time-helper.php
CHANGED
@@ -2,7 +2,6 @@
|
|
2 |
/**
|
3 |
* Helper class for getting/setting workflow time options
|
4 |
*
|
5 |
-
* @author Icegram
|
6 |
* @since 4.4.1
|
7 |
* @version 1.0
|
8 |
* @package Email Subscribers
|
2 |
/**
|
3 |
* Helper class for getting/setting workflow time options
|
4 |
*
|
|
|
5 |
* @since 4.4.1
|
6 |
* @version 1.0
|
7 |
* @package Email Subscribers
|
lite/includes/workflows/class-es-workflow-triggers.php
CHANGED
@@ -2,7 +2,6 @@
|
|
2 |
/**
|
3 |
* Includes all workflows triggers.
|
4 |
*
|
5 |
-
* @author Icegram
|
6 |
* @since 4.4.1
|
7 |
* @version 1.0
|
8 |
* @package Email Subscribers
|
@@ -116,8 +115,11 @@ class ES_Workflow_Triggers extends ES_Workflow_Registry {
|
|
116 |
*
|
117 |
* @var ES_Workflow_Trigger
|
118 |
*/
|
119 |
-
$
|
120 |
-
|
|
|
|
|
|
|
121 |
}
|
122 |
|
123 |
static::$loaded[ $trigger_name ] = $trigger;
|
2 |
/**
|
3 |
* Includes all workflows triggers.
|
4 |
*
|
|
|
5 |
* @since 4.4.1
|
6 |
* @version 1.0
|
7 |
* @package Email Subscribers
|
115 |
*
|
116 |
* @var ES_Workflow_Trigger
|
117 |
*/
|
118 |
+
$trigger_class = $includes[ $trigger_name ];
|
119 |
+
if ( class_exists( $trigger_class ) ) {
|
120 |
+
$trigger = new $trigger_class();
|
121 |
+
$trigger->set_name( $trigger_name );
|
122 |
+
}
|
123 |
}
|
124 |
|
125 |
static::$loaded[ $trigger_name ] = $trigger;
|
lite/includes/workflows/class-es-workflows-table.php
CHANGED
@@ -2,7 +2,6 @@
|
|
2 |
/**
|
3 |
* Show workflows list in admin dashboard.
|
4 |
*
|
5 |
-
* @author Icegram
|
6 |
* @since 4.4.1
|
7 |
* @version 1.0
|
8 |
* @package Email Subscribers
|
2 |
/**
|
3 |
* Show workflows list in admin dashboard.
|
4 |
*
|
|
|
5 |
* @since 4.4.1
|
6 |
* @version 1.0
|
7 |
* @package Email Subscribers
|
lite/includes/workflows/data-types/abstracts/class-es-data-type-form-data.php
CHANGED
@@ -2,7 +2,6 @@
|
|
2 |
/**
|
3 |
* Workflow data type form data
|
4 |
*
|
5 |
-
* @author Icegram
|
6 |
* @since 4.4.6
|
7 |
* @version 1.0
|
8 |
* @package Email Subscribers
|
2 |
/**
|
3 |
* Workflow data type form data
|
4 |
*
|
|
|
5 |
* @since 4.4.6
|
6 |
* @version 1.0
|
7 |
* @package Email Subscribers
|
lite/includes/workflows/data-types/class-es-data-type-user.php
CHANGED
@@ -2,7 +2,6 @@
|
|
2 |
/**
|
3 |
* Workflow data type user
|
4 |
*
|
5 |
-
* @author Icegram
|
6 |
* @since 4.4.1
|
7 |
* @version 1.0
|
8 |
* @package Email Subscribers
|
2 |
/**
|
3 |
* Workflow data type user
|
4 |
*
|
|
|
5 |
* @since 4.4.1
|
6 |
* @version 1.0
|
7 |
* @package Email Subscribers
|
lite/includes/workflows/db/class-es-db-workflows-queue.php
CHANGED
@@ -2,7 +2,6 @@
|
|
2 |
/**
|
3 |
* Workflow Queue DB
|
4 |
*
|
5 |
-
* @author Icegram
|
6 |
* @since 4.4.1
|
7 |
* @version 1.0
|
8 |
* @package Email Subscribers
|
2 |
/**
|
3 |
* Workflow Queue DB
|
4 |
*
|
|
|
5 |
* @since 4.4.1
|
6 |
* @version 1.0
|
7 |
* @package Email Subscribers
|
lite/includes/workflows/db/class-es-db-workflows.php
CHANGED
@@ -2,7 +2,6 @@
|
|
2 |
/**
|
3 |
* Workflow DB
|
4 |
*
|
5 |
-
* @author Icegram
|
6 |
* @since 4.4.1
|
7 |
* @version 1.0
|
8 |
* @package Email Subscribers
|
2 |
/**
|
3 |
* Workflow DB
|
4 |
*
|
|
|
5 |
* @since 4.4.1
|
6 |
* @version 1.0
|
7 |
* @package Email Subscribers
|
lite/includes/workflows/fields/class-es-checkbox.php
CHANGED
@@ -2,7 +2,6 @@
|
|
2 |
/**
|
3 |
* Email Subscribers' checkbox field
|
4 |
*
|
5 |
-
* @author Icegram
|
6 |
* @since 4.4.3
|
7 |
* @version 1.0
|
8 |
* @package Email Subscribers
|
2 |
/**
|
3 |
* Email Subscribers' checkbox field
|
4 |
*
|
|
|
5 |
* @since 4.4.3
|
6 |
* @version 1.0
|
7 |
* @package Email Subscribers
|
lite/includes/workflows/fields/class-es-date.php
CHANGED
@@ -2,7 +2,6 @@
|
|
2 |
/**
|
3 |
* Email Subscribers' date field
|
4 |
*
|
5 |
-
* @author Icegram
|
6 |
* @since 4.4.1
|
7 |
* @version 1.0
|
8 |
* @package Email Subscribers
|
2 |
/**
|
3 |
* Email Subscribers' date field
|
4 |
*
|
|
|
5 |
* @since 4.4.1
|
6 |
* @version 1.0
|
7 |
* @package Email Subscribers
|
lite/includes/workflows/fields/class-es-field.php
CHANGED
@@ -2,7 +2,6 @@
|
|
2 |
/**
|
3 |
* Email Subscribers' field abstract class
|
4 |
*
|
5 |
-
* @author Icegram
|
6 |
* @since 4.4.1
|
7 |
* @version 1.0
|
8 |
* @package Email Subscribers
|
2 |
/**
|
3 |
* Email Subscribers' field abstract class
|
4 |
*
|
|
|
5 |
* @since 4.4.1
|
6 |
* @version 1.0
|
7 |
* @package Email Subscribers
|
lite/includes/workflows/fields/class-es-number.php
CHANGED
@@ -2,7 +2,6 @@
|
|
2 |
/**
|
3 |
* Email Subscribers' number field
|
4 |
*
|
5 |
-
* @author Icegram
|
6 |
* @since 4.4.1
|
7 |
* @version 1.0
|
8 |
* @package Email Subscribers
|
2 |
/**
|
3 |
* Email Subscribers' number field
|
4 |
*
|
|
|
5 |
* @since 4.4.1
|
6 |
* @version 1.0
|
7 |
* @package Email Subscribers
|
lite/includes/workflows/fields/class-es-select.php
CHANGED
@@ -2,7 +2,6 @@
|
|
2 |
/**
|
3 |
* Email Subscribers' select field
|
4 |
*
|
5 |
-
* @author Icegram
|
6 |
* @since 4.4.1
|
7 |
* @version 1.0
|
8 |
* @package Email Subscribers
|
2 |
/**
|
3 |
* Email Subscribers' select field
|
4 |
*
|
|
|
5 |
* @since 4.4.1
|
6 |
* @version 1.0
|
7 |
* @package Email Subscribers
|
lite/includes/workflows/fields/class-es-text.php
CHANGED
@@ -2,7 +2,6 @@
|
|
2 |
/**
|
3 |
* Email Subscribers' text field
|
4 |
*
|
5 |
-
* @author Icegram
|
6 |
* @since 4.4.1
|
7 |
* @version 1.0
|
8 |
* @package Email Subscribers
|
2 |
/**
|
3 |
* Email Subscribers' text field
|
4 |
*
|
|
|
5 |
* @since 4.4.1
|
6 |
* @version 1.0
|
7 |
* @package Email Subscribers
|
lite/includes/workflows/fields/class-es-time.php
CHANGED
@@ -2,7 +2,6 @@
|
|
2 |
/**
|
3 |
* Email Subscribers' time field
|
4 |
*
|
5 |
-
* @author Icegram
|
6 |
* @since 4.4.1
|
7 |
* @version 1.0
|
8 |
* @package Email Subscribers
|
2 |
/**
|
3 |
* Email Subscribers' time field
|
4 |
*
|
|
|
5 |
* @since 4.4.1
|
6 |
* @version 1.0
|
7 |
* @package Email Subscribers
|
lite/includes/workflows/fields/class-es-wp-editor.php
CHANGED
@@ -2,7 +2,6 @@
|
|
2 |
/**
|
3 |
* Email Subscribers' WP Editor field
|
4 |
*
|
5 |
-
* @author Icegram
|
6 |
* @since 4.5.3
|
7 |
* @version 1.0
|
8 |
* @package Email Subscribers
|
2 |
/**
|
3 |
* Email Subscribers' WP Editor field
|
4 |
*
|
|
|
5 |
* @since 4.5.3
|
6 |
* @version 1.0
|
7 |
* @package Email Subscribers
|
lite/includes/workflows/queue/class-es-workflow-queue-factory.php
CHANGED
@@ -2,7 +2,6 @@
|
|
2 |
/**
|
3 |
* Factory class for ES_Workflow_Queue object
|
4 |
*
|
5 |
-
* @author Icegram
|
6 |
* @since 4.4.1
|
7 |
* @version 1.0
|
8 |
* @package Email Subscribers
|
2 |
/**
|
3 |
* Factory class for ES_Workflow_Queue object
|
4 |
*
|
|
|
5 |
* @since 4.4.1
|
6 |
* @version 1.0
|
7 |
* @package Email Subscribers
|
lite/includes/workflows/queue/class-es-workflow-queue-handler.php
CHANGED
@@ -2,7 +2,6 @@
|
|
2 |
/**
|
3 |
* Workflow Queue Handler
|
4 |
*
|
5 |
-
* @author Icegram
|
6 |
* @since 4.4.1
|
7 |
* @version 1.0
|
8 |
* @package Email Subscribers
|
2 |
/**
|
3 |
* Workflow Queue Handler
|
4 |
*
|
|
|
5 |
* @since 4.4.1
|
6 |
* @version 1.0
|
7 |
* @package Email Subscribers
|
lite/includes/workflows/queue/class-es-workflow-queue-runner.php
CHANGED
@@ -2,7 +2,6 @@
|
|
2 |
/**
|
3 |
* Workflow Queue Runner
|
4 |
*
|
5 |
-
* @author Icegram
|
6 |
* @since 4.4.1
|
7 |
* @version 1.0
|
8 |
* @package Email Subscribers
|
2 |
/**
|
3 |
* Workflow Queue Runner
|
4 |
*
|
|
|
5 |
* @since 4.4.1
|
6 |
* @version 1.0
|
7 |
* @package Email Subscribers
|
lite/includes/workflows/triggers/abstracts/class-es-trigger-form-submitted.php
CHANGED
@@ -2,7 +2,6 @@
|
|
2 |
/**
|
3 |
* Abstract trigger for form related triggers
|
4 |
*
|
5 |
-
* @author Icegram
|
6 |
* @since 4.4.6
|
7 |
* @version 1.0
|
8 |
* @package Email Subscribers
|
2 |
/**
|
3 |
* Abstract trigger for form related triggers
|
4 |
*
|
|
|
5 |
* @since 4.4.6
|
6 |
* @version 1.0
|
7 |
* @package Email Subscribers
|
lite/includes/workflows/triggers/class-es-trigger-user-deleted.php
CHANGED
@@ -2,7 +2,6 @@
|
|
2 |
/**
|
3 |
* Triggers when a user gets deleted
|
4 |
*
|
5 |
-
* @author Icegram
|
6 |
* @since 4.4.1
|
7 |
* @version 1.0
|
8 |
* @package Email Subscribers
|
2 |
/**
|
3 |
* Triggers when a user gets deleted
|
4 |
*
|
|
|
5 |
* @since 4.4.1
|
6 |
* @version 1.0
|
7 |
* @package Email Subscribers
|
lite/includes/workflows/triggers/class-es-trigger-user-registered.php
CHANGED
@@ -2,7 +2,6 @@
|
|
2 |
/**
|
3 |
* Triggers when a user gets registered
|
4 |
*
|
5 |
-
* @author Icegram
|
6 |
* @since 4.4.1
|
7 |
* @version 1.0
|
8 |
* @package Email Subscribers
|
2 |
/**
|
3 |
* Triggers when a user gets registered
|
4 |
*
|
|
|
5 |
* @since 4.4.1
|
6 |
* @version 1.0
|
7 |
* @package Email Subscribers
|
lite/includes/workflows/triggers/class-es-trigger-user-updated.php
CHANGED
@@ -2,7 +2,6 @@
|
|
2 |
/**
|
3 |
* Triggers when a user is updated
|
4 |
*
|
5 |
-
* @author Icegram
|
6 |
* @since 4.4.1
|
7 |
* @version 1.0
|
8 |
* @package Email Subscribers
|
2 |
/**
|
3 |
* Triggers when a user is updated
|
4 |
*
|
|
|
5 |
* @since 4.4.1
|
6 |
* @version 1.0
|
7 |
* @package Email Subscribers
|
lite/includes/workflows/workflow-helper-functions.php
CHANGED
@@ -2,7 +2,6 @@
|
|
2 |
/**
|
3 |
* Workflow helper functions
|
4 |
*
|
5 |
-
* @author Icegram
|
6 |
* @since 4.4.1
|
7 |
* @version 1.0
|
8 |
* @package Email Subscribers
|
2 |
/**
|
3 |
* Workflow helper functions
|
4 |
*
|
|
|
5 |
* @since 4.4.1
|
6 |
* @version 1.0
|
7 |
* @package Email Subscribers
|
lite/public/class-email-subscribers-public.php
CHANGED
@@ -23,7 +23,6 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
23 |
*
|
24 |
* @package Email_Subscribers
|
25 |
* @subpackage Email_Subscribers/public
|
26 |
-
* @author Your Name <email@example.com>
|
27 |
*/
|
28 |
class Email_Subscribers_Public {
|
29 |
|
23 |
*
|
24 |
* @package Email_Subscribers
|
25 |
* @subpackage Email_Subscribers/public
|
|
|
26 |
*/
|
27 |
class Email_Subscribers_Public {
|
28 |
|
lite/public/partials/class-es-shortcode.php
CHANGED
@@ -23,7 +23,6 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
23 |
*
|
24 |
* @package Email_Subscribers
|
25 |
* @subpackage Email_Subscribers/public
|
26 |
-
* @author Your Name <email@example.com>
|
27 |
*/
|
28 |
class ES_Shortcode {
|
29 |
|
@@ -276,7 +275,8 @@ class ES_Shortcode {
|
|
276 |
if ( ! empty( $contact_id ) ) {
|
277 |
$status_span = '<span class="es_list_contact_status ' . $list_contact_status_map[ $list_id ] . '" title="' . ucwords( $list_contact_status_map[ $list_id ] ) . '">';
|
278 |
}
|
279 |
-
$lists_html .= '<td class="pt-4">'
|
|
|
280 |
} else {
|
281 |
$lists_html .= '<td class="pt-4"><label><input type="checkbox" class="pl-6 form-checkbox " name="' . $name . '" value="' . $list_id . '" /><span class="pl-1 pr-6 text-gray-500 text-sm font-normal">' . $list_name . '</span></label></td>';
|
282 |
}
|
23 |
*
|
24 |
* @package Email_Subscribers
|
25 |
* @subpackage Email_Subscribers/public
|
|
|
26 |
*/
|
27 |
class ES_Shortcode {
|
28 |
|
275 |
if ( ! empty( $contact_id ) ) {
|
276 |
$status_span = '<span class="es_list_contact_status ' . $list_contact_status_map[ $list_id ] . '" title="' . ucwords( $list_contact_status_map[ $list_id ] ) . '">';
|
277 |
}
|
278 |
+
$lists_html .= '<td class="pt-4">';
|
279 |
+
$lists_html .= $status_span . '<label><input type="checkbox" class="pl-6 form-checkbox" name="' . $name . '" checked="checked" value="' . $list_id . '" /><span class="pl-1 pr-6 text-gray-500 text-sm font-normal">' . $list_name . '</span></label></td>';
|
280 |
} else {
|
281 |
$lists_html .= '<td class="pt-4"><label><input type="checkbox" class="pl-6 form-checkbox " name="' . $name . '" value="' . $list_id . '" /><span class="pl-1 pr-6 text-gray-500 text-sm font-normal">' . $list_name . '</span></label></td>';
|
282 |
}
|
readme.txt
CHANGED
@@ -6,7 +6,7 @@ Tags: email marketing, subscription, autoresponder, post notification, welcome e
|
|
6 |
Requires at least: 3.9
|
7 |
Tested up to: 5.5.3
|
8 |
Requires PHP: 5.6
|
9 |
-
Stable tag: 4.6.
|
10 |
License: GPLv3
|
11 |
License URI: http://www.gnu.org/licenses
|
12 |
|
@@ -304,6 +304,14 @@ Refer [here](https://www.icegram.com/documentation/es-faq/).
|
|
304 |
|
305 |
== Changelog ==
|
306 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
307 |
**4.6.3 (09.11.2020)**
|
308 |
|
309 |
* New: Duplicate Broadcasts and Sequences [PRO]
|
6 |
Requires at least: 3.9
|
7 |
Tested up to: 5.5.3
|
8 |
Requires PHP: 5.6
|
9 |
+
Stable tag: 4.6.4
|
10 |
License: GPLv3
|
11 |
License URI: http://www.gnu.org/licenses
|
12 |
|
304 |
|
305 |
== Changelog ==
|
306 |
|
307 |
+
**4.6.4 (24.11.2020)**
|
308 |
+
|
309 |
+
* New: Added {{POSTMORETAG}} keyword for Post Notification
|
310 |
+
* New: New workflow trigger for WooCommerce order creation [PRO]
|
311 |
+
* New: Added option to select multiple lists while importing subscribers [PRO]
|
312 |
+
* Fix: Import not working for existing subscribers
|
313 |
+
* Fix: Duplicate email issue in few edge cases
|
314 |
+
|
315 |
**4.6.3 (09.11.2020)**
|
316 |
|
317 |
* New: Duplicate Broadcasts and Sequences [PRO]
|