Newsletter - Version 6.7.9

Version Description

  • Fixed posts block
Download this release

Release Info

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

Code changes from version 6.7.7 to 6.7.9

emails/blocks/posts/layout-one.php CHANGED
@@ -37,7 +37,7 @@ $size = ['width' => 300, 'height' => 0];
37
  $media = null;
38
  if ($show_image) {
39
  $media = tnp_composer_block_posts_get_media($post, $size);
40
- var_dump($media);
41
  if ($media) {
42
  $media->link = $url;
43
  $media->set_width(105);
37
  $media = null;
38
  if ($show_image) {
39
  $media = tnp_composer_block_posts_get_media($post, $size);
40
+ //var_dump($media);
41
  if ($media) {
42
  $media->link = $url;
43
  $media->set_width(105);
emails/blocks/social/block.php CHANGED
@@ -31,7 +31,7 @@ $configured = false;
31
  $configured = true;
32
  ?>
33
  <span class="tnpc-row-edit" data-type="image">
34
- <a href="<?php echo $block_options['facebook_url'] ?>"><img src="<?php echo $social_icon_url ?>/facebook.png" alt="Facebook"></a>
35
  </span>
36
  <?php } ?>
37
  <?php
@@ -39,7 +39,7 @@ $configured = false;
39
  $configured = true;
40
  ?>
41
  <span class="tnpc-row-edit" data-type="image">
42
- <a href="<?php echo $block_options['twitter_url'] ?>"><img src="<?php echo $social_icon_url ?>/twitter.png" alt="Twitter"></a>
43
  </span>
44
  <?php } ?>
45
  <?php
@@ -47,7 +47,7 @@ $configured = false;
47
  $configured = true;
48
  ?>
49
  <span class="tnpc-row-edit" data-type="image">
50
- <a href="<?php echo $block_options['pinterest_url'] ?>"><img src="<?php echo $social_icon_url ?>/pinterest.png" alt="Pinterest"></a>
51
  </span>
52
  <?php } ?>
53
  <?php
@@ -55,7 +55,7 @@ $configured = false;
55
  $configured = true;
56
  ?>
57
  <span class="tnpc-row-edit" data-type="image">
58
- <a href="<?php echo $block_options['linkedin_url'] ?>"><img src="<?php echo $social_icon_url ?>/linkedin.png" alt="LinkedIn"></a>
59
  </span>
60
  <?php } ?>
61
  <?php
@@ -63,7 +63,7 @@ $configured = false;
63
  $configured = true;
64
  ?>
65
  <span class="tnpc-row-edit" data-type="image">
66
- <a href="<?php echo $block_options['tumblr_url'] ?>"><img src="<?php echo $social_icon_url ?>/tumblr.png" alt="Tumblr"></a>
67
  </span>
68
  <?php } ?>
69
  <?php
@@ -71,7 +71,7 @@ $configured = false;
71
  $configured = true;
72
  ?>
73
  <span class="tnpc-row-edit" data-type="image">
74
- <a href="<?php echo $block_options['youtube_url'] ?>"><img src="<?php echo $social_icon_url ?>/youtube.png" alt="Youtube"></a>
75
  </span>
76
  <?php } ?>
77
  <?php
@@ -79,7 +79,7 @@ $configured = false;
79
  $configured = true;
80
  ?>
81
  <span class="tnpc-row-edit" data-type="image">
82
- <a href="<?php echo $block_options['soundcloud_url'] ?>"><img src="<?php echo $social_icon_url ?>/soundcloud.png" alt="SoundCloud"></a>
83
  </span>
84
  <?php } ?>
85
  <?php
@@ -87,7 +87,7 @@ $configured = false;
87
  $configured = true;
88
  ?>
89
  <span class="tnpc-row-edit" data-type="image">
90
- <a href="<?php echo $block_options['instagram_url'] ?>"><img src="<?php echo $social_icon_url ?>/instagram.png" alt="Instagram"></a>
91
  </span>
92
  <?php } ?>
93
  <?php
@@ -95,7 +95,7 @@ $configured = false;
95
  $configured = true;
96
  ?>
97
  <span class="tnpc-row-edit" data-type="image">
98
- <a href="<?php echo $block_options['vimeo_url'] ?>"><img src="<?php echo $social_icon_url ?>/vimeo.png" alt="Vimeo"></a>
99
  </span>
100
  <?php } ?>
