Newsletter - Version 7.4.1

Version Description

  • Added check on invalid media on two columns post type
  • WP 5.9.2 compatibility check
Download this release

Release Info

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

Code changes from version 7.4.0 to 7.4.1

Files changed (3) hide show
  1. emails/blocks/posts/layout-two.php +69 -70
  2. plugin.php +2 -2
  3. readme.txt +7 -2
emails/blocks/posts/layout-two.php CHANGED
@@ -51,87 +51,86 @@ $items = [];
51
  </style>
52
 
53
 
54
- <?php foreach ($posts AS $p) { ?>
55
- <?php
56
- $media = null;
57
- if ($show_image) {
58
- $media = tnp_composer_block_posts_get_media($p, $size, $image_placeholder_url);
 
59
  $media->link = tnp_post_permalink($p);
60
  $media->set_width($column_width);
61
  }
 
62
 
63
- $meta = [];
64
 
65
- if ($show_date) {
66
- $meta[] = tnp_post_date($p);
67
- }
68
 
69
- if ($show_author) {
70
- $author_object = get_user_by('id', $p->post_author);
71
- if ($author_object) {
72
- $meta[] = $author_object->display_name;
73
- }
74
  }
 
75
 
76
- $button_options['button_url'] = tnp_post_permalink($p);
77
- ob_start();
78
- ?>
79
-
80
-
81
-
82
- <table cellpadding="0" cellspacing="0" border="0" width="100%">
83
- <?php if ($media) { ?>
84
- <tr>
85
- <td align="center" valign="middle">
86
- <?php echo TNP_Composer::image($media, ['class' => 'fluid']) ?>
87
- </td>
88
- </tr>
89
- <?php } ?>
90
- <tr>
91
- <td align="center" inline-class="title" class="title tnpc-row-edit tnpc-inline-editable" data-type="title" data-id="<?php echo $p->ID ?>">
92
- <?php
93
- echo TNP_Composer::is_post_field_edited_inline($options['inline_edits'], 'title', $p->ID) ?
94
- TNP_Composer::get_edited_inline_post_field($options['inline_edits'], 'title', $p->ID) :
95
- tnp_post_title($p)
96
- ?>
97
- </td>
98
- </tr>
99
- <?php if ($meta) { ?>
100
- <tr>
101
- <td align="center" inline-class="meta" class="meta">
102
- <?php echo esc_html(implode(' - ', $meta)) ?>
103
- </td>
104
- </tr>
105
- <?php } ?>
106
-
107
-
108
- <?php if ($excerpt_length) { ?>
109
- <tr>
110
- <td align="center" inline-class="excerpt" class="title tnpc-row-edit tnpc-inline-editable" data-type="text" data-id="<?php echo $p->ID ?>">
111
- <?php
112
- echo TNP_Composer::is_post_field_edited_inline($options['inline_edits'], 'text', $p->ID) ?
113
- TNP_Composer::get_edited_inline_post_field($options['inline_edits'], 'text', $p->ID) :
114
- tnp_post_excerpt($p, $excerpt_length)
115
- ?>
116
- </td>
117
- </tr>
118
- <?php } ?>
119
-
120
- <?php if ($show_read_more_button) { ?>
121
- <tr>
122
- <td align="center" inline-class="button">
123
- <?php echo TNP_Composer::button($button_options) ?>
124
- </td>
125
- </tr>
126
- <?php } ?>
127
- </table>
128
  <?php
129
- $items[] = ob_get_clean();
130
-
131
- } ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
132
 
133
 
134
- <?php echo TNP_Composer::grid($items, ['width'=>$total_width, 'responsive'=>true, 'padding'=>5])?>
135
 
136
 
137
 
51
  </style>
52
 
53
 
