Version Description
- SVN Deleted files fix
Download this release
Release Info
Developer | satollo |
Plugin | Newsletter |
Version | 5.4.2 |
Comparing to | |
See all releases |
Code changes from version 5.4.1 to 5.4.2
- emails/blocks/html/blockx.php +0 -27
- emails/tnp-composer/blocks/content-01-hero.block.png +0 -0
- emails/tnp-composer/blocks/content-02-heading.block.png +0 -0
- emails/tnp-composer/blocks/content-03-text.block.png +0 -0
- emails/tnp-composer/blocks/content-05-image.block.png +0 -0
- emails/tnp-composer/blocks/content-06-posts.block.php +0 -88
- emails/tnp-composer/blocks/content-06-posts.block.png +0 -0
- emails/tnp-composer/blocks/content-07-twocols.block.php +0 -109
- emails/tnp-composer/blocks/content-07-twocols.block.png +0 -0
- emails/tnp-composer/blocks/footer-01-footer.block.png +0 -0
- emails/tnp-composer/blocks/footer-02-canspam.block.png +0 -0
- emails/tnp-composer/blocks/footer-03-social.block.png +0 -0
- emails/tnp-composer/blocks/header-01-header.block.png +0 -0
- main/diagnostic.php +0 -406
- plugin.php +2 -2
- readme.txt +5 -1
emails/blocks/html/blockx.php
DELETED
@@ -1,27 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
* Name: Html
|
4 |
-
* Section: content
|
5 |
-
* Description: Free HTML block
|
6 |
-
*
|
7 |
-
*/
|
8 |
-
|
9 |
-
/* @var $options array */
|
10 |
-
/* @var $wpdb wpdb */
|
11 |
-
|
12 |
-
$default_options = array(
|
13 |
-
'html'=>'<p>My <strong>HTML</strong> code<p>'
|
14 |
-
);
|
15 |
-
|
16 |
-
$options = array_merge($default_options, $options);
|
17 |
-
|
18 |
-
?>
|
19 |
-
|
20 |
-
<table width="100%" border="0" cellpadding="0" align="center" cellspacing="0">
|
21 |
-
<tr>
|
22 |
-
<td width="100%" valign="top" align="center">
|
23 |
-
<?php echo $options['html'] ?>
|
24 |
-
</td>
|
25 |
-
</tr>
|
26 |
-
</table>
|
27 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
emails/tnp-composer/blocks/content-01-hero.block.png
CHANGED
File without changes
|
emails/tnp-composer/blocks/content-02-heading.block.png
CHANGED
File without changes
|
emails/tnp-composer/blocks/content-03-text.block.png
CHANGED
File without changes
|
emails/tnp-composer/blocks/content-05-image.block.png
CHANGED
File without changes
|
emails/tnp-composer/blocks/content-06-posts.block.php
DELETED
@@ -1,88 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
include NEWSLETTER_INCLUDES_DIR . '/helper.php';
|
3 |
-
|
4 |
-
$filters = array();
|
5 |
-
$filters['showposts'] = isset($_POST['num']) ? intval($_POST['num']) : 3;
|
6 |
-
if (!empty($_POST['categories'])) {
|
7 |
-
$filters['category__in'] = $_POST['categories'];
|
8 |
-
}
|
9 |
-
if (!empty($_POST['tags'])) {
|
10 |
-
$filters['tag'] = $_POST['tags'];
|
11 |
-
}
|
12 |
-
$posts = get_posts($filters);
|
13 |
-
|
14 |
-
$bgcolor = isset($_POST['bgcolor']) ? $_POST['bgcolor'] : '#E6E9ED';
|
15 |
-
|
16 |
-
?>
|
17 |
-
|
18 |
-
<!-- COMPACT ARTICLE SECTION -->
|
19 |
-
<table border="0" cellpadding="0" cellspacing="0" width="100%" class="tnpc-row tnpc-row-posts" data-id="content-06" data-block="content-06-posts">
|
20 |
-
<tr>
|
21 |
-
<td bgcolor="<?php echo $bgcolor ?>" align="center" style="padding: 70px 15px 70px 15px;" class="section-padding edit-block">
|
22 |
-
|
23 |
-
<table border="0" cellpadding="0" cellspacing="0" width="500" style="padding:0 0 20px 0;" class="responsive-table">
|
24 |
-
<!-- TITLE -->
|
25 |
-
<tr>
|
26 |
-
<td align="center" style="padding: 0 0 10px 0; font-size: 25px; font-family: Helvetica, Arial, sans-serif; font-weight: normal; color: #333333;" class="padding-copy tnpc-row-edit" data-type="title" colspan="2">From Our Blog</td>
|
27 |
-
</tr>
|
28 |
-
|
29 |
-
<?php foreach ($posts AS $post) { ?>
|
30 |
-
|
31 |
-
<tr>
|
32 |
-
<td valign="top" style="padding: 40px 0 0 0;" class="mobile-hide tnpc-row-edit" data-type="image">
|
33 |
-
<a href="<?php echo tnp_post_permalink($post) ?>" target="_blank">
|
34 |
-
<img src="<?php echo tnp_post_thumbnail_src($post) ?>" width="105" height="105" border="0" style="display: block; font-family: Arial; color: #666666; font-size: 14px; width: 105px!important; height: 105px!important;">
|
35 |
-
</a>
|
36 |
-
</td>
|
37 |
-
<td style="padding: 40px 0 0 0;" class="no-padding">
|
38 |
-
<!-- ARTICLE -->
|
39 |
-
<table border="0" cellspacing="0" cellpadding="0" width="100%">
|
40 |
-
<tr>
|
41 |
-
<td align="left" style="padding: 0 0 5px 25px; font-size: 13px; font-family: Helvetica, Arial, sans-serif; font-weight: normal; color: #aaaaaa;" class="padding-meta">
|
42 |
-
<?php echo tnp_post_date($post) ?>
|
43 |
-
</td>
|
44 |
-
</tr>
|
45 |
-
<tr>
|
46 |
-
<td align="left" style="padding: 0 0 5px 25px; font-size: 22px; font-family: Helvetica, Arial, sans-serif; font-weight: normal; color: #333333;" class="padding-copy tnpc-row-edit" data-type="title">
|
47 |
-
<?php echo tnp_post_title($post) ?>
|
48 |
-
</td>
|
49 |
-
</tr>
|
50 |
-
<tr>
|
51 |
-
<td align="left" style="padding: 10px 0 15px 25px; font-size: 16px; line-height: 24px; font-family: Helvetica, Arial, sans-serif; color: #666666;" class="padding-copy tnpc-row-edit" data-type="text">
|
52 |
-
<?php echo tnp_post_excerpt($post) ?>
|
53 |
-
</td>
|
54 |
-
</tr>
|
55 |
-
<tr>
|
56 |
-
<td style="padding:0 0 45px 25px;" align="left" class="padding">
|
57 |
-
<table border="0" cellspacing="0" cellpadding="0" class="mobile-button-container">
|
58 |
-
<tr>
|
59 |
-
<td align="center">
|
60 |
-
<!-- BULLETPROOF BUTTON -->
|
61 |
-
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="mobile-button-container">
|
62 |
-
<tr>
|
63 |
-
<td align="center" style="padding: 0;" class="padding-copy">
|
64 |
-
<table border="0" cellspacing="0" cellpadding="0" class="responsive-table">
|
65 |
-
<tr>
|
66 |
-
<td align="center">
|
67 |
-
<a href="<?php echo tnp_post_permalink($post) ?>" target="_blank" style="font-size: 15px; font-family: Helvetica, Arial, sans-serif; font-weight: normal; color: #ffffff; text-decoration: none; background-color: #256F9C; border-top: 10px solid #256F9C; border-bottom: 10px solid #256F9C; border-left: 20px solid #256F9C; border-right: 20px solid #256F9C; border-radius: 3px; -webkit-border-radius: 3px; -moz-border-radius: 3px; display: inline-block;" class="mobile-button tnpc-row-edit" data-type="link">Go To Article →</a>
|
68 |
-
</td>
|
69 |
-
</tr>
|
70 |
-
</table>
|
71 |
-
</td>
|
72 |
-
</tr>
|
73 |
-
</table>
|
74 |
-
</td>
|
75 |
-
</tr>
|
76 |
-
</table>
|
77 |
-
</td>
|
78 |
-
</tr>
|
79 |
-
</table>
|
80 |
-
</td>
|
81 |
-
</tr>
|
82 |
-
|
83 |
-
<?php } ?>
|
84 |
-
|
85 |
-
</table>
|
86 |
-
</td>
|
87 |
-
</tr>
|
88 |
-
</table>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
emails/tnp-composer/blocks/content-06-posts.block.png
DELETED
Binary file
|
emails/tnp-composer/blocks/content-07-twocols.block.php
DELETED
@@ -1,109 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
include NEWSLETTER_INCLUDES_DIR . '/helper.php';
|
3 |
-
|
4 |
-
$filters = array();
|
5 |
-
$filters['showposts'] = isset($_POST['num']) ? intval($_POST['num']) : 3;
|
6 |
-
if (!empty($_POST['categories'])) {
|
7 |
-
$filters['category__in'] = $_POST['categories'];
|
8 |
-
}
|
9 |
-
if (!empty($_POST['tags'])) {
|
10 |
-
$filters['tag'] = $_POST['tags'];
|
11 |
-
}
|
12 |
-
$posts = get_posts($filters);
|
13 |
-
|
14 |
-
$bgcolor = isset($_POST['bgcolor']) ? $_POST['bgcolor'] : '#E6E9ED';
|
15 |
-
|
16 |
-
?>
|
17 |
-
|
18 |
-
<!-- TWO COLUMN SECTION -->
|
19 |
-
<table border="0" cellpadding="0" cellspacing="0" width="100%" class="tnpc-row tnpc-row-posts" data-id="content-07" data-block="content-07-twocols">
|
20 |
-
<tr>
|
21 |
-
<td bgcolor="<?php echo $bgcolor ?>" align="center" style="padding: 70px 15px 70px 15px;" class="section-padding edit-block">
|
22 |
-
<table border="0" cellpadding="0" cellspacing="0" width="500" class="responsive-table">
|
23 |
-
<tr>
|
24 |
-
<td>
|
25 |
-
<!-- TITLE SECTION AND COPY -->
|
26 |
-
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
27 |
-
<tr>
|
28 |
-
<td align="center" style="font-size: 25px; font-family: Helvetica, Arial, sans-serif; color: #333333;" class="padding-copy tnpc-row-edit" data-type="title">Great News!</td>
|
29 |
-
</tr>
|
30 |
-
<tr>
|
31 |
-
<td align="center" style="padding: 20px 0 20px 0; font-size: 16px; line-height: 25px; font-family: Helvetica, Arial, sans-serif; color: #666666;" class="padding-copy tnpc-row-edit" data-type="text">The twelve jurors were all writing very busily on slates.</td>
|
32 |
-
</tr>
|
33 |
-
</table>
|
34 |
-
</td>
|
35 |
-
</tr>
|
36 |
-
<tr>
|
37 |
-
<td>
|
38 |
-
<!-- TWO COLUMNS -->
|
39 |
-
<table cellspacing="0" cellpadding="0" border="0" width="100%">
|
40 |
-
<?php foreach (array_chunk($posts, 2) AS $row) { ?>
|
41 |
-
<tr>
|
42 |
-
<td valign="top" style="padding: 0;" class="mobile-wrapper">
|
43 |
-
|
44 |
-
<!-- LEFT COLUMN -->
|
45 |
-
<table cellpadding="0" cellspacing="0" border="0" width="47%" align="left" class="responsive-table">
|
46 |
-
<tr>
|
47 |
-
<td style="padding: 20px 0 40px 0;">
|
48 |
-
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
49 |
-
<tr>
|
50 |
-
<td align="center" bgcolor="#F5F7FA" valign="middle" class="tnpc-row-edit" data-type="image">
|
51 |
-
<a href="<?php echo tnp_post_permalink($row[0]) ?>" target="_blank">
|
52 |
-
<img src="<?php echo tnp_post_thumbnail_src($row[0], array(240, 160)) ?>" width="240" height="160" style="display: block; color: #666666; font-family: Helvetica, arial, sans-serif; font-size: 13px; width: 240px; height: 160px;" border="0" class="img-max">
|
53 |
-
</a>
|
54 |
-
</td>
|
55 |
-
</tr>
|
56 |
-
<tr>
|
57 |
-
<td align="center" style="padding: 15px 0 0 0; font-family: Arial, sans-serif; color: #333333; font-size: 20px;" bgcolor="#F5F7FA" class="tnpc-row-edit" data-type="title"><?php echo tnp_post_title($row[0]) ?></td>
|
58 |
-
</tr>
|
59 |
-
<tr>
|
60 |
-
<td align="center" style="padding: 5px 0 0 0; font-family: Arial, sans-serif; color: #666666; font-size: 14px; line-height: 20px;" bgcolor="#F5F7FA" class="tnpc-row-edit" data-type="text"><?php echo tnp_post_excerpt($row[0]) ?></td>
|
61 |
-
</tr>
|
62 |
-
<tr>
|
63 |
-
<td align="center" style="padding: 5px 0 0 0; font-family: Arial, sans-serif; color: #666666; font-size: 14px; line-height: 20px;" bgcolor="#F5F7FA"><a href="<?php echo tnp_post_permalink($row[0]) ?>" style="color: #256F9C; text-decoration: none;" class="tnpc-row-edit" data-type="link">Go To Article →</a></td>
|
64 |
-
</tr>
|
65 |
-
</table>
|
66 |
-
</td>
|
67 |
-
</tr>
|
68 |
-
</table>
|
69 |
-
|
70 |
-
<?php if (!empty($row[1])) { ?>
|
71 |
-
<!-- RIGHT COLUMN -->
|
72 |
-
<table cellpadding="0" cellspacing="0" border="0" width="47%" align="right" class="responsive-table">
|
73 |
-
<tr>
|
74 |
-
<td style="padding: 20px 0 40px 0;">
|
75 |
-
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
76 |
-
<tr>
|
77 |
-
<td align="center" bgcolor="#F5F7FA" valign="middle" class="tnpc-row-edit" data-type="image">
|
78 |
-
<a href="<?php echo tnp_post_permalink($row[1]) ?>" target="_blank">
|
79 |
-
<img src="<?php echo tnp_post_thumbnail_src($row[1], array(240, 160)) ?>" width="240" height="160" style="display: block; color: #666666; font-family: Helvetica, arial, sans-serif; font-size: 13px; width: 240px; height: 160px;" border="0" class="img-max">
|
80 |
-
</a>
|
81 |
-
</td>
|
82 |
-
</tr>
|
83 |
-
<tr>
|
84 |
-
<td align="center" style="padding: 15px 0 0 0; font-family: Arial, sans-serif; color: #333333; font-size: 20px;" bgcolor="#F5F7FA" class="tnpc-row-edit" data-type="title"><?php echo tnp_post_title($row[1]) ?></td>
|
85 |
-
</tr>
|
86 |
-
<tr>
|
87 |
-
<td align="center" style="padding: 5px 0 0 0; font-family: Arial, sans-serif; color: #666666; font-size: 14px; line-height: 20px;" bgcolor="#F5F7FA" class="tnpc-row-edit" data-type="text"><?php echo tnp_post_excerpt($row[1]) ?></td>
|
88 |
-
</tr>
|
89 |
-
<tr>
|
90 |
-
<td align="center" style="padding: 5px 0 0 0; font-family: Arial, sans-serif; color: #666666; font-size: 14px; line-height: 20px;" bgcolor="#F5F7FA"><a href="<?php echo tnp_post_permalink($row[1]) ?>" style="color: #256F9C; text-decoration: none;" class="tnpc-row-edit" data-type="link">Go To Article →</a></td>
|
91 |
-
</tr>
|
92 |
-
</table>
|
93 |
-
</td>
|
94 |
-
</tr>
|
95 |
-
</table>
|
96 |
-
<?php } ?>
|
97 |
-
|
98 |
-
</td>
|
99 |
-
</tr>
|
100 |
-
|
101 |
-
<?php } ?>
|
102 |
-
|
103 |
-
</table>
|
104 |
-
</td>
|
105 |
-
</tr>
|
106 |
-
</table>
|
107 |
-
</td>
|
108 |
-
</tr>
|
109 |
-
</table>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
emails/tnp-composer/blocks/content-07-twocols.block.png
DELETED
Binary file
|
emails/tnp-composer/blocks/footer-01-footer.block.png
CHANGED
File without changes
|
emails/tnp-composer/blocks/footer-02-canspam.block.png
CHANGED
File without changes
|
emails/tnp-composer/blocks/footer-03-social.block.png
CHANGED
File without changes
|
emails/tnp-composer/blocks/header-01-header.block.png
CHANGED
File without changes
|
main/diagnostic.php
DELETED
@@ -1,406 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
if (!defined('ABSPATH'))
|
3 |
-
exit;
|
4 |
-
|
5 |
-
@include_once NEWSLETTER_INCLUDES_DIR . '/controls.php';
|
6 |
-
$module = Newsletter::instance();
|
7 |
-
$controls = new NewsletterControls();
|
8 |
-
|
9 |
-
if ($controls->is_action('save')) {
|
10 |
-
update_option('newsletter_log_level', $controls->data['log_level']);
|
11 |
-
update_option('newsletter_diagnostic', $controls->data);
|
12 |
-
$controls->messages = 'Loggin levels saved.';
|
13 |
-
}
|
14 |
-
|
15 |
-
if ($controls->is_action('reset_cron_calls')) {
|
16 |
-
update_option($module->prefix . '_cron_calls', false);
|
17 |
-
$controls->messages = 'Reset.';
|
18 |
-
}
|
19 |
-
if ($controls->is_action('check-versions')) {
|
20 |
-
$newsletter->hook_newsletter_extension_versions(true);
|
21 |
-
$controls->messages = 'Extensions data updated. Go to the plugins panel to see if there are updates available.';
|
22 |
-
}
|
23 |
-
|
24 |
-
if ($controls->is_action('trigger')) {
|
25 |
-
$newsletter->hook_newsletter();
|
26 |
-
$controls->messages = 'Delivery engine triggered.';
|
27 |
-
}
|
28 |
-
|
29 |
-
if ($controls->is_action('undismiss')) {
|
30 |
-
update_option('newsletter_dismissed', array());
|
31 |
-
$controls->messages = 'Notices restored.';
|
32 |
-
}
|
33 |
-
|
34 |
-
if ($controls->is_action('trigger_followup')) {
|
35 |
-
NewsletterFollowup::instance()->send();
|
36 |
-
$controls->messages = 'Follow up delivery engine triggered.';
|
37 |
-
}
|
38 |
-
|
39 |
-
if ($controls->is_action('engine_on')) {
|
40 |
-
wp_clear_scheduled_hook('newsletter');
|
41 |
-
wp_schedule_event(time() + 30, 'newsletter', 'newsletter');
|
42 |
-
$controls->messages = 'Delivery engine reactivated.';
|
43 |
-
}
|
44 |
-
|
45 |
-
if ($controls->is_action('reset_stats')) {
|
46 |
-
update_option('newsletter_diagnostic_cron_calls', array(), false);
|
47 |
-
$controls->messages = 'Scheduler statistics reset.';
|
48 |
-
}
|
49 |
-
|
50 |
-
if ($controls->is_action('upgrade')) {
|
51 |
-
// TODO: Compact them in a call to Newsletter which should be able to manage the installed modules
|
52 |
-
Newsletter::instance()->upgrade();
|
53 |
-
NewsletterUsers::instance()->upgrade();
|
54 |
-
NewsletterSubscription::instance()->upgrade();
|
55 |
-
NewsletterEmails::instance()->upgrade();
|
56 |
-
NewsletterStatistics::instance()->upgrade();
|
57 |
-
if (method_exists('NewsletterFollowup', 'upgrade')) {
|
58 |
-
NewsletterFollowup::instance()->upgrade();
|
59 |
-
}
|
60 |
-
$controls->messages = 'Upgrade forced!';
|
61 |
-
}
|
62 |
-
|
63 |
-
if ($controls->is_action('upgrade_old')) {
|
64 |
-
$row = $wpdb->get_row("select * from " . NEWSLETTER_USERS_TABLE . " limit 1");
|
65 |
-
if (!isset($row->id)) {
|
66 |
-
$row = $wpdb->query("alter table " . NEWSLETTER_USERS_TABLE . " drop primary key");
|
67 |
-
$row = $wpdb->query("alter table " . NEWSLETTER_USERS_TABLE . " add column id int not null auto_increment primary key");
|
68 |
-
$row = $wpdb->query("alter table " . NEWSLETTER_USERS_TABLE . " add unique email (email)");
|
69 |
-
}
|
70 |
-
$controls->messages = 'Done.';
|
71 |
-
}
|
72 |
-
|
73 |
-
if ($controls->is_action('delete_transient')) {
|
74 |
-
delete_transient($_POST['btn']);
|
75 |
-
// Found blogs where timeout has been lost and the transient never deleted
|
76 |
-
delete_option('_transient_newsletter_main_engine');
|
77 |
-
delete_option('_transient_timeout_newsletter_main_engine');
|
78 |
-
$controls->messages = 'Deleted.';
|
79 |
-
}
|
80 |
-
|
81 |
-
if ($controls->is_action('test')) {
|
82 |
-
|
83 |
-
if (!NewsletterModule::is_email($controls->data['test_email'])) {
|
84 |
-
$controls->errors = 'The test email address is not set or is not correct.';
|
85 |
-
}
|
86 |
-
|
87 |
-
if (empty($controls->errors)) {
|
88 |
-
|
89 |
-
if ($controls->data['test_email'] == $module->options['sender_email']) {
|
90 |
-
$controls->messages .= '<strong>Warning:</strong> you are using as test email the same address configured as sender in main configuration. Test can fail because of that.<br>';
|
91 |
-
}
|
92 |
-
|
93 |
-
// Direct WordPress email
|
94 |
-
$text = 'This is a simple test email sent directly with the WordPress mailing functionality' . "\r\n" .
|
95 |
-
'in the same way WordPress sends notifications of new comment or registered users.' . "\r\n\r\n" .
|
96 |
-
'This email is in pure text format and the sender should be wordpress@youdomain.tld' . "\r\n" .
|
97 |
-
'(but it can be forced to be different with specific plugins.';
|
98 |
-
|
99 |
-
$r = wp_mail($controls->data['test_email'], 'WordPress test email at ' . date(DATE_ISO8601), $text);
|
100 |
-
$controls->messages .= 'Email sent with WordPress: ';
|
101 |
-
if ($r) {
|
102 |
-
$controls->messages .= '<strong>SUCCESS</strong><br>';
|
103 |
-
} else {
|
104 |
-
global $phpmailer;
|
105 |
-
$controls->messages .= '<strong>FAILED</strong> (' . $phpmailer->ErrorInfo . ')<br>';
|
106 |
-
}
|
107 |
-
|
108 |
-
// Newsletter mail
|
109 |
-
$text = array();
|
110 |
-
$text['html'] = '<p>This is an <b>HTML</b> test email sent using the sender data set on Newsletter main setting. <a href="https://www.thenewsletterplugin.com">This is a link to an external site</a>.</p>';
|
111 |
-
$text['text'] = 'This is a textual test email part sent using the sender data set on Newsletter main setting.';
|
112 |
-
$r = $module->mail($controls->data['test_email'], 'Newsletter test email at ' . date(DATE_ISO8601), $text);
|
113 |
-
|
114 |
-
$controls->messages .= 'Email sent with Newsletter';
|
115 |
-
if ($module->mail_method) {
|
116 |
-
$controls->messages .= ' (with a mail delivery extension)';
|
117 |
-
} else {
|
118 |
-
$smtp_options = $module->get_smtp_options();
|
119 |
-
|
120 |
-
if (!empty($smtp_options['enabled'])) {
|
121 |
-
$controls->messages .= ' (with an SMTP)';
|
122 |
-
}
|
123 |
-
}
|
124 |
-
$controls->messages .= ': ';
|
125 |
-
|
126 |
-
if ($r) {
|
127 |
-
$controls->messages .= '<strong>SUCCESS</strong><br>';
|
128 |
-
} else {
|
129 |
-
$controls->messages .= '<strong>FAILED</strong> (' . $module->mail_last_error . ')<br>';
|
130 |
-
|
131 |
-
if ($module->mail_method) {
|
132 |
-
$controls->messages .= '- You are using a mail delivery extension. Check and test its configuration.<br>';
|
133 |
-
} else {
|
134 |
-
$smtp_options = $module->get_smtp_options();
|
135 |
-
if (!empty($smtp_options['enabled'])) {
|
136 |
-
$controls->messages .= '- You are using an SMTP (' . $smtp_options['host'] . '). Check its configuration on main configuration or on SMTP Newsletter extensions if used.<br>';
|
137 |
-
}
|
138 |
-
}
|
139 |
-
|
140 |
-
if (!empty($module->options['return_path'])) {
|
141 |
-
$controls->messages .= '- Try to remove the return path on main settings.<br>';
|
142 |
-
}
|
143 |
-
|
144 |
-
$parts = explode('@', $module->options['sender_email']);
|
145 |
-
$sitename = strtolower($_SERVER['SERVER_NAME']);
|
146 |
-
if (substr($sitename, 0, 4) == 'www.') {
|
147 |
-
$sitename = substr($sitename, 4);
|
148 |
-
}
|
149 |
-
if (strtolower($sitename) != strtolower($parts[1])) {
|
150 |
-
$controls->messages .= '- Try to set on main setting a sender address with the same domain of your blog: ' . $sitename . ' (you are using ' . $module->options['sender_email'] . ')<br>';
|
151 |
-
}
|
152 |
-
}
|
153 |
-
}
|
154 |
-
}
|
155 |
-
|
156 |
-
if (empty($controls->data)) {
|
157 |
-
$controls->data = get_option('newsletter_diagnostic');
|
158 |
-
}
|
159 |
-
|
160 |
-
$calls = get_option('newsletter_diagnostic_cron_calls', array());
|
161 |
-
|
162 |
-
if (count($calls) > 1) {
|
163 |
-
$mean = 0;
|
164 |
-
$max = 0;
|
165 |
-
$min = 0;
|
166 |
-
for ($i = 1; $i < count($calls); $i++) {
|
167 |
-
$diff = $calls[$i] - $calls[$i - 1];
|
168 |
-
$mean += $diff;
|
169 |
-
if ($min == 0 || $min > $diff) {
|
170 |
-
$min = $diff;
|
171 |
-
}
|
172 |
-
if ($max < $diff) {
|
173 |
-
$max = $diff;
|
174 |
-
}
|
175 |
-
}
|
176 |
-
$mean = $mean / (count($calls) - 1);
|
177 |
-
}
|
178 |
-
|
179 |
-
// Send calls stats
|
180 |
-
$send_calls = get_option('newsletter_diagnostic_send_calls', array());
|
181 |
-
if (count($send_calls)) {
|
182 |
-
$send_max = 0;
|
183 |
-
$send_min = PHP_INT_MAX;
|
184 |
-
$send_total_time = 0;
|
185 |
-
$send_total_emails = 0;
|
186 |
-
$send_completed = 0;
|
187 |
-
for ($i = 0; $i < count($send_calls); $i++) {
|
188 |
-
if (empty($send_calls[$i][2])) continue;
|
189 |
-
|
190 |
-
$delta = $send_calls[$i][1] - $send_calls[$i][0];
|
191 |
-
$send_total_time += $delta;
|
192 |
-
$send_total_emails += $send_calls[$i][2];
|
193 |
-
$send_mean = $delta / $send_calls[$i][2];
|
194 |
-
if ($send_min > $send_mean) {
|
195 |
-
$send_min = $send_mean;
|
196 |
-
}
|
197 |
-
if ($send_max < $send_mean) {
|
198 |
-
$send_max = $send_mean;
|
199 |
-
}
|
200 |
-
if (isset($send_calls[$i][3]))
|
201 |
-
$send_completed++;
|
202 |
-
}
|
203 |
-
$send_mean = $send_total_time / $send_total_emails;
|
204 |
-
}
|
205 |
-
?>
|
206 |
-
|
207 |
-
<div class="wrap" id="tnp-wrap">
|
208 |
-
|
209 |
-
<?php include NEWSLETTER_DIR . '/tnp-header.php'; ?>
|
210 |
-
|
211 |
-
<div id="tnp-heading">
|
212 |
-
|
213 |
-
<h2>Newsletter Diagnostic</h2>
|
214 |
-
<p>
|
215 |
-
If something is not working, here are some test procedures and diagnostics. But before you try these,
|
216 |
-
write down any configuration changes that you may have made.
|
217 |
-
For example: Did you use sender email or name? What was the return path? What was the reply to?
|
218 |
-
</p>
|
219 |
-
|
220 |
-
</div>
|
221 |
-
|
222 |
-
<div id="tnp-body">
|
223 |
-
|
224 |
-
<form method="post" action="">
|
225 |
-
<?php $controls->init(); ?>
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
<div id="tabs">
|
230 |
-
|
231 |
-
<ul>
|
232 |
-
<li><a href="#tabs-tests"><?php _e('Tests', 'newsletter') ?></a></li>
|
233 |
-
<li><a href="#tabs-2"><?php _e('Scheduler', 'newsletter') ?></a></li>
|
234 |
-
<li><a href="#tabs-logging"><?php _e('Logging', 'newsletter') ?></a></li>
|
235 |
-
<li><a href="#tabs-upgrade"><?php _e('Maintenance', 'newsletter') ?></a></li>
|
236 |
-
</ul>
|
237 |
-
|
238 |
-
<!-- TESTS -->
|
239 |
-
<div id="tabs-tests">
|
240 |
-
<p>Here you can test if the blog is able to send emails reliabily.</p>
|
241 |
-
|
242 |
-
<p>Email address where to send test messages: <?php $controls->text('test_email', 50); ?></p>
|
243 |
-
|
244 |
-
<p>
|
245 |
-
<?php //$controls->button('test_wp', 'Send an email with WordPress'); ?>
|
246 |
-
<?php $controls->button('test', 'Send few test emails'); ?>
|
247 |
-
</p>
|
248 |
-
|
249 |
-
<p class="description">
|
250 |
-
First test emailing with WordPress if it does not work you need to contact your provider. Test on different addresses.
|
251 |
-
<br>
|
252 |
-
Second test emailing with Newsletter. You must receive three distinct email in different formats.
|
253 |
-
<br>
|
254 |
-
If the WordPress test works but Newsletter test doesn't, check the main configuration and try to change the sender,
|
255 |
-
return path and reply to email addresses.
|
256 |
-
</p>
|
257 |
-
</div>
|
258 |
-
|
259 |
-
<!-- LOGGING -->
|
260 |
-
<div id="tabs-logging">
|
261 |
-
|
262 |
-
<p>
|
263 |
-
The logging feature of Newsletter, when enabled, writes detailed information of the working
|
264 |
-
status inside few (so called) log files. Log files, one per module, are stored inside the folder
|
265 |
-
<code>wp-content/logs/newsletter</code>.
|
266 |
-
</p>
|
267 |
-
|
268 |
-
<table class="form-table">
|
269 |
-
|
270 |
-
<tbody>
|
271 |
-
<tr>
|
272 |
-
<td>
|
273 |
-
Log level
|
274 |
-
</td>
|
275 |
-
<td>
|
276 |
-
<?php $controls->log_level('log_level'); ?>
|
277 |
-
</td>
|
278 |
-
</tr>
|
279 |
-
<tr>
|
280 |
-
<td>
|
281 |
-
Log folder
|
282 |
-
</td>
|
283 |
-
<td>
|
284 |
-
<code><?php echo NEWSLETTER_LOG_DIR ?></code>
|
285 |
-
<br>
|
286 |
-
<?php
|
287 |
-
if (!is_dir(NEWSLETTER_LOG_DIR)) {
|
288 |
-
echo '<span class="newsletter-error-span">The log folder does not exists, no logging possible!</span>';
|
289 |
-
} else {
|
290 |
-
echo 'The log folder exists.';
|
291 |
-
}
|
292 |
-
?>
|
293 |
-
</td>
|
294 |
-
</tr>
|
295 |
-
|
296 |
-
|
297 |
-
</tbody>
|
298 |
-
</table>
|
299 |
-
|
300 |
-
<p><?php $controls->button_save(); ?></p>
|
301 |
-
</div>
|
302 |
-
|
303 |
-
<!-- SEMAPHORES -->
|
304 |
-
<div id="tabs-2">
|
305 |
-
|
306 |
-
<h3>Scheduler</h3>
|
307 |
-
<table class="widefat" style="width: auto; margin: 0">
|
308 |
-
<thead>
|
309 |
-
<tr>
|
310 |
-
<th>Function</th>
|
311 |
-
<th>Status</th>
|
312 |
-
</tr>
|
313 |
-
</thead>
|
314 |
-
|
315 |
-
<tbody>
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
<tr>
|
322 |
-
<td>Sending statistics</td>
|
323 |
-
<td>
|
324 |
-
|
325 |
-
<?php if (!$send_calls) { ?>
|
326 |
-
<em>Still not enough data.</em>
|
327 |
-
<?php } else { ?>
|
328 |
-
Average time to send an email: <?php echo sprintf("%.2f", $send_mean) ?> seconds<br>
|
329 |
-
Max mean time measured: <?php echo $send_max ?> seconds<br>
|
330 |
-
Min mean time measured: <?php echo $send_min ?> seconds<br>
|
331 |
-
Total emails: <?php echo $send_total_emails ?><br>
|
332 |
-
Batches prematurely interrupted: <?php echo sprintf("%.2f", (count($send_calls) - $send_completed) * 100.0 / count($send_calls)) ?>%<br>
|
333 |
-
Collected batch samples: <?php echo count($send_calls); ?><br>
|
334 |
-
<?php } ?>
|
335 |
-
</td>
|
336 |
-
</tr>
|
337 |
-
|
338 |
-
|
339 |
-
</tbody>
|
340 |
-
</table>
|
341 |
-
|
342 |
-
<h3>Semaphores</h3>
|
343 |
-
<table class="widefat" style="width: auto; margin: 0">
|
344 |
-
<thead>
|
345 |
-
<tr>
|
346 |
-
<th>Name</th>
|
347 |
-
<th>Active since</th>
|
348 |
-
</tr>
|
349 |
-
</thead>
|
350 |
-
|
351 |
-
<tbody>
|
352 |
-
<tr>
|
353 |
-
<td>
|
354 |
-
Newsletter delivery
|
355 |
-
</td>
|
356 |
-
<td>
|
357 |
-
<?php
|
358 |
-
$value = get_transient('newsletter_main_engine');
|
359 |
-
if ($value)
|
360 |
-
echo (time() - $value) . ' seconds';
|
361 |
-
else
|
362 |
-
echo 'Not set';
|
363 |
-
?>
|
364 |
-
<?php $controls->button('delete_transient', 'Delete', null, 'newsletter_main_engine'); ?>
|
365 |
-
</td>
|
366 |
-
</tr>
|
367 |
-
</tbody>
|
368 |
-
</table>
|
369 |
-
|
370 |
-
</div>
|
371 |
-
<div id="tabs-upgrade">
|
372 |
-
<p>
|
373 |
-
Plugin and modules are able to upgrade them self when needed. If you urgently need to try to force an upgrade, press the
|
374 |
-
button below.
|
375 |
-
</p>
|
376 |
-
|
377 |
-
<p>
|
378 |
-
<?php $controls->button('check-versions', 'Check for new extension versions'); ?>
|
379 |
-
</p>
|
380 |
-
|
381 |
-
<p>
|
382 |
-
<?php $controls->button('upgrade', 'Force an upgrade'); ?>
|
383 |
-
</p>
|
384 |
-
|
385 |
-
<p>
|
386 |
-
Restore al dismissed messages
|
387 |
-
</p>
|
388 |
-
<p>
|
389 |
-
<?php $controls->button('undismiss', 'Restore'); ?>
|
390 |
-
</p>
|
391 |
-
|
392 |
-
<p>
|
393 |
-
Very old versions need to be upgraded on a spacial way. Use the button blow.
|
394 |
-
</p>
|
395 |
-
<p>
|
396 |
-
<?php $controls->button('upgrade_old', 'Force an upgrade from very old versions'); ?>
|
397 |
-
</p>
|
398 |
-
</div>
|
399 |
-
|
400 |
-
</form>
|
401 |
-
|
402 |
-
</div>
|
403 |
-
|
404 |
-
<?php include NEWSLETTER_DIR . '/tnp-footer.php'; ?>
|
405 |
-
|
406 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
plugin.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
Plugin Name: Newsletter
|
5 |
Plugin URI: https://www.thenewsletterplugin.com/plugins/newsletter
|
6 |
Description: Newsletter is a cool plugin to create your own subscriber list, to send newsletters, to build your business. <strong>Before update give a look to <a href="https://www.thenewsletterplugin.com/category/release">this page</a> to know what's changed.</strong>
|
7 |
-
Version: 5.4.
|
8 |
Author: Stefano Lissa & The Newsletter Team
|
9 |
Author URI: https://www.thenewsletterplugin.com
|
10 |
Disclaimer: Use at your own risk. No warranty expressed or implied is provided.
|
@@ -14,7 +14,7 @@
|
|
14 |
*/
|
15 |
|
16 |
// Used as dummy parameter on css and js links
|
17 |
-
define('NEWSLETTER_VERSION', '5.4.
|
18 |
|
19 |
global $wpdb, $newsletter;
|
20 |
|
4 |
Plugin Name: Newsletter
|
5 |
Plugin URI: https://www.thenewsletterplugin.com/plugins/newsletter
|
6 |
Description: Newsletter is a cool plugin to create your own subscriber list, to send newsletters, to build your business. <strong>Before update give a look to <a href="https://www.thenewsletterplugin.com/category/release">this page</a> to know what's changed.</strong>
|
7 |
+
Version: 5.4.2
|
8 |
Author: Stefano Lissa & The Newsletter Team
|
9 |
Author URI: https://www.thenewsletterplugin.com
|
10 |
Disclaimer: Use at your own risk. No warranty expressed or implied is provided.
|
14 |
*/
|
15 |
|
16 |
// Used as dummy parameter on css and js links
|
17 |
+
define('NEWSLETTER_VERSION', '5.4.2');
|
18 |
|
19 |
global $wpdb, $newsletter;
|
20 |
|
readme.txt
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
Tags: newsletter,email,subscription,mass mail,list build,email marketing,direct mailing,automation,automated
|
3 |
Requires at least: 3.4.0
|
4 |
Tested up to: 4.9.5
|
5 |
-
Stable tag: 5.4.
|
6 |
Contributors: satollo,webagile,michael-travan
|
7 |
|
8 |
Add a real newsletter system to your blog. For free. With unlimited newsletters and subscribers.
|
@@ -90,6 +90,10 @@ Thank you, The Newsletter Team
|
|
90 |
|
91 |
== Changelog ==
|
92 |
|
|
|
|
|
|
|
|
|
93 |
= 5.4.1 =
|
94 |
|
95 |
* Fixed debug notice in the standard widget
|
2 |
Tags: newsletter,email,subscription,mass mail,list build,email marketing,direct mailing,automation,automated
|
3 |
Requires at least: 3.4.0
|
4 |
Tested up to: 4.9.5
|
5 |
+
Stable tag: 5.4.2
|
6 |
Contributors: satollo,webagile,michael-travan
|
7 |
|
8 |
Add a real newsletter system to your blog. For free. With unlimited newsletters and subscribers.
|
90 |
|
91 |
== Changelog ==
|
92 |
|
93 |
+
= 5.4.2 =
|
94 |
+
|
95 |
+
* SVN Deleted files fix
|
96 |
+
|
97 |
= 5.4.1 =
|
98 |
|
99 |
* Fixed debug notice in the standard widget
|