101
  <?php if (!$configured) { ?>
31
  $configured = true;
32
  ?>
33
  <span class="tnpc-row-edit" data-type="image">
34
+ <a href="<?php echo esc_url($block_options['facebook_url']) ?>"><img src="<?php echo $social_icon_url ?>/facebook.png" alt="Facebook"></a>
35
  </span>
36
  <?php } ?>
37
  <?php
39
  $configured = true;
40
  ?>
41
  <span class="tnpc-row-edit" data-type="image">
42
+ <a href="<?php echo esc_url($block_options['twitter_url']) ?>"><img src="<?php echo $social_icon_url ?>/twitter.png" alt="Twitter"></a>
43
  </span>
44
  <?php } ?>
45
  <?php
47
  $configured = true;
48
  ?>
49
  <span class="tnpc-row-edit" data-type="image">
50
+ <a href="<?php echo esc_url($block_options['pinterest_url']) ?>"><img src="<?php echo $social_icon_url ?>/pinterest.png" alt="Pinterest"></a>
51
  </span>
52
  <?php } ?>
53
  <?php
55
  $configured = true;
56
  ?>
57
  <span class="tnpc-row-edit" data-type="image">
58
+ <a href="<?php echo esc_url($block_options['linkedin_url']) ?>"><img src="<?php echo $social_icon_url ?>/linkedin.png" alt="LinkedIn"></a>
59
  </span>
60
  <?php } ?>
61
  <?php
63
  $configured = true;
64
  ?>
65
  <span class="tnpc-row-edit" data-type="image">
66
+ <a href="<?php echo esc_url($block_options['tumblr_url']) ?>"><img src="<?php echo $social_icon_url ?>/tumblr.png" alt="Tumblr"></a>
67
  </span>
68
  <?php } ?>
69
  <?php
71
  $configured = true;
72
  ?>
73
  <span class="tnpc-row-edit" data-type="image">
74
+ <a href="<?php echo esc_url($block_options['youtube_url']) ?>"><img src="<?php echo $social_icon_url ?>/youtube.png" alt="Youtube"></a>
75
  </span>
76
  <?php } ?>
77
  <?php
79
  $configured = true;
80
  ?>
81
  <span class="tnpc-row-edit" data-type="image">
82
+ <a href="<?php echo esc_url($block_options['soundcloud_url']) ?>"><img src="<?php echo $social_icon_url ?>/soundcloud.png" alt="SoundCloud"></a>
83
  </span>
84
  <?php } ?>
85
  <?php
87
  $configured = true;
88
  ?>
89
  <span class="tnpc-row-edit" data-type="image">
90
+ <a href="<?php echo esc_url($block_options['instagram_url']) ?>"><img src="<?php echo $social_icon_url ?>/instagram.png" alt="Instagram"></a>
91
  </span>
92
  <?php } ?>
93
  <?php
95
  $configured = true;
96
  ?>
97
  <span class="tnpc-row-edit" data-type="image">
98
+ <a href="<?php echo esc_url($block_options['vimeo_url']) ?>"><img src="<?php echo $social_icon_url ?>/vimeo.png" alt="Vimeo"></a>
99
  </span>
100
  <?php } ?>