54
+ <?php foreach ($posts AS $p) { ?>
55
+ <?php
56
+ $media = null;
57
+ if ($show_image) {
58
+ $media = tnp_composer_block_posts_get_media($p, $size, $image_placeholder_url);
59
+ if ($media) {
60
  $media->link = tnp_post_permalink($p);
61
  $media->set_width($column_width);
62
  }
63
+ }
64
 
65
+ $meta = [];
66
 
67
+ if ($show_date) {
68
+ $meta[] = tnp_post_date($p);
69
+ }
70
 
71
+ if ($show_author) {
72
+ $author_object = get_user_by('id', $p->post_author);
73
+ if ($author_object) {
74
+ $meta[] = $author_object->display_name;
 
75
  }
76
+ }
77
 
78
+ $button_options['button_url'] = tnp_post_permalink($p);
79
+ ob_start();
80
+ ?>
81
+ <table cellpadding="0" cellspacing="0" border="0" width="100%">
82
+ <?php if ($media) { ?>
83
+ <tr>
84
+ <td align="center" valign="middle">
85
+ <?php echo TNP_Composer::image($media, ['class' => 'fluid']) ?>
86
+ </td>
87
+ </tr>
88
+ <?php } ?>
89
+ <tr>
90
+ <td align="center" inline-class="title" class="title tnpc-row-edit tnpc-inline-editable" data-type="title" data-id="<?php echo $p->ID ?>">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
91
  <?php
92
+ echo TNP_Composer::is_post_field_edited_inline($options['inline_edits'], 'title', $p->ID) ?
93
+ TNP_Composer::get_edited_inline_post_field($options['inline_edits'], 'title', $p->ID) :
94
+ tnp_post_title($p)
95
+ ?>
96
+ </td>
97
+ </tr>
98
+ <?php if ($meta) { ?>
99
+ <tr>
100
+ <td align="center" inline-class="meta" class="meta">
101
+ <?php echo esc_html(implode(' - ', $meta)) ?>
102
+ </td>
103
+ </tr>
104
+ <?php } ?>
105
+
106
+
107
+ <?php if ($excerpt_length) { ?>
108
+ <tr>
109
+ <td align="center" inline-class="excerpt" class="title tnpc-row-edit tnpc-inline-editable" data-type="text" data-id="<?php echo $p->ID ?>">
110
+ <?php
111
+ echo TNP_Composer::is_post_field_edited_inline($options['inline_edits'], 'text', $p->ID) ?
112
+ TNP_Composer::get_edited_inline_post_field($options['inline_edits'], 'text', $p->ID) :
113
+ tnp_post_excerpt($p, $excerpt_length)
114
+ ?>
115
+ </td>
116
+ </tr>
117
+ <?php } ?>
118
+
119
+ <?php if ($show_read_more_button) { ?>
120
+ <tr>
121
+ <td align="center" inline-class="button">
122
+ <?php echo TNP_Composer::button($button_options) ?>
123
+ </td>
124
+ </tr>
125
+ <?php } ?>
126
+ </table>
127
+ <?php
128
+ $items[] = ob_get_clean();
129
+ }
130
+ ?>
131
 
132
 
133
+ <?php echo TNP_Composer::grid($items, ['width' => $total_width, 'responsive' => true, 'padding' => 5]) ?>
134
 
135
 
136
 
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: 7.4.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.
@@ -37,7 +37,7 @@ if (version_compare(phpversion(), '5.6', '<')) {
37
  return;
38
  }
39
 
40
- define('NEWSLETTER_VERSION', '7.4.0');
41
 
42
  global $newsletter, $wpdb;
43
 
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: 7.4.1
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.
37
  return;
38
  }
39
 
40
+ define('NEWSLETTER_VERSION', '7.4.1');
41
 
42
  global $newsletter, $wpdb;
43
 
readme.txt CHANGED
@@ -1,7 +1,7 @@
1
  === Newsletter ===
2
  Tags: newsletter, email marketing, welcome email, signup forms, contact, lead generation, marketing automation
3
- Tested up to: 5.9
4
- Stable tag: 7.4.0
5
  Contributors: satollo,webagile,michael-travan
6
  License: GPLv2 or later
7
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
@@ -125,6 +125,11 @@ Thank you, The Newsletter Team
125
 
126
  == Changelog ==
127
 
 
 
 
 
 
128
  = 7.4.0 =
129
 
130
  * Added privacy links
1
  === Newsletter ===
2
  Tags: newsletter, email marketing, welcome email, signup forms, contact, lead generation, marketing automation
3
+ Tested up to: 5.9.2
4
+ Stable tag: 7.4.1
5
  Contributors: satollo,webagile,michael-travan
6
  License: GPLv2 or later
7
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
125
 
126
  == Changelog ==
127
 
128
+ = 7.4.1 =
129
+
130
+ * Added check on invalid media on two columns post type
131
+ * WP 5.9.2 compatibility check
132
+
133
  = 7.4.0 =
134
 
135
  * Added privacy links