Version Description
- Hero block fix
Download this release
Release Info
Developer | satollo |
Plugin | Newsletter |
Version | 6.5.0 |
Comparing to | |
See all releases |
Code changes from version 6.4.9 to 6.5.0
- emails/blocks/hero/block.php +4 -1
- includes/composer.php +63 -38
- includes/controls.php +1 -1
- plugin.php +2 -2
- readme.txt +5 -1
emails/blocks/hero/block.php
CHANGED
@@ -23,7 +23,8 @@ $defaults = array(
|
|
23 |
'layout' => 'full',
|
24 |
'button_url' => '',
|
25 |
'button_label' => 'Click Here',
|
26 |
-
'
|
|
|
27 |
'button_font_size' => 20,
|
28 |
'button_background' => '#256F9C',
|
29 |
'block_padding_top'=>20,
|
@@ -120,6 +121,7 @@ if (!empty($options['image']['id'])) {
|
|
120 |
|
121 |
<tr>
|
122 |
<td align="center">
|
|
|
123 |
<?php echo tnpc_button($options)?>
|
124 |
</td>
|
125 |
</tr>
|
@@ -177,6 +179,7 @@ if (!empty($options['image']['id'])) {
|
|
177 |
<table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%">
|
178 |
<tr>
|
179 |
<td align="center" vertical-align="middle" style="font-size:0px;padding:10px 25px;word-break:break-word;">
|
|
|
180 |
<?php echo tnpc_button($options)?>
|
181 |
</td>
|
182 |
</tr>
|
23 |
'layout' => 'full',
|
24 |
'button_url' => '',
|
25 |
'button_label' => 'Click Here',
|
26 |
+
'button_font_color' => '#ffffff',
|
27 |
+
'button_font_weight' => 'normal',
|
28 |
'button_font_size' => 20,
|
29 |
'button_background' => '#256F9C',
|
30 |
'block_padding_top'=>20,
|
121 |
|
122 |
<tr>
|
123 |
<td align="center">
|
124 |
+
<br>
|
125 |
<?php echo tnpc_button($options)?>
|
126 |
</td>
|
127 |
</tr>
|
179 |
<table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%">
|
180 |
<tr>
|
181 |
<td align="center" vertical-align="middle" style="font-size:0px;padding:10px 25px;word-break:break-word;">
|
182 |
+
|
183 |
<?php echo tnpc_button($options)?>
|
184 |
</td>
|
185 |
</tr>
|
includes/composer.php
CHANGED
@@ -5,6 +5,18 @@ function tnp_register_block($dir) {
|
|
5 |
return TNP_Composer::register_block($dir);
|
6 |
}
|
7 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
class TNP_Composer {
|
9 |
|
10 |
static $block_dirs = array();
|
@@ -276,43 +288,56 @@ class TNP_Composer {
|
|
276 |
$controls->data['subject'] = $email->subject;
|
277 |
}
|
278 |
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
317 |
|
318 |
}
|
5 |
return TNP_Composer::register_block($dir);
|
6 |
}
|
7 |
|
8 |
+
/**
|
9 |
+
* Generates and HTML button for email using the values found on $options and
|
10 |
+
* prefixed by $prefix, with the standard syntax of NewsletterFields::button().
|
11 |
+
*
|
12 |
+
* @param array $options
|
13 |
+
* @param string $prefix
|
14 |
+
* @return string
|
15 |
+
*/
|
16 |
+
function tnpc_button($options, $prefix = 'button') {
|
17 |
+
return TNP_Composer::button($options, $prefix);
|
18 |
+
}
|
19 |
+
|
20 |
class TNP_Composer {
|
21 |
|
22 |
static $block_dirs = array();
|
288 |
$controls->data['subject'] = $email->subject;
|
289 |
}
|
290 |
|
291 |
+
/**
|
292 |
+
* Extract inline edited post field from inline_edit_list[]
|
293 |
+
*
|
294 |
+
* @param array $inline_edit_list
|
295 |
+
* @param string $field_type
|
296 |
+
* @param int $post_id
|
297 |
+
*
|
298 |
+
* @return string
|
299 |
+
*/
|
300 |
+
static function get_edited_inline_post_field($inline_edit_list, $field_type, $post_id) {
|
301 |
+
|
302 |
+
foreach ($inline_edit_list as $edit) {
|
303 |
+
if ($edit['type'] == $field_type && $edit['post_id'] == $post_id) {
|
304 |
+
return $edit['content'];
|
305 |
+
}
|
306 |
+
}
|
307 |
+
|
308 |
+
return '';
|
309 |
+
}
|
310 |
+
|
311 |
+
/**
|
312 |
+
* Check if inline_edit_list[] have inline edit field for specific post
|
313 |
+
*
|
314 |
+
* @param array $inline_edit_list
|
315 |
+
* @param string $field_type
|
316 |
+
* @param int $post_id
|
317 |
+
*
|
318 |
+
* @return bool
|
319 |
+
*/
|
320 |
+
static function is_post_field_edited_inline($inline_edit_list, $field_type, $post_id) {
|
321 |
+
foreach ($inline_edit_list as $edit) {
|
322 |
+
if ($edit['type'] == $field_type && $edit['post_id'] == $post_id) {
|
323 |
+
return true;
|
324 |
+
}
|
325 |
+
}
|
326 |
+
|
327 |
+
return false;
|
328 |
+
}
|
329 |
+
|
330 |
+
static function button($options, $prefix = 'button') {
|
331 |
+
$b = '<table border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-collapse:separate;line-height:100%;">';
|
332 |
+
$b .= '<tr>';
|
333 |
+
$b .= '<td align="center" bgcolor="' . $options[$prefix . '_background'] . '" role="presentation" style="border:none;border-radius:3px;cursor:auto;mso-padding-alt:10px 25px;background:' . $options[$prefix . '_background'] . '" valign="middle">';
|
334 |
+
$b .= '<a href="' . $options[$prefix . '_url'] . '"';
|
335 |
+
$b .= ' style="display:inline-block;background:' . $options[$prefix . '_background'] . ';color:' . $options[$prefix . '_font_color'] . ';font-family:' . $options[$prefix . '_font_family'] . ';font-size:' . $options[$prefix . '_font_size'] . 'px;font-weight:' . $options[$prefix . '_font_weight'] . ';line-height:120%;margin:0;text-decoration:none;text-transform:none;padding:10px 25px;mso-padding-alt:0px;border-radius:3px;"';
|
336 |
+
$b .= ' target="_blank">';
|
337 |
+
$b .= $options[$prefix . '_label'];
|
338 |
+
$b .= '</a>';
|
339 |
+
$b .= '</td></tr></table>';
|
340 |
+
return $b;
|
341 |
+
}
|
342 |
|
343 |
}
|
includes/controls.php
CHANGED
@@ -1406,7 +1406,7 @@ class NewsletterControls {
|
|
1406 |
echo '<select id="options-' . esc_attr($name) . '" name="options[' . esc_attr($name) . ']">';
|
1407 |
foreach ($fonts as $key => $font) {
|
1408 |
echo '<option value="', esc_attr($key), '"';
|
1409 |
-
if ($value == $
|
1410 |
echo ' selected';
|
1411 |
}
|
1412 |
echo '>', esc_html($font), '</option>';
|
1406 |
echo '<select id="options-' . esc_attr($name) . '" name="options[' . esc_attr($name) . ']">';
|
1407 |
foreach ($fonts as $key => $font) {
|
1408 |
echo '<option value="', esc_attr($key), '"';
|
1409 |
+
if ($value == $key) {
|
1410 |
echo ' selected';
|
1411 |
}
|
1412 |
echo '>', esc_html($font), '</option>';
|
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: 6.
|
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.
|
@@ -28,7 +28,7 @@
|
|
28 |
|
29 |
*/
|
30 |
|
31 |
-
define('NEWSLETTER_VERSION', '6.
|
32 |
|
33 |
global $newsletter, $wpdb;
|
34 |
|
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: 6.5.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.
|
28 |
|
29 |
*/
|
30 |
|
31 |
+
define('NEWSLETTER_VERSION', '6.5.0');
|
32 |
|
33 |
global $newsletter, $wpdb;
|
34 |
|
readme.txt
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
Tags: email, email marketing, newsletter, newsletter subscribers, welcome email, signup forms, contact, lead generation, popup, marketing automation
|
3 |
Requires at least: 3.4.0
|
4 |
Tested up to: 5.3.2
|
5 |
-
Stable tag: 6.
|
6 |
Requires PHP: 5.6
|
7 |
Contributors: satollo,webagile,michael-travan
|
8 |
|
@@ -109,6 +109,10 @@ Thank you, The Newsletter Team
|
|
109 |
|
110 |
== Changelog ==
|
111 |
|
|
|
|
|
|
|
|
|
112 |
= 6.4.9 =
|
113 |
|
114 |
* Added background selection to the composer
|
2 |
Tags: email, email marketing, newsletter, newsletter subscribers, welcome email, signup forms, contact, lead generation, popup, marketing automation
|
3 |
Requires at least: 3.4.0
|
4 |
Tested up to: 5.3.2
|
5 |
+
Stable tag: 6.5.0
|
6 |
Requires PHP: 5.6
|
7 |
Contributors: satollo,webagile,michael-travan
|
8 |
|
109 |
|
110 |
== Changelog ==
|
111 |
|
112 |
+
= 6.5.0 =
|
113 |
+
|
114 |
+
* Hero block fix
|
115 |
+
|
116 |
= 6.4.9 =
|
117 |
|
118 |
* Added background selection to the composer
|