101
  <?php if (!$configured) { ?>
emails/themes/cta-2015/theme.php CHANGED
@@ -106,16 +106,6 @@ $social_icon_url = plugins_url('newsletter') . '/emails/themes/cta-2015/images';
106
  </tr>
107
  </table>
108
 
109
- <!-- footer -->
110
- <table cellpadding="15" cellspacing="0" align="center" width="100%" bgcolor="#eeeeee" border="0">
111
- <tr>
112
- <td style="font-size: 12px">
113
- <p><a href="{profile_url}">Manage your subscription</a></p>
114
- <p><?php echo $theme_options['main_footer_contact'] ?></p>
115
- <p><?php echo $theme_options['main_footer_legal'] ?></p>
116
- </td>
117
- </tr>
118
- </table>
119
  </td>
120
  </tr>
121
  </table>
106
  </tr>
107
  </table>
108
 
 
 
 
 
 
 
 
 
 
 
109
  </td>
110
  </tr>
111
  </table>
emails/themes/default/footer.php CHANGED
@@ -1,11 +1,13 @@
1
  <?php
2
- if (!defined('ABSPATH')) exit;
 
 
3
  ?>
4
  <!-- Footer -->
5
- <div style="text-align: center; font-weight: bold; margin: 40px 0 10px;"><?php echo $theme_options['main_footer_title'] ?></div>
6
- <div style="text-align: center; margin: 10px 0 20px;"><?php echo $theme_options['main_footer_contact'] ?></div>
7
 
8
  <?php include WP_PLUGIN_DIR . '/newsletter/emails/themes/default/social_main.php'; ?>
9
 
10
- <div style="text-align: center; color: #888; margin-top: 20px;"><?php echo $theme_options['main_footer_legal'] ?></div>
11
  <div style="text-align: center; color: #888">To change your subscription, <a target="_blank" href="{profile_url}">click here</a>.</div>
1
  <?php
2
+
3
+ defined('ABSPATH') || exit;
4
+
5
  ?>
6
  <!-- Footer -->
7
+ <div style="text-align: center; font-weight: bold; margin: 40px 0 10px;"><?php echo esc_html($theme_options['main_footer_title']) ?></div>
8
+ <div style="text-align: center; margin: 10px 0 20px;"><?php echo esc_html($theme_options['main_footer_contact']) ?></div>
9
 
10
  <?php include WP_PLUGIN_DIR . '/newsletter/emails/themes/default/social_main.php'; ?>
11
 
12
+ <div style="text-align: center; color: #888; margin-top: 20px;"><?php echo esc_html($theme_options['main_footer_legal']) ?></div>
13
  <div style="text-align: center; color: #888">To change your subscription, <a target="_blank" href="{profile_url}">click here</a>.</div>
emails/themes/default/theme.php CHANGED
@@ -143,7 +143,7 @@ if (isset($theme_options['theme_posts'])) {
143
  </div>
144
  <?php if (!empty($theme_options['main_header_sub'])) { ?>
145
  <div style="padding: 10px 0; color: #000; font-size: 16px; text-align: center;">
146
- <?php echo $theme_options['main_header_sub'] ?>
147
  </div>
148
  <?php } ?>
149
  <?php } ?>
143
  </div>
144
  <?php if (!empty($theme_options['main_header_sub'])) { ?>
145
  <div style="padding: 10px 0; color: #000; font-size: 16px; text-align: center;">
146
+ <?php echo esc_html($theme_options['main_header_sub']) ?>
147
  </div>
148
  <?php } ?>
149
  <?php } ?>
emails/themes/linear/images/facebook.png DELETED
Binary file
emails/themes/linear/images/purple.png DELETED
Binary file
emails/themes/linear/images/twitter.png DELETED
Binary file
emails/themes/linear/images/youtube.png DELETED
Binary file
emails/themes/linear/screenshot.png DELETED
Binary file
emails/themes/linear/theme-options.php DELETED
@@ -1,22 +0,0 @@
1
- <?php
2
- if (!defined('ABSPATH'))
3
- exit;
4
- ?>
5
- <table class="form-table">
6
- <tr>
7
- <th>Max posts</th>
8
- <td><?php $controls->text('theme_max_posts', 5); ?></td>
9
- </tr>
10
- <tr>
11
- <th>Categories</th>
12
- <td><?php $controls->categories_group('theme_categories'); ?></td>
13
- </tr>
14
- <tr>
15
- <th>Post types</th>
16
- <td>
17
- <?php $controls->post_types('theme_post_types'); ?>
18
- <p class="description">Leave all uncheck for a default behavior.</p>
19
- </td>
20
- </tr>
21
- </table>
22
- <?php include WP_PLUGIN_DIR . '/newsletter/emails/themes/default/social-options.php'; ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
emails/themes/linear/theme-text.php DELETED
@@ -1,11 +0,0 @@
1
- <?php
2
- if (!defined('ABSPATH'))
3
- exit;
4
- ?>This email requires a modern e-mail reader but you can view the email online here:
5
-
6
- {email_url}.
7
-
8
- Thank you, <?php echo wp_specialchars_decode(get_option('blogname'), ENT_QUOTES); ?>
9
-
10
- To change your subscription follow:
11
- {profile_url}.
 
 
 
 
 
 
 
 
 
 
 
