Newsletter - Version 5.7.2

Version Description

  • Improvements on posts block
  • New hero block layout
  • Transaltepress extension compatibility pack
Download this release

Release Info

Developer satollo
Plugin Icon 128x128 Newsletter
Version 5.7.2
Comparing to
See all releases

Code changes from version 5.7.0 to 5.7.2

emails/blocks/cta/block.php CHANGED
@@ -15,16 +15,21 @@ $default_options = array(
15
  'url' => home_url(),
16
  'font_family' => $font_family,
17
  'font_size' => 16,
 
18
  'block_background'=>'#ffffff',
19
- 'width'=>'200'
 
 
20
  );
21
 
22
  $options = array_merge($default_options, $options);
23
- $options['block_padding_top'] = '15px';
24
- $options['block_padding_bottom'] = '15px';
 
 
25
  ?>
26
 
27
- <a href="<?php echo $options['url'] ?>" target="_blank" rel="noopener" style="line-height: normal; font-size: <?php echo $options['font_size'] ?>px; font-family: <?php echo $options['font_family'] ?>; font-weight: normal; color: <?php echo $options['color'] ?>; text-decoration: none; background-color: <?php echo $options['background'] ?>; border-top: 15px solid <?php echo $options['background'] ?>; border-bottom: 15px solid <?php echo $options['background'] ?>; border-left: 25px solid <?php echo $options['background'] ?>; border-right: 25px solid <?php echo $options['background'] ?>; width: <?php echo $options['width'] ?>px; max-width: 100%; box-sizing: border-box; border-radius: 3px; -webkit-border-radius: 3px; -moz-border-radius: 3px; display: inline-block;"><?php echo $options['text'] ?></a>
28
 
29
  <div itemscope="" itemtype="http://schema.org/EmailMessage">
30
  <div itemprop="potentialAction" itemscope="" itemtype="http://schema.org/ViewAction">
15
  'url' => home_url(),
16
  'font_family' => $font_family,
17
  'font_size' => 16,
18
+ 'font_weight' => 'normal',
19
  'block_background'=>'#ffffff',
20
+ 'width'=>'200',
21
+ 'block_padding_top' => '20',
22
+ 'block_padding_bottom' => '20',
23
  );
24
 
25
  $options = array_merge($default_options, $options);
26
+ //$options['block_padding_top'] = '15px';
27
+ //$options['block_padding_bottom'] = '15px';
28
+ $options['block_padding_left'] = '0px';
29
+ $options['block_padding_right'] = '0px';
30
  ?>
31
 
32
+ <a href="<?php echo $options['url'] ?>" target="_blank" rel="noopener" style="line-height: normal; font-size: <?php echo $options['font_size'] ?>px; font-family: <?php echo $options['font_family'] ?>; font-weight: <?php echo $options['font_weight'] ?>; color: <?php echo $options['color'] ?>; text-decoration: none; background-color: <?php echo $options['background'] ?>; border-top: 15px solid <?php echo $options['background'] ?>; border-bottom: 15px solid <?php echo $options['background'] ?>; border-left: 25px solid <?php echo $options['background'] ?>; border-right: 25px solid <?php echo $options['background'] ?>; width: <?php echo $options['width'] ?>px; max-width: 100%; box-sizing: border-box; border-radius: 3px; -webkit-border-radius: 3px; -moz-border-radius: 3px; display: inline-block;"><?php echo $options['text'] ?></a>
33
 
34
  <div itemscope="" itemtype="http://schema.org/EmailMessage">
35
  <div itemprop="potentialAction" itemscope="" itemtype="http://schema.org/ViewAction">
emails/blocks/cta/options.php CHANGED
@@ -7,53 +7,60 @@
7
 
8
  <table class="form-table">
9
  <tr>
10
- <th>Text</th>
11
  <td>
12
- <?php $controls->text('text') ?>
 
 
13
  </td>
14
  </tr>
15
  <tr>
16
- <th>Button color</th>
17
  <td>
18
- <?php $controls->color('background') ?>
19
- </td>
20
- </tr>
21
- <tr>
22
- <th><?php _e('Color', 'newsletter') ?></th>
23
- <td>
24
- <?php $controls->color('color') ?>
25
- </td>
26
- </tr>
27
- <tr>
28
- <th>Link to</th>
29
- <td>
30
- <?php $controls->text('url', 50, 'https://...') ?>
31
- </td>
32
- </tr>
33
- <tr>
34
- <th>Font size</th>
35
- <td>
36
- <?php $controls->css_font_size('font_size') ?>
37
  </td>
38
  </tr>
 
39
  <tr>
40
- <th>Font family</th>
41
  <td>
42
- <?php $controls->css_font_family('font_family') ?>
43
  </td>
44
  </tr>
45
-
46
  <tr>
47
- <th>Width</th>
48
  <td>
49
- <?php $controls->text('width') ?>px
50
  </td>
51
  </tr>
52
-
53
  <tr>
54
- <th><?php _e('Background', 'newsletter') ?></th>
55
  <td>
56
- <?php $controls->color('block_background') ?>
 
 
 
 
 
 
 
 
 
 
 
57
  </td>
58
  </tr>
59
  </table>
7
 
8
  <table class="form-table">
9
  <tr>
10
+ <th><?php _e('Label and link', 'newsletter') ?></th>
11
  <td>
12
+ <?php $controls->text('text', 70) ?>
13
+ <br>
14
+ <?php $controls->text('url', 70, 'https://...') ?>
15
  </td>
16
  </tr>
17
  <tr>
18
+ <th></th>
19
  <td>
20
+ <table class="tnp-button-colors">
21
+ <tr>
22
+ <td>
23
+ <?php _e('Background', 'newsletter') ?><br>
24
+ <?php $controls->color('background') ?>
25
+ </td>
26
+ <td>
27
+ <?php _e('Label', 'newsletter') ?><br>
28
+ <?php $controls->color('color') ?>
29
+ </td>
30
+ </tr>
31
+ </table>
32
+ <?php $controls->css_font('font') ?>
 
 
 
 
 
 
33
  </td>
34
  </tr>
35
+
36
  <tr>
37
+ <th><?php _e('Width', 'newsletter') ?></th>
38
  <td>
39
+ <?php $controls->text('width') ?>px
40
  </td>
41
  </tr>
42
+
43
  <tr>
44
+ <th><?php _e('Block background', 'newsletter') ?></th>
45
  <td>
46
+ <?php $controls->color('block_background') ?>
47
  </td>
48
  </tr>
 
49
  <tr>
50
+ <th><?php _e('Block padding', 'newsletter') ?></th>
51
  <td>
52
+ <table class="tnp-button-colors">
53
+ <tr>
54
+ <td>
55
+ Top<br>
56
+ <?php $controls->text('block_padding_top', 4) ?>
57
+ </td>
58
+ <td>
59
+ Bottom<br>
60
+ <?php $controls->text('block_padding_bottom', 4) ?>
61
+ </td>
62
+ </tr>
63
+ </table>
64
  </td>
65
  </tr>
66
  </table>
