Version Description
(25.07.2019) = * Update: Admin notification will be sent out only after contacts confirm their subscription * Update: Show Post Notifications categories in campaigns view * Fix: Sort contacts by name * Fix: Email Notification formatting issue
Download this release
Release Info
Developer | Icegram |
Plugin | Email Subscribers & Newsletters |
Version | 4.1.9 |
Comparing to | |
See all releases |
Code changes from version 4.1.8 to 4.1.9
- admin/images/edd-sync.png +0 -0
- admin/images/give-sync.png +0 -0
- admin/images/ninja-forms-sync.png +0 -0
- admin/images/wpforms-sync.png +0 -0
- admin/partials/dashboard.php +1 -1
- email-subscribers.php +2 -2
- includes/admin/class-es-admin-settings.php +3 -1
- includes/admin/class-es-campaigns-table.php +20 -10
- includes/admin/class-es-handle-subscription.php +5 -4
- includes/admin/class-es-newsletters.php +0 -1
- includes/admin/class-es-reports-table.php +15 -9
- includes/admin/class-es-subscribers-table.php +1 -1
- includes/class-email-subscribers.php +1 -1
- includes/class-es-install.php +1 -1
- includes/db/class-es-db-contacts.php +6 -3
- includes/db/class-es-db-sending-queue.php +17 -3
- includes/es-backward.php +11 -10
- includes/feedback/assets/css/{emoji.css → emoji.min.css} +0 -0
- includes/feedback/assets/css/{feedback.css → feedback.min.css} +0 -0
- includes/feedback/assets/css/{star-rating.css → star-rating.min.css} +0 -0
- includes/feedback/assets/css/{sweetalert2.css → sweetalert2.min.css} +0 -0
- includes/feedback/assets/images/loading.gif +0 -0
- includes/feedback/assets/js/{sweetalert2.js → sweetalert2.min.js} +0 -0
- includes/feedback/{class-ig-feedback-v-1-0-5.php → class-ig-feedback-v-1-0-7.php} +82 -68
- includes/feedback/{class-ig-tracker-v-1-0-5.php → class-ig-tracker-v-1-0-7.php} +10 -4
- includes/pro-features.php +200 -24
- public/class-email-subscribers-public.php +6 -0
- public/js/email-subscribers-public.js +13 -14
- readme.txt +7 -1
admin/images/edd-sync.png
ADDED
Binary file
|
admin/images/give-sync.png
ADDED
Binary file
|
admin/images/ninja-forms-sync.png
ADDED
Binary file
|
admin/images/wpforms-sync.png
ADDED
Binary file
|
admin/partials/dashboard.php
CHANGED
@@ -60,7 +60,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
60 |
<td class="es-emm-optin">
|
61 |
<form name="klawoo_subscribe" action="#" method="POST" accept-charset="utf-8">
|
62 |
<input class="es-ltr" type="text" name="name" id="name" placeholder="Your Name" />
|
63 |
-
<input class="es-ltr" type="text" name="email" id="email" placeholder="Your Email" required /> <br />
|
64 |
<input type="hidden" name="list" value="hN8OkYzujUlKgDgfCTEcIA"/>
|
65 |
<input type="checkbox" name="es-gdpr-agree" id ="es-gdpr-agree" value="1" required="required">
|
66 |
<label for="es-gdpr-agree"><?php echo sprintf(__( 'I have read and agreed to your %s.', 'email-subscribers' ), '<a href="https://www.icegram.com/privacy-policy/" target="_blank">' . __( 'Privacy Policy', 'email-subscribers' ) . '</a>' ); ?></label>
|
60 |
<td class="es-emm-optin">
|
61 |
<form name="klawoo_subscribe" action="#" method="POST" accept-charset="utf-8">
|
62 |
<input class="es-ltr" type="text" name="name" id="name" placeholder="Your Name" />
|
63 |
+
<input class="es-ltr" type="text" name="email" id="email" placeholder="Your Email" required value="<?php echo $admin_email;?>"/> <br />
|
64 |
<input type="hidden" name="list" value="hN8OkYzujUlKgDgfCTEcIA"/>
|
65 |
<input type="checkbox" name="es-gdpr-agree" id ="es-gdpr-agree" value="1" required="required">
|
66 |
<label for="es-gdpr-agree"><?php echo sprintf(__( 'I have read and agreed to your %s.', 'email-subscribers' ), '<a href="https://www.icegram.com/privacy-policy/" target="_blank">' . __( 'Privacy Policy', 'email-subscribers' ) . '</a>' ); ?></label>
|
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.1.
|
7 |
* Author: Icegram
|
8 |
* Author URI: https://www.icegram.com/
|
9 |
* Requires at least: 3.9
|
@@ -24,7 +24,7 @@ if ( ! defined( 'WPINC' ) ) {
|
|
24 |
* Define constants
|
25 |
*/
|
26 |
define( 'ES_PLUGIN_DIR', dirname( __FILE__ ) );
|
27 |
-
define( 'ES_PLUGIN_VERSION', '4.1.
|
28 |
define( 'ES_PLUGIN_BASE_NAME', plugin_basename( __FILE__ ) );
|
29 |
|
30 |
if ( ! defined( 'ES_PLUGIN_FILE' ) ) {
|
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.1.9
|
7 |
* Author: Icegram
|
8 |
* Author URI: https://www.icegram.com/
|
9 |
* Requires at least: 3.9
|
24 |
* Define constants
|
25 |
*/
|
26 |
define( 'ES_PLUGIN_DIR', dirname( __FILE__ ) );
|
27 |
+
define( 'ES_PLUGIN_VERSION', '4.1.9' );
|
28 |
define( 'ES_PLUGIN_BASE_NAME', plugin_basename( __FILE__ ) );
|
29 |
|
30 |
if ( ! defined( 'ES_PLUGIN_FILE' ) ) {
|
includes/admin/class-es-admin-settings.php
CHANGED
@@ -80,10 +80,12 @@ class ES_Admin_Settings {
|
|
80 |
foreach ( $options as $key => $value ) {
|
81 |
if ( substr( $key, 0, 6 ) === 'ig_es_' ) {
|
82 |
|
|
|
|
|
83 |
if ( in_array( $key, $text_fields_to_sanitize ) ) {
|
84 |
$value = sanitize_text_field( $value );
|
85 |
} elseif ( in_array( $key, $texarea_fields_to_sanitize ) ) {
|
86 |
-
$value =
|
87 |
} elseif ( in_array( $key, $email_fields_to_sanitize ) ) {
|
88 |
$value = sanitize_email( $value );
|
89 |
}
|
80 |
foreach ( $options as $key => $value ) {
|
81 |
if ( substr( $key, 0, 6 ) === 'ig_es_' ) {
|
82 |
|
83 |
+
$value = stripslashes($value);
|
84 |
+
|
85 |
if ( in_array( $key, $text_fields_to_sanitize ) ) {
|
86 |
$value = sanitize_text_field( $value );
|
87 |
} elseif ( in_array( $key, $texarea_fields_to_sanitize ) ) {
|
88 |
+
$value = wp_kses_post($value);
|
89 |
} elseif ( in_array( $key, $email_fields_to_sanitize ) ) {
|
90 |
$value = sanitize_email( $value );
|
91 |
}
|
includes/admin/class-es-campaigns-table.php
CHANGED
@@ -121,9 +121,9 @@ class ES_Campaigns_Table extends WP_List_Table {
|
|
121 |
|
122 |
if ( ! $do_count_only ) {
|
123 |
|
124 |
-
$order
|
125 |
-
$expected_order_values = array('asc', 'desc');
|
126 |
-
if(!in_array($order, $expected_order_values)) {
|
127 |
$order = 'desc';
|
128 |
}
|
129 |
|
@@ -198,6 +198,14 @@ class ES_Campaigns_Table extends WP_List_Table {
|
|
198 |
$type = ucwords( str_replace( '_', ' ', $type ) );
|
199 |
|
200 |
return $type;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
201 |
default:
|
202 |
return $item[ $column_name ]; //Show the whole array for troubleshooting purposes
|
203 |
}
|
@@ -227,9 +235,10 @@ class ES_Campaigns_Table extends WP_List_Table {
|
|
227 |
|
228 |
$type = $item['type'];
|
229 |
|
230 |
-
if ( $type === 'post_notification' ) {
|
231 |
|
232 |
-
|
|
|
|
|
233 |
|
234 |
$template = get_post( $item['base_template_id'] );
|
235 |
|
@@ -239,12 +248,12 @@ class ES_Campaigns_Table extends WP_List_Table {
|
|
239 |
$title = '';
|
240 |
}
|
241 |
|
242 |
-
|
243 |
-
$actions ['edit'] = sprintf( __( '<a href="?page=%s&action=%s&list=%s&_wpnonce=%s">Edit</a>', 'email-subscribers' ), esc_attr( 'es_notifications' ), 'edit', absint( $item['id'] ), $nonce );
|
244 |
-
}
|
245 |
|
|
|
246 |
$actions['delete'] = sprintf( __( '<a href="?page=%s&action=%s&list=%s&_wpnonce=%s" onclick="return checkDelete()">Delete</a>', 'email-subscribers' ), esc_attr( 'es_campaigns' ), 'delete', absint( $item['id'] ), $nonce );
|
247 |
-
|
|
|
248 |
} else {
|
249 |
$title = $item['name'];
|
250 |
}
|
@@ -264,6 +273,7 @@ class ES_Campaigns_Table extends WP_List_Table {
|
|
264 |
'base_template_id' => __( 'Name', 'email-subscribers' ),
|
265 |
'type' => __( 'Type', 'email-subscribers' ),
|
266 |
'list_ids' => __( 'List', 'email-subscribers' ),
|
|
|
267 |
'status' => __( 'Status', 'email-subscribers' )
|
268 |
);
|
269 |
|
@@ -281,7 +291,7 @@ class ES_Campaigns_Table extends WP_List_Table {
|
|
281 |
//'base_template_id' => array( 'base_template_id', true ),
|
282 |
//'list_ids' => array( 'list_ids', true ),
|
283 |
//'status' => array( 'status', true )
|
284 |
-
'type'
|
285 |
);
|
286 |
|
287 |
return $sortable_columns;
|
121 |
|
122 |
if ( ! $do_count_only ) {
|
123 |
|
124 |
+
$order = ! empty( $order ) ? strtolower( $order ) : 'desc';
|
125 |
+
$expected_order_values = array( 'asc', 'desc' );
|
126 |
+
if ( ! in_array( $order, $expected_order_values ) ) {
|
127 |
$order = 'desc';
|
128 |
}
|
129 |
|
198 |
$type = ucwords( str_replace( '_', ' ', $type ) );
|
199 |
|
200 |
return $type;
|
201 |
+
|
202 |
+
case 'categories':
|
203 |
+
if ( ! empty( $item[ $column_name ] ) ) {
|
204 |
+
return implode( ', ', ES_Common::convert_categories_string_to_array( $item[ $column_name ] ) );
|
205 |
+
} else {
|
206 |
+
return '-';
|
207 |
+
}
|
208 |
+
|
209 |
default:
|
210 |
return $item[ $column_name ]; //Show the whole array for troubleshooting purposes
|
211 |
}
|
235 |
|
236 |
$type = $item['type'];
|
237 |
|
|
|
238 |
|
239 |
+
$nonce = wp_create_nonce( 'es_post_notification' );
|
240 |
+
|
241 |
+
if ( $type === 'post_notification' ) {
|
242 |
|
243 |
$template = get_post( $item['base_template_id'] );
|
244 |
|
248 |
$title = '';
|
249 |
}
|
250 |
|
251 |
+
$slug = esc_attr('es_notifications');
|
|
|
|
|
252 |
|
253 |
+
$actions ['edit'] = sprintf( __( '<a href="?page=%s&action=%s&list=%s&_wpnonce=%s">Edit</a>', 'email-subscribers' ), $slug, 'edit', absint( $item['id'] ), $nonce );
|
254 |
$actions['delete'] = sprintf( __( '<a href="?page=%s&action=%s&list=%s&_wpnonce=%s" onclick="return checkDelete()">Delete</a>', 'email-subscribers' ), esc_attr( 'es_campaigns' ), 'delete', absint( $item['id'] ), $nonce );
|
255 |
+
|
256 |
+
$title .= $this->row_actions( $actions );
|
257 |
} else {
|
258 |
$title = $item['name'];
|
259 |
}
|
273 |
'base_template_id' => __( 'Name', 'email-subscribers' ),
|
274 |
'type' => __( 'Type', 'email-subscribers' ),
|
275 |
'list_ids' => __( 'List', 'email-subscribers' ),
|
276 |
+
'categories' => __( 'Categories', 'email-subscribers' ),
|
277 |
'status' => __( 'Status', 'email-subscribers' )
|
278 |
);
|
279 |
|
291 |
//'base_template_id' => array( 'base_template_id', true ),
|
292 |
//'list_ids' => array( 'list_ids', true ),
|
293 |
//'status' => array( 'status', true )
|
294 |
+
'type' => array( 'type', true )
|
295 |
);
|
296 |
|
297 |
return $sortable_columns;
|
includes/admin/class-es-handle-subscription.php
CHANGED
@@ -156,13 +156,14 @@ class ES_Handle_Subscription {
|
|
156 |
$this->send_welcome_notification();
|
157 |
}
|
158 |
|
|
|
|
|
|
|
|
|
|
|
159 |
$response['message'] = 'es_single_optin_success_message';
|
160 |
}
|
161 |
|
162 |
-
$ig_es_notifyadmin = get_option( 'ig_es_notify_admin' );
|
163 |
-
if ( 'yes' === $ig_es_notifyadmin ) {
|
164 |
-
$this->send_admin_signup_notification();
|
165 |
-
}
|
166 |
|
167 |
$response['status'] = 'SUCCESS';
|
168 |
|
156 |
$this->send_welcome_notification();
|
157 |
}
|
158 |
|
159 |
+
$ig_es_notifyadmin = get_option( 'ig_es_notify_admin' );
|
160 |
+
if ( 'yes' === $ig_es_notifyadmin ) {
|
161 |
+
$this->send_admin_signup_notification();
|
162 |
+
}
|
163 |
+
|
164 |
$response['message'] = 'es_single_optin_success_message';
|
165 |
}
|
166 |
|
|
|
|
|
|
|
|
|
167 |
|
168 |
$response['status'] = 'SUCCESS';
|
169 |
|
includes/admin/class-es-newsletters.php
CHANGED
@@ -238,7 +238,6 @@ class ES_Newsletters {
|
|
238 |
|
239 |
$data = apply_filters( 'ig_es_broadcast_data', $data );
|
240 |
|
241 |
-
|
242 |
if ( ! empty( $template_id ) ) {
|
243 |
|
244 |
$campaign_id = ES_DB_Campaigns::save_campaign( $data );
|
238 |
|
239 |
$data = apply_filters( 'ig_es_broadcast_data', $data );
|
240 |
|
|
|
241 |
if ( ! empty( $template_id ) ) {
|
242 |
|
243 |
$campaign_id = ES_DB_Campaigns::save_campaign( $data );
|
includes/admin/class-es-reports-table.php
CHANGED
@@ -144,15 +144,21 @@ class ES_Reports_Table extends WP_List_Table {
|
|
144 |
$class = 'alternate';
|
145 |
}
|
146 |
|
|
|
|
|
|
|
|
|
|
|
|
|
147 |
?>
|
148 |
|
149 |
<tr class="<?php echo $class; ?>">
|
150 |
<td align="left"><?php echo $i; ?></td>
|
151 |
-
<td><?php echo $
|
152 |
-
<td><span style="color:#03a025;font-weight:bold;"><?php echo $
|
153 |
-
<td><?php echo ig_es_format_date_time( $
|
154 |
-
<td><span><?php echo ( ! empty( $
|
155 |
-
<td><?php echo ig_es_format_date_time( $
|
156 |
</tr>
|
157 |
|
158 |
<?php
|
@@ -348,7 +354,7 @@ class ES_Reports_Table extends WP_List_Table {
|
|
348 |
|
349 |
$per_page = $this->get_items_per_page( 'reports_per_page', 20 );
|
350 |
$current_page = $this->get_pagenum();
|
351 |
-
$total_items
|
352 |
|
353 |
$this->set_pagination_args( array(
|
354 |
'total_items' => $total_items, //WE have to calculate the total number of items
|
@@ -375,9 +381,9 @@ class ES_Reports_Table extends WP_List_Table {
|
|
375 |
if ( ! $do_count_only ) {
|
376 |
|
377 |
// Prepare Order by clause
|
378 |
-
$order
|
379 |
-
$expected_order_values = array('asc', 'desc');
|
380 |
-
if(!in_array($order, $expected_order_values)) {
|
381 |
$order = 'desc';
|
382 |
}
|
383 |
|
144 |
$class = 'alternate';
|
145 |
}
|
146 |
|
147 |
+
$email_id = ! empty( $email['email'] ) ? $email['email'] : ( ! empty( $email['es_deliver_emailmail'] ) ? $email['es_deliver_emailmail'] : '' );
|
148 |
+
$status = ! empty( $email['status'] ) ? $email['status'] : ( ! empty( $email['es_deliver_sentstatus'] ) ? $email['es_deliver_sentstatus'] : '' );
|
149 |
+
$sent_at = ! empty( $email['sent_at'] ) ? $email['sent_at'] : ( ! empty( $email['es_deliver_sentdate'] ) ? $email['es_deliver_sentdate'] : '' );
|
150 |
+
$opened = ! empty( $email['sent_at'] ) ? $email['sent_at'] : ( ! empty( $email['es_deliver_status'] ) && $email['es_deliver_status'] === 'Viewed' ? 1 : 0 );
|
151 |
+
$opened_at = ! empty( $email['opened_at'] ) ? $email['opened_at'] : ( ! empty( $email['es_deliver_viewdate'] ) ? $email['es_deliver_viewdate'] : '' );
|
152 |
+
|
153 |
?>
|
154 |
|
155 |
<tr class="<?php echo $class; ?>">
|
156 |
<td align="left"><?php echo $i; ?></td>
|
157 |
+
<td><?php echo $email_id; ?></td>
|
158 |
+
<td><span style="color:#03a025;font-weight:bold;"><?php echo $status; ?></span></td>
|
159 |
+
<td><?php echo ig_es_format_date_time( $sent_at ); ?></td>
|
160 |
+
<td><span><?php echo ( ! empty( $opened ) && $opened == 1 ) ? _e( 'Viewed', 'email-subscribers' ) : '<i title="' . __( 'Not yet viewed', 'email-subscribers' ) . '" class="dashicons dashicons-es dashicons-minus">' ?></span></td>
|
161 |
+
<td><?php echo ig_es_format_date_time( $opened_at ); ?></td>
|
162 |
</tr>
|
163 |
|
164 |
<?php
|
354 |
|
355 |
$per_page = $this->get_items_per_page( 'reports_per_page', 20 );
|
356 |
$current_page = $this->get_pagenum();
|
357 |
+
$total_items = $this->get_notifications( 0, 0, true );
|
358 |
|
359 |
$this->set_pagination_args( array(
|
360 |
'total_items' => $total_items, //WE have to calculate the total number of items
|
381 |
if ( ! $do_count_only ) {
|
382 |
|
383 |
// Prepare Order by clause
|
384 |
+
$order = ! empty( $order ) ? strtolower( $order ) : 'desc';
|
385 |
+
$expected_order_values = array( 'asc', 'desc' );
|
386 |
+
if ( ! in_array( $order, $expected_order_values ) ) {
|
387 |
$order = 'desc';
|
388 |
}
|
389 |
|
includes/admin/class-es-subscribers-table.php
CHANGED
@@ -436,7 +436,7 @@ class ES_Subscribers_Table extends WP_List_Table {
|
|
436 |
|
437 |
$offset = ( $page_number - 1 ) * $per_page;
|
438 |
|
439 |
-
$expected_order_by_values = array( 'name', 'email', 'created_at' );
|
440 |
if ( ! in_array( $order_by, $expected_order_by_values ) ) {
|
441 |
$order_by = 'created_at';
|
442 |
}
|
436 |
|
437 |
$offset = ( $page_number - 1 ) * $per_page;
|
438 |
|
439 |
+
$expected_order_by_values = array( 'name', 'email', 'created_at', 'first_name' );
|
440 |
if ( ! in_array( $order_by, $expected_order_by_values ) ) {
|
441 |
$order_by = 'created_at';
|
442 |
}
|
includes/class-email-subscribers.php
CHANGED
@@ -74,7 +74,7 @@ class Email_Subscribers {
|
|
74 |
public function __construct() {
|
75 |
global $ig_es_feedback, $ig_es_tracker;
|
76 |
|
77 |
-
$feedback_version = '1.0.
|
78 |
|
79 |
require_once plugin_dir_path( __FILE__ ) . 'class-email-subscribers-activator.php';
|
80 |
require_once plugin_dir_path( __FILE__ ) . 'class-email-subscribers-deactivator.php';
|
74 |
public function __construct() {
|
75 |
global $ig_es_feedback, $ig_es_tracker;
|
76 |
|
77 |
+
$feedback_version = '1.0.7';
|
78 |
|
79 |
require_once plugin_dir_path( __FILE__ ) . 'class-email-subscribers-activator.php';
|
80 |
require_once plugin_dir_path( __FILE__ ) . 'class-email-subscribers-deactivator.php';
|
includes/class-es-install.php
CHANGED
@@ -65,7 +65,7 @@ class ES_Install {
|
|
65 |
'ig_es_update_400_migrate_subscribers',
|
66 |
'ig_es_update_400_migrate_post_notifications',
|
67 |
'ig_es_update_400_migrate_notifications',
|
68 |
-
'ig_es_update_400_migrate_reports_data',
|
69 |
'ig_es_update_400_migrate_group_selectors_forms',
|
70 |
'ig_es_update_400_db_version'
|
71 |
),
|
65 |
'ig_es_update_400_migrate_subscribers',
|
66 |
'ig_es_update_400_migrate_post_notifications',
|
67 |
'ig_es_update_400_migrate_notifications',
|
68 |
+
//'ig_es_update_400_migrate_reports_data',
|
69 |
'ig_es_update_400_migrate_group_selectors_forms',
|
70 |
'ig_es_update_400_db_version'
|
71 |
),
|
includes/db/class-es-db-contacts.php
CHANGED
@@ -318,8 +318,13 @@ class ES_DB_Contacts {
|
|
318 |
$contact_id = $wpdb->get_var( $sql );
|
319 |
$data = array();
|
320 |
if ( ! empty( $contact_id ) ) {
|
|
|
|
|
|
|
|
|
|
|
321 |
$list_query = "SELECT count(*) as count FROM " . IG_LISTS_CONTACTS_TABLE . " WHERE list_id IN (%s) AND contact_id = %s";
|
322 |
-
$list_sql = $wpdb->prepare( $list_query, implode( ',', $list_id ), $contact_id );
|
323 |
$data['contact_id'] = $contact_id;
|
324 |
$list_contact_count = $wpdb->get_var( $list_sql );
|
325 |
if ( ! empty( $list_contact_count ) ) {
|
@@ -330,8 +335,6 @@ class ES_DB_Contacts {
|
|
330 |
}
|
331 |
|
332 |
return $data;
|
333 |
-
|
334 |
-
|
335 |
}
|
336 |
|
337 |
public static function get_email_details_map() {
|
318 |
$contact_id = $wpdb->get_var( $sql );
|
319 |
$data = array();
|
320 |
if ( ! empty( $contact_id ) ) {
|
321 |
+
|
322 |
+
if ( ! is_array( $list_id ) ) {
|
323 |
+
$list_id = array( $list_id );
|
324 |
+
}
|
325 |
+
|
326 |
$list_query = "SELECT count(*) as count FROM " . IG_LISTS_CONTACTS_TABLE . " WHERE list_id IN (%s) AND contact_id = %s";
|
327 |
+
$list_sql = $wpdb->prepare( $list_query, implode( ', ', $list_id ), $contact_id );
|
328 |
$data['contact_id'] = $contact_id;
|
329 |
$list_contact_count = $wpdb->get_var( $list_sql );
|
330 |
if ( ! empty( $list_contact_count ) ) {
|
335 |
}
|
336 |
|
337 |
return $data;
|
|
|
|
|
338 |
}
|
339 |
|
340 |
public static function get_email_details_map() {
|
includes/db/class-es-db-sending-queue.php
CHANGED
@@ -144,12 +144,26 @@ class ES_DB_Sending_Queue {
|
|
144 |
if ( $notification_hash != "" ) {
|
145 |
$query = $wpdb->prepare( "SELECT * FROM " . IG_SENDING_QUEUE_TABLE . " WHERE mailing_queue_hash = %s", array( $notification_hash ) );
|
146 |
$emails = $wpdb->get_results( $query, ARRAY_A );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
147 |
}
|
148 |
|
149 |
return $emails;
|
150 |
}
|
151 |
|
152 |
-
|
153 |
public static function do_batch_insert( $delivery_data ) {
|
154 |
|
155 |
$status = ! empty( $delivery_data['status'] ) ? $delivery_data['status'] : 'In Queue';
|
@@ -240,7 +254,7 @@ class ES_DB_Sending_Queue {
|
|
240 |
|
241 |
$total_bataches = ( $total > IG_DEFAULT_BATCH_SIZE ) ? ceil( $total / $batch_size ) : 1;
|
242 |
|
243 |
-
$last_sending_queue_batch_run = get_transient( 'ig_es_last_sending_queue_batch_run'. false );
|
244 |
|
245 |
if ( false === $last_sending_queue_batch_run ) {
|
246 |
$batch_start_from = 0;
|
@@ -257,7 +271,7 @@ class ES_DB_Sending_Queue {
|
|
257 |
set_transient( 'ig_es_running_migration_for_' . $i, true, 300 );
|
258 |
$batch_start = $i * $batch_size;
|
259 |
|
260 |
-
$query
|
261 |
|
262 |
$results = $wpdb->get_results( $query, ARRAY_A );
|
263 |
$values = $data = $place_holders = array();
|
144 |
if ( $notification_hash != "" ) {
|
145 |
$query = $wpdb->prepare( "SELECT * FROM " . IG_SENDING_QUEUE_TABLE . " WHERE mailing_queue_hash = %s", array( $notification_hash ) );
|
146 |
$emails = $wpdb->get_results( $query, ARRAY_A );
|
147 |
+
|
148 |
+
// We are not migrating reports data because it caused lots of migration issues
|
149 |
+
// in the past. So, we are fetching reports data from older table if we don't get
|
150 |
+
// the data from the new table.
|
151 |
+
|
152 |
+
// This is generally fetch the data for older campaigns
|
153 |
+
if ( count( $emails ) == 0 ) {
|
154 |
+
$es_deliver_report_table = EMAIL_SUBSCRIBERS_STATS_TABLE;
|
155 |
+
|
156 |
+
$result = $wpdb->get_var( "SHOW TABLES LIKE '{$es_deliver_report_table}' " );
|
157 |
+
if ( $result === $es_deliver_report_table ) {
|
158 |
+
$query = $wpdb->prepare( "SELECT * FROM {$es_deliver_report_table} WHERE es_deliver_sentguid = %s", array( $notification_hash ) );
|
159 |
+
$emails = $wpdb->get_results( $query, ARRAY_A );
|
160 |
+
}
|
161 |
+
}
|
162 |
}
|
163 |
|
164 |
return $emails;
|
165 |
}
|
166 |
|
|
|
167 |
public static function do_batch_insert( $delivery_data ) {
|
168 |
|
169 |
$status = ! empty( $delivery_data['status'] ) ? $delivery_data['status'] : 'In Queue';
|
254 |
|
255 |
$total_bataches = ( $total > IG_DEFAULT_BATCH_SIZE ) ? ceil( $total / $batch_size ) : 1;
|
256 |
|
257 |
+
$last_sending_queue_batch_run = get_transient( 'ig_es_last_sending_queue_batch_run' . false );
|
258 |
|
259 |
if ( false === $last_sending_queue_batch_run ) {
|
260 |
$batch_start_from = 0;
|
271 |
set_transient( 'ig_es_running_migration_for_' . $i, true, 300 );
|
272 |
$batch_start = $i * $batch_size;
|
273 |
|
274 |
+
$query = "SELECT * FROM " . EMAIL_SUBSCRIBERS_STATS_TABLE . " LIMIT {$batch_start}, {$batch_size}";
|
275 |
|
276 |
$results = $wpdb->get_results( $query, ARRAY_A );
|
277 |
$values = $data = $place_holders = array();
|
includes/es-backward.php
CHANGED
@@ -97,6 +97,17 @@ class es_cls_dbquery {
|
|
97 |
ES_Mailer::send( $email, $subject, $content );
|
98 |
}
|
99 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
100 |
} else {
|
101 |
|
102 |
// Send Confirmation mail
|
@@ -106,16 +117,6 @@ class es_cls_dbquery {
|
|
106 |
ES_Mailer::send( $email, $subject, $content );
|
107 |
}
|
108 |
|
109 |
-
$list_name = ES_DB_Lists::get_list_id_name_map( $list_id );
|
110 |
-
$template_data = array(
|
111 |
-
'name' => $name,
|
112 |
-
'first_name' => $sub_data['first_name'],
|
113 |
-
'last_name' => $sub_data['last_name'],
|
114 |
-
'email' => $email,
|
115 |
-
'list_name' => $list_name
|
116 |
-
);
|
117 |
-
|
118 |
-
ES_Common::send_signup_notification_to_admins( $template_data );
|
119 |
|
120 |
}
|
121 |
}
|
97 |
ES_Mailer::send( $email, $subject, $content );
|
98 |
}
|
99 |
|
100 |
+
$list_name = ES_DB_Lists::get_list_id_name_map( $list_id );
|
101 |
+
$template_data = array(
|
102 |
+
'name' => $name,
|
103 |
+
'first_name' => $sub_data['first_name'],
|
104 |
+
'last_name' => $sub_data['last_name'],
|
105 |
+
'email' => $email,
|
106 |
+
'list_name' => $list_name
|
107 |
+
);
|
108 |
+
|
109 |
+
ES_Common::send_signup_notification_to_admins( $template_data );
|
110 |
+
|
111 |
} else {
|
112 |
|
113 |
// Send Confirmation mail
|
117 |
ES_Mailer::send( $email, $subject, $content );
|
118 |
}
|
119 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
120 |
|
121 |
}
|
122 |
}
|
includes/feedback/assets/css/{emoji.css → emoji.min.css}
RENAMED
File without changes
|
includes/feedback/assets/css/{feedback.css → feedback.min.css}
RENAMED
File without changes
|
includes/feedback/assets/css/{star-rating.css → star-rating.min.css}
RENAMED
File without changes
|
includes/feedback/assets/css/{sweetalert2.css → sweetalert2.min.css}
RENAMED
File without changes
|
includes/feedback/assets/images/loading.gif
ADDED
Binary file
|
includes/feedback/assets/js/{sweetalert2.js → sweetalert2.min.js}
RENAMED
File without changes
|
includes/feedback/{class-ig-feedback-v-1-0-5.php → class-ig-feedback-v-1-0-7.php}
RENAMED
@@ -1,33 +1,24 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
* @class IG_Feedback_V_1_0_5
|
9 |
-
* @package feedback
|
10 |
-
* @copyright Copyright (c) 2019, Icegram
|
11 |
-
* @license https://opensource.org/licenses/gpl-license GNU Public License
|
12 |
-
* @author Icegram
|
13 |
-
* @since 1.0.0
|
14 |
-
*/
|
15 |
-
|
16 |
-
defined( 'ABSPATH' ) || exit;
|
17 |
-
|
18 |
-
if ( ! class_exists( 'IG_Feedback_V_1_0_5' ) ) {
|
19 |
/**
|
20 |
-
*
|
21 |
*
|
22 |
-
*
|
|
|
23 |
*
|
24 |
-
* @
|
25 |
-
* @package
|
26 |
-
* @
|
27 |
-
* @license
|
28 |
-
* @
|
|
|
29 |
*/
|
30 |
-
class
|
31 |
|
32 |
/**
|
33 |
* The API URL where we will send feedback data.
|
@@ -127,7 +118,7 @@ if ( ! class_exists( 'IG_Feedback_V_1_0_5' ) ) {
|
|
127 |
* @since 1.0.1
|
128 |
*/
|
129 |
public function enqueue_scripts() {
|
130 |
-
wp_enqueue_script( 'sweetalert', plugin_dir_url( __FILE__ ) . 'assets/js/sweetalert2.js', array( 'jquery' ) );
|
131 |
}
|
132 |
|
133 |
/**
|
@@ -136,19 +127,19 @@ if ( ! class_exists( 'IG_Feedback_V_1_0_5' ) ) {
|
|
136 |
* @since 1.0.1
|
137 |
*/
|
138 |
public function enqueue_styles() {
|
139 |
-
wp_register_style( 'sweetalert', plugin_dir_url( __FILE__ ) . 'assets/css/sweetalert2.css' );
|
140 |
wp_enqueue_style( 'sweetalert' );
|
141 |
|
142 |
wp_register_style( 'animate', plugin_dir_url( __FILE__ ) . 'assets/css/animate.min.css' );
|
143 |
wp_enqueue_style( 'animate' );
|
144 |
|
145 |
-
wp_register_style( 'ig-feedback-star-rating', plugin_dir_url( __FILE__ ) . 'assets/css/star-rating.css' );
|
146 |
wp_enqueue_style( 'ig-feedback-star-rating' );
|
147 |
|
148 |
-
wp_register_style( 'ig-feedback-emoji', plugin_dir_url( __FILE__ ) . 'assets/css/emoji.css' );
|
149 |
wp_enqueue_style( 'ig-feedback-emoji' );
|
150 |
|
151 |
-
wp_register_style( 'ig-feedback', plugin_dir_url( __FILE__ ) . 'assets/css/feedback.css' );
|
152 |
wp_enqueue_style( 'ig-feedback' );
|
153 |
}
|
154 |
|
@@ -388,23 +379,25 @@ if ( ! class_exists( 'IG_Feedback_V_1_0_5' ) ) {
|
|
388 |
|
389 |
?>
|
390 |
|
391 |
-
<
|
392 |
-
<
|
393 |
-
<
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
<
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
<
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
<
|
406 |
-
|
407 |
-
|
|
|
|
|
408 |
|
409 |
<?php
|
410 |
|
@@ -460,9 +453,11 @@ if ( ! class_exists( 'IG_Feedback_V_1_0_5' ) ) {
|
|
460 |
}
|
461 |
}
|
462 |
|
463 |
-
|
|
|
|
|
464 |
|
465 |
-
$('
|
466 |
|
467 |
Swal.mixin({
|
468 |
footer: '<?php echo $this->footer; ?>',
|
@@ -488,12 +483,13 @@ if ( ! class_exists( 'IG_Feedback_V_1_0_5' ) ) {
|
|
488 |
|
489 |
},
|
490 |
preConfirm: () => {
|
|
|
|
|
491 |
|
492 |
-
var email = $('#ig-feedback-data-email').val();
|
493 |
-
var name = $('#ig-feedback-data-name').val();
|
494 |
-
var message = $('#ig-feedback-data-message').val();
|
495 |
-
var consent = $('#ig-feedback-data-consent').attr('checked');
|
496 |
-
|
497 |
|
498 |
if (email !== '' && !validateEmail(email)) {
|
499 |
Swal.showValidationMessage('Please enter valid email');
|
@@ -589,9 +585,9 @@ if ( ! class_exists( 'IG_Feedback_V_1_0_5' ) ) {
|
|
589 |
formOpen = false,
|
590 |
consent = $('#ig-deactivate-survey-help-consent-<?php echo $this->plugin; ?>');
|
591 |
|
592 |
-
function togglePersonalInfoFields
|
593 |
|
594 |
-
if(show) {
|
595 |
$form.find('#ig-deactivate-survey-info-name').show();
|
596 |
$form.find('#ig-deactivate-survey-info-email-address').show();
|
597 |
$form.find('#ig-deactivate-survey-consent-additional-data').show();
|
@@ -603,6 +599,15 @@ if ( ! class_exists( 'IG_Feedback_V_1_0_5' ) ) {
|
|
603 |
|
604 |
};
|
605 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
606 |
|
607 |
function validateEmail(email) {
|
608 |
var emailReg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/;
|
@@ -628,7 +633,7 @@ if ( ! class_exists( 'IG_Feedback_V_1_0_5' ) ) {
|
|
628 |
$form.find('.ig-deactivate-survey-option').removeClass('selected');
|
629 |
$(this).closest('.ig-deactivate-survey-option').addClass('selected').find('input[type=text]').show();
|
630 |
|
631 |
-
if(consent.attr('checked') === 'checked') {
|
632 |
togglePersonalInfoFields(true);
|
633 |
}
|
634 |
});
|
@@ -640,8 +645,9 @@ if ( ! class_exists( 'IG_Feedback_V_1_0_5' ) ) {
|
|
640 |
|
641 |
// Help Consent
|
642 |
togglePersonalInfoFields(false);
|
|
|
643 |
consent.on('click', function () {
|
644 |
-
if(consent.attr('checked') === 'checked') {
|
645 |
togglePersonalInfoFields(true);
|
646 |
} else {
|
647 |
togglePersonalInfoFields(false);
|
@@ -651,6 +657,7 @@ if ( ! class_exists( 'IG_Feedback_V_1_0_5' ) ) {
|
|
651 |
// Survey submit.
|
652 |
$form.submit(function (event) {
|
653 |
event.preventDefault();
|
|
|
654 |
if (!$form.find('input[type=radio]:checked').val()) {
|
655 |
$form.find('.ig-deactivate-survey-footer').prepend('<span class="error"><?php echo esc_js( __( 'Please select an option', 'email-subscribers' ) ); ?></span>');
|
656 |
return;
|
@@ -660,10 +667,10 @@ if ( ! class_exists( 'IG_Feedback_V_1_0_5' ) ) {
|
|
660 |
var name = '';
|
661 |
var email = '';
|
662 |
|
663 |
-
if(consent.attr('checked') === 'checked') {
|
664 |
-
name = $('#ig-deactivate-survey-info-name').val();
|
665 |
-
email = $('#ig-deactivate-survey-info-email-address').val();
|
666 |
-
if(email === '' || !validateEmail(email)) {
|
667 |
alert('Please enter valid email');
|
668 |
return;
|
669 |
}
|
@@ -823,6 +830,11 @@ if ( ! class_exists( 'IG_Feedback_V_1_0_5' ) ) {
|
|
823 |
text-decoration: none;
|
824 |
padding-top: 7px;
|
825 |
}
|
|
|
|
|
|
|
|
|
|
|
826 |
</style>
|
827 |
<?php
|
828 |
}
|
@@ -838,7 +850,7 @@ if ( ! class_exists( 'IG_Feedback_V_1_0_5' ) ) {
|
|
838 |
return;
|
839 |
}
|
840 |
|
841 |
-
$email = get_option('admin_email');
|
842 |
|
843 |
$options = array(
|
844 |
1 => array(
|
@@ -887,11 +899,13 @@ if ( ! class_exists( 'IG_Feedback_V_1_0_5' ) ) {
|
|
887 |
<input id="ig-deactivate-survey-help-consent-<?php echo $this->plugin; ?>" class="ig-deactivate-survey-option-input" type="checkbox" name="code" data-option-slug="<?php echo $option['slug']; ?>"/><b>Yes, I give my consent to track plugin usage and contact me back to make this plugin works!</b>
|
888 |
</div>
|
889 |
<div class="ig-deactivate-survey-info-data">
|
890 |
-
|
891 |
-
<input type="text" class="ig-deactivate-survey-info-
|
|
|
892 |
</div>
|
893 |
<div class="ig-deactivate-survey-footer">
|
894 |
<button type="submit" class="ig-deactivate-survey-submit button button-primary button-large"><?php echo sprintf( esc_html__( 'Submit %s Deactivate', 'email-subscribers' ), '&' ); ?></button>
|
|
|
895 |
<a href="#" class="ig-deactivate-survey-deactivate"><?php echo sprintf( esc_html__( 'Skip %s Deactivate', 'email-subscribers' ), '&' ); ?></a>
|
896 |
</div>
|
897 |
</form>
|
@@ -961,9 +975,9 @@ if ( ! class_exists( 'IG_Feedback_V_1_0_5' ) ) {
|
|
961 |
$host = ! empty( $url_parts['host'] ) ? $url_parts['host'] : false;
|
962 |
|
963 |
// Discard our development environment
|
964 |
-
if('192.168.0.112' === $host) {
|
965 |
-
|
966 |
-
|
967 |
|
968 |
if ( ! empty( $url ) && ! empty( $host ) ) {
|
969 |
if ( false !== ip2long( $host ) ) {
|
1 |
<?php
|
2 |
+
|
3 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
4 |
+
exit; // Exit if accessed directly.
|
5 |
+
}
|
6 |
+
|
7 |
+
if ( ! class_exists( 'IG_Feedback_V_1_0_7' ) ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
/**
|
9 |
+
* IG Feedback
|
10 |
*
|
11 |
+
* The IG Feedback class adds functionality to get quick interactive feedback from users.
|
12 |
+
* There are different types of feedabck widget like Stars, Emoji, Thubms Up/ Down, Number etc.
|
13 |
*
|
14 |
+
* @class IG_Feedback_V_1_0_7
|
15 |
+
* @package feedback
|
16 |
+
* @copyright Copyright (c) 2019, Icegram
|
17 |
+
* @license https://opensource.org/licenses/gpl-license GNU Public License
|
18 |
+
* @author Icegram
|
19 |
+
* @since 1.0.0
|
20 |
*/
|
21 |
+
class IG_Feedback_V_1_0_7 {
|
22 |
|
23 |
/**
|
24 |
* The API URL where we will send feedback data.
|
118 |
* @since 1.0.1
|
119 |
*/
|
120 |
public function enqueue_scripts() {
|
121 |
+
wp_enqueue_script( 'sweetalert', plugin_dir_url( __FILE__ ) . 'assets/js/sweetalert2.min.js', array( 'jquery' ) );
|
122 |
}
|
123 |
|
124 |
/**
|
127 |
* @since 1.0.1
|
128 |
*/
|
129 |
public function enqueue_styles() {
|
130 |
+
wp_register_style( 'sweetalert', plugin_dir_url( __FILE__ ) . 'assets/css/sweetalert2.min.css' );
|
131 |
wp_enqueue_style( 'sweetalert' );
|
132 |
|
133 |
wp_register_style( 'animate', plugin_dir_url( __FILE__ ) . 'assets/css/animate.min.css' );
|
134 |
wp_enqueue_style( 'animate' );
|
135 |
|
136 |
+
wp_register_style( 'ig-feedback-star-rating', plugin_dir_url( __FILE__ ) . 'assets/css/star-rating.min.css' );
|
137 |
wp_enqueue_style( 'ig-feedback-star-rating' );
|
138 |
|
139 |
+
wp_register_style( 'ig-feedback-emoji', plugin_dir_url( __FILE__ ) . 'assets/css/emoji.min.css' );
|
140 |
wp_enqueue_style( 'ig-feedback-emoji' );
|
141 |
|
142 |
+
wp_register_style( 'ig-feedback', plugin_dir_url( __FILE__ ) . 'assets/css/feedback.min.css' );
|
143 |
wp_enqueue_style( 'ig-feedback' );
|
144 |
}
|
145 |
|
379 |
|
380 |
?>
|
381 |
|
382 |
+
<div class="ig-general-feedback" id="ig-general-feedback-<?php echo $this->plugin; ?>">
|
383 |
+
<form class="ig-general-feedback" id="ig-general-feedback">
|
384 |
+
<p class="ig-feedback-data-name">
|
385 |
+
<label class="ig-label">Name</label><br/>
|
386 |
+
<input type="text" name="feedback_data[name]" id="ig-feedback-data-name" value="<?php echo $params['name']; ?>"/>
|
387 |
+
</p>
|
388 |
+
<p class="ig-feedback-data-email">
|
389 |
+
<label class="ig-label"">Email</label><br/>
|
390 |
+
<input type="email" name="feedback_data[email]" id="ig-feedback-data-email" value="<?php echo $params['email']; ?>"/>
|
391 |
+
</p>
|
392 |
+
<p class="ig-feedback-data-message">
|
393 |
+
<label class="ig-label"">Feedback</label><br/>
|
394 |
+
<textarea name="feedback_data[details]" id="ig-feedback-data-message"></textarea>
|
395 |
+
</p>
|
396 |
+
<p>
|
397 |
+
<input type="checkbox" name="feedback_data[collect_system_info]" checked="checked" id="ig-feedback-data-consent"/><?php echo $params['consent_text']; ?>
|
398 |
+
</p>
|
399 |
+
</form>
|
400 |
+
</div>
|
401 |
|
402 |
<?php
|
403 |
|
453 |
}
|
454 |
}
|
455 |
|
456 |
+
var feedbackButtonID = 'ig-feedback-button-<?php echo $this->plugin; ?>';
|
457 |
+
|
458 |
+
$('#wpwrap').append('<div class="ig-es-feedback-button" id="' + feedbackButtonID + '">Feedback</div>');
|
459 |
|
460 |
+
$('#' + feedbackButtonID).on('click', function () {
|
461 |
|
462 |
Swal.mixin({
|
463 |
footer: '<?php echo $this->footer; ?>',
|
483 |
|
484 |
},
|
485 |
preConfirm: () => {
|
486 |
+
var $overlay = $('#ig-general-feedback-<?php echo $this->plugin; ?>');
|
487 |
+
var $form = $overlay.find('form');
|
488 |
|
489 |
+
var email = $form.find('#ig-feedback-data-email').val();
|
490 |
+
var name = $form.find('#ig-feedback-data-name').val();
|
491 |
+
var message = $form.find('#ig-feedback-data-message').val();
|
492 |
+
var consent = $form.find('#ig-feedback-data-consent').attr('checked');
|
|
|
493 |
|
494 |
if (email !== '' && !validateEmail(email)) {
|
495 |
Swal.showValidationMessage('Please enter valid email');
|
585 |
formOpen = false,
|
586 |
consent = $('#ig-deactivate-survey-help-consent-<?php echo $this->plugin; ?>');
|
587 |
|
588 |
+
function togglePersonalInfoFields(show) {
|
589 |
|
590 |
+
if (show) {
|
591 |
$form.find('#ig-deactivate-survey-info-name').show();
|
592 |
$form.find('#ig-deactivate-survey-info-email-address').show();
|
593 |
$form.find('#ig-deactivate-survey-consent-additional-data').show();
|
599 |
|
600 |
};
|
601 |
|
602 |
+
function loader($show) {
|
603 |
+
|
604 |
+
if ($show) {
|
605 |
+
$form.find('#ig-deactivate-survey-loader').show();
|
606 |
+
} else {
|
607 |
+
$form.find('#ig-deactivate-survey-loader').hide();
|
608 |
+
}
|
609 |
+
|
610 |
+
}
|
611 |
|
612 |
function validateEmail(email) {
|
613 |
var emailReg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/;
|
633 |
$form.find('.ig-deactivate-survey-option').removeClass('selected');
|
634 |
$(this).closest('.ig-deactivate-survey-option').addClass('selected').find('input[type=text]').show();
|
635 |
|
636 |
+
if (consent.attr('checked') === 'checked') {
|
637 |
togglePersonalInfoFields(true);
|
638 |
}
|
639 |
});
|
645 |
|
646 |
// Help Consent
|
647 |
togglePersonalInfoFields(false);
|
648 |
+
loader(false);
|
649 |
consent.on('click', function () {
|
650 |
+
if (consent.attr('checked') === 'checked') {
|
651 |
togglePersonalInfoFields(true);
|
652 |
} else {
|
653 |
togglePersonalInfoFields(false);
|
657 |
// Survey submit.
|
658 |
$form.submit(function (event) {
|
659 |
event.preventDefault();
|
660 |
+
loader(true);
|
661 |
if (!$form.find('input[type=radio]:checked').val()) {
|
662 |
$form.find('.ig-deactivate-survey-footer').prepend('<span class="error"><?php echo esc_js( __( 'Please select an option', 'email-subscribers' ) ); ?></span>');
|
663 |
return;
|
667 |
var name = '';
|
668 |
var email = '';
|
669 |
|
670 |
+
if (consent.attr('checked') === 'checked') {
|
671 |
+
name = $form.find('#ig-deactivate-survey-info-name').val();
|
672 |
+
email = $form.find('#ig-deactivate-survey-info-email-address').val();
|
673 |
+
if (email === '' || !validateEmail(email)) {
|
674 |
alert('Please enter valid email');
|
675 |
return;
|
676 |
}
|
830 |
text-decoration: none;
|
831 |
padding-top: 7px;
|
832 |
}
|
833 |
+
|
834 |
+
.ig-deactivate-survey-loader {
|
835 |
+
vertical-align: middle;
|
836 |
+
padding: 10px;
|
837 |
+
}
|
838 |
</style>
|
839 |
<?php
|
840 |
}
|
850 |
return;
|
851 |
}
|
852 |
|
853 |
+
$email = get_option( 'admin_email' );
|
854 |
|
855 |
$options = array(
|
856 |
1 => array(
|
899 |
<input id="ig-deactivate-survey-help-consent-<?php echo $this->plugin; ?>" class="ig-deactivate-survey-option-input" type="checkbox" name="code" data-option-slug="<?php echo $option['slug']; ?>"/><b>Yes, I give my consent to track plugin usage and contact me back to make this plugin works!</b>
|
900 |
</div>
|
901 |
<div class="ig-deactivate-survey-info-data">
|
902 |
+
|
903 |
+
<input type="text" class="ig-deactivate-survey-info-name" id="ig-deactivate-survey-info-name" placeholder="Enter Name" name="ig-deactivate-survey-info-name" value=""/>
|
904 |
+
<input type="text" class="ig-deactivate-survey-info-email-address" id="ig-deactivate-survey-info-email-address" name="ig-deactivate-survey-info-email-address" value="<?php echo $email; ?>"/>
|
905 |
</div>
|
906 |
<div class="ig-deactivate-survey-footer">
|
907 |
<button type="submit" class="ig-deactivate-survey-submit button button-primary button-large"><?php echo sprintf( esc_html__( 'Submit %s Deactivate', 'email-subscribers' ), '&' ); ?></button>
|
908 |
+
<img class="ig-deactivate-survey-loader" id="ig-deactivate-survey-loader" src="<?php echo plugin_dir_url( __FILE__ ); ?>/assets/images/loading.gif"/>
|
909 |
<a href="#" class="ig-deactivate-survey-deactivate"><?php echo sprintf( esc_html__( 'Skip %s Deactivate', 'email-subscribers' ), '&' ); ?></a>
|
910 |
</div>
|
911 |
</form>
|
975 |
$host = ! empty( $url_parts['host'] ) ? $url_parts['host'] : false;
|
976 |
|
977 |
// Discard our development environment
|
978 |
+
if ( '192.168.0.112' === $host ) {
|
979 |
+
return false;
|
980 |
+
}
|
981 |
|
982 |
if ( ! empty( $url ) && ! empty( $host ) ) {
|
983 |
if ( false !== ip2long( $host ) ) {
|
includes/feedback/{class-ig-tracker-v-1-0-5.php → class-ig-tracker-v-1-0-7.php}
RENAMED
@@ -4,17 +4,23 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
4 |
exit; // Exit if accessed directly.
|
5 |
}
|
6 |
|
7 |
-
if ( ! class_exists( '
|
8 |
|
9 |
/**
|
10 |
-
*
|
11 |
*
|
12 |
* Icegram tracker handler class is responsible for sending anonymous plugin
|
13 |
* data to Icegram servers for users that actively allowed data tracking.
|
14 |
*
|
15 |
-
* @
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
*/
|
17 |
-
class
|
18 |
|
19 |
/**
|
20 |
* Get Active, Inactive or all plugins info
|
4 |
exit; // Exit if accessed directly.
|
5 |
}
|
6 |
|
7 |
+
if ( ! class_exists( 'IG_Tracker_V_1_0_7' ) ) {
|
8 |
|
9 |
/**
|
10 |
+
* Class IG_Tracker_V_1_0_7
|
11 |
*
|
12 |
* Icegram tracker handler class is responsible for sending anonymous plugin
|
13 |
* data to Icegram servers for users that actively allowed data tracking.
|
14 |
*
|
15 |
+
* @class IG_Tracker_V_1_0_7
|
16 |
+
* @package feedback
|
17 |
+
* @copyright Copyright (c) 2019, Icegram
|
18 |
+
* @license https://opensource.org/licenses/gpl-license GNU Public License
|
19 |
+
* @author Icegram
|
20 |
+
* @since 1.0.0
|
21 |
+
*
|
22 |
*/
|
23 |
+
class IG_Tracker_V_1_0_7 {
|
24 |
|
25 |
/**
|
26 |
* Get Active, Inactive or all plugins info
|
includes/pro-features.php
CHANGED
@@ -8,7 +8,13 @@ add_filter( 'ig_es_sync_users_tabs', 'ig_es_add_sync_users_tabs', 11, 1 );
|
|
8 |
add_action( 'ig_es_sync_users_tabs_comments', 'ig_es_add_comments_tab_settings' );
|
9 |
add_action( 'ig_es_sync_users_tabs_woocommerce', 'ig_es_add_woocommerce_tab_settings' );
|
10 |
add_action( 'ig_es_sync_users_tabs_cf7', 'ig_es_add_cf7_tab_settings' );
|
11 |
-
add_action( '
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
|
13 |
function ig_es_add_upsale( $fields ) {
|
14 |
global $ig_es_tracker;
|
@@ -76,6 +82,46 @@ function ig_es_add_sync_users_tabs( $tabs ) {
|
|
76 |
'indicator_label' => 'Starter'
|
77 |
);
|
78 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
}
|
80 |
|
81 |
return $tabs;
|
@@ -98,13 +144,13 @@ function ig_es_add_comments_tab_settings( $tab_options ) {
|
|
98 |
ob_start();
|
99 |
?>
|
100 |
<div class="">
|
101 |
-
<h2><?php _e('Sync Comment Users', 'email-subscribers') ?></h2>
|
102 |
-
<p><?php _e('Quickly add to your mailing list when someone post a comment on your website.', 'email-subscribers') ?></p>
|
103 |
-
<h2><?php _e('How to setup?', 'email-subscribers') ?></h2>
|
104 |
-
<p><?php _e('Once you upgrade to ', 'email-subscribers') ?><a href="https://www.icegram.com/email-subscribers-starter/?utm_source=in_app&utm_medium=comment_sync&utm_campaign=es_upsale#sync_comment_users"><?php _e('Email Subscribers Starter', 'email-subscribers') ?></a>, <?php _e('you will have settings panel where you need to enable Comment user sync and select the list in which you want to add people whenever someone post a
|
105 |
-
comment.', 'email-subscribers') ?></p>
|
106 |
<hr>
|
107 |
-
<p class="help"><?php _e('Checkout ', 'email-subscribers') ?><a href="https://www.icegram.com/email-subscribers-
|
108 |
</div>
|
109 |
<?php
|
110 |
|
@@ -127,14 +173,14 @@ function ig_es_add_woocommerce_tab_settings( $tab_options ) {
|
|
127 |
ob_start();
|
128 |
?>
|
129 |
<div class="">
|
130 |
-
<h2><?php _e('Sync WooCommerce Customers', 'email-subscribers') ?></h2>
|
131 |
-
<p><?php _e('Are you using WooCommerce for your online business? You can use this integration to add to a specific list whenever someone make a purchase from you', 'email-subscribers') ?></p>
|
132 |
-
<h2><?php _e('How to setup?', 'email-subscribers') ?></h2>
|
133 |
-
<p><?php _e('Once you upgrade to ', 'email-subscribers') ?><a href="https://www.icegram.com/email-subscribers-starter/?utm_source=in_app&utm_medium=woocommerce_sync&utm_campaign=es_upsale#sync_woocommerce_customers"><?php _e('Email Subscribers Starter', 'email-subscribers') ?></a>, <?php _e('you will have settings panel where you need to enable WooCommerce sync and select the list in which you want to add people whenever they
|
134 |
purchase something
|
135 |
-
from you.', 'email-subscribers') ?></p>
|
136 |
<hr>
|
137 |
-
<p class="help"><?php _e('Checkout ', 'email-subscribers') ?><a href="https://www.icegram.com/email-subscribers-
|
138 |
</div>
|
139 |
<?php $content = ob_get_clean(); ?>
|
140 |
|
@@ -160,12 +206,13 @@ function ig_es_add_cf7_tab_settings( $tab_options ) {
|
|
160 |
ob_start();
|
161 |
?>
|
162 |
<div class="">
|
163 |
-
<h2><?php _e('Sync Contact Form 7 users', 'email-subscribers') ?></h2>
|
164 |
-
<p><?php _e('Are you using Contact Form 7 for your list building? You can use this integration to add to a specific list whenever new subscribers added from Contact Form 7', 'email-subscribers') ?></p>
|
165 |
-
<h2><?php _e('How to setup?', 'email-subscribers') ?></h2>
|
166 |
-
<p><?php _e('Once you upgrade to ', 'email-subscribers') ?><a href="https://www.icegram.com/email-subscribers-starter/?utm_source=in_app&utm_medium=cf7_sync&utm_campaign=es_upsale#sync_cf7_subscribers"><?php _e('Email Subscribers Starter',
|
|
|
167 |
<hr>
|
168 |
-
<p class="help"><?php _e('Checkout ', 'email-subscribers') ?><a href="https://www.icegram.com/email-subscribers-
|
169 |
</div>
|
170 |
<?php $content = ob_get_clean(); ?>
|
171 |
|
@@ -182,6 +229,135 @@ function ig_es_add_cf7_tab_settings( $tab_options ) {
|
|
182 |
<?php
|
183 |
}
|
184 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
185 |
function add_spam_score_utm_link() {
|
186 |
global $post, $pagenow, $ig_es_tracker;
|
187 |
if ( $post->post_type !== 'es_template' ) {
|
@@ -191,12 +367,12 @@ function add_spam_score_utm_link() {
|
|
191 |
$all_plugins = $ig_es_tracker::get_plugins();
|
192 |
|
193 |
if ( ! in_array( $es_premium, $all_plugins ) ) {
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
}
|
201 |
|
202 |
|
8 |
add_action( 'ig_es_sync_users_tabs_comments', 'ig_es_add_comments_tab_settings' );
|
9 |
add_action( 'ig_es_sync_users_tabs_woocommerce', 'ig_es_add_woocommerce_tab_settings' );
|
10 |
add_action( 'ig_es_sync_users_tabs_cf7', 'ig_es_add_cf7_tab_settings' );
|
11 |
+
add_action( 'ig_es_sync_users_tabs_give', 'ig_es_add_give_tab_settings' );
|
12 |
+
add_action( 'ig_es_sync_users_tabs_wpforms', 'ig_es_add_wpforms_tab_settings' );
|
13 |
+
add_action( 'ig_es_sync_users_tabs_ninja_forms', 'ig_es_add_ninja_forms_tab_settings' );
|
14 |
+
add_action( 'ig_es_sync_users_tabs_edd', 'ig_es_add_edd_tab_settings' );
|
15 |
+
|
16 |
+
|
17 |
+
add_action( 'edit_form_advanced', 'add_spam_score_utm_link' );
|
18 |
|
19 |
function ig_es_add_upsale( $fields ) {
|
20 |
global $ig_es_tracker;
|
82 |
'indicator_label' => 'Starter'
|
83 |
);
|
84 |
}
|
85 |
+
|
86 |
+
$wpforms_plugin = 'wpforms-lite/wpforms.php';
|
87 |
+
if ( in_array( $wpforms_plugin, $active_plugins ) ) {
|
88 |
+
$tabs['wpforms'] = array(
|
89 |
+
'name' => __( 'WPForms', 'email-subscribers' ),
|
90 |
+
'indicator_option' => 'ig_es_show_sync_wpforms_users_indicator',
|
91 |
+
'indicator_label' => 'Starter'
|
92 |
+
);
|
93 |
+
}
|
94 |
+
|
95 |
+
// Show only if Give is installed & activated
|
96 |
+
$give_plugin = 'give/give.php';
|
97 |
+
if ( in_array( $give_plugin, $active_plugins ) ) {
|
98 |
+
$tabs['give'] = array(
|
99 |
+
'name' => __( 'Give', 'email-subscribers' ),
|
100 |
+
'indicator_option' => 'ig_es_show_sync_give_users_indicator',
|
101 |
+
'indicator_label' => 'Starter'
|
102 |
+
);
|
103 |
+
}
|
104 |
+
|
105 |
+
// Show only if Ninja Forms is installed & activated
|
106 |
+
$ninja_forms_plugin = 'ninja-forms/ninja-forms.php';
|
107 |
+
if ( in_array( $ninja_forms_plugin, $active_plugins ) ) {
|
108 |
+
$tabs['ninja_forms'] = array(
|
109 |
+
'name' => __( 'Ninja Forms', 'email-subscribers' ),
|
110 |
+
'indicator_option' => 'ig_es_show_sync_ninja_forms_users_indicator',
|
111 |
+
'indicator_label' => 'Starter'
|
112 |
+
);
|
113 |
+
}
|
114 |
+
|
115 |
+
// Show only if EDD is installed & activated
|
116 |
+
$edd_plugin = 'easy-digital-downloads/easy-digital-downloads.php';
|
117 |
+
if ( in_array( $edd_plugin, $active_plugins ) ) {
|
118 |
+
$tabs['edd'] = array(
|
119 |
+
'name' => __( 'EDD', 'email-subscribers' ),
|
120 |
+
'indicator_option' => 'ig_es_show_sync_edd_users_indicator',
|
121 |
+
'indicator_label' => 'Starter'
|
122 |
+
);
|
123 |
+
}
|
124 |
+
|
125 |
}
|
126 |
|
127 |
return $tabs;
|
144 |
ob_start();
|
145 |
?>
|
146 |
<div class="">
|
147 |
+
<h2><?php _e( 'Sync Comment Users', 'email-subscribers' ) ?></h2>
|
148 |
+
<p><?php _e( 'Quickly add to your mailing list when someone post a comment on your website.', 'email-subscribers' ) ?></p>
|
149 |
+
<h2><?php _e( 'How to setup?', 'email-subscribers' ) ?></h2>
|
150 |
+
<p><?php _e( 'Once you upgrade to ', 'email-subscribers' ) ?><a href="https://www.icegram.com/email-subscribers-starter/?utm_source=in_app&utm_medium=comment_sync&utm_campaign=es_upsale#sync_comment_users"><?php _e( 'Email Subscribers Starter', 'email-subscribers' ) ?></a>, <?php _e( 'you will have settings panel where you need to enable Comment user sync and select the list in which you want to add people whenever someone post a
|
151 |
+
comment.', 'email-subscribers' ) ?></p>
|
152 |
<hr>
|
153 |
+
<p class="help"><?php _e( 'Checkout ', 'email-subscribers' ) ?><a href="https://www.icegram.com/email-subscribers-pricing/?utm_source=in_app&utm_medium=comment_sync&utm_campaign=es_upsale#sync_comment_users"><?php _e( 'Email Subscribers Starter', 'email-subscribers' ) ?></a> <?php _e( 'now', 'email-subscribers' ) ?></p>
|
154 |
</div>
|
155 |
<?php
|
156 |
|
173 |
ob_start();
|
174 |
?>
|
175 |
<div class="">
|
176 |
+
<h2><?php _e( 'Sync WooCommerce Customers', 'email-subscribers' ) ?></h2>
|
177 |
+
<p><?php _e( 'Are you using WooCommerce for your online business? You can use this integration to add to a specific list whenever someone make a purchase from you', 'email-subscribers' ) ?></p>
|
178 |
+
<h2><?php _e( 'How to setup?', 'email-subscribers' ) ?></h2>
|
179 |
+
<p><?php _e( 'Once you upgrade to ', 'email-subscribers' ) ?><a href="https://www.icegram.com/email-subscribers-starter/?utm_source=in_app&utm_medium=woocommerce_sync&utm_campaign=es_upsale#sync_woocommerce_customers"><?php _e( 'Email Subscribers Starter', 'email-subscribers' ) ?></a>, <?php _e( 'you will have settings panel where you need to enable WooCommerce sync and select the list in which you want to add people whenever they
|
180 |
purchase something
|
181 |
+
from you.', 'email-subscribers' ) ?></p>
|
182 |
<hr>
|
183 |
+
<p class="help"><?php _e( 'Checkout ', 'email-subscribers' ) ?><a href="https://www.icegram.com/email-subscribers-pricing/?utm_source=in_app&utm_medium=woocommerce_sync&utm_campaign=es_upsale#sync_woocommerce_customers">Email Subscribers Starter</a> Now</p>
|
184 |
</div>
|
185 |
<?php $content = ob_get_clean(); ?>
|
186 |
|
206 |
ob_start();
|
207 |
?>
|
208 |
<div class="">
|
209 |
+
<h2><?php _e( 'Sync Contact Form 7 users', 'email-subscribers' ) ?></h2>
|
210 |
+
<p><?php _e( 'Are you using Contact Form 7 for your list building? You can use this integration to add to a specific list whenever new subscribers added from Contact Form 7', 'email-subscribers' ) ?></p>
|
211 |
+
<h2><?php _e( 'How to setup?', 'email-subscribers' ) ?></h2>
|
212 |
+
<p><?php _e( 'Once you upgrade to ', 'email-subscribers' ) ?><a href="https://www.icegram.com/email-subscribers-starter/?utm_source=in_app&utm_medium=cf7_sync&utm_campaign=es_upsale#sync_cf7_subscribers"><?php _e( 'Email Subscribers Starter',
|
213 |
+
'email-subscribers' ) ?></a>, <?php _e( 'you will have settings panel where you need to enable Contact form 7 sync and select the list in which you want to add people whenever they fill any of the Contact Form.', 'email-subscribers' ) ?></p>
|
214 |
<hr>
|
215 |
+
<p class="help"><?php _e( 'Checkout ', 'email-subscribers' ) ?><a href="https://www.icegram.com/email-subscribers-pricing/?utm_source=in_app&utm_medium=cf7_sync&utm_campaign=es_upsale#sync_cf7_subscribers">Email Subscribers Starter</a> Now</p>
|
216 |
</div>
|
217 |
<?php $content = ob_get_clean(); ?>
|
218 |
|
229 |
<?php
|
230 |
}
|
231 |
|
232 |
+
function ig_es_add_give_tab_settings( $tab_options ) {
|
233 |
+
|
234 |
+
$info = array(
|
235 |
+
'type' => 'info',
|
236 |
+
);
|
237 |
+
|
238 |
+
ob_start();
|
239 |
+
?>
|
240 |
+
<div class="">
|
241 |
+
<h2><?php _e( 'Sync Donors', 'email-subscribers' ) ?></h2>
|
242 |
+
<p><?php _e( 'We found that you are using Give WordPress plugin to collect donations. Now, with this integration, you can add your donors to any of your subscriber list and send them Newsletters in future.', 'email-subscribers' ) ?></p>
|
243 |
+
<h2><?php _e( 'How to setup?', 'email-subscribers' ) ?></h2>
|
244 |
+
<p><?php _e( 'Once you upgrade to ', 'email-subscribers' ) ?><a target="_blank" href="https://www.icegram.com/email-subscribers-starter/?utm_source=in_app&utm_medium=give_sync&utm_campaign=es_upsale#sync_give_donors"><?php _e( 'Email Subscribers Starter',
|
245 |
+
'email-subscribers' ) ?></a>, <?php _e( 'you will have settings panel where you need to enable Give integration and select the list in which you want to add people whenever they make donation.', 'email-subscribers' ) ?></p>
|
246 |
+
<hr>
|
247 |
+
<p class="help"><?php _e( 'Checkout ', 'email-subscribers' ) ?><a target="_blank" href="https://www.icegram.com/email-subscribers-pricing/?utm_source=in_app&utm_medium=give_sync&utm_campaign=es_upsale#sync_give_donors">Email Subscribers Starter</a> Now</p>
|
248 |
+
</div>
|
249 |
+
<?php $content = ob_get_clean(); ?>
|
250 |
+
|
251 |
+
<a target="_blank" href="https://www.icegram.com/email-subscribers-starter/?utm_source=in_app&utm_medium=give_sync&utm_campaign=es_upsale#sync_give_donors">
|
252 |
+
<img src=" <?php echo EMAIL_SUBSCRIBERS_URL . '/admin/images/give-sync.png' ?> "/>
|
253 |
+
</a>
|
254 |
+
|
255 |
+
<?php
|
256 |
+
|
257 |
+
ES_Common::prepare_information_box( $info, $content );
|
258 |
+
|
259 |
+
?>
|
260 |
+
|
261 |
+
<?php
|
262 |
+
}
|
263 |
+
|
264 |
+
function ig_es_add_wpforms_tab_settings( $tab_options ) {
|
265 |
+
|
266 |
+
$info = array(
|
267 |
+
'type' => 'info',
|
268 |
+
);
|
269 |
+
|
270 |
+
ob_start();
|
271 |
+
?>
|
272 |
+
<div class="">
|
273 |
+
<h2><?php _e( 'Sync Donors', 'email-subscribers' ) ?></h2>
|
274 |
+
<p><?php _e( 'Are you using Give WordPress plugin to collect donations? Want to send Thank You email to them? You can use this integration to be in touch with them.', 'email-subscribers' ) ?></p>
|
275 |
+
<h2><?php _e( 'How to setup?', 'email-subscribers' ) ?></h2>
|
276 |
+
<p><?php _e( 'Once you upgrade to ', 'email-subscribers' ) ?><a target="_blank" href="https://www.icegram.com/email-subscribers-starter/?utm_source=in_app&utm_medium=wpforms_sync&utm_campaign=es_upsale#sync_wpforms_contacts"><?php _e( 'Email Subscribers Starter',
|
277 |
+
'email-subscribers' ) ?></a>, <?php _e( 'you will have settings panel where you need to enable Give sync and select the list in which you want to add people whenever they make donation.', 'email-subscribers' ) ?></p>
|
278 |
+
<hr>
|
279 |
+
<p class="help"><?php _e( 'Checkout ', 'email-subscribers' ) ?><a target="_blank" href="https://www.icegram.com/email-subscribers-pricing/?utm_source=in_app&utm_medium=wpforms_sync&utm_campaign=es_upsale#sync_wpforms_contacts">Email Subscribers Starter</a> Now</p>
|
280 |
+
</div>
|
281 |
+
<?php $content = ob_get_clean(); ?>
|
282 |
+
|
283 |
+
<a target="_blank" href="https://www.icegram.com/email-subscribers-starter/?utm_source=in_app&utm_medium=wpforms_sync&utm_campaign=es_upsale#sync_wpforms_contacts">
|
284 |
+
<img src=" <?php echo EMAIL_SUBSCRIBERS_URL . '/admin/images/wpforms-sync.png' ?> "/>
|
285 |
+
</a>
|
286 |
+
|
287 |
+
<?php
|
288 |
+
|
289 |
+
ES_Common::prepare_information_box( $info, $content );
|
290 |
+
|
291 |
+
?>
|
292 |
+
|
293 |
+
<?php
|
294 |
+
}
|
295 |
+
|
296 |
+
function ig_es_add_ninja_forms_tab_settings( $tab_options ) {
|
297 |
+
|
298 |
+
$info = array(
|
299 |
+
'type' => 'info',
|
300 |
+
);
|
301 |
+
|
302 |
+
ob_start();
|
303 |
+
?>
|
304 |
+
<div class="">
|
305 |
+
<h2><?php _e( 'Sync Contacts', 'email-subscribers' ) ?></h2>
|
306 |
+
<p><?php _e( 'We found that you are using Ninja Forms. Want to add your contact to a mailing list? You can use this integration to add your contact to add into mailing list', 'email-subscribers' ) ?></p>
|
307 |
+
<h2><?php _e( 'How to setup?', 'email-subscribers' ) ?></h2>
|
308 |
+
<p><?php _e( 'Once you upgrade to ', 'email-subscribers' ) ?><a target="_blank" href="https://www.icegram.com/email-subscribers-starter/?utm_source=in_app&utm_medium=ninja_forms_sync&utm_campaign=es_upsale#sync_ninja_forms_contacts"><?php _e( 'Email Subscribers Starter',
|
309 |
+
'email-subscribers' ) ?></a>, <?php _e( 'you will have settings panel where you need to enable Give sync and select the list in which you want to add people whenever they make donation.', 'email-subscribers' ) ?></p>
|
310 |
+
<hr>
|
311 |
+
<p class="help"><?php _e( 'Checkout ', 'email-subscribers' ) ?><a target="_blank" href="https://www.icegram.com/email-subscribers-pricing/?utm_source=in_app&utm_medium=ninja_forms_sync&utm_campaign=es_upsale#sync_ninja_forms_contacts">Email Subscribers Starter</a> Now</p>
|
312 |
+
</div>
|
313 |
+
<?php $content = ob_get_clean(); ?>
|
314 |
+
|
315 |
+
<a target="_blank" href="https://www.icegram.com/email-subscribers-starter/?utm_source=in_app&utm_medium=ninja_forms_sync&utm_campaign=es_upsale#sync_ninja_forms_contacts">
|
316 |
+
<img src=" <?php echo EMAIL_SUBSCRIBERS_URL . '/admin/images/ninja-forms-sync.png' ?> "/>
|
317 |
+
</a>
|
318 |
+
|
319 |
+
<?php
|
320 |
+
|
321 |
+
ES_Common::prepare_information_box( $info, $content );
|
322 |
+
|
323 |
+
?>
|
324 |
+
|
325 |
+
<?php
|
326 |
+
}
|
327 |
+
|
328 |
+
function ig_es_add_edd_tab_settings( $tab_options ) {
|
329 |
+
|
330 |
+
$info = array(
|
331 |
+
'type' => 'info',
|
332 |
+
);
|
333 |
+
|
334 |
+
ob_start();
|
335 |
+
?>
|
336 |
+
<div class="">
|
337 |
+
<h2><?php _e( 'Sync Customers', 'email-subscribers' ) ?></h2>
|
338 |
+
<p><?php _e( 'We found that you are using EDD to sell digital goods online. You can use this integration to send Newsletters/ Post Notifications to your customers.', 'email-subscribers' ) ?></p>
|
339 |
+
<h2><?php _e( 'How to setup?', 'email-subscribers' ) ?></h2>
|
340 |
+
<p><?php _e( 'Once you upgrade to ', 'email-subscribers' ) ?><a target="_blank" href="https://www.icegram.com/email-subscribers-starter/?utm_source=in_app&utm_medium=edd_sync&utm_campaign=es_upsale#sync_edd_customers"><?php _e( 'Email Subscribers Starter',
|
341 |
+
'email-subscribers' ) ?></a>, <?php _e( 'you will have settings panel where you need to enable EDD sync and select the list in which you want to add people whenever they purchase something from you.', 'email-subscribers' ) ?></p>
|
342 |
+
<hr>
|
343 |
+
<p class="help"><?php _e( 'Checkout ', 'email-subscribers' ) ?><a target="_blank" href="https://www.icegram.com/email-subscribers-pricing/?utm_source=in_app&utm_medium=edd_sync&utm_campaign=es_upsale#sync_edd_customers">Email Subscribers Starter</a> Now</p>
|
344 |
+
</div>
|
345 |
+
<?php $content = ob_get_clean(); ?>
|
346 |
+
|
347 |
+
<a target="_blank" href="https://www.icegram.com/email-subscribers/?utm_source=in_app&utm_medium=edd_sync&utm_campaign=es_upsale#sync_edd_customers">
|
348 |
+
<img src=" <?php echo EMAIL_SUBSCRIBERS_URL . '/admin/images/edd-sync.png' ?> "/>
|
349 |
+
</a>
|
350 |
+
|
351 |
+
<?php
|
352 |
+
|
353 |
+
ES_Common::prepare_information_box( $info, $content );
|
354 |
+
|
355 |
+
?>
|
356 |
+
|
357 |
+
<?php
|
358 |
+
}
|
359 |
+
|
360 |
+
|
361 |
function add_spam_score_utm_link() {
|
362 |
global $post, $pagenow, $ig_es_tracker;
|
363 |
if ( $post->post_type !== 'es_template' ) {
|
367 |
$all_plugins = $ig_es_tracker::get_plugins();
|
368 |
|
369 |
if ( ! in_array( $es_premium, $all_plugins ) ) {
|
370 |
+
?>
|
371 |
+
<script>
|
372 |
+
jQuery('#submitdiv').after('<div class="es_upsale"><a style="text-decoration:none;" target="_blank" href="https://www.icegram.com/documentation/how-ready-made-template-in-in-email-subscribers-look/?utm_source=in_app&utm_medium=es_template&utm_campaign=es_upsale"><img title="Get readymade templates" style="width:100%;border:0.3em #d46307 solid" src="<?php echo EMAIL_SUBSCRIBERS_URL?>/admin/images/starter-tmpl.png"/><p style="background: #d46307; color: #FFF; padding: 4px; width: 100%; text-align:center">Get readymade beautiful email templates</p></a></div>');
|
373 |
+
</script>
|
374 |
+
<?php
|
375 |
+
}
|
376 |
}
|
377 |
|
378 |
|
public/class-email-subscribers-public.php
CHANGED
@@ -183,6 +183,12 @@ class Email_Subscribers_Public {
|
|
183 |
$subject = ES_Mailer::prepare_welcome_email_subject( $data );
|
184 |
ES_Mailer::send( $email, $subject, $content );
|
185 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
186 |
}
|
187 |
|
188 |
do_action( 'es_redirect_to_optin_page', $option );
|
183 |
$subject = ES_Mailer::prepare_welcome_email_subject( $data );
|
184 |
ES_Mailer::send( $email, $subject, $content );
|
185 |
}
|
186 |
+
|
187 |
+
$lists = ES_DB_Lists::get_all_lists_name_by_contact( $db_id );
|
188 |
+
$list_name = implode( ", ", $lists );
|
189 |
+
|
190 |
+
$data['list_name'] = $list_name;
|
191 |
+
ES_Common::send_signup_notification_to_admins( $data );
|
192 |
}
|
193 |
|
194 |
do_action( 'es_redirect_to_optin_page', $option );
|
public/js/email-subscribers-public.js
CHANGED
@@ -111,7 +111,6 @@
|
|
111 |
}
|
112 |
|
113 |
$(document).ready(function () {
|
114 |
-
|
115 |
// var submitButton = $('.es_subscription_form_submit');
|
116 |
|
117 |
$(document).on('submit', '.es_subscription_form', function (e) {
|
@@ -120,19 +119,19 @@
|
|
120 |
handleBindFunction(form);
|
121 |
});
|
122 |
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
});
|
133 |
});
|
134 |
-
}
|
135 |
-
}
|
136 |
-
|
137 |
});
|
138 |
})(jQuery);
|
|
|
|
111 |
}
|
112 |
|
113 |
$(document).ready(function () {
|
|
|
114 |
// var submitButton = $('.es_subscription_form_submit');
|
115 |
|
116 |
$(document).on('submit', '.es_subscription_form', function (e) {
|
119 |
handleBindFunction(form);
|
120 |
});
|
121 |
|
122 |
+
});
|
123 |
+
// Compatibility of ES with IG
|
124 |
+
jQuery( window ).on( "init.icegram", function(e, ig) {
|
125 |
+
if(typeof ig !== 'undefined' && typeof ig.messages !== 'undefined' ) {
|
126 |
+
jQuery('.icegram .es_shortcode_form, .icegram form[data-source="ig-es"]').each(function(i, v){
|
127 |
+
jQuery(v).bind('submit', function (e) {
|
128 |
+
e.preventDefault();
|
129 |
+
var form = $(this);
|
130 |
+
handleBindFunction(form, true);
|
|
|
131 |
});
|
132 |
+
});
|
133 |
+
}
|
|
|
134 |
});
|
135 |
})(jQuery);
|
136 |
+
|
137 |
+
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Author URI: https://www.icegram.com/
|
|
5 |
Tags: subscription, newsletter, email marketing, post notification, email newsletter form, email signup, email widget, newsletter signup, subscribe, subscription form, bulk emails, signup form, list builder, lead generation, welcome email, contacts
|
6 |
Requires at least: 3.9
|
7 |
Tested up to: 5.2.2
|
8 |
-
Stable tag: 4.1.
|
9 |
License: GPLv3
|
10 |
License URI: http://www.gnu.org/licenses
|
11 |
|
@@ -305,6 +305,12 @@ Use our free plugin [Email Subscribers - Group Selector](https://wordpress.org/p
|
|
305 |
|
306 |
== Changelog ==
|
307 |
|
|
|
|
|
|
|
|
|
|
|
|
|
308 |
= 4.1.8 (16.07.2019) =
|
309 |
* New: Now, admin can add/ edit First Name & Last Name of subscribers.
|
310 |
* Fix: Fixed Vulnerabilities (Thanks Tin Duong of Fortinet's FortiGuard Labs, WordPress Plugin Review Team & Ihor Voschyk for reporting)
|
5 |
Tags: subscription, newsletter, email marketing, post notification, email newsletter form, email signup, email widget, newsletter signup, subscribe, subscription form, bulk emails, signup form, list builder, lead generation, welcome email, contacts
|
6 |
Requires at least: 3.9
|
7 |
Tested up to: 5.2.2
|
8 |
+
Stable tag: 4.1.9
|
9 |
License: GPLv3
|
10 |
License URI: http://www.gnu.org/licenses
|
11 |
|
305 |
|
306 |
== Changelog ==
|
307 |
|
308 |
+
= 4.1.9 (25.07.2019) =
|
309 |
+
* Update: Admin notification will be sent out only after contacts confirm their subscription
|
310 |
+
* Update: Show Post Notifications categories in campaigns view
|
311 |
+
* Fix: Sort contacts by name
|
312 |
+
* Fix: Email Notification formatting issue
|
313 |
+
|
314 |
= 4.1.8 (16.07.2019) =
|
315 |
* New: Now, admin can add/ edit First Name & Last Name of subscribers.
|
316 |
* Fix: Fixed Vulnerabilities (Thanks Tin Duong of Fortinet's FortiGuard Labs, WordPress Plugin Review Team & Ihor Voschyk for reporting)
|