emails/themes/linear/theme.php DELETED
@@ -1,121 +0,0 @@
1
- <?php
2
- global $post;
3
-
4
- if (!defined('ABSPATH'))
5
- exit;
6
-
7
- $filters = array();
8
- if (!empty($theme_options['theme_categories'])) {
9
- $filters['category__in'] = $theme_options['theme_categories'];
10
- }
11
-
12
- if (empty($theme_options['theme_max_posts'])) {
13
- $filters['posts_per_page'] = 10;
14
- } else {
15
- $filters['posts_per_page'] = (int) $theme_options['theme_max_posts'];
16
- }
17
-
18
- if (!empty($theme_options['theme_post_types'])) {
19
- $filters['post_type'] = $theme_options['theme_post_types'];
20
- }
21
-
22
- $posts = get_posts($filters);
23
-
24
- ?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
25
- <html>
26
- <head>
27
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
28
-
29
- <style type="text/css">
30
- </style>
31
- </head>
32
- <body leftmargin="0" marginwidth="0" topmargin="0" marginheight="0" offset="0" style="background-color: #efefef;">
33
-
34
- <table align="center" border="0" cellpadding="0" cellspacing="0" width="100%">
35
- <tr>
36
- <td align="center" valign="top">
37
-
38
- <table border="0" cellpadding="10" cellspacing="0" width="600" style="background-color: #FAFAFA;">
39
- <tr>
40
- <td valign="top">
41
- <table border="0" cellpadding="10" cellspacing="0" width="100%">
42
- <tr>
43
- <td valign="top" align="left" style="color: #505050;font-family: Arial;font-size: 10px;">
44
- You are receiving this email because you subscribed to <?php echo get_option('blogname'); ?>. <a href="{profile_url}">Click here to change your subscription</a>.
45
- </td>
46
- <td valign="top" width="190" align="left" style="color: #505050;font-family: Arial;font-size: 10px;">
47
- Is this email not displaying correctly?<br><a href="{email_url}" style="color: #336699;font-weight: normal;text-decoration: underline;">View it online</a>.
48
- </td>
49
- </tr>
50
- </table>
51
- </td>
52
- </tr>
53
- </table>
54
-
55
- <table border="0" cellpadding="0" cellspacing="0" width="600" bgcolor="#FFFFFF">
56
- <tr>
57
- <td align="center" valign="middle" height="150" style="color: #202020;font-family: Arial;font-size: 34px;font-weight: bold;line-height: 100%;padding: 5px 0 -2px 0;border-width: 1px 0px;border-style: solid;border-color: #dddddd;">
58
- <?php echo get_option('blogname'); ?>
59
- </td>
60
- </tr>
61
- </table>
62
- <table border="0" cellpadding="0" cellspacing="0" width="600" bgcolor="#FFFFFF">
63
- <tr>
64
-
65
- <td valign="top">
66
- <table border="0" cellpadding="20" cellspacing="0" width="200">
67
- <tr>
68
- <td valign="top" align="left" style="color: #505050;font-family: Arial;font-size: 12px;line-height: 150%;">
69
- Sidebar text
70
- </td>
71
- </tr>
72
- <?php
73
- if (!isset($theme_options['theme_social_disable'])) {
74
- $social_icon_url = plugins_url('emails/themes/default/images', 'newsletter/plugin.pnp');
75
- ?>
76
- <tr>
77
- <td valign="top" align="left">
78
- <?php
79
- foreach (array('facebook', 'twitter', 'youtube', 'linkedin', 'pinterest', 'tumblr', 'instagram') as $social) {
80
- if (empty($theme_options["theme_$social"]))
81
- continue;
82
- ?>
83
- <a href="<?php echo $theme_options["theme_$social"]; ?>"><img src="<?php echo $social_icon_url; ?>/<?php echo $social; ?>.png" alt="<?php echo $social; ?>"></a>
84
- <?php } ?>
85
- </td>
86
- </tr>
87
- <?php } ?>
88
- </table>
89
- </td>
90
-
91
- <td valign="top">
92
- <table border="0" cellpadding="20" cellspacing="0" width="100%" bgcolor="#ffffff">
93
- <tr>
94
- <td valign="top">
95
-
96
- <?php foreach ($posts as $post) {
97
- setup_postdata($post);
98
- ?>
99
- <h2 style="color: #202020;font-family: Arial;font-size: 20px;font-weight: bold;margin-top: 0;margin-bottom: 10px;border-bottom: 1px solid #efefef;">
100
- <?php the_title(); ?>
101
- </h2>
102
- <center><img src="<?php echo newsletter_get_post_image($post->ID, 'medium'); ?>"></center>
103
- <div style="color: #505050;font-family: Arial;font-size: 14px;line-height: 150%;">
104
- <?php the_excerpt(); ?>
105
- </div>
106
- <?php } ?>
107
- </td>
108
- </tr>
109
- </table>
110
- </td>
111
-
112
- </tr>
113
- </table>
114
- </td>
115
- </tr>
116
-
117
- </table>
118
- <br><br>
119
-
120
- </body>
121
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
emails/themes/theme-1/screenshot.png DELETED
Binary file
emails/themes/theme-1/theme-options.php DELETED
@@ -1,46 +0,0 @@
1
- <?php
2
- /*
3
- * This is a pre packaged theme options page. Every option name
4
- * must start with "theme_" so Newsletter can distinguish them from other
5
- * options that are specific to the object using the theme.
6
- *
7
- * An array of theme default options should always be present and that default options
8
- * should be merged with the current complete set of options as shown below.
9
- *
10
- * Every theme can define its own set of options, the will be used in the theme.php
11
- * file while composing the email body. Newsletter knows nothing about theme options
12
- * (other than saving them) and does not use or relies on any of them.
13
- *
14
- * For multilanguage purpose you can actually check the constants "WP_LANG", until
15
- * a decent system will be implemented.
16
- */
17
-
18
- if (!defined('ABSPATH'))
19
- exit;
20
-
21
- $theme_defaults = array(
22
- 'theme_max_posts'=>10,
23
- 'theme_categories'=>array()
24
- );
25
-
26
- // Mandatory!
27
- $controls->merge_defaults($theme_defaults);
28
- ?>
29
-
30
- <table class="form-table">
31
- <tr>
32
- <th>Max new posts to include</th>
33
- <td>
34
- <?php $controls->text('theme_max_posts', 5); ?> (it defaults to 10 if empty or invalid)
35
- </td>
36
- </tr>
37
- <tr>
38
- <th>Categories</th>
39
- <td>
40
- <?php $controls->categories_group('theme_categories'); ?>
41
- </td>
42
- </tr>
43
- </table>
44
-
45
- <?php include WP_PLUGIN_DIR . '/newsletter/emails/themes/default/social-options.php'; ?>
46
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
emails/themes/theme-1/theme-text.php DELETED
@@ -1,49 +0,0 @@
1
- <?php
2
- global $newsletter; // Newsletter object
3
- global $post; // Current post managed by WordPress
4
-
5
- if (!defined('ABSPATH'))
6
- exit;
7
-
8
- // This file is included inside a function so it inherit all the local variables.
9
-
10
- // Since a theme has it's own options, it must check if there is new content to send
11
- // out.
12
- // Inside $theme_options['last_time'] there is the time stamps of the last run
13
- // to be used to decide if we need to stop or not.
14
-
15
- $filters = array();
16
-
17
- $filters['posts_per_page'] = (int)$theme_options['max_posts'];
18
- if ($filters['posts_per_page'] == 0) $filters['posts_per_page'] = 10;
19
-
20
- // This theme has an option with categories to be included.
21
- if (is_array($theme_options['categories'])) {
22
- $filters['cat'] = implode(',', $theme_options['categories']);
23
- }
24
-
25
- $posts = get_posts($filters);
26
-
27
- // Retrieve the posts asking them to WordPress
28
- $posts = get_posts($filters);
29
-
30
- ?><?php echo $theme_options['theme_opening_text']; ?>
31
-
32
- * <?php echo $theme_options['theme_title']; ?>
33
-
34
-
35
- <?php
36
- foreach ($posts as $post) {
37
- // Setup the post (WordPress requirement)
38
- setup_postdata($post);
39
- ?>
40
- <?php the_title(); ?>
41
-
42
- <?php the_permalink(); ?>
43
-
44
-
45
- <?php } ?>
46
-
47
-
48
- <?php echo $theme_options['theme_footer_text']; ?>
49
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
emails/themes/theme-1/theme.php DELETED
@@ -1,113 +0,0 @@
1
- <?php
2
- global $newsletter; // Newsletter object
3
- global $post; // Current post managed by WordPress
4
-
5
- if (!defined('ABSPATH'))
6
- exit;
7
-
8
- /*
9
- * Some variabled are prepared by Newsletter Plus and are available inside the theme,
10
- * for example the theme options used to build the email body as configured by blog
11
- * owner.
12
- *
13
- * $theme_options - is an associative array with theme options: every option starts
14
- * with "theme_" as required. See the theme-options.php file for details.
15
- * Inside that array there are the autmated email options as well, if needed.
16
- * A special value can be present in theme_options and is the "last_run" which indicates
17
- * when th automated email has been composed last time. Is should be used to find if
18
- * there are now posts or not.
19
- *
20
- * $is_test - if true it means we are composing an email for test purpose.
21
- */
22
-
23
-
24
- // This array will be passed to WordPress to extract the posts
25
- $filters = array();
26
-
27
- // Maximum number of post to retrieve
28
- $filters['posts_per_page'] = (int) $theme_options['theme_max_posts'];
29
- if ($filters['posts_per_page'] == 0)
30
- $filters['posts_per_page'] = 10;
31
-
32
-
33
- // Include only posts from specified categories. Do not filter per category is no
34
- // one category has been selected.
35
- if (is_array($theme_options['theme_categories'])) {
36
- $filters['cat'] = implode(',', $theme_options['theme_categories']);
37
- }
38
-
39
- // Retrieve the posts asking them to WordPress
40
- $posts = get_posts($filters);
41
- ?>
42
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
43
- <html>
44
- <head>
45
- <title></title>
46
- </head>
47
-
48
- <body>
49
- <table bgcolor="#c0c0c0" width="100%" cellpadding="20" cellspacing="0" border="0">
50
- <tr>
51
- <td align="center">
52
- <table width="500" bgcolor="#ffffff" align="center" cellspacing="10" cellpadding="0" style="border: 1px solid #666;">
53
- <tr>
54
- <td style="font-size: 30px">
55
- <i><?php echo get_option('blogname'); ?></i>
56
- </td>
57
- </tr>
58
- <tr>
59
- <td style="border-top: 1px solid #eee; border-bottom: 1px solid #eee; font-size: 12px; color: #999">
60
- <br />NEWSLETTER<br /><br />
61
- </td>
62
- </tr>
63
- <tr>
64
- <td style="font-size: 14px; color: #666">
65
- <p>Dear {name}, here an update from <?php echo get_option('blogname'); ?>.</p>
66
- </td>
67
- </tr>
68
- <?php
69
- // Do not use &post, it leads to problems...
70
- foreach ($posts as $post) {
71
-
72
- // Setup the post (WordPress requirement)
73
- setup_postdata($post);
74
-
75
- // The theme can "suggest" a subject replacing the one configured, for example. In this case
76
- // the theme, is there is no subject, suggest the first post title.
77
- if (empty($theme_options['subject']))
78
- $theme_options['subject'] = $post->post_title;
79
-
80
- // Extract a thumbnail, return null if no thumb can be found
81
- $image = nt_post_image(get_the_ID());
82
- ?>
83
- <tr>
84
- <td style="font-size: 14px; color: #666">
85
- <?php if ($image != null) { ?>
86
- <img src="<?php echo $image; ?>" alt="picture" align="left"/>
87
- <?php } ?>
88
- <p><a target="_tab" href="<?php echo get_permalink(); ?>" style="font-size: 16px; color: #000; text-decoration: none"><?php the_title(); ?></a></p>
89
-
90
- <?php the_excerpt(); ?>
91
- </td>
92
- </tr>
93
- <?php
94
- }
95
- ?>
96
- <?php if (!isset($theme_options['theme_social_disable'])) { ?>
97
- <tr>
98
- <td style="font-family: Arial; font-size: 12px">
99
- <?php include WP_PLUGIN_DIR . '/newsletter/emails/themes/default/social.php'; ?>
100
- </td>
101
- </tr>
102
- <?php } ?>
103
- <tr>
104
- <td style="border-top: 1px solid #eee; border-bottom: 1px solid #eee; font-size: 12px; color: #999">
105
- You received this email because you subscribed for it as {email}. If you'd like, you can <a target="_tab" href="{unsubscription_url}">unsubscribe</a>.
106
- </td>
107
- </tr>
108
- </table>
109
- </td>
110
- </tr>
111
- </table>
112
- </body>
113
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
emails/themes/theme-3/header.jpg DELETED
Binary file
emails/themes/theme-3/screenshot.png DELETED
Binary file
emails/themes/theme-3/theme-options.php DELETED
@@ -1,47 +0,0 @@
1
- <?php
2
- /*
3
- * This is a pre packaged theme options page. Every option name
4
- * must start with "theme_" so Newsletter can distinguish them from other
5
- * options that are specific to the object using the theme.
6
- *
7
- * An array of theme default options should always be present and that default options
8
- * should be merged with the current complete set of options as shown below.
9
- *
10
- * Every theme can define its own set of options, the will be used in the theme.php
11
- * file while composing the email body. Newsletter knows nothing about theme options
12
- * (other than saving them) and does not use or relies on any of them.
13
- *
14
- * For multilanguage purpose you can actually check the constants "WP_LANG", until
15
- * a decent system will be implemented.
16
- */
17
-
18
- if (!defined('ABSPATH'))
19
- exit;
20
-
21
- $theme_defaults = array(
22
- 'theme_max_posts'=>10,
23
-
24
- 'theme_categories'=>array()
25
- );
26
-
27
- // Mandatory!
28
- $controls->merge_defaults($theme_defaults);
29
- ?>
30
- <p>This theme build an email loading all new posts after the date of the last run.</p>
31
- <table class="form-table">
32
- <tr>
33
- <th>Max new posts to include</th>
34
- <td>
35
- <?php $controls->text('theme_max_posts', 5); ?> (it defaults to 10 if empty or invalid)
36
- </td>
37
- </tr>
38
- <tr>
39
- <th>Categories</th>
40
- <td>
41
- <?php $controls->categories_group('theme_categories'); ?>
42
- </td>
43
- </tr>
44
- </table>
45
-
46
- <?php include WP_PLUGIN_DIR . '/newsletter/emails/themes/default/social-options.php'; ?>
47
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
emails/themes/theme-3/theme-text.php DELETED
@@ -1,49 +0,0 @@
1
- <?php
2
- global $newsletter; // Newsletter object
3
- global $post; // Current post managed by WordPress
4
-
5
- if (!defined('ABSPATH'))
6
- exit;
7
-
8
- // This file is included inside a function so it inherit all the local variables.
9
-
10
- // Since a theme has it's own options, it must check if there is new content to send
11
- // out.
12
- // Inside $theme_options['last_time'] there is the time stamps of the last run
13
- // to be used to decide if we need to stop or not.
14
-
15
- $filters = array();
16
-
17
- $filters['posts_per_page'] = (int)$theme_options['max_posts'];
18
- if ($filters['posts_per_page'] == 0) $filters['posts_per_page'] = 10;
19
-
20
- // This theme has an option with categories to be included.
21
- if (is_array($theme_options['categories'])) {
22
- $filters['cat'] = implode(',', $theme_options['categories']);
23
- }
24
-
25
- $posts = get_posts($filters);
26
-
27
- // Retrieve the posts asking them to WordPress
28
- $posts = get_posts($filters);
29
-
30
- ?><?php echo $theme_options['theme_opening_text']; ?>
31
-
32
- * <?php echo $theme_options['theme_title']; ?>
33
-
34
-
35
- <?php
36
- foreach ($posts as $post) {
37
- // Setup the post (WordPress requirement)
38
- setup_postdata($post);
39
- ?>
40
- <?php the_title(); ?>
41
-
42
- <?php the_permalink(); ?>
43
-
44
-
45
- <?php } ?>
46
-
47
-
48
- <?php echo $theme_options['theme_footer_text']; ?>
49
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
emails/themes/theme-3/theme.php DELETED
@@ -1,124 +0,0 @@
1
- <?php
2
- global $newsletter; // Newsletter object
3
- global $post; // Current post managed by WordPress
4
-
5
- if (!defined('ABSPATH'))
6
- exit;
7
-
8
- /*
9
- * Some variabled are prepared by Newsletter Plus and are available inside the theme,
10
- * for example the theme options used to build the email body as configured by blog
11
- * owner.
12
- *
13
- * $theme_options - is an associative array with theme options: every option starts
14
- * with "theme_" as required. See the theme-options.php file for details.
15
- * Inside that array there are the autmated email options as well, if needed.
16
- * A special value can be present in theme_options and is the "last_run" which indicates
17
- * when th automated email has been composed last time. Is should be used to find if
18
- * there are now posts or not.
19
- *
20
- * $is_test - if true it means we are composing an email for test purpose.
21
- */
22
-
23
-
24
- // This array will be passed to WordPress to extract the posts
25
- $filters = array();
26
-
27
- // Maximum number of post to retrieve
28
- $filters['posts_per_page'] = (int) $theme_options['theme_max_posts'];
29
- if ($filters['posts_per_page'] == 0)
30
- $filters['posts_per_page'] = 10;
31
-
32
-
33
- // Include only posts from specified categories. Do not filter per category is no
34
- // one category has been selected.
35
- if (isset($theme_options['theme_categories']) && is_array($theme_options['theme_categories'])) {
36
- $filters['cat'] = implode(',', $theme_options['theme_categories']);
37
- }
38
-
39
- // Retrieve the posts asking them to WordPress
40
- $posts = get_posts($filters);
41
- ?>
42
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
43
- <html>
44
- <head>
45
- <title></title>
46
- </head>
47
-
48
- <body>
49
- <br />
50
-
51
- <table cellspacing="0" align="center" border="0" style="max-width:600px; width:600px; background-color: #eee;" cellpadding="0" width="600px">
52
- <!-- Header -->
53
- <tr style="background: #455560; background-image: url(<?php echo plugins_url('header.jpg', __FILE__); ?>); height:80px;width:600px;" cellspacing="0" border="0" align="center" cellpadding="0" width="600" height="80">
54
- <td height="80" width="600" style="color: #fff; font-size: 30px; font-family: Arial;" align="center" valign="middle">
55
- <?php echo get_option('blogname'); ?>
56
- </td>
57
- </tr>
58
- <tr style="background: #d0d0d0; height:20px;width:600px;">
59
- <td valign="top" height="20" width="600" bgcolor="#ffffff" align="center" style="font-family: Arial; font-size: 12px">
60
- <?php echo get_option('blogdescription'); ?>
61
- </td>
62
- </tr>
63
- <tr>
64
- <td>
65
- <table cellspacing="0" border="0" style="max-width:600px; width:600px; background-color: #eee;font-family:helvetica,arial,sans-serif;color:#555;font-size:13px;line-height:15px;" align="center" cellpadding="20" width="600px">
66
- <tr>
67
- <td>
68
- <table cellpadding="0" cellspacing="0" border="0" bordercolor="" width="100%" bgcolor="#ffffff">
69
- <?php
70
- // Do not use &post, it leads to problems...
71
- foreach ($posts as $post) {
72
-
73
- // Setup the post (WordPress requirement)
74
- setup_postdata($post);
75
-
76
- // The theme can "suggest" a subject replacing the one configured, for example. In this case
77
- // the theme, is there is no subject, suggest the first post title.
78
- if (empty($theme_options['subject']))
79
- $theme_options['subject'] = $post->post_title;
80
-
81
- // Extract a thumbnail, return null if no thumb can be found
82
- $image = nt_post_image(get_the_ID());
83
- ?>
84
- <tr>
85
- <td style="font-family: Arial; font-size: 12px">
86
- <?php if ($image != null) { ?>
87
- <img src="<?php echo $image; ?>" alt="picture" align="left" width="100" height="100" style="margin-right: 10px"/>
88
- <?php } ?>
89
- <a target="_tab" href="<?php echo get_permalink(); ?>" style="color: #000; text-decoration: none"><b><?php the_title(); ?></b></a><br />
90
-
91
- <?php the_excerpt(); ?>
92
- </td>
93
- </tr>
94
- <?php
95
- }
96
- ?>
97
- </table>
98
-
99
- </td>
100
- </tr>
101
- </table>
102
- </td>
103
- </tr>
104
- <?php if (!isset($theme_options['theme_social_disable'])) { ?>
105
- <tr>
106
- <td style="font-family: Arial; font-size: 12px">
107
- <?php include WP_PLUGIN_DIR . '/newsletter/emails/themes/default/social.php'; ?>
108
- </td>
109
- </tr>
110
- <?php } ?>
111
- <tr>
112
- <td bgcolor="#ffffff" style="font-family: Arial; font-size: 12px">
113
-
114
- This email was sent to <b>{email}</b> because you opted in on <?php echo get_option('blogname'); ?> website.
115
- <br />
116
-
117
- <a target="_tab" href="{profile_url}">Manage the subscription</a> |
118
-
119
- <a target="_tab" href="{unsubscription_url}">Unsubscribe</a>
120
- </td>
121
- </tr>
122
- </table>
123
- </body>
124
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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.7.7
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.
@@ -35,7 +35,7 @@ if (version_compare(phpversion(), '5.6', '<')) {
35
  return;
36
  }