emails/blocks/hero/block.php ADDED
@@ -0,0 +1,231 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Name: Last posts
4
+ * Section: content
5
+ * Description: Last opsts list with different layouts
6
+ */
7
+
8
+ /* @var $options array */
9
+ /* @var $wpdb wpdb */
10
+ include NEWSLETTER_INCLUDES_DIR . '/helper.php';
11
+
12
+ $defaults = array(
13
+ 'url' => '',
14
+ 'title' => 'An Awesome Title',
15
+ 'text' => 'This is just a simple text you should change',
16
+ 'font_family' => 'Helvetica, Arial, sans-serif',
17
+ 'font_size' => '13',
18
+ 'font_weight' => 'normal',
19
+ 'title_font_family' => 'Helvetica, Arial, sans-serif',
20
+ 'title_font_size' => '20',
21
+ 'title_font_weight' => 'normal',
22
+ 'block_background' => '#ffffff',
23
+ 'layout' => 'full',
24
+ 'button_label' => 'Click Here',
25
+ 'button_color' => '#ffffff',
26
+ 'button_background' => '#256F9C',
27
+ 'layout' => 'full'
28
+ );
29
+
30
+ $options = array_merge($defaults, $options);
31
+
32
+ $url = $options['url'];
33
+
34
+ $font_family = $options['font_family'];
35
+ $font_size = $options['font_size'];
36
+ $font_weight = $options['font_weight'];
37
+
38
+ $title_font_family = $options['title_font_family'];
39
+ $title_font_size = $options['title_font_size'];
40
+ $title_font_weight = $options['title_font_weight'];
41
+
42
+ $button_color = $options['button_color'];
43
+ $button_background = $options['button_background'];
44
+ $button_label = $options['button_label'];
45
+ $layout = $options['layout'];
46
+
47
+ $options['block_padding_top'] = '20px';
48
+ $options['block_padding_bottom'] = '20px';
49
+ $options['block_padding_left'] = '0px';
50
+ $options['block_padding_right'] = '0px';
51
+
52
+ if (!empty($options['image'])) {
53
+ if ($layout == 'full') {
54
+ $image = tnp_media_resize($options['image']['id'], array(600, 0));
55
+ } else {
56
+ $image = tnp_media_resize($options['image']['id'], array(300, 200, true));
57
+ }
58
+ } else {
59
+ $image = false;
60
+ }
61
+ ?>
62
+
63
+ <?php if ($layout == 'full') { ?>
64
+
65
+ <style>
66
+ .hero-title {
67
+ font-size: <?php echo $title_font_size ?>px;
68
+ color: #333333;
69
+ padding-top: 30px;
70
+ font-family: <?php echo $title_font_family ?>;
71
+ font-weight: <?php echo $title_font_weight ?>;
72
+ }
73
+ .hero-text {
74
+ padding: 20px 0 0 0;
75
+ font-size: <?php echo $font_size ?>px;
76
+ line-height: 150%;
77
+ color: #666666;
78
+ font-family: <?php echo $font_family ?>;
79
+ }
80
+ .hero-button-table {
81
+ background-color: <?php echo $button_background ?>;
82
+ /*border:1px solid #353535;*/
83
+ border-radius:5px;
84
+ }
85
+ .hero-button-td {
86
+ color: <?php echo $button_color ?>;
87
+ font-family:<?php echo $font_family ?>;
88
+ font-size:16px;
89
+ font-weight:bold;
90
+ letter-spacing:-.5px;
91
+ line-height:150%;
92
+ padding-top:15px;
93
+ padding-right:30px;
94
+ padding-bottom:15px;
95
+ padding-left:30px;
96
+ }
97
+ .hero-button-a {
98
+ color:<?php echo $button_color ?>;
99
+ text-decoration:none;
100
+ }
101
+ .hero-image {
102
+ max-width: 100%!important;
103
+ display: block;
104
+ }
105
+ </style>
106
+
107
+
108
+ <!-- HERO IMAGE -->
109
+ <table width="100%" border="0" cellspacing="0" cellpadding="0">
110
+ <tr>
111
+ <td class="padding-copy tnpc-row-edit">
112
+ <a href="<?php echo $url ?>" target="_blank" rel="noopener nofollow">
113
+ <img src="<?php echo $image ?>" border="0" alt="" inline-class="hero-image">
114
+ </a>
115
+ </td>
116
+ </tr>
117
+ <tr>
118
+ <td>
119
+ <!-- COPY -->
120
+ <table width="100%" border="0" cellspacing="0" cellpadding="0">
121
+ <tr>
122
+ <td align="center" inline-class="hero-title">
123
+ <span><?php echo $options['title'] ?></span>
124
+ </td>
125
+ </tr>
126
+ <tr>
127
+ <td align="center" inline-class="hero-text">
128
+ <span><?php echo $options['text'] ?></span>
129
+ </td>
130
+ </tr>
131
+
132
+ <tr>
133
+ <td align="center">
134
+ <br>
135
+ <table border="0" cellpadding="0" cellspacing="0" inline-class="hero-button-table" align="center">
136
+ <tr>
137
+ <td align="center" valign="middle" inline-class="hero-button-td">
138
+ <a href="<?php echo esc_attr($url) ?>" target="_blank" inline-class="hero-button-a"><?php echo $button_label ?></a>
139
+ </td>
140
+ </tr>
141
+ </table>
142
+
143
+ </td>
144
+ </tr>
145
+ </table>
146
+ </td>
147
+ </tr>
148
+ </table>
149
+
150
+ <?php } ?>
151
+
152
+ <?php if ($layout == 'left') { ?>
153
+
154
+ <style>
155
+ .hero-title {
156
+ font-size: <?php echo $title_font_size ?>px;
157
+ color: #333333;
158
+ padding-top: 0;
159
+ font-family: <?php echo $title_font_family ?>;
160
+ font-weight: <?php echo $title_font_weight ?>;
161
+ }
162
+ .hero-text {
163
+ padding: 20px 0 0 0;
164
+ font-size: <?php echo $font_size ?>px;
165
+ line-height: 150%;
166
+ color: #666666;
167
+ font-family: <?php echo $font_family ?>;
168
+ font-weight: <?php echo $font_weight ?>;
169
+ }
170
+ .hero-button-table {
171
+ background-color: <?php echo $button_background ?>;
172
+ /*border:1px solid #353535;*/
173
+ border-radius:5px;
174
+ }
175
+ .hero-button-td {
176
+ color: <?php echo $button_color ?>;
177
+ font-family:<?php echo $font_family ?>;
178
+ font-size:<?php echo $font_size ?>px;
179
+ font-weight:bold;
180
+ letter-spacing:-.5px;
181
+ line-height:150%;
182
+ padding-top:10px;
183
+ padding-right:30px;
184
+ padding-bottom:10px;
185
+ padding-left:30px;
186
+ }
187
+ .hero-button-a {
188
+ color:<?php echo $button_color ?>;
189
+ text-decoration:none;
190
+ }
191
+ </style>
192
+
193
+ <table width="290" align="left" class="hero-table">
194
+ <tr>
195
+ <td align="center" valign="top">
196
+ <img src="<?php echo $image ?>" border="0" alt="" style="max-width: 100%!important; height: auto!important; display: block;" class="img-max">
197
+ </td>
198
+ </tr>
199
+ </table>
200
+
201
+ <table width="290" align="right" class="hero-table hero-table-right">
202
+ <tr>
203
+ <td>
204
+ <table width="100%" border="0" cellspacing="0" cellpadding="0">
205
+ <tr>
206
+ <td align="center" inline-class="hero-title">
207
+ <span><?php echo $options['title'] ?></span>
208
+ </td>
209
+ </tr>
210
+ <tr>
211
+ <td align="center" inline-class="hero-text">
212
+ <span><?php echo $options['text'] ?></span>
213
+ </td>
214
+ </tr>
215
+ </table>
216
+ <br>
217
+ <table border="0" cellpadding="0" cellspacing="0" align="center" inline-class="hero-button-table">
218
+ <tr>
219
+ <td align="center" valign="middle" inline-class="hero-button-td">
220
+ <a href="<?php echo esc_attr($url) ?>" target="_blank" inline-class="hero-button-a"><?php echo $button_label ?></a>
221
+ </td>
222
+ </tr>
223
+ </table>
224
+
225
+ </td>
226
+ </tr>
227
+ </table>
228
+
229
+
230
+ <?php } ?>
231
+
emails/{tnp-composer/blocks/content-01-hero.block.png → blocks/hero/icon.png} RENAMED
File without changes
emails/blocks/hero/options.php ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * @var $options array contains all the options the current block we're ediging contains
4
+ * @var $controls NewsletterControls
5
+ */
6
+ ?>
7
+
8
+ <table class="form-table">
9
+ <tr>
10
+ <th><?php _e('Layout', 'newsletter') ?></th>
11
+ <td>
12
+ <?php $controls->select('layout', array('full' => 'Full', 'left' => 'Left')) ?>
13
+ </td>
14
+ </tr>
15
+ <tr>
16
+ <th><?php _e('Image', 'newsletter') ?></th>
17
+ <td>
18
+ <?php $controls->media('image') ?>
19
+ </td>
20
+ </tr>
21
+
22
+ <tr>
23
+ <th>Title and Text</th>
24
+ <td>
25
+ <?php $controls->text('title', 70) ?>
26
+ <?php $controls->css_font('title_font') ?>
27
+ <br><br>
28
+ <?php $controls->textarea('text') ?>
29
+ <?php $controls->css_font('font') ?>
30
+ </td>
31
+ </tr>
32
+ <tr>
33
+ <th><?php _e('Button', 'newsletter') ?></th>
34
+ <td>
35
+
36
+
37
+ <?php $controls->text('button_label', 70) ?>
38
+ <br>
39
+ <?php $controls->text('url', 70, 'https://...') ?>
40
+
41
+ <table class="tnp-button-colors">
42
+ <tr>
43
+ <td>
44
+ <?php _e('Background', 'newsletter') ?><br>
45
+ <?php $controls->color('button_background') ?>
46
+ </td>
47
+ <td>
48
+ <?php _e('Label', 'newsletter')?><br>
49
+ <?php $controls->color('button_color') ?>
50
+ </td>
51
+ </tr>
52
+ </table>
53
+ </td>
54
+ </tr>
55
+ <tr>
56
+ <th><?php _e('Block background', 'newsletter') ?></th>
57
+ <td>
58
+ <?php $controls->color('block_background') ?>
59
+ </td>
60
+ </tr>
61
+ </table>
62
+
emails/blocks/hero/style.css ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ @media all and (max-width: 525px) {
2
+ .hero-table {
3
+ width: 100%!important;
4
+ max-width: 100%!important;
5
+ }
6
+
7
+ .hero-table-right {
8
+ margin-top: 20px;
9
+ }
10
+ }
emails/blocks/posts/block.php CHANGED
@@ -15,6 +15,8 @@ $defaults = array(
15
  'color' => '#999999',
16
  'font_family' => 'Helvetica, Arial, sans-serif',
17
  'font_size' => '13',
 
 
18
  'max' => 4,
19
  'read_more' => __('Read more...', 'newsletter'),
20
  'categories' => '',
@@ -22,11 +24,20 @@ $defaults = array(
22
  'block_background' => '#ffffff',
23
  'layout' => 'one',
24
  'language' => '',
25
- 'button_color' => '#256F9C'
 
26
  );
27
 
28
  $options = array_merge($defaults, $options);
29
 
 
 
 
 
 
 
 
 
30
  $filters = array();
31
  $filters['posts_per_page'] = (int) $options['max'];
32
 
@@ -43,6 +54,8 @@ $posts = Newsletter::instance()->get_posts($filters, $options['language']);
43
  $button_color = $options['button_color'];
44
 
45
  $alternative = plugins_url('newsletter') . '/emails/blocks/posts/images/blank.png';
 
 
46
  ?>
47
 
48
  <?php if ($options['layout'] == 'one') { ?>
@@ -50,23 +63,48 @@ $alternative = plugins_url('newsletter') . '/emails/blocks/posts/images/blank.pn
50
  .posts-title {
51
  padding: 0 0 10px 0;
52
  font-size: 25px;
53
- font-family: <?php echo $font_family ?>;
54
  font-weight: normal;
55
  color: #333333;
 
56
  }
57
  .posts-post-date {
58
  padding: 0 0 5px 25px;
59
- font-size: 13px;
60
  font-family: <?php echo $font_family ?>;
61
  font-weight: normal;
62
  color: #aaaaaa;
63
  }
64
  .posts-post-title {
65
  padding: 0 0 5px 25px;
66
- font-size: 22px;
67
- font-family: <?php echo $font_family ?>;
68
  font-weight: normal;
69
  color: #333333;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
70
  }
71
  </style>
72
  <!-- COMPACT ARTICLE SECTION -->
@@ -84,15 +122,17 @@ $alternative = plugins_url('newsletter') . '/emails/blocks/posts/images/blank.pn
84
  <td align="center" inline-class="posts-title" class="padding-copy tnpc-row-edit" data-type="title" colspan="2"><?php echo $options['title'] ?></td>
85
  </tr>
86
 
87
- <?php foreach ($posts AS $post) { ?>
88
 
89
  <tr>
90
- <td valign="top" style="padding: 40px 0 0 0;" class="mobile-hide">
 
91
  <a href="<?php echo tnp_post_permalink($post) ?>" target="_blank">
92
- <img src="<?php echo tnp_post_thumbnail_src($post, array(105, 105, true), $alternative) ?>" width="105" height="105" border="0" style="display: block; font-family: Arial; color: #666666; font-size: 14px; width: 105px!important; height: 105px!important;">
93
  </a>
94
  </td>
95
- <td style="padding: 40px 0 0 0;" class="no-padding">
 
96
  <!-- ARTICLE -->
97
  <table border="0" cellspacing="0" cellpadding="0" width="100%">
98
  <?php if (!empty($options['show_date'])) { ?>
@@ -108,12 +148,12 @@ $alternative = plugins_url('newsletter') . '/emails/blocks/posts/images/blank.pn
108
  </td>
109
  </tr>
110
  <tr>
111
- <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">
112
  <?php echo tnp_post_excerpt($post) ?>
113
  </td>
114
  </tr>
115
  <tr>
116
- <td style="padding:0 0 45px 25px;" align="left" class="padding">
117
  <table border="0" cellspacing="0" cellpadding="0" class="mobile-button-container">
118
  <tr>
119
  <td align="center">
@@ -124,7 +164,7 @@ $alternative = plugins_url('newsletter') . '/emails/blocks/posts/images/blank.pn
124
  <table border="0" cellspacing="0" cellpadding="0" class="responsive-table">
125
  <tr>
126
  <td align="center">
127
- <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: <?php echo $button_color?>; border-top: 10px solid <?php echo $button_color?>; border-bottom: 10px solid <?php echo $button_color?>; border-left: 20px solid <?php echo $button_color?>; border-right: 20px solid <?php echo $button_color?>; border-radius: 3px; -webkit-border-radius: 3px; -moz-border-radius: 3px; display: inline-block;" class="mobile-button tnpc-row-edit" data-type="link"><?php echo $options['read_more'] ?></a>
128
  </td>
129
  </tr>
130
  </table>
@@ -152,7 +192,7 @@ $alternative = plugins_url('newsletter') . '/emails/blocks/posts/images/blank.pn
152
  .posts-title {
153
  font-size: 25px;
154
  line-height: 30px;
155
- font-family: <?php echo $font_family ?>;
156
  color: #333333;
157
  }
158
  .post-subtitle {
@@ -164,17 +204,17 @@ $alternative = plugins_url('newsletter') . '/emails/blocks/posts/images/blank.pn
164
  }
165
  .posts-post-title {
166
  padding: 15px 0 0 0;
167
- font-family: <?php echo $font_family ?>;
168
  color: #333333;
169
- font-size: 20px;
170
- line-height: 25px;
171
  }
172
  .posts-post-excerpt {
173
  padding: 5px 0 0 0;
174
  font-family: <?php echo $font_family ?>;
175
  color: #666666;
176
- font-size: 14px;
177
- line-height: 20px;
178
  }
179
  </style>
180
  <!-- TWO COLUMN SECTION -->
@@ -187,9 +227,11 @@ $alternative = plugins_url('newsletter') . '/emails/blocks/posts/images/blank.pn
187
  <tr>
188
  <td align="center" inline-class="posts-title" class="padding-copy tnpc-row-edit" data-type="title"><?php echo $options['title'] ?></td>
189
  </tr>
 
190
  <tr>
191
  <td align="center" inline-class="posts-subtitle" class="padding-copy tnpc-row-edit" data-type="text">The twelve jurors were all writing very busily on slates.</td>
192
  </tr>
 
193
  </table>
194
  </td>
195
  </tr>
@@ -206,13 +248,15 @@ $alternative = plugins_url('newsletter') . '/emails/blocks/posts/images/blank.pn
206
  <tr>
207
  <td style="padding: 20px 0 40px 0;">
208
  <table cellpadding="0" cellspacing="0" border="0" width="100%">
 
209
  <tr>
210
  <td align="center" valign="middle" class="tnpc-row-edit" data-type="image">
211
  <a href="<?php echo tnp_post_permalink($row[0]) ?>" target="_blank">
212
- <img src="<?php echo tnp_post_thumbnail_src($row[0], array(240, 160, true)) ?>" width="240" height="160" border="0" class="img-max">
213
  </a>
214
  </td>
215
  </tr>
 
216
  <tr>
217
  <td align="center" inline-class="posts-post-title" class="tnpc-row-edit" data-type="title"><?php echo tnp_post_title($row[0]) ?></td>
218
  </tr>
@@ -221,7 +265,7 @@ $alternative = plugins_url('newsletter') . '/emails/blocks/posts/images/blank.pn
221
  </tr>
222
  <tr>
223
  <td align="center" style="padding: 5px 0 0 0; font-family: Arial, sans-serif; color: #666666; font-size: 14px; line-height: 20px;">
224
- <a href="<?php echo tnp_post_permalink($row[0]) ?>" target="_blank" style="font-size: 15px; font-family: Helvetica, Arial, sans-serif; font-weight: normal; color: #ffffff; text-decoration: none; background-color: <?php echo $button_color?>; border-top: 10px solid <?php echo $button_color?>; border-bottom: 10px solid <?php echo $button_color?>; border-left: 20px solid <?php echo $button_color?>; border-right: 20px solid <?php echo $button_color?>; border-radius: 3px; -webkit-border-radius: 3px; -moz-border-radius: 3px; display: inline-block;" class="mobile-button tnpc-row-edit" data-type="link"><?php echo $options['read_more'] ?></a>
225
  </td>
226
  </tr>
227
  </table>
@@ -235,13 +279,15 @@ $alternative = plugins_url('newsletter') . '/emails/blocks/posts/images/blank.pn
235
  <tr>
236
  <td style="padding: 20px 0 40px 0;">
237
  <table cellpadding="0" cellspacing="0" border="0" width="100%">
 
238
  <tr>
239
  <td align="center" valign="middle" class="tnpc-row-edit" data-type="image">
240
  <a href="<?php echo tnp_post_permalink($row[1]) ?>" target="_blank">
241
- <img src="<?php echo tnp_post_thumbnail_src($row[1], array(240, 160, true)) ?>" width="240" height="160" border="0" class="img-max">
242
  </a>
243
  </td>
244
  </tr>
 
245
  <tr>
246
  <td align="center" inline-class="posts-post-title" class="tnpc-row-edit" data-type="title"><?php echo tnp_post_title($row[1]) ?></td>
247
  </tr>
@@ -251,7 +297,7 @@ $alternative = plugins_url('newsletter') . '/emails/blocks/posts/images/blank.pn
251
  <tr>
252
 
253
  <td align="center" style="padding: 5px 0 0 0; font-family: Arial, sans-serif; color: #666666; font-size: 14px; line-height: 20px;">
254
- <a href="<?php echo tnp_post_permalink($row[1]) ?>" target="_blank" style="font-size: 15px; font-family: Helvetica, Arial, sans-serif; font-weight: normal; color: #ffffff; text-decoration: none; background-color: <?php echo $button_color?>; border-top: 10px solid <?php echo $button_color?>; border-bottom: 10px solid <?php echo $button_color?>; border-left: 20px solid <?php echo $button_color?>; border-right: 20px solid <?php echo $button_color?>; border-radius: 3px; -webkit-border-radius: 3px; -moz-border-radius: 3px; display: inline-block;" class="mobile-button tnpc-row-edit" data-type="link"><?php echo $options['read_more'] ?></a>
255
  </td>
256
  </tr>
257
  </table>
15
  'color' => '#999999',
16
  'font_family' => 'Helvetica, Arial, sans-serif',
17
  'font_size' => '13',
18
+ 'title_font_family' => 'Helvetica, Arial, sans-serif',
19
+ 'title_font_size' => '25',
20
  'max' => 4,
21
  'read_more' => __('Read more...', 'newsletter'),
22
  'categories' => '',
24
  'block_background' => '#ffffff',
25
  'layout' => 'one',
26
  'language' => '',
27
+ 'button_color' => '#256F9C',
28
+ 'show_image'=> 1
29
  );
30
 
31
  $options = array_merge($defaults, $options);
32
 
33
+ $font_family = $options['font_family'];
34
+ $font_size = $options['font_size'];
35
+
36
+ $title_font_family = $options['title_font_family'];
37
+ $title_font_size = $options['title_font_size'];
38
+
39
+ $show_image = !empty($options['show_image']);
40
+
41
  $filters = array();
42
  $filters['posts_per_page'] = (int) $options['max'];
43
 
54
  $button_color = $options['button_color'];
55
 
56
  $alternative = plugins_url('newsletter') . '/emails/blocks/posts/images/blank.png';
57
+ $alternative_2 = plugins_url('newsletter') . '/emails/blocks/posts/images/blank-240x160.png';
58
+
59
  ?>
60
 
61
  <?php if ($options['layout'] == 'one') { ?>
63
  .posts-title {
64
  padding: 0 0 10px 0;
65
  font-size: 25px;
66
+ font-family: <?php echo $title_font_family ?>;
67
  font-weight: normal;
68
  color: #333333;
69
+ line-height: 1.5em;
70
  }
71
  .posts-post-date {
72
  padding: 0 0 5px 25px;
73
+ font-size: 13px;
74
  font-family: <?php echo $font_family ?>;
75
  font-weight: normal;
76
  color: #aaaaaa;
77
  }
78
  .posts-post-title {
79
  padding: 0 0 5px 25px;
80
+ font-size: <?php echo $title_font_size ?>px;
81
+ font-family: <?php echo $title_font_family ?>;
82
  font-weight: normal;
83
  color: #333333;
84
+ line-height: 1.5em;
85
+ }
86
+ .posts-post-excerpt {
87
+ padding: 10px 0 15px 25px;
88
+ font-family: <?php echo $font_family ?>;
89
+ color: #666666;
90
+ font-size: <?php echo $font_size ?>px;
91
+ line-height: 1.5em;
92
+ }
93
+ .posts-post-button {
94
+ font-size: 15px;
95
+ font-family: <?php echo $font_family ?>;
96
+ font-weight: normal;
97
+ color: #ffffff;
98
+ text-decoration: none;
99
+ background-color: <?php echo $button_color ?>;
100
+ border-top: 10px solid <?php echo $button_color ?>;
101
+ border-bottom: 10px solid <?php echo $button_color ?>;
102
+ border-left: 20px solid <?php echo $button_color ?>;
103
+ border-right: 20px solid <?php echo $button_color ?>;
104
+ border-radius: 3px;
105
+ -webkit-border-radius: 3px;
106
+ -moz-border-radius: 3px;
107
+ display: inline-block;
108
  }
109
  </style>
110
  <!-- COMPACT ARTICLE SECTION -->
122
  <td align="center" inline-class="posts-title" class="padding-copy tnpc-row-edit" data-type="title" colspan="2"><?php echo $options['title'] ?></td>
123
  </tr>
124
 
125
+ <?php foreach ($posts as $post) { ?>
126
 
127
  <tr>
128
+ <?php if ($show_image) { ?>
129
+ <td valign="top" style="padding: 30px 0 0 0; width: 105px!important" class="mobile-hide">
130
  <a href="<?php echo tnp_post_permalink($post) ?>" target="_blank">
131
+ <img src="<?php echo tnp_post_thumbnail_src($post, array(105, 105, true), $alternative) ?>" width="105" height="105" border="0" style="display: block; font-family: Arial; color: #666666; font-size: 14px; min-width: 105px!important; width: 105px!important;">
132
  </a>
133
  </td>
134
+ <?php } ?>
135
+ <td style="padding: 30px 0 0 0;" class="no-padding">
136
  <!-- ARTICLE -->
137
  <table border="0" cellspacing="0" cellpadding="0" width="100%">
138
  <?php if (!empty($options['show_date'])) { ?>
148
  </td>
149
  </tr>
150
  <tr>
151
+ <td align="left" inline-class="posts-post-excerpt" class="padding-copy tnpc-row-edit" data-type="text">
152
  <?php echo tnp_post_excerpt($post) ?>
153
  </td>
154
  </tr>
155
  <tr>
156
+ <td style="padding:0 0 35px 25px;" align="left" class="padding">
157
  <table border="0" cellspacing="0" cellpadding="0" class="mobile-button-container">
158
  <tr>
159
  <td align="center">
164
  <table border="0" cellspacing="0" cellpadding="0" class="responsive-table">
165
  <tr>
166
  <td align="center">
167
+ <a href="<?php echo tnp_post_permalink($post) ?>" target="_blank" inline-class="posts-post-button" class="mobile-button tnpc-row-edit" data-type="link"><?php echo $options['read_more'] ?></a>
168
  </td>
169
  </tr>
170
  </table>
192
  .posts-title {
193
  font-size: 25px;
194
  line-height: 30px;
195
+ font-family: <?php echo $title_font_family ?>;
196
  color: #333333;
197
  }
198
  .post-subtitle {
204
  }
205
  .posts-post-title {
206
  padding: 15px 0 0 0;
207
+ font-family: <?php echo $title_font_family ?>;
208
  color: #333333;
209
+ font-size: <?php echo $title_font_size ?>px;
210
+ line-height: 1.3em;
211
  }
212
  .posts-post-excerpt {
213
  padding: 5px 0 0 0;
214
  font-family: <?php echo $font_family ?>;
215
  color: #666666;
216
+ font-size: <?php echo $font_size ?>px;
217
+ line-height: 1.4em;
218
  }
219
  </style>
220
  <!-- TWO COLUMN SECTION -->
227
  <tr>
228
  <td align="center" inline-class="posts-title" class="padding-copy tnpc-row-edit" data-type="title"><?php echo $options['title'] ?></td>
229
  </tr>
230
+ <!--
231
  <tr>
232
  <td align="center" inline-class="posts-subtitle" class="padding-copy tnpc-row-edit" data-type="text">The twelve jurors were all writing very busily on slates.</td>
233
  </tr>
234
+ -->
235
  </table>
236
  </td>
237
  </tr>
248
  <tr>
249
  <td style="padding: 20px 0 40px 0;">
250
  <table cellpadding="0" cellspacing="0" border="0" width="100%">
251
+ <?php if ($show_image) { ?>
252
  <tr>
253
  <td align="center" valign="middle" class="tnpc-row-edit" data-type="image">
254
  <a href="<?php echo tnp_post_permalink($row[0]) ?>" target="_blank">
255
+ <img src="<?php echo tnp_post_thumbnail_src($row[0], array(240, 160, true), $alternative_2) ?>" width="240" height="160" border="0" class="img-max">
256
  </a>
257
  </td>
258
  </tr>
259
+ <?php } ?>
260
  <tr>
261
  <td align="center" inline-class="posts-post-title" class="tnpc-row-edit" data-type="title"><?php echo tnp_post_title($row[0]) ?></td>
262
  </tr>
265
  </tr>
266
  <tr>
267
  <td align="center" style="padding: 5px 0 0 0; font-family: Arial, sans-serif; color: #666666; font-size: 14px; line-height: 20px;">
268
+ <a href="<?php echo tnp_post_permalink($row[0]) ?>" target="_blank" style="font-size: 15px; font-family: Helvetica, Arial, sans-serif; font-weight: normal; color: #ffffff; text-decoration: none; background-color: <?php echo $button_color ?>; border-top: 10px solid <?php echo $button_color ?>; border-bottom: 10px solid <?php echo $button_color ?>; border-left: 20px solid <?php echo $button_color ?>; border-right: 20px solid <?php echo $button_color ?>; border-radius: 3px; -webkit-border-radius: 3px; -moz-border-radius: 3px; display: inline-block;" class="mobile-button tnpc-row-edit" data-type="link"><?php echo $options['read_more'] ?></a>
269
  </td>
270
  </tr>
271
  </table>
279
  <tr>
280
  <td style="padding: 20px 0 40px 0;">
281
  <table cellpadding="0" cellspacing="0" border="0" width="100%">
282
+ <?php if ($show_image) { ?>
283
  <tr>
284
  <td align="center" valign="middle" class="tnpc-row-edit" data-type="image">
285
  <a href="<?php echo tnp_post_permalink($row[1]) ?>" target="_blank">
286
+ <img src="<?php echo tnp_post_thumbnail_src($row[1], array(240, 160, true), $alternative_2) ?>" width="240" height="160" border="0" class="img-max">
287
  </a>
288
  </td>
289
  </tr>
290
+ <?php } ?>
291
  <tr>
292
  <td align="center" inline-class="posts-post-title" class="tnpc-row-edit" data-type="title"><?php echo tnp_post_title($row[1]) ?></td>
293
  </tr>
297
  <tr>
298
 
299
  <td align="center" style="padding: 5px 0 0 0; font-family: Arial, sans-serif; color: #666666; font-size: 14px; line-height: 20px;">
300
+ <a href="<?php echo tnp_post_permalink($row[1]) ?>" target="_blank" style="font-size: 15px; font-family: Helvetica, Arial, sans-serif; font-weight: normal; color: #ffffff; text-decoration: none; background-color: <?php echo $button_color ?>; border-top: 10px solid <?php echo $button_color ?>; border-bottom: 10px solid <?php echo $button_color ?>; border-left: 20px solid <?php echo $button_color ?>; border-right: 20px solid <?php echo $button_color ?>; border-radius: 3px; -webkit-border-radius: 3px; -moz-border-radius: 3px; display: inline-block;" class="mobile-button tnpc-row-edit" data-type="link"><?php echo $options['read_more'] ?></a>
301
  </td>
302
  </tr>
303
  </table>
emails/blocks/posts/images/blank-240x160.png ADDED
Binary file
emails/blocks/posts/options.php CHANGED
@@ -52,12 +52,34 @@
52
  <?php $controls->select('layout', array('one' => 'One column', 'two' => 'Two columns')) ?>
53
  </td>
54
  </tr>
 
 
 
 
 
 
55
  <tr>
56
  <th><?php _e('Show date', 'newsletter') ?></th>
57
  <td>
58
  <?php $controls->yesno('show_date') ?>
59
  </td>
60
  </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
61
  <tr>
62
  <th><?php _e('Block background', 'newsletter') ?></th>
63
  <td>
52
  <?php $controls->select('layout', array('one' => 'One column', 'two' => 'Two columns')) ?>
53
  </td>
54
  </tr>
55
+ <tr>
56
+ <th><?php _e('Show image', 'newsletter') ?></th>
57
+ <td>
58
+ <?php $controls->yesno('show_image') ?>
59
+ </td>
60
+ </tr>
61
  <tr>
62
  <th><?php _e('Show date', 'newsletter') ?></th>
63
  <td>
64
  <?php $controls->yesno('show_date') ?>
65
  </td>
66
  </tr>
67
+
68
+ </table>
69
+
70
+ <table class="form-table">
71
+ <tr>
72
+ <th><?php _e('Text font', 'newsletter') ?></th>
73
+ <td>
74
+ <?php $controls->css_font_family('font_family'); ?> <?php $controls->css_font_size('font_size'); ?>
75
+ </td>
76
+ </tr>
77
+ <tr>
78
+ <th><?php _e('Title font', 'newsletter') ?></th>
79
+ <td>
80
+ <?php $controls->css_font_family('title_font_family'); ?> <?php $controls->css_font_size('title_font_size'); ?>
81
+ </td>
82
+ </tr>
83
  <tr>
84
  <th><?php _e('Block background', 'newsletter') ?></th>
85
  <td>
emails/blocks/preheader/block.php CHANGED
@@ -22,8 +22,13 @@ $options = array_merge($default_options, $options);
22
 
23
  ?>
24
  <style>
 
 
 
 
 
25
  .preheader-link {
26
- padding: 20px;
27
  text-align: center;
28
  font-size: <?php echo $options['font_size'] ?>px;
29
  font-family: <?php echo $options['font_family'] ?>;
@@ -31,7 +36,7 @@ $options = array_merge($default_options, $options);
31
  }
32
  </style>
33
 
34
- <table width="100%" border="0" cellpadding="0" align="center" cellspacing="0">
35
  <tr>
36
  <td class="preheader-link" width="50%" valign="top" align="center">
37
  <?php echo $options['text'] ?>
22
 
23
  ?>
24
  <style>
25
+ .preheader-table {
26
+ width: 100%!important
27
+ border: 0;
28
+ border-collapse: collapse;
29
+ }
30
  .preheader-link {
31
+ padding: 10px;
32
  text-align: center;
33
  font-size: <?php echo $options['font_size'] ?>px;
34
  font-family: <?php echo $options['font_family'] ?>;
36
  }
37
  </style>
38
 
39
+ <table width="100%" border="0" cellpadding="0" align="center" cellspacing="0" inline-class="preheader-table">
40
  <tr>
41
  <td class="preheader-link" width="50%" valign="top" align="center">
42
  <?php echo $options['text'] ?>
emails/emails.php CHANGED
@@ -66,7 +66,7 @@ class NewsletterEmails extends NewsletterModule {
66
  */
67
  function render_block($block_id = null, $wrapper = false, $options = array()) {
68
  $width = 600;
69
- $font_family = 'Helvetica, Arial, sans-serif';
70
 
71
  $block_options = get_option('newsletter_main');
72
 
@@ -91,7 +91,7 @@ class NewsletterEmails extends NewsletterModule {
91
  return;
92
  }
93
  $is_old_block = isset($block['filename']) && strpos($block['filename'], '.block');
94
-
95
  if ($is_old_block) {
96
  ob_start();
97
  include NEWSLETTER_DIR . '/emails/tnp-composer/blocks/' . $block['filename'] . '.php';
@@ -101,7 +101,7 @@ class NewsletterEmails extends NewsletterModule {
101
  include $block['dir'] . '/block.php';
102
  $content = ob_get_clean();
103
  }
104
-
105
  // Obsolete
106
  $content = str_replace('{width}', $width, $content);
107
  $content = $this->inline_css($content, true);
@@ -111,14 +111,23 @@ class NewsletterEmails extends NewsletterModule {
111
  $options['block_background'] = '';
112
  }
113
  $style = '';
114
- if (isset($options['block_padding_top'])) $style .= 'padding-top: ' . $options['block_padding_top'] . '; ';
115
- if (isset($options['block_padding_left'])) $style .= 'padding-left: ' . $options['block_padding_left'] . '; ';
116
- if (isset($options['block_padding_right'])) $style .= 'padding-right: ' . $options['block_padding_right'] . '; ';
117
- if (isset($options['block_padding_bottom'])) $style .= 'padding-bottom: ' . $options['block_padding_bottom'] . '; ';
118
-
 
 
 
 
 
 
 
 
 
119
  // Old block type
120
  if ($is_old_block) {
121
-
122
  echo '<table border="0" cellpadding="0" cellspacing="0" align="center" width="100%" style="border-collapse: collapse; width: 100%;" class="tnpc-row" data-id="', esc_attr($block_id), "\">\n";
123
  echo "<tr>\n";
124
  echo '<td align="center" style="padding: 0;">', "\n";
@@ -129,11 +138,10 @@ class NewsletterEmails extends NewsletterModule {
129
  echo '<td class="edit-block" align="center" style="', $style, 'text-align: center;" bgcolor="', $options['block_background'], '" width="100%">', "\n";
130
 
131
  echo $content;
132
-
133
  echo "</td>\n</tr>\n</table>";
134
  echo '<!--[if mso]></td></tr></table><![endif]-->';
135
  echo "\n</td>\n</tr></table>\n\n";
136
-
137
  } else {
138
 
139
  $data = '';
@@ -146,13 +154,13 @@ class NewsletterEmails extends NewsletterModule {
146
  }
147
  }
148
  }
149
-
150
  if ($wrapper) {
151
  echo '<table border="0" cellpadding="0" cellspacing="0" align="center" width="100%" style="border-collapse: collapse; width: 100%;" class="tnpc-row tnpc-row-block" data-id="', esc_attr($block_id), '">';
152
  echo '<tr>';
153
  echo '<td data-options="', esc_attr($data), '" align="center" style="padding: 0; font-family: Helvetica, Arial, sans-serif;" class="edit-block">';
154
  }
155
-
156
  // Container that fixes the width and makes the block responsive
157
  echo '<!--[if mso]><table border="0" cellpadding="0" align="center" cellspacing="0" width="' . $width . '"><tr><td width="' . $width . '"><![endif]-->';
158
  echo "\n";
@@ -161,7 +169,7 @@ class NewsletterEmails extends NewsletterModule {
161
  echo '<td align="center" style="', $style, 'text-align: center;" bgcolor="', $options['block_background'], '" width="100%">', "\n";
162
 
163
  echo $content;
164
-
165
  echo "</td>\n</tr>\n</table>";
166
  echo '<!--[if mso]></td></tr></table><![endif]-->';
167
  if ($wrapper) {
@@ -248,7 +256,7 @@ class NewsletterEmails extends NewsletterModule {
248
  header('X-Robots-Tag: noindex,nofollow,noarchive');
249
  header('Cache-Control: no-cache,no-store,private');
250
 
251
- echo $newsletter->replace($email->message, $user, $email->id);
252
 
253
  die();
254
  break;
@@ -277,6 +285,7 @@ class NewsletterEmails extends NewsletterModule {
277
  header('Content-Type: text/css');
278
  echo file_get_contents(__DIR__ . '/tnp-composer/css/newsletter.css');
279
  $dirs = apply_filters('newsletter_blocks_dir', array());
 
280
  foreach ($dirs as $dir) {
281
  $dir = str_replace('\\', '/', $dir);
282
  $list = NewsletterEmails::instance()->scan_blocks_dir($dir);
@@ -504,8 +513,9 @@ class NewsletterEmails extends NewsletterModule {
504
  $relative_dir = substr($dir, strlen(WP_CONTENT_DIR));
505
  while ($file = readdir($handle)) {
506
 
507
- if ($file == '.' || $file == '..') continue;
508
-
 
509
  // The block unique key, we should find out how to biuld it, maybe an hash of the (relative) dir?
510
  $block_id = sanitize_key($file);
511
 
@@ -544,9 +554,10 @@ class NewsletterEmails extends NewsletterModule {
544
  function get_blocks() {
545
 
546
  static $blocks = null;
547
-
548
- if (!is_null($blocks)) return $blocks;
549
-
 
550
  $blocks = array();
551
 
552
  // Legacy blocks
@@ -595,16 +606,18 @@ class NewsletterEmails extends NewsletterModule {
595
  */
596
  function get_block($id) {
597
  switch ($id) {
598
- case 'content-07-twocols.block':
599
- case 'content-06-posts.block':
600
  $id = 'posts';
601
  break;
602
  case 'content-04-cta.block': $id = 'cta';
603
  break;
 
 
604
  // case 'content-02-heading.block': $id = '/plugins/newsletter/emails/blocks/heading';
605
  // break;
606
  }
607
-
608
  // Conversion for old full path ID
609
  $id = sanitize_key(basename($id));
610
 
66
  */
67
  function render_block($block_id = null, $wrapper = false, $options = array()) {
68
  $width = 600;
69
+ $font_family = 'Helvetica, Arial, sans-serif';
70
 
71
  $block_options = get_option('newsletter_main');
72
 
91
  return;
92
  }
93
  $is_old_block = isset($block['filename']) && strpos($block['filename'], '.block');
94
+
95
  if ($is_old_block) {
96
  ob_start();
97
  include NEWSLETTER_DIR . '/emails/tnp-composer/blocks/' . $block['filename'] . '.php';
101
  include $block['dir'] . '/block.php';
102
  $content = ob_get_clean();
103
  }
104
+
105
  // Obsolete
106
  $content = str_replace('{width}', $width, $content);
107
  $content = $this->inline_css($content, true);
111
  $options['block_background'] = '';
112
  }
113
  $style = '';
114
+ $options['block_padding_top'] = (int)str_replace('px', '', $options['block_padding_top']);
115
+ $options['block_padding_bottom'] = (int)str_replace('px', '', $options['block_padding_bottom']);
116
+ $options['block_padding_right'] = (int)str_replace('px', '', $options['block_padding_right']);
117
+ $options['block_padding_left'] = (int)str_replace('px', '', $options['block_padding_left']);
118
+
119
+ if (isset($options['block_padding_top']))
120
+ $style .= 'padding-top: ' . $options['block_padding_top'] . 'px; ';
121
+ if (isset($options['block_padding_left']))
122
+ $style .= 'padding-left: ' . $options['block_padding_left'] . 'px; ';
123
+ if (isset($options['block_padding_right']))
124
+ $style .= 'padding-right: ' . $options['block_padding_right'] . 'px; ';
125
+ if (isset($options['block_padding_bottom']))
126
+ $style .= 'padding-bottom: ' . $options['block_padding_bottom'] . 'px; ';
127
+
128
  // Old block type
129
  if ($is_old_block) {
130
+
131
  echo '<table border="0" cellpadding="0" cellspacing="0" align="center" width="100%" style="border-collapse: collapse; width: 100%;" class="tnpc-row" data-id="', esc_attr($block_id), "\">\n";
132
  echo "<tr>\n";
133
  echo '<td align="center" style="padding: 0;">', "\n";
138
  echo '<td class="edit-block" align="center" style="', $style, 'text-align: center;" bgcolor="', $options['block_background'], '" width="100%">', "\n";
139
 
140
  echo $content;
141
+
142
  echo "</td>\n</tr>\n</table>";
143
  echo '<!--[if mso]></td></tr></table><![endif]-->';
144
  echo "\n</td>\n</tr></table>\n\n";
 
145
  } else {
146
 
147
  $data = '';
154
  }
155
  }
156
  }
157
+
158
  if ($wrapper) {
159
  echo '<table border="0" cellpadding="0" cellspacing="0" align="center" width="100%" style="border-collapse: collapse; width: 100%;" class="tnpc-row tnpc-row-block" data-id="', esc_attr($block_id), '">';
160
  echo '<tr>';
161
  echo '<td data-options="', esc_attr($data), '" align="center" style="padding: 0; font-family: Helvetica, Arial, sans-serif;" class="edit-block">';
162
  }
163
+
164
  // Container that fixes the width and makes the block responsive
165
  echo '<!--[if mso]><table border="0" cellpadding="0" align="center" cellspacing="0" width="' . $width . '"><tr><td width="' . $width . '"><![endif]-->';
166
  echo "\n";
169
  echo '<td align="center" style="', $style, 'text-align: center;" bgcolor="', $options['block_background'], '" width="100%">', "\n";
170
 
171
  echo $content;
172
+
173
  echo "</td>\n</tr>\n</table>";
174
  echo '<!--[if mso]></td></tr></table><![endif]-->';
175
  if ($wrapper) {
256
  header('X-Robots-Tag: noindex,nofollow,noarchive');
257
  header('Cache-Control: no-cache,no-store,private');
258
 
259
+ echo $newsletter->replace($email->message, $user, $email);
260
 
261
  die();
262
  break;
285
  header('Content-Type: text/css');
286
  echo file_get_contents(__DIR__ . '/tnp-composer/css/newsletter.css');
287
  $dirs = apply_filters('newsletter_blocks_dir', array());
288
+ array_push($dirs, __DIR__ . '/blocks');
289
  foreach ($dirs as $dir) {
290
  $dir = str_replace('\\', '/', $dir);
291
  $list = NewsletterEmails::instance()->scan_blocks_dir($dir);
513
  $relative_dir = substr($dir, strlen(WP_CONTENT_DIR));
514
  while ($file = readdir($handle)) {
515
 
516
+ if ($file == '.' || $file == '..')
517
+ continue;
518
+
519
  // The block unique key, we should find out how to biuld it, maybe an hash of the (relative) dir?
520
  $block_id = sanitize_key($file);
521
 
554
  function get_blocks() {
555
 
556
  static $blocks = null;
557
+
558
+ if (!is_null($blocks))
559
+ return $blocks;
560
+
561
  $blocks = array();
562
 
563
  // Legacy blocks
606
  */
607
  function get_block($id) {
608
  switch ($id) {
609
+ case 'content-07-twocols.block':
610
+ case 'content-06-posts.block':
611
  $id = 'posts';
612
  break;
613
  case 'content-04-cta.block': $id = 'cta';
614
  break;
615
+ case 'content-01-hero.block': $id = 'hero';
616
+ break;
617
  // case 'content-02-heading.block': $id = '/plugins/newsletter/emails/blocks/heading';
618
  // break;
619
  }
620
+
621
  // Conversion for old full path ID
622
  $id = sanitize_key(basename($id));
623
 
emails/tnp-composer/_css/newsletter-builder.css CHANGED
@@ -114,7 +114,7 @@
114
 
115
  #newsletter-builder-area {
116
  xbackground-color: #EDF1F4;
117
- width: 860px;
118
  margin-left: 30px;
119
  box-sizing: border-box;
120
  padding-left: 50px;
@@ -122,18 +122,19 @@
122
  margin-top: 30px;
123
  padding-top: 10px;
124
  border-radius: 10px;
125
- border: 1px solid #eee;
126
  margin-bottom: 30px;
127
  }
128
 
129
 
 
130
  #newsletter-builder-area-center-frame-content {
131
  /*float: left;*/
132
- width: 750px;
133
  /*background-color: rgba(153,153,153,1);*/
134
  min-height: 50px;
135
  padding-bottom: 75px;
136
- border: 1px dashed #eee;
137
  }
138
 
139
  #newsletter-mobile-preview-area {
@@ -141,22 +142,23 @@
141
  box-sizing: border-box;
142
  margin-top: 30px;
143
  text-align: center;
144
- border: 1px solid #eee;
145
  border-radius: 10px;
146
  padding-left: 10px;
147
  padding-right: 10px;
 
148
  }
149
  #newsletter-mobile-preview-area input {
150
  width: 100px;
151
  }
152
 
153
- #tnp-mobile-preview {
154
  width: 340px!important;
155
  height: 95%;
156
- padding-top: 10px;
157
- padding-bottom: 10px;
158
  box-sizing: border-box;
159
  }
 
160
  .tnpc-row {
161
  -webkit-transition: box-shadow 0.5s;
162
  -moz-transition: box-shadow 0.5s;
@@ -596,12 +598,33 @@
596
  padding: 10px;
597
  }
598
 
599
- #tnpc-block-options-form th, #tnpc-block-options-form td {
 
 
 
 
 
 
 
 
 
 
600
  padding: 5px;
 
 
601
  }
602
 
603
  #tnpc-block-options-form table.form-table {
604
  margin: 0px;
605
  border-collapse: separate!important;
606
- border-spacing: 3px!important;
607
  }
 
 
 
 
 
 
 
 
 
114
 
115
  #newsletter-builder-area {
116
  xbackground-color: #EDF1F4;
117
+ width: 750px;
118
  margin-left: 30px;
119
  box-sizing: border-box;
120
  padding-left: 50px;
122
  margin-top: 30px;
123
  padding-top: 10px;
124
  border-radius: 10px;
125
+ border: 1px solid #ddd;
126
  margin-bottom: 30px;
127
  }
128
 
129
 
130
+
131
  #newsletter-builder-area-center-frame-content {
132
  /*float: left;*/
133
+ /*width: 730px;*/
134
  /*background-color: rgba(153,153,153,1);*/
135
  min-height: 50px;
136
  padding-bottom: 75px;
137
+ /*border: 1px dashed #eee;*/
138
  }
139
 
140
  #newsletter-mobile-preview-area {
142
  box-sizing: border-box;
143
  margin-top: 30px;
144
  text-align: center;
145
+ border: 1px solid #ddd;
146
  border-radius: 10px;
147
  padding-left: 10px;
148
  padding-right: 10px;
149
+ padding-top: 10px;
150
  }
151
  #newsletter-mobile-preview-area input {
152
  width: 100px;
153
  }
154
 
155
+ iframe#tnp-mobile-preview {
156
  width: 340px!important;
157
  height: 95%;
158
+ padding: 0;
 
159
  box-sizing: border-box;
160
  }
161
+
162
  .tnpc-row {
163
  -webkit-transition: box-shadow 0.5s;
164
  -moz-transition: box-shadow 0.5s;
598
  padding: 10px;
599
  }
600
 
601
+ #tnpc-block-options-form h3 {
602
+ color: #000;
603
+ }
604
+
605
+ #tnpc-block-options-form table.form-table th {
606
+ background-color: #f4f4f4;
607
+ width: 150px;
608
+ vertical-align: top;
609
+ }
610
+
611
+ #tnpc-block-options-form table.form-table th, #tnpc-block-options-form table.form-table td {
612
  padding: 5px;
613
+ padding-right: 15px;
614
+ padding-top: 15px;
615
  }
616
 
617
  #tnpc-block-options-form table.form-table {
618
  margin: 0px;
619
  border-collapse: separate!important;
620
+ border-spacing: 1px!important;
621
  }
622
+
623
+ #tnpc-block-options-form table.form-table table.tnp-button-colors {
624
+ border: 0;
625
+ border-collapse: collapse;
626
+ }
627
+ #tnpc-block-options-form table.form-table table.tnp-button-colors td {
628
+ border: 0;
629
+ padding-top: 0;
630
+ }
emails/tnp-composer/blocks/{content-01-hero.block.php → _/content-01-hero.block.php} RENAMED
File without changes
emails/tnp-composer/blocks/_/content-01-hero.block.png ADDED
Binary file
emails/tnp-composer/blocks/content-05-image.block.php CHANGED
@@ -5,7 +5,7 @@
5
 
6
  <div class="tnpc-row-edit" data-type="image">
7
  <a href="#" target="_blank">
8
- <img src="https://unsplash.it/800/300?image=998" border="0" alt="Insert alt text here" width="<?php echo $width ?>" style="width: <?php echo $width ?>px; max-width: 100%!important; height: auto!important;display: block; color: #666666;" class="img-max">
9
  </a>
10
  </div>
11
 
5
 
6
  <div class="tnpc-row-edit" data-type="image">
7
  <a href="#" target="_blank">
8
+ <img src="https://unsplash.it/800/300?image=998" border="0" alt="Insert alt text here" style="max-width: 100%!important; height: auto!important;display: block;" class="img-max">
9
  </a>
10
  </div>
11
 
emails/tnp-composer/css/newsletter.css CHANGED
@@ -40,7 +40,7 @@ table{border-collapse:collapse !important;}
40
 
41
  img[class="img-max"]{
42
  max-width: 100% !important;
43
- width: 100% !important;
44
  height:auto !important;
45
  }
46
 
40
 
41
  img[class="img-max"]{
42
  max-width: 100% !important;
43
+ /*width: 100% !important;*/
44
  height:auto !important;
45
  }
46
 
includes/controls.php CHANGED
@@ -1347,6 +1347,12 @@ class NewsletterControls {
1347
  return NewsletterUsers::instance()->get_test_users();
1348
  }
1349
 
 
 
 
 
 
 
1350
  function css_font_size($name = 'font_size') {
1351
  $value = $this->get_value($name);
1352
 
@@ -1358,7 +1364,23 @@ class NewsletterControls {
1358
  }
1359
  echo '>' . $i . '</option>';
1360
  }
1361
- echo '</select>&nbsp;px';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1362
  }
1363
 
1364
  function css_font_family($name = 'font_family') {
@@ -1456,19 +1478,16 @@ class NewsletterControls {
1456
  }
1457
 
1458
  function language($name = 'language') {
1459
- if (!class_exists('SitePress')) {
1460
- echo __('Install WPML or Polylang for multilanguage support', 'newsletter');
 
1461
  return;
1462
  }
1463
 
1464
- $languages = apply_filters('wpml_active_languages', null);
1465
- $language_options = array('' => 'All');
1466
- foreach ($languages as $language) {
1467
- $language_options[$language['language_code']] = $language['translated_name'];
1468
- }
1469
-
1470
-
1471
- $this->select($name, $language_options);
1472
  }
1473
 
1474
  function is_multilanguage() {
1347
  return NewsletterUsers::instance()->get_test_users();
1348
  }
1349
 
1350
+ function css_font($name = 'font', $attrs = array()) {
1351
+ $this->css_font_family($name . '_family');
1352
+ $this->css_font_size($name . '_size');
1353
+ $this->css_font_weight($name . '_weight');
1354
+ }
1355
+
1356
  function css_font_size($name = 'font_size') {
1357
  $value = $this->get_value($name);
1358
 
1364
  }
1365
  echo '>' . $i . '</option>';
1366
  }
1367
+ echo '</select>';
1368
+ }
1369
+
1370
+ function css_font_weight($name = 'font_weight') {
1371
+ $value = $this->get_value($name);
1372
+
1373
+ $fonts = array('Normal', 'Bold');
1374
+
1375
+ echo '<select id="options-' . esc_attr($name) . '" name="options[' . esc_attr($name) . ']">';
1376
+ foreach ($fonts as $font) {
1377
+ echo '<option value="', esc_attr($font), '"';
1378
+ if ($value == $font) {
1379
+ echo ' selected';
1380
+ }
1381
+ echo '>', esc_html($font), '</option>';
1382
+ }
1383
+ echo '</select>';
1384
  }
1385
 
1386
  function css_font_family($name = 'font_family') {
1478
  }
1479
 
1480
  function language($name = 'language') {
1481
+ if (!class_exists('SitePress') && !function_exists('pll_default_language') && !class_exists('TRP_Translate_Press')) {
1482
+ echo __('Install a multilanguage plugin.', 'newsletter');
1483
+ echo ' <a href="https://www.thenewsletterplugin.com/documentation/multilanguage" target="_blank">', __('Read more', 'newsletter'), '</a>';
1484
  return;
1485
  }
1486
 
1487
+ $languages = Newsletter::instance()->get_languages();
1488
+ $languages = array_merge(array('' => 'All'), $languages);
1489
+
1490
+ $this->select($name, $languages);
 
 
 
 
1491
  }
1492
 
1493
  function is_multilanguage() {
includes/helper.php CHANGED
@@ -76,8 +76,12 @@ function tnp_media_resize($media_id, $size) {
76
 
77
  // Thumbnail generation if needed.
78
  if (!file_exists($absolute_thumb) || filemtime($absolute_thumb) < filemtime($absolute_file)) {
79
- wp_mkdir_p(WP_CONTENT_DIR . '/newsletter/thumbnails/' . $pathinfo['dirname']);
80
-
 
 
 
 
81
  $editor = wp_get_image_editor($absolute_file);
82
  if (is_wp_error($editor)) {
83
  return $editor;
76
 
77
  // Thumbnail generation if needed.
78
  if (!file_exists($absolute_thumb) || filemtime($absolute_thumb) < filemtime($absolute_file)) {
79
+ $r = wp_mkdir_p(WP_CONTENT_DIR . '/newsletter/thumbnails/' . $pathinfo['dirname']);
80
+
81
+ if (!$r) {
82
+ return $uploads['baseurl'] . '/' . $relative_file;
83
+ }
84
+
85
  $editor = wp_get_image_editor($absolute_file);
86
  if (is_wp_error($editor)) {
87
  return $editor;
includes/module.php CHANGED
@@ -1155,8 +1155,8 @@ class NewsletterModule {
1155
  }
1156
 
1157
  /**
1158
- * Add to a destination url the parameters to identify the user, the email and to show
1159
- * an alert message, if required. The parameters and them managed by the [newsletter] shortcode.
1160
  *
1161
  * @param string $url If empty the standard newsletter page URL is used (usually it is empty, but sometime a custom URL has been specified)
1162
  * @param string $message_key The message identifier
@@ -1212,7 +1212,7 @@ class NewsletterModule {
1212
  }
1213
  return $url;
1214
  }
1215
-
1216
  function get_subscribe_url() {
1217
  return $this->build_action_url('s');
1218
  }
@@ -1302,7 +1302,7 @@ class NewsletterModule {
1302
 
1303
  return $this->get_user($user);
1304
  }
1305
-
1306
  /**
1307
  *
1308
  * @global wpdb $wpdb
@@ -1313,11 +1313,11 @@ class NewsletterModule {
1313
  global $wpdb;
1314
 
1315
  $token = $this->get_token();
1316
-
1317
  $this->query($wpdb->prepare("update " . NEWSLETTER_USERS_TABLE . " set token=%s where id=%d limit 1", $token, $user->id));
1318
 
1319
  return $this->get_user($user);
1320
- }
1321
 
1322
  /**
1323
  * Create a log entry with the meaningful user data.
@@ -1373,7 +1373,7 @@ class NewsletterModule {
1373
  function get_user_by_wp_user_id($wp_user_id, $format = OBJECT) {
1374
  return $this->store->get_single_by_field(NEWSLETTER_USERS_TABLE, 'wp_user_id', $wp_user_id, $format);
1375
  }
1376
-
1377
  /**
1378
  * Returns the user language IF there is a supported mutilanguage plugin installed.
1379
  * @param TNP_User $user
@@ -1734,12 +1734,13 @@ class NewsletterModule {
1734
  * @return string The language code
1735
  */
1736
  function get_current_language($user = null) {
 
1737
  // TODO: Check if the blog is multilanguage?
1738
-
1739
  if ($user && $user->language) {
1740
  return $user->language;
1741
  }
1742
-
1743
  if (class_exists('SitePress')) {
1744
  $current_language = apply_filters('wpml_current_language', '');
1745
  if ($current_language == 'all') {
@@ -1750,15 +1751,19 @@ class NewsletterModule {
1750
  if (function_exists('pll_current_language')) {
1751
  return pll_current_language();
1752
  }
1753
- return '';
 
 
 
1754
  }
1755
 
1756
  function get_default_language() {
1757
  if (class_exists('SitePress')) {
1758
  return $current_language = apply_filters('wpml_current_language', '');
1759
- }
1760
- if (function_exists('pll_default_language')) {
1761
  return pll_default_language();
 
 
1762
  }
1763
  return '';
1764
  }
@@ -1770,45 +1775,49 @@ class NewsletterModule {
1770
  function is_default_language() {
1771
  return $this->get_current_language() == $this->get_default_language();
1772
  }
1773
-
1774
  /**
1775
- * Returns an array od languages with key the language code and value the language name.
1776
  * An empty array is returned if no language is available.
1777
  */
1778
  function get_languages() {
1779
  $language_options = array();
 
1780
  if (class_exists('SitePress')) {
1781
  $languages = apply_filters('wpml_active_languages', null);
1782
  foreach ($languages as $language) {
1783
  $language_options[$language['language_code']] = $language['translated_name'];
1784
  }
 
1785
  } else if (function_exists('icl_get_languages')) {
1786
  $languages = icl_get_languages();
1787
- foreach ($languages as $code=>$language) {
1788
  $language_options[$code] = $language['native_name'];
1789
  }
1790
- }
1791
-
1792
- return $language_options;
 
1793
  }
1794
-
1795
  function get_language_label($language) {
1796
  $languages = $this->get_languages();
1797
- if (isset($languages[$language])) return $languages[$language];
 
1798
  return '';
1799
-
1800
  }
1801
 
1802
  function switch_language($language) {
1803
  if (class_exists('SitePress')) {
1804
- if (empty($language)) $language = 'all';
 
1805
  do_action('wpml_switch_language', $language);
1806
  return;
1807
  }
1808
  }
1809
 
1810
  function is_multilanguage() {
1811
- return class_exists('SitePress') || function_exists('pll_default_language');
1812
  }
1813
 
1814
  function get_posts($filters = array(), $language = '') {
1155
  }
1156
 
1157
  /**
1158
+ * Add to a destination URL the parameters to identify the user, the email and to show
1159
+ * an alert message, if required. The parameters are then managed by the [newsletter] shortcode.
1160
  *
1161
  * @param string $url If empty the standard newsletter page URL is used (usually it is empty, but sometime a custom URL has been specified)
1162
  * @param string $message_key The message identifier
1212
  }
1213
  return $url;
1214
  }
1215
+
1216
  function get_subscribe_url() {
1217
  return $this->build_action_url('s');
1218
  }
1302
 
1303
  return $this->get_user($user);
1304
  }
1305
+
1306
  /**
1307
  *
1308
  * @global wpdb $wpdb
1313
  global $wpdb;
1314
 
1315
  $token = $this->get_token();
1316
+
1317
  $this->query($wpdb->prepare("update " . NEWSLETTER_USERS_TABLE . " set token=%s where id=%d limit 1", $token, $user->id));
1318
 
1319
  return $this->get_user($user);
1320
+ }
1321
 
1322
  /**
1323
  * Create a log entry with the meaningful user data.
1373
  function get_user_by_wp_user_id($wp_user_id, $format = OBJECT) {
1374
  return $this->store->get_single_by_field(NEWSLETTER_USERS_TABLE, 'wp_user_id', $wp_user_id, $format);
1375
  }
1376
+
1377
  /**
1378
  * Returns the user language IF there is a supported mutilanguage plugin installed.
1379
  * @param TNP_User $user
1734
  * @return string The language code
1735
  */
1736
  function get_current_language($user = null) {
1737
+ global $TRP_LANGUAGE, $current_user;
1738
  // TODO: Check if the blog is multilanguage?
1739
+
1740
  if ($user && $user->language) {
1741
  return $user->language;
1742
  }
1743
+
1744
  if (class_exists('SitePress')) {
1745
  $current_language = apply_filters('wpml_current_language', '');
1746
  if ($current_language == 'all') {
1751
  if (function_exists('pll_current_language')) {
1752
  return pll_current_language();
1753
  }
1754
+
1755
+ $current_language = apply_filters('newsletter_current_language', '');
1756
+
1757
+ return $current_language;
1758
  }
1759
 
1760
  function get_default_language() {
1761
  if (class_exists('SitePress')) {
1762
  return $current_language = apply_filters('wpml_current_language', '');
1763
+ } else if (function_exists('pll_default_language')) {
 
1764
  return pll_default_language();
1765
+ } else if (class_exists('TRP_Translate_Press')) {
1766
+ // TODO: Find the default language
1767
  }
1768
  return '';
1769
  }
1775
  function is_default_language() {
1776
  return $this->get_current_language() == $this->get_default_language();
1777
  }
1778
+
1779
  /**
1780
+ * Returns an array of languages with key the language code and value the language name.
1781
  * An empty array is returned if no language is available.
1782
  */
1783
  function get_languages() {
1784
  $language_options = array();
1785
+
1786
  if (class_exists('SitePress')) {
1787
  $languages = apply_filters('wpml_active_languages', null);
1788
  foreach ($languages as $language) {
1789
  $language_options[$language['language_code']] = $language['translated_name'];
1790
  }
1791
+ return $language_options;
1792
  } else if (function_exists('icl_get_languages')) {
1793
  $languages = icl_get_languages();
1794
+ foreach ($languages as $code => $language) {
1795
  $language_options[$code] = $language['native_name'];
1796
  }
1797
+ return $language_options;
1798
+ }
1799
+
1800
+ return apply_filters('newsletter_languages', $language_options);
1801
  }
1802
+
1803
  function get_language_label($language) {
1804
  $languages = $this->get_languages();
1805
+ if (isset($languages[$language]))
1806
+ return $languages[$language];
1807
  return '';
 
1808
  }
1809
 
1810
  function switch_language($language) {
1811
  if (class_exists('SitePress')) {
1812
+ if (empty($language))
1813
+ $language = 'all';
1814
  do_action('wpml_switch_language', $language);
1815
  return;
1816
  }
1817
  }
1818
 
1819
  function is_multilanguage() {
1820
+ return class_exists('SitePress') || function_exists('pll_default_language') || class_exists('TRP_Translate_Press');
1821
  }
1822
 
1823
  function get_posts($filters = array(), $language = '') {
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.7.0
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.7.0');
18
 
19
  global $newsletter, $wpdb;
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.7.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.7.2');
18
 
19
  global $newsletter, $wpdb;
20
 
profile/index.php CHANGED
@@ -142,7 +142,7 @@ if ($controls->is_action()) {
142
  </table>
143
  <?php } else { ?>
144
 
145
- <p>Switch to your main language to manage these options.</p>
146
 
147
 
148
 
142
  </table>
143
  <?php } else { ?>
144
 
145
+ <p>Switch to "All languages" to manage these options.</p>
146
 
147
 
148
 
readme.txt CHANGED
@@ -2,7 +2,7 @@
2
  Tags: newsletter,email,subscription,mass mail,list build,email marketing,direct mailing,automation,automated,mailing list
3
  Requires at least: 3.4.0
4
  Tested up to: 4.9.8
5
- Stable tag: 5.7.0
6
  Contributors: satollo,webagile,michael-travan
7
 
8
  Add a real newsletter system to your blog. For free. With unlimited newsletters and subscribers.
@@ -108,6 +108,16 @@ Thank you, The Newsletter Team
108
 
109
  == Changelog ==
110
 
 
 
 
 
 
 
 
 
 
 
111
  = 5.7.0 =
112
 
113
  * Cancellation error message fix
2
  Tags: newsletter,email,subscription,mass mail,list build,email marketing,direct mailing,automation,automated,mailing list
3
  Requires at least: 3.4.0
4
  Tested up to: 4.9.8
5
+ Stable tag: 5.7.2
6
  Contributors: satollo,webagile,michael-travan
7
 
8
  Add a real newsletter system to your blog. For free. With unlimited newsletters and subscribers.
108
 
109
  == Changelog ==
110
 
111
+ = 5.7.2 =
112
+
113
+ * Improvements on posts block
114
+ * New hero block layout
115
+ * Transaltepress extension compatibility pack
116
+
117
+ = 5.7.1 =
118
+
119
+ * Improvements on posts block
120
+
121
  = 5.7.0 =
122
 
123
  * Cancellation error message fix
subscription/options.php CHANGED
@@ -169,7 +169,7 @@ if ($controls->is_action()) {
169
  </tr>
170
  </table>
171
  <?php } else { ?>
172
- <p>Switch to your main language to manage these options.</p>
173
  <?php } ?>
174
 
175
  </div>
169
  </tr>
170
  </table>
171
  <?php } else { ?>
172
+ <p>Switch to "All languages" to manage these options.</p>
173
  <?php } ?>
174
 
175
  </div>