37
 
38
- define('NEWSLETTER_VERSION', '6.7.7');
39
 
40
  global $newsletter, $wpdb;
41
 
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.7.9
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.
35
  return;
36
  }
37
 
38
+ define('NEWSLETTER_VERSION', '6.7.9');
39
 
40
  global $newsletter, $wpdb;
41
 
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.4.2
5
- Stable tag: 6.7.7
6
  Requires PHP: 5.6
7
  Contributors: satollo,webagile,michael-travan
8
 
@@ -113,6 +113,14 @@ Thank you, The Newsletter Team
113
 
114
  == Changelog ==
115
 
 
 
 
 
 
 
 
 
116
  = 6.7.7 =
117
 
118
  * Fixed text escape for header and footer blocks (was reported as security required fix)
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.4.2
5
+ Stable tag: 6.7.9
6
  Requires PHP: 5.6
7
  Contributors: satollo,webagile,michael-travan
8
 
113
 
114
  == Changelog ==
115
 
116
+ = 6.7.9 =
117
+
118
+ * Fixed posts block
119
+
120
+ = 6.7.8 =
121
+
122
+ * Removed old themes (anyway not usable since long time)
123
+
124
  = 6.7.7 =
125
 
126
  * Fixed text escape for header and footer blocks (was reported as security required fix)