first commit

This commit is contained in:
2024-07-15 11:28:08 +02:00
commit f52d538ea5
21891 changed files with 6161164 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

View File

@@ -0,0 +1,9 @@
<?php
if (!defined('ABSPATH')) exit;
?>
<table class="form-table">
<tr>
<th><?php _e('Disable social links', 'newsletter') ?></th>
<td><?php $controls->checkbox('theme_social_disable', ''); ?></td>
</tr>
</table>

View File

@@ -0,0 +1,11 @@
<?php
if (!defined('ABSPATH')) exit;
?>
This email requires a modern e-mail reader but you can view the email online here:
{email_url}.
Thank you, <?php echo wp_specialchars_decode(get_option('blogname'), ENT_QUOTES); ?>
To change your subscription follow:
{profile_url}.

View File

@@ -0,0 +1,45 @@
<?php
if (!defined('ABSPATH')) exit;
?><html>
<head>
<style>
body {
font-family: sans-serif;
font-size: 12px;
background-color: #ffffff;
}
</style>
</head>
<body bgcolor="#ffffff">
<h1>Your awesome title</h1>
<p>
Hi {name} (but you should remove that if you're not collecting subscriber names),
</p>
<p>
here the foreword of your shiny new newsletter. Most of the times a simple layout is the best.
</p>
<h2>There is more for you!</h2>
<p>Still not secure to sign up for our premium service? Even with a standard service plan you'll receive our t-shirt!</p>
<p>
Goodbye!
</p>
<?php include WP_PLUGIN_DIR . '/newsletter/emails/themes/default/social_main.php'; ?>
<hr>
<p>
To cancel <a href="{unsubscription_url}">click here</a>, to edit your subscription
<a href="{profile_url}">click here</a>.
</p>
<p>
<?php echo $theme_options['main_footer_contact'] ?>
</p>
<p>
<?php echo $theme_options['main_footer_legal'] ?>
</p>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

View File

@@ -0,0 +1,11 @@
<?php
if (!defined('ABSPATH')) exit;
?>
<table class="form-table">
<tr>
<th><?php _e('Primary color', 'newsletter') ?></th>
<td>
<?php $controls->color('theme_color'); ?> (eg. #87aa14)
</td>
</tr>
</table>

View File

@@ -0,0 +1,11 @@
<?php
if (!defined('ABSPATH')) exit;
?>
This email requires a modern e-mail reader but you can view the email online here:
{email_url}.
Thank you, <?php echo wp_specialchars_decode(get_option('blogname'), ENT_QUOTES); ?>
To change your subscription follow:
{profile_url}.

View File

@@ -0,0 +1,123 @@
<?php
/*
* Name: CTA 2015
* Type: standard
* Description: Single call to action marketing template
*/
if (!defined('ABSPATH')) exit;
$color = '#87aa14';
if (!empty($theme_options['theme_color'])) {
$color = $theme_options['theme_color'];
}
$header = '';
$header_color = '#000000';
if (!empty($theme_options['main_header_logo']['url'])) {
$header = '<img src="' . $theme_options['main_header_logo']['url'] . '" style="max-width: 500px">';
} else {
if (!empty($theme_options['main_header_title'])) {
$header = '<h2 style="color: ' . $header_color . '">' . $theme_options['main_header_title'] . '</h2>';
} else {
$header = '<h2 style="color: ' . $header_color . '">' . get_option('blogname') . '</h2>';
}
if (!empty($theme_options['main_header_sub'])) {
$header .= '<p style="color: #666666">' . $theme_options['main_header_sub'] . '</p>';
}
}
$font_family = 'Verdana';
//$cta_bgcolor = '#008800';
//if (!empty($theme_options['theme_cta_bgcolor'])) {
// $cta_bgcolor = $theme_options['theme_cta_bgcolor'];
//}
$social_icon_url = plugins_url('newsletter') . '/emails/themes/cta-2015/images';
?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
</head>
<body bgcolor="#ffffff">
<table width="500" cellpadding="0" cellspacing="0" align="center" bgcolor="#ffffff" border="0">
<tr>
<td align="center" style="font-family: Verdana">
<table cellpadding="10" cellspacing="0" border="0" width="100%">
<tr>
<td style="font-size: 12px" align="center">
<a href="{email_url}" style="text-decoration: none">View online</a>
</td>
</tr>
</table>
</td>
</tr>
<!-- header -->
<tr>
<td align="center" style="font-family: Verdana">
<?php echo $header; ?>
</td>
</tr>
<!-- body -->
<tr>
<td style="font-family: Verdana">
<!-- main text -->
<table cellpadding="15" cellspacing="0" align="center" border="0" width="100%">
<tr>
<td style="font-size: 15px" align="center">
<h1>Super catching title</h1>
<p>
Here you should introduce your incredible offer. Remember the golden rule: write
something useful for your readers, not for yourself.
</p>
<p>
If a reader ask the question: what's here for me, the content is answering?
</p>
</td>
</tr>
</table>
<!-- cta -->
<table cellpadding="15" cellspacing="0" align="center" bgcolor="<?php echo $color ?>" border="0" style="border-radius: 5px">
<tr>
<td><a href="#" style="font-size: 15px; color: #ffffff; text-decoration: none">Call to action</a></td>
</tr>
</table>
<!-- spacer -->
<table cellpadding="0" cellspacing="0" align="center" bgcolor="#ffffff" border="0" width="100%">
<tr>
<td>
&nbsp;
</td>
</tr>
</table>
<?php include WP_PLUGIN_DIR . '/newsletter/emails/themes/default/footer.php'; ?>
<!-- spacer -->
<table cellpadding="0" cellspacing="0" align="center" bgcolor="#ffffff" border="0" width="100%">
<tr>
<td>
&nbsp;
</td>
</tr>
</table>
<!-- footer -->
<table cellpadding="15" cellspacing="0" align="center" width="100%" bgcolor="#eeeeee" border="0">
<tr>
<td style="font-size: 12px">
<p><a href="{profile_url}">Manage your subscription</a></p>
<p><?php echo $theme_options['main_footer_contact'] ?></p>
<p><?php echo $theme_options['main_footer_legal'] ?></p>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<?php
if (!defined('ABSPATH')) exit;
?>
<!-- Footer -->
<div style="text-align: center; font-weight: bold; margin: 40px 0 10px;"><?php echo $theme_options['main_footer_title'] ?></div>
<div style="text-align: center; margin: 10px 0 20px;"><?php echo $theme_options['main_footer_contact'] ?></div>
<?php include WP_PLUGIN_DIR . '/newsletter/emails/themes/default/social_main.php'; ?>
<div style="text-align: center; color: #888; margin-top: 20px;"><?php echo $theme_options['main_footer_legal'] ?></div>
<div style="text-align: center; color: #888">To change your subscription, <a target="_blank" href="{profile_url}">click here</a>.</div>

Binary file not shown.

After

Width:  |  Height:  |  Size: 663 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 736 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 661 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 893 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 973 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 724 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

View File

@@ -0,0 +1,46 @@
<?php
if (!defined('ABSPATH')) exit;
?>
<h3>Social icons</h3>
<table class="form-table">
<tr>
<th>Social block</th>
<td><?php $controls->checkbox('theme_social_disable'); ?> Disable</td>
</tr>
<tr>
<th>Facebook</th>
<td><?php $controls->text_url('theme_facebook', 30); ?></td>
</tr>
<tr>
<th>Twitter</th>
<td><?php $controls->text_url('theme_twitter', 30); ?></td>
</tr>
<tr>
<th>Pinterest</th>
<td><?php $controls->text_url('theme_pinterest', 30); ?></td>
</tr>
<tr>
<th>Google+</th>
<td><?php $controls->text_url('theme_googleplus', 30); ?></td>
</tr>
<tr>
<th>LinkedIn</th>
<td><?php $controls->text_url('theme_linkedin', 30); ?></td>
</tr>
<tr>
<th>Tumblr</th>
<td><?php $controls->text_url('theme_tumblr', 30); ?></td>
</tr>
<tr>
<th>YouTube</th>
<td><?php $controls->text_url('theme_youtube', 30); ?></td>
</tr>
<tr>
<th>Soundcloud</th>
<td><?php $controls->text_url('theme_soundcloud', 30); ?></td>
</tr>
<tr>
<th>Instagram</th>
<td><?php $controls->text_url('theme_instagram', 30); ?></td>
</tr>
</table>

View File

@@ -0,0 +1,68 @@
<!-- Social -->
<?php
if (!defined('ABSPATH')) exit;
if (isset($theme_options['theme_social_disable'])) return;
$social_icon_url = plugins_url('newsletter') . '/emails/themes/default/images';
?>
<table cellpadding="5" align="center">
<tr>
<?php if (!empty($theme_options['theme_facebook'])) { ?>
<td style="text-align: center; vertical-align: top" align="center" valign="top">
<a href="<?php echo esc_attr($theme_options['theme_facebook']) ?>"><img src="<?php echo $social_icon_url ?>/facebook.png"><br>Facebook</a>
</td>
<?php } ?>
<?php if (!empty($theme_options['theme_twitter'])) { ?>
<td style="text-align: center; vertical-align: top" align="center" valign="top">
<a href="<?php echo esc_attr($theme_options['theme_twitter']) ?>"><img src="<?php echo $social_icon_url ?>/twitter.png"><br>Twitter</a>
</td>
<?php } ?>
<?php if (!empty($theme_options['theme_googleplus'])) { ?>
<td style="text-align: center; vertical-align: top" align="center" valign="top">
<a href="<?php echo esc_attr($theme_options['theme_googleplus']) ?>"><img src="<?php echo $social_icon_url ?>/googleplus.png"><br>Google+</a>
</td>
<?php } ?>
<?php if (!empty($theme_options['theme_pinterest'])) { ?>
<td style="text-align: center; vertical-align: top" align="center" valign="top">
<a href="<?php echo esc_attr($theme_options['theme_pinterest']) ?>"><img src="<?php echo $social_icon_url ?>/pinterest.png"><br>Pinterest</a>
</td>
<?php } ?>
<?php if (!empty($theme_options['theme_linkedin'])) { ?>
<td style="text-align: center; vertical-align: top" align="center" valign="top">
<a href="<?php echo esc_attr($theme_options['theme_linkedin']) ?>"><img src="<?php echo $social_icon_url ?>/linkedin.png"><br>LinkedIn</a>
</td>
<?php } ?>
<?php if (!empty($theme_options['theme_tumblr'])) { ?>
<td style="text-align: center; vertical-align: top" align="center" valign="top">
<a href="<?php echo esc_attr($theme_options['theme_tumblr']) ?>"><img src="<?php echo $social_icon_url ?>/tumblr.png"><br>Tumblr</a>
</td>
<?php } ?>
<?php if (!empty($theme_options['theme_youtube'])) { ?>
<td style="text-align: center; vertical-align: top" align="center" valign="top">
<a href="<?php echo esc_attr($theme_options['theme_youtube']) ?>"><img src="<?php echo $social_icon_url ?>/youtube.png"><br>Youtube</a>
</td>
<?php } ?>
<?php if (!empty($theme_options['theme_soundcloud'])) { ?>
<td style="text-align: center; vertical-align: top" align="center" valign="top">
<a href="<?php echo esc_attr($theme_options['theme_soundcloud']) ?>"><img src="<?php echo $social_icon_url ?>/soundcloud.png"><br>SoundCloud</a>
</td>
<?php } ?>
<?php if (!empty($theme_options['theme_instagram'])) { ?>
<td style="text-align: center; vertical-align: top" align="center" valign="top">
<a href="<?php echo esc_attr($theme_options['theme_instagram']) ?>"><img src="<?php echo $social_icon_url ?>/instagram.png"><br>Instagram</a>
</td>
<?php } ?>
<?php if (!empty($theme_options['theme_vimeo'])) { ?>
<td style="text-align: center; vertical-align: top" align="center" valign="top">
<a href="<?php echo esc_attr($theme_options['theme_vimeo']) ?>"><img src="<?php echo $social_icon_url ?>/vimeo.png"><br>Vimeo</a>
</td>
<?php } ?>
</tr>
</table>

View File

@@ -0,0 +1,51 @@
<!-- Social -->
<?php
if (!defined('ABSPATH')) exit;
if (isset($theme_options['theme_social_disable'])) return;
$social_icon_url = plugins_url('newsletter') . '/emails/themes/default/images';
?>
<table cellpadding="5" align="center">
<tr>
<?php if (!empty($theme_options['main_facebook_url'])) { ?>
<td style="text-align: center; vertical-align: top" align="center" valign="top">
<a href="<?php echo esc_attr($theme_options['main_facebook_url']) ?>"><img src="<?php echo $social_icon_url ?>/facebook.png" alt="Facebook"></a>
</td>
<?php } ?>
<?php if (!empty($theme_options['main_googleplus_url'])) { ?>
<td style="text-align: center; vertical-align: top" align="center" valign="top">
<a href="<?php echo esc_attr($theme_options['main_googleplus_url']) ?>"><img src="<?php echo $social_icon_url ?>/googleplus.png"></a>
</td>
<?php } ?>
<?php if (!empty($theme_options['main_twitter_url'])) { ?>
<td style="text-align: center; vertical-align: top" align="center" valign="top">
<a href="<?php echo esc_attr($theme_options['main_twitter_url']) ?>"><img src="<?php echo $social_icon_url ?>/twitter.png"></a>
</td>
<?php } ?>
<?php if (!empty($theme_options['main_linkedin_url'])) { ?>
<td style="text-align: center; vertical-align: top" align="center" valign="top">
<a href="<?php echo esc_attr($theme_options['main_linkedin_url']) ?>"><img src="<?php echo $social_icon_url ?>/linkedin.png"></a>
</td>
<?php } ?>
<?php if (!empty($theme_options['main_youtube_url'])) { ?>
<td style="text-align: center; vertical-align: top" align="center" valign="top">
<a href="<?php echo esc_attr($theme_options['main_youtube_url']) ?>"><img src="<?php echo $social_icon_url ?>/youtube.png"></a>
</td>
<?php } ?>
<?php if (!empty($theme_options['main_vimeo_url'])) { ?>
<td style="text-align: center; vertical-align: top" align="center" valign="top">
<a href="<?php echo esc_attr($theme_options['main_vimeo_url']) ?>"><img src="<?php echo $social_icon_url ?>/vimeo.png"></a>
</td>
<?php } ?>
<?php if (!empty($theme_options['main_instagram_url'])) { ?>
<td style="text-align: center; vertical-align: top" align="center" valign="top">
<a href="<?php echo esc_attr($theme_options['main_instagram_url']) ?>"><img src="<?php echo $social_icon_url ?>/instagram.png"></a>
</td>
<?php } ?>
</tr>
</table>

View File

@@ -0,0 +1,64 @@
<?php
defined('ABSPATH') || exit;
?>
<table class="form-table">
<tr><td colspan="2">General options for header, social links and footer sections could also be set in <a href="?page=newsletter_main_main">Blog Info panel</a>.</td></tr>
<tr>
<th><?php _e('Primary color', 'newsletter') ?></th>
<td>
<?php $controls->color('theme_color'); ?>
<p class="description" style="display: inline">Hex values, e.g. #FF0000</p>
</td>
</tr>
<tr>
<th><?php _e('Disable social links', 'newsletter') ?></th>
<td><?php $controls->checkbox('theme_social_disable', ''); ?></td>
</tr>
</table>
<h3><?php _e('Posts', 'newsletter') ?></h3>
<table class="form-table">
<tr>
<th>Language</th>
<td>
<?php $controls->language(); ?>
</td>
</tr>
<tr>
<th>&nbsp;</th>
<td>
<?php $controls->checkbox('theme_posts', 'Add latest posts'); ?>
<br>
<?php $controls->checkbox('theme_thumbnails', 'Add post thumbnails'); ?>
<br>
<?php $controls->checkbox('theme_excerpts', 'Add post excerpts'); ?>
</td>
</tr>
<tr>
<th><?php _e('Categories', 'newsletter') ?></th>
<td>
<?php $controls->categories_group('theme_categories'); ?>
</td>
</tr>
<tr>
<th><?php _e('Tags', 'newsletter') ?></th>
<td>
<?php $controls->text('theme_tags', 30); ?>
<p class="description" style="display: inline"> comma separated</p>
</td>
</tr>
<tr>
<th><?php _e('Max posts', 'newsletter') ?></th>
<td>
<?php $controls->text('theme_max_posts', 5); ?>
</td>
</tr>
<tr>
<th><?php _e('Post types', 'newsletter') ?></th>
<td>
<?php $controls->post_types('theme_post_types'); ?>
</td>
</tr>
</table>

View File

@@ -0,0 +1,10 @@
<?php
if (!defined('ABSPATH')) exit;
?>This email requires a modern e-mail reader but you can view the email online here:
{email_url}.
Thank you, <?php echo wp_specialchars_decode(get_option('blogname'), ENT_QUOTES); ?>
To change your subscription follow:
{profile_url}.

View File

@@ -0,0 +1,133 @@
<?php
/*
* Name: Default
* Type: standard
* Some variables are already defined:
*
* - $theme_options An array with all theme options
* - $theme_url Is the absolute URL to the theme folder used to reference images
* - $theme_subject Will be the email subject if set by this theme
*
*/
global $newsletter, $post;
defined('ABSPATH') || exit;
if (empty($theme_options['theme_color']))
$color = '#555555';
else
$color = $theme_options['theme_color'];
if (isset($theme_options['theme_posts'])) {
$filters = array();
if (empty($theme_options['theme_max_posts']))
$filters['posts_per_page'] = 10;
else
$filters['posts_per_page'] = (int) $theme_options['theme_max_posts'];
if (!empty($theme_options['theme_categories'])) {
$filters['category__in'] = $theme_options['theme_categories'];
}
if (!empty($theme_options['theme_tags'])) {
$filters['tag'] = $theme_options['theme_tags'];
}
if (!empty($theme_options['theme_post_types'])) {
$filters['post_type'] = $theme_options['theme_post_types'];
}
if (!empty($theme_options['language'])) {
$filters['suppress_filters'] = false;
do_action('wpml_switch_language', $theme_options['language']);
}
$posts = get_posts($filters);
}
?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<!-- Not all email client take care of styles inserted here -->
<style type="text/css" media="all">
a {
text-decoration: none;
color: <?php echo $color; ?>;
}
</style>
</head>
<body style="margin: 0!important; padding: 0!important">
<div style="background-color: #f4f4f4; font-family: Helvetica Neue, Helvetica, Arial, sans-serif; font-size: 14px; color: #666; margin: 0 auto; padding: 0;">
<br>
<table align="center" bgcolor="#ffffff" width="100%" style="max-width: 600px; width: 100%; border-collapse: collapse; background-color: #000" cellpadding="0" cellspacing="0" border="0">
<tr>
<td valign="top" bgcolor="#ffffff" width="100%" style="font-family: Helvetica Neue, Helvetica, Arial, sans-serif; font-size: 14px; color: #666;">
<div style="text-align: left; background-color: #fff;">
<div style="text-align: center">
<?php
//HEADER
// if (!empty($theme_options['theme_banner'])) {
// echo $theme_options['theme_banner'];
if (!empty($theme_options['theme_header_logo']['url'])) {
?>
<img style="max-width: 500px" alt="<?php echo esc_attr($theme_options['main_header_title']) ?>" src="<?php echo esc_attr($theme_options['theme_header_logo']['url']) ?>">
<?php } elseif (!empty($theme_options['main_header_logo']['url'])) { ?>
<img style="max-width: 500px" alt="<?php echo esc_attr($theme_options['main_header_title']) ?>" src="<?php echo esc_attr($theme_options['main_header_logo']['url']) ?>">
<?php } elseif (!empty($theme_options['main_header_title'])) { ?>
<div style="padding: 30px 0; color: #000; font-size: 28px; background-color: #EFEFEF; border-bottom: 1px solid #ddd; text-align: center;">
<?php echo $theme_options['main_header_title'] ?>
</div>
<?php if (!empty($theme_options['main_header_sub'])) { ?>
<div style="padding: 10px 0; color: #000; font-size: 16px; text-align: center;">
<?php echo $theme_options['main_header_sub'] ?>
</div>
<?php } ?>
<?php } else { ?>
<div style="padding: 30px 20px; color: #000; font-size: 28px; background-color: #EFEFEF; border-bottom: 1px solid #ddd; text-align: center;">
<?php echo get_option('blogname'); ?>
</div>
<?php if (!empty($theme_options['main_header_sub'])) { ?>
<div style="padding: 10px 0; color: #000; font-size: 16px; text-align: center;">
<?php echo $theme_options['main_header_sub'] ?>
</div>
<?php } ?>
<?php } ?>
</div>
<div style="padding: 10px 20px 20px 20px; background-color: #fff; line-height: 18px">
<p style="text-align: center; font-size: small;"><a target="_blank" href="{email_url}">View this email online</a></p>
<p>Here you can start to write your message. Be polite with your readers! Don't forget the subject of this message.</p>
<?php if (!empty($posts)) { ?>
<table cellpadding="5">
<?php foreach ($posts as $post) {
setup_postdata($post); ?>
<tr>
<?php if (isset($theme_options['theme_thumbnails'])) { ?>
<td valign="top"><a target="_blank" href="<?php echo get_permalink($post); ?>"><img width="75" style="width: 75px; min-width: 75px" src="<?php echo newsletter_get_post_image($post->ID); ?>" alt="image"></a></td>
<?php } ?>
<td valign="top">
<a target="_blank" href="<?php echo get_permalink(); ?>" style="font-size: 20px; line-height: 26px"><?php the_title(); ?></a>
<?php if (isset($theme_options['theme_excerpts'])) newsletter_the_excerpt($post); ?>
</td>
</tr>
<?php } ?>
</table>
<?php } ?>
<?php include WP_PLUGIN_DIR . '/newsletter/emails/themes/default/footer.php'; ?>
</div>
</div>
</td>
</tr>
</table>
<br><br>
</div>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 594 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

View File

@@ -0,0 +1,22 @@
<?php
if (!defined('ABSPATH'))
exit;
?>
<table class="form-table">
<tr>
<th>Max posts</th>
<td><?php $controls->text('theme_max_posts', 5); ?></td>
</tr>
<tr>
<th>Categories</th>
<td><?php $controls->categories_group('theme_categories'); ?></td>
</tr>
<tr>
<th>Post types</th>
<td>
<?php $controls->post_types('theme_post_types'); ?>
<p class="description">Leave all uncheck for a default behavior.</p>
</td>
</tr>
</table>
<?php include WP_PLUGIN_DIR . '/newsletter/emails/themes/default/social-options.php'; ?>

View File

@@ -0,0 +1,11 @@
<?php
if (!defined('ABSPATH'))
exit;
?>This email requires a modern e-mail reader but you can view the email online here:
{email_url}.
Thank you, <?php echo wp_specialchars_decode(get_option('blogname'), ENT_QUOTES); ?>
To change your subscription follow:
{profile_url}.

View File

@@ -0,0 +1,121 @@
<?php
global $post;
if (!defined('ABSPATH'))
exit;
$filters = array();
if (!empty($theme_options['theme_categories'])) {
$filters['category__in'] = $theme_options['theme_categories'];
}
if (empty($theme_options['theme_max_posts'])) {
$filters['posts_per_page'] = 10;
} else {
$filters['posts_per_page'] = (int) $theme_options['theme_max_posts'];
}
if (!empty($theme_options['theme_post_types'])) {
$filters['post_type'] = $theme_options['theme_post_types'];
}
$posts = get_posts($filters);
?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style type="text/css">
</style>
</head>
<body leftmargin="0" marginwidth="0" topmargin="0" marginheight="0" offset="0" style="background-color: #efefef;">
<table align="center" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="center" valign="top">
<table border="0" cellpadding="10" cellspacing="0" width="600" style="background-color: #FAFAFA;">
<tr>
<td valign="top">
<table border="0" cellpadding="10" cellspacing="0" width="100%">
<tr>
<td valign="top" align="left" style="color: #505050;font-family: Arial;font-size: 10px;">
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>.
</td>
<td valign="top" width="190" align="left" style="color: #505050;font-family: Arial;font-size: 10px;">
Is this email not displaying correctly?<br><a href="{email_url}" style="color: #336699;font-weight: normal;text-decoration: underline;">View it online</a>.
</td>
</tr>
</table>
</td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="600" bgcolor="#FFFFFF">
<tr>
<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;">
<?php echo get_option('blogname'); ?>
</td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="600" bgcolor="#FFFFFF">
<tr>
<td valign="top">
<table border="0" cellpadding="20" cellspacing="0" width="200">
<tr>
<td valign="top" align="left" style="color: #505050;font-family: Arial;font-size: 12px;line-height: 150%;">
Sidebar text
</td>
</tr>
<?php
if (!isset($theme_options['theme_social_disable'])) {
$social_icon_url = plugins_url('emails/themes/default/images', 'newsletter/plugin.pnp');
?>
<tr>
<td valign="top" align="left">
<?php
foreach (array('facebook', 'twitter', 'youtube', 'linkedin', 'googleplus', 'pinterest', 'tumblr', 'instagram') as $social) {
if (empty($theme_options["theme_$social"]))
continue;
?>
<a href="<?php echo $theme_options["theme_$social"]; ?>"><img src="<?php echo $social_icon_url; ?>/<?php echo $social; ?>.png" alt="<?php echo $social; ?>"></a>
<?php } ?>
</td>
</tr>
<?php } ?>
</table>
</td>
<td valign="top">
<table border="0" cellpadding="20" cellspacing="0" width="100%" bgcolor="#ffffff">
<tr>
<td valign="top">
<?php foreach ($posts as $post) {
setup_postdata($post);
?>
<h2 style="color: #202020;font-family: Arial;font-size: 20px;font-weight: bold;margin-top: 0;margin-bottom: 10px;border-bottom: 1px solid #efefef;">
<?php the_title(); ?>
</h2>
<center><img src="<?php echo newsletter_get_post_image($post->ID, 'medium'); ?>"></center>
<div style="color: #505050;font-family: Arial;font-size: 14px;line-height: 150%;">
<?php the_excerpt(); ?>
</div>
<?php } ?>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<br><br>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 195 KiB

View File

@@ -0,0 +1,19 @@
<?php
if (!defined('ABSPATH'))
exit;
?>
<p>
This theme requires posts with at least one image and a number of posts like
3, 6, 9, ...
</p>
<table class="form-table">
<tr>
<th>Max posts</th>
<td><?php $controls->text('theme_max_posts', 5); ?></td>
</tr>
<tr>
<th>Categories</th>
<td><?php $controls->categories_group('theme_categories'); ?></td>
</tr>
</table>
<?php include WP_PLUGIN_DIR . '/newsletter/emails/themes/default/social-options.php'; ?>

View File

@@ -0,0 +1,11 @@
<?php
if (!defined('ABSPATH'))
exit;
?>This email requires a modern e-mail reader but you can view the email online here:
{email_url}.
Thank you, <?php echo wp_specialchars_decode(get_option('blogname'), ENT_QUOTES); ?>
To change your subscription follow:
{profile_url}.

View File

@@ -0,0 +1,85 @@
<?php
/*
* Some variables are already defined:
*
* - $theme_options An array with all theme options
* - $theme_url Is the absolute URL to the theme folder used to reference images
* - $theme_subject Will be the email subject if set by this theme
*
*/
global $newsletter, $post;
if (!defined('ABSPATH')) exit;
$filters = array();
if (!empty($theme_options['theme_categories'])) {
$filters['category__in'] = $theme_options['theme_categories'];
}
if (empty($theme_options['theme_max_posts']))
$filters['posts_per_page'] = 9;
else
$filters['posts_per_page'] = (int) $theme_options['theme_max_posts'];
$posts = get_posts($filters);
?><!DOCTYPE html>
<html>
<head>
</style>
</head>
<body style="background-color: #eee; background-image: url('<?php echo $theme_url; ?>/images/bg.jpg'); font-family: Helvetica Neue, Helvetica, Arial, sans-serif; font-size: 14px; color: #666; margin: 0 auto; padding: 0;">
<br>
<table align="center">
<tr>
<td align="center">
<small><a target="_tab" href="{email_url}" style="color: #666; text-decoration: none">View this email online</a></small>
<br>
<div style="color: #b00; font-size: 50px; font-family: serif; font-style: italic;">
<?php echo get_option('blogname'); ?>
</div>
<br>
<br>
<table cellpadding="5">
<tr>
<?php for ($i=0; $i<3; $i++) { $post = $posts[$i]; setup_postdata($post); ?>
<td align="center" valign="top">
<a target="_tab" href="<?php echo get_permalink(); ?>" style="font-size: 14px; line-height: 26px; font-weight: bold; color: #000; text-decoration: none"><?php echo substr(get_the_title(), 0, 25); ?>...</a><br>
<a target="_tab" href="<?php echo get_permalink(); ?>" style="display: block; width: 200px; height: 170px; overflow: hidden"><img width="200" src="<?php echo newsletter_get_post_image($post->ID, 'medium'); ?>" alt=""></a>
</td>
<?php } ?>
</tr>
<tr>
<?php for ($i=3; $i<6; $i++) { $post = $posts[$i]; setup_postdata($post); ?>
<td align="center" valign="top">
<a target="_tab" href="<?php echo get_permalink(); ?>" style="font-size: 14px; line-height: 26px; font-weight: bold; color: #000; text-decoration: none"><?php echo substr(get_the_title(), 0, 25); ?>...</a><br>
<a target="_tab" href="<?php echo get_permalink(); ?>" style="display: block; width: 200px; height: 170px; overflow: hidden"><img width="200" src="<?php echo newsletter_get_post_image($post->ID, 'medium'); ?>" alt=""></a>
</td>
<?php } ?>
</tr>
<tr>
<?php for ($i=6; $i<9; $i++) { $post = $posts[$i]; setup_postdata($post); ?>
<td align="center" valign="top">
<a target="_tab" href="<?php echo get_permalink(); ?>" style="font-size: 14px; line-height: 26px; font-weight: bold; color: #000; text-decoration: none"><?php echo substr(get_the_title(), 0, 25); ?>...</a><br>
<a target="_tab" href="<?php echo get_permalink(); ?>" style="display: block; width: 200px; height: 170px; overflow: hidden"><img width="200" src="<?php echo newsletter_get_post_image($post->ID, 'medium'); ?>" alt=""></a>
</td>
<?php } ?>
</tr>
</table>
<br><br>
<?php
if (!isset($theme_options['theme_social_disable'])) {
include WP_PLUGIN_DIR . '/newsletter/emails/themes/default/social.php';
}
?>
<small>To change your subscription, <a target="_tab" href="{profile_url}" style="color: #666; text-decoration: none">click here</a></small>
</td>
</tr>
</table>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

View File

@@ -0,0 +1 @@
<?php include WP_PLUGIN_DIR . '/newsletter/emails/themes/default/social-options.php'; ?>

View File

@@ -0,0 +1,11 @@
<?php
if (!defined('ABSPATH'))
exit;
?>This email requires a modern e-mail reader but you can view the email online here:
{email_url}.
Thank you, <?php echo wp_specialchars_decode(get_option('blogname'), ENT_QUOTES); ?>
To change your subscription follow:
{profile_url}.

View File

@@ -0,0 +1,160 @@
<?php
/*
* Some variables are already defined:
*
* - $theme_options An array with all theme options
* - $theme_url Is the absolute URL to the theme folder used to reference images
* - $theme_subject Will be the email subject if set by this theme
*
*/
global $newsletter, $post;
if (!defined('ABSPATH'))
exit;
if (empty($theme_options['theme_color']))
$color = '#0088cc';
else
$color = $theme_options['theme_color'];
if (isset($theme_options['theme_posts'])) {
$filters = array();
if (empty($theme_options['theme_max_posts']))
$filters['posts_per_page'] = 10;
else
$filters['posts_per_page'] = (int) $theme_options['theme_max_posts'];
if (!empty($theme_options['theme_categories'])) {
$filters['category__in'] = $theme_options['theme_categories'];
}
if (!empty($theme_options['theme_tags'])) {
$filters['tag'] = $theme_options['theme_tags'];
}
if (!empty($theme_options['theme_post_types'])) {
$filters['post_type'] = $theme_options['theme_post_types'];
}
$posts = get_posts($filters);
}
?><!DOCTYPE html>
<html>
<head>
<style type="text/css">
.ReadMsgBody {
width: 100%;
}
.ExternalClass {
width: 100%; background-color:#e7e8e9 !important;
}
.yshortcuts {color: #2979be;}
body {
background-color: #e7e8e9;}
</style>
</head>
<body style="background-color:#e7e8e9;">
<br>
<br>
<table border="0" cellspacing="0" cellpadding="1" width="550" align="center">
<tbody>
<tr>
<td style="background-color: #fff;" width="550" valign="top">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td valign="top" style="background-color: #333; color: #f4f4f4; font-size: 20px; padding: 7px">
<?php echo get_option('blogname') ?>
</td>
</tr>
<!-- main content here -->
<tr>
<td>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td rowspan="10" width="35"></td>
<td height="30"><br /></td>
<td rowspan="9" width="35"></td>
</tr>
<tr>
<td style="font-size: 32px; font-family: Arial; color: #217abe;">Here the title</td>
</tr>
<tr>
<td style="font-size: 22px; font-family: Arial; color: #262729;">Here the subtitle</td>
</tr>
<tr>
<td style="font-size: 14px; font-family: Arial; color: #444; text-align: left">
<p>Hi {name},</p>
<p>here a great new from me. I absoutely need to share this secret with you.</p>
<p>Here a unordered list:</p>
<ul>
<li>List item 1</li>
<li>List item 2</li>
<li>List item 3</li>
</ul>
<p>Some other words before say good bye!</p>
<p>See you soon.</p>
</td>
</tr>
<tr>
<td height="30"></td>
</tr>
</tbody>
</table>
</td>
</tr>
<!-- end main content -->
<tr>
<td>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td width="35" height="20"></td>
<td></td>
<td rowspan="3" width="35"></td>
</tr>
<tr>
<td></td>
<td>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td align="center" style="font-size: 14px; font-family: Arial;">
<?php include WP_PLUGIN_DIR . '/newsletter/emails/themes/default/social.php'; ?>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td height="20"></td>
<td></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td style="background-color: #000000;" height="2"></td>
</tr>
<tr>
<td style="background-color: #1b1c1e; font-size: 13px; color: #f4f4f4;" height="20" align="center">
To unsubscribe <a style="color: #ccc" href="{unsubscription_url}">click here</a>, to edit your profile
<a style="color: #ccc" href="{profile_url}">click here</a>.
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 KiB

View File

@@ -0,0 +1,46 @@
<?php
/*
* This is a pre packaged theme options page. Every option name
* must start with "theme_" so Newsletter can distinguish them from other
* options that are specific to the object using the theme.
*
* An array of theme default options should always be present and that default options
* should be merged with the current complete set of options as shown below.
*
* Every theme can define its own set of options, the will be used in the theme.php
* file while composing the email body. Newsletter knows nothing about theme options
* (other than saving them) and does not use or relies on any of them.
*
* For multilanguage purpose you can actually check the constants "WP_LANG", until
* a decent system will be implemented.
*/
if (!defined('ABSPATH'))
exit;
$theme_defaults = array(
'theme_max_posts'=>10,
'theme_categories'=>array()
);
// Mandatory!
$controls->merge_defaults($theme_defaults);
?>
<table class="form-table">
<tr>
<th>Max new posts to include</th>
<td>
<?php $controls->text('theme_max_posts', 5); ?> (it defaults to 10 if empty or invalid)
</td>
</tr>
<tr>
<th>Categories</th>
<td>
<?php $controls->categories_group('theme_categories'); ?>
</td>
</tr>
</table>
<?php include WP_PLUGIN_DIR . '/newsletter/emails/themes/default/social-options.php'; ?>

View File

@@ -0,0 +1,49 @@
<?php
global $newsletter; // Newsletter object
global $post; // Current post managed by WordPress
if (!defined('ABSPATH'))
exit;
// This file is included inside a function so it inherit all the local variables.
// Since a theme has it's own options, it must check if there is new content to send
// out.
// Inside $theme_options['last_time'] there is the time stamps of the last run
// to be used to decide if we need to stop or not.
$filters = array();
$filters['posts_per_page'] = (int)$theme_options['max_posts'];
if ($filters['posts_per_page'] == 0) $filters['posts_per_page'] = 10;
// This theme has an option with categories to be included.
if (is_array($theme_options['categories'])) {
$filters['cat'] = implode(',', $theme_options['categories']);
}
$posts = get_posts($filters);
// Retrieve the posts asking them to WordPress
$posts = get_posts($filters);
?><?php echo $theme_options['theme_opening_text']; ?>
* <?php echo $theme_options['theme_title']; ?>
<?php
foreach ($posts as $post) {
// Setup the post (WordPress requirement)
setup_postdata($post);
?>
<?php the_title(); ?>
<?php the_permalink(); ?>
<?php } ?>
<?php echo $theme_options['theme_footer_text']; ?>

View File

@@ -0,0 +1,113 @@
<?php
global $newsletter; // Newsletter object
global $post; // Current post managed by WordPress
if (!defined('ABSPATH'))
exit;
/*
* Some variabled are prepared by Newsletter Plus and are available inside the theme,
* for example the theme options used to build the email body as configured by blog
* owner.
*
* $theme_options - is an associative array with theme options: every option starts
* with "theme_" as required. See the theme-options.php file for details.
* Inside that array there are the autmated email options as well, if needed.
* A special value can be present in theme_options and is the "last_run" which indicates
* when th automated email has been composed last time. Is should be used to find if
* there are now posts or not.
*
* $is_test - if true it means we are composing an email for test purpose.
*/
// This array will be passed to WordPress to extract the posts
$filters = array();
// Maximum number of post to retrieve
$filters['posts_per_page'] = (int) $theme_options['theme_max_posts'];
if ($filters['posts_per_page'] == 0)
$filters['posts_per_page'] = 10;
// Include only posts from specified categories. Do not filter per category is no
// one category has been selected.
if (is_array($theme_options['theme_categories'])) {
$filters['cat'] = implode(',', $theme_options['theme_categories']);
}
// Retrieve the posts asking them to WordPress
$posts = get_posts($filters);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title></title>
</head>
<body>
<table bgcolor="#c0c0c0" width="100%" cellpadding="20" cellspacing="0" border="0">
<tr>
<td align="center">
<table width="500" bgcolor="#ffffff" align="center" cellspacing="10" cellpadding="0" style="border: 1px solid #666;">
<tr>
<td style="font-size: 30px">
<i><?php echo get_option('blogname'); ?></i>
</td>
</tr>
<tr>
<td style="border-top: 1px solid #eee; border-bottom: 1px solid #eee; font-size: 12px; color: #999">
<br />NEWSLETTER<br /><br />
</td>
</tr>
<tr>
<td style="font-size: 14px; color: #666">
<p>Dear {name}, here an update from <?php echo get_option('blogname'); ?>.</p>
</td>
</tr>
<?php
// Do not use &post, it leads to problems...
foreach ($posts as $post) {
// Setup the post (WordPress requirement)
setup_postdata($post);
// The theme can "suggest" a subject replacing the one configured, for example. In this case
// the theme, is there is no subject, suggest the first post title.
if (empty($theme_options['subject']))
$theme_options['subject'] = $post->post_title;
// Extract a thumbnail, return null if no thumb can be found
$image = nt_post_image(get_the_ID());
?>
<tr>
<td style="font-size: 14px; color: #666">
<?php if ($image != null) { ?>
<img src="<?php echo $image; ?>" alt="picture" align="left"/>
<?php } ?>
<p><a target="_tab" href="<?php echo get_permalink(); ?>" style="font-size: 16px; color: #000; text-decoration: none"><?php the_title(); ?></a></p>
<?php the_excerpt(); ?>
</td>
</tr>
<?php
}
?>
<?php if (!isset($theme_options['theme_social_disable'])) { ?>
<tr>
<td style="font-family: Arial; font-size: 12px">
<?php include WP_PLUGIN_DIR . '/newsletter/emails/themes/default/social.php'; ?>
</td>
</tr>
<?php } ?>
<tr>
<td style="border-top: 1px solid #eee; border-bottom: 1px solid #eee; font-size: 12px; color: #999">
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>.
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 188 KiB

View File

@@ -0,0 +1,47 @@
<?php
/*
* This is a pre packaged theme options page. Every option name
* must start with "theme_" so Newsletter can distinguish them from other
* options that are specific to the object using the theme.
*
* An array of theme default options should always be present and that default options
* should be merged with the current complete set of options as shown below.
*
* Every theme can define its own set of options, the will be used in the theme.php
* file while composing the email body. Newsletter knows nothing about theme options
* (other than saving them) and does not use or relies on any of them.
*
* For multilanguage purpose you can actually check the constants "WP_LANG", until
* a decent system will be implemented.
*/
if (!defined('ABSPATH'))
exit;
$theme_defaults = array(
'theme_max_posts'=>10,
'theme_categories'=>array()
);
// Mandatory!
$controls->merge_defaults($theme_defaults);
?>
<p>This theme build an email loading all new posts after the date of the last run.</p>
<table class="form-table">
<tr>
<th>Max new posts to include</th>
<td>
<?php $controls->text('theme_max_posts', 5); ?> (it defaults to 10 if empty or invalid)
</td>
</tr>
<tr>
<th>Categories</th>
<td>
<?php $controls->categories_group('theme_categories'); ?>
</td>
</tr>
</table>
<?php include WP_PLUGIN_DIR . '/newsletter/emails/themes/default/social-options.php'; ?>

View File

@@ -0,0 +1,49 @@
<?php
global $newsletter; // Newsletter object
global $post; // Current post managed by WordPress
if (!defined('ABSPATH'))
exit;
// This file is included inside a function so it inherit all the local variables.
// Since a theme has it's own options, it must check if there is new content to send
// out.
// Inside $theme_options['last_time'] there is the time stamps of the last run
// to be used to decide if we need to stop or not.
$filters = array();
$filters['posts_per_page'] = (int)$theme_options['max_posts'];
if ($filters['posts_per_page'] == 0) $filters['posts_per_page'] = 10;
// This theme has an option with categories to be included.
if (is_array($theme_options['categories'])) {
$filters['cat'] = implode(',', $theme_options['categories']);
}
$posts = get_posts($filters);
// Retrieve the posts asking them to WordPress
$posts = get_posts($filters);
?><?php echo $theme_options['theme_opening_text']; ?>
* <?php echo $theme_options['theme_title']; ?>
<?php
foreach ($posts as $post) {
// Setup the post (WordPress requirement)
setup_postdata($post);
?>
<?php the_title(); ?>
<?php the_permalink(); ?>
<?php } ?>
<?php echo $theme_options['theme_footer_text']; ?>

View File

@@ -0,0 +1,124 @@
<?php
global $newsletter; // Newsletter object
global $post; // Current post managed by WordPress
if (!defined('ABSPATH'))
exit;
/*
* Some variabled are prepared by Newsletter Plus and are available inside the theme,
* for example the theme options used to build the email body as configured by blog
* owner.
*
* $theme_options - is an associative array with theme options: every option starts
* with "theme_" as required. See the theme-options.php file for details.
* Inside that array there are the autmated email options as well, if needed.
* A special value can be present in theme_options and is the "last_run" which indicates
* when th automated email has been composed last time. Is should be used to find if
* there are now posts or not.
*
* $is_test - if true it means we are composing an email for test purpose.
*/
// This array will be passed to WordPress to extract the posts
$filters = array();
// Maximum number of post to retrieve
$filters['posts_per_page'] = (int) $theme_options['theme_max_posts'];
if ($filters['posts_per_page'] == 0)
$filters['posts_per_page'] = 10;
// Include only posts from specified categories. Do not filter per category is no
// one category has been selected.
if (isset($theme_options['theme_categories']) && is_array($theme_options['theme_categories'])) {
$filters['cat'] = implode(',', $theme_options['theme_categories']);
}
// Retrieve the posts asking them to WordPress
$posts = get_posts($filters);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title></title>
</head>
<body>
<br />
<table cellspacing="0" align="center" border="0" style="max-width:600px; width:600px; background-color: #eee;" cellpadding="0" width="600px">
<!-- Header -->
<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">
<td height="80" width="600" style="color: #fff; font-size: 30px; font-family: Arial;" align="center" valign="middle">
<?php echo get_option('blogname'); ?>
</td>
</tr>
<tr style="background: #d0d0d0; height:20px;width:600px;">
<td valign="top" height="20" width="600" bgcolor="#ffffff" align="center" style="font-family: Arial; font-size: 12px">
<?php echo get_option('blogdescription'); ?>
</td>
</tr>
<tr>
<td>
<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">
<tr>
<td>
<table cellpadding="0" cellspacing="0" border="0" bordercolor="" width="100%" bgcolor="#ffffff">
<?php
// Do not use &post, it leads to problems...
foreach ($posts as $post) {
// Setup the post (WordPress requirement)
setup_postdata($post);
// The theme can "suggest" a subject replacing the one configured, for example. In this case
// the theme, is there is no subject, suggest the first post title.
if (empty($theme_options['subject']))
$theme_options['subject'] = $post->post_title;
// Extract a thumbnail, return null if no thumb can be found
$image = nt_post_image(get_the_ID());
?>
<tr>
<td style="font-family: Arial; font-size: 12px">
<?php if ($image != null) { ?>
<img src="<?php echo $image; ?>" alt="picture" align="left" width="100" height="100" style="margin-right: 10px"/>
<?php } ?>
<a target="_tab" href="<?php echo get_permalink(); ?>" style="color: #000; text-decoration: none"><b><?php the_title(); ?></b></a><br />
<?php the_excerpt(); ?>
</td>
</tr>
<?php
}
?>
</table>
</td>
</tr>
</table>
</td>
</tr>
<?php if (!isset($theme_options['theme_social_disable'])) { ?>
<tr>
<td style="font-family: Arial; font-size: 12px">
<?php include WP_PLUGIN_DIR . '/newsletter/emails/themes/default/social.php'; ?>
</td>
</tr>
<?php } ?>
<tr>
<td bgcolor="#ffffff" style="font-family: Arial; font-size: 12px">
This email was sent to <b>{email}</b> because you opted in on <?php echo get_option('blogname'); ?> website.
<br />
<a target="_tab" href="{profile_url}">Manage the subscription</a> |
<a target="_tab" href="{unsubscription_url}">Unsubscribe</a>
</td>
</tr>
</table>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 819 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 KiB

View File

@@ -0,0 +1,12 @@
<?php
defined('ABSPATH') || exit;
$theme_defaults = array(
'theme_max_posts' => 10,
'theme_read_more' => __('Read More', 'newsletter'),
'theme_pre_message' => 'This email has been sent to {email} because subscribed and confirmed on ' . get_option('blogname') . '. <a href="{profile_url}">Click here to modify you subscription or unsubscribe</a>.',
'theme_footer_message' => 'To change your subscription, <a target="_blank" href="{profile_url}">click here</a>.',
'theme_categories' => array()
);

View File

@@ -0,0 +1,71 @@
<?php
/*
* This is a pre packaged theme options page. Every option name
* must start with "theme_" so Newsletter can distinguish them from other
* options that are specific to the object using the theme.
*
* An array of theme default options should always be present and that default options
* should be merged with the current complete set of options as shown below.
*
* Every theme can define its own set of options, the will be used in the theme.php
* file while composing the email body. Newsletter knows nothing about theme options
* (other than saving them) and does not use or relies on any of them.
*
* For multilanguage purpose you can actually check the constants "WP_LANG", until
* a decent system will be implemented.
*/
/* @var $controls NewsletterControls */
defined('ABSPATH') || exit;
?>
<div id="tabs">
<ul>
<li><a href="#tabs-a"><?php _e('General', 'newsletter') ?></a></li>
<li><a href="#tabs-b"><?php _e('Social', 'newsletter') ?></a></li>
</ul>
<div id="tabs-a">
<table class="form-table">
<tr>
<th>Max new posts to include</th>
<td>
<?php $controls->select_number('theme_max_posts', 1, 50); ?>
</td>
</tr>
<tr>
<th>Categories to include</th>
<td><?php $controls->categories_group('theme_categories'); ?></td>
</tr>
<tr>
<th>Post types</th>
<td>
<?php $controls->post_types('theme_post_types'); ?>
<p class="description">Leave all uncheck for a default behavior.</p>
</td>
</tr>
<tr>
<th>Pre header message</th>
<td>
<?php $controls->textarea_fixed('theme_pre_message', '100%', 120); ?>
</td>
</tr>
<tr>
<th>Footer message</th>
<td>
<?php $controls->textarea_fixed('theme_footer_message', '100%', 120); ?>
</td>
</tr>
<tr>
<th>Read more label</th>
<td>
<?php $controls->text('theme_read_more'); ?>
</td>
</tr>
</table>
</div>
<div id="tabs-b">
<?php include WP_PLUGIN_DIR . '/newsletter/emails/themes/default/social-options.php'; ?>
</div>
</div>

View File

@@ -0,0 +1,11 @@
<?php
if (!defined('ABSPATH'))
exit;
?>This email requires a modern e-mail reader but you can view the email online here:
{email_url}.
Thank you, <?php echo wp_specialchars_decode(get_option('blogname'), ENT_QUOTES); ?>
To change your subscription follow:
{profile_url}.

View File

@@ -0,0 +1,140 @@
<?php
global $newsletter; // Newsletter object
global $post; // Current post managed by WordPress
if (!defined('ABSPATH'))
exit;
/*
* Some variabled are prepared by Newsletter Plus and are available inside the theme,
* for example the theme options used to build the email body as configured by blog
* owner.
*
* $theme_options - is an associative array with theme options: every option starts
* with "theme_" as required. See the theme-options.php file for details.
* Inside that array there are the autmated email options as well, if needed.
* A special value can be present in theme_options and is the "last_run" which indicates
* when th automated email has been composed last time. Is should be used to find if
* there are now posts or not.
*
* $is_test - if true it means we are composing an email for test purpose.
*/
// This array will be passed to WordPress to extract the posts
$filters = array();
// Maximum number of post to retrieve
$filters['posts_per_page'] = (int) $theme_options['theme_max_posts'];
if ($filters['posts_per_page'] == 0) {
$filters['posts_per_page'] = 10;
}
// Include only posts from specified categories. Do not filter per category is no
// one category has been selected.
if (is_array($theme_options['theme_categories'])) {
$filters['cat'] = implode(',', $theme_options['theme_categories']);
}
if (!empty($theme_options['theme_post_types'])) {
$filters['post_type'] = $theme_options['theme_post_types'];
}
// Retrieve the posts asking them to WordPress
$posts = get_posts($filters);
?>
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body style="font:normal 11px helvetica,sans-serif;">
<table style="background:#ffffff; max-width: 100%" width="600" align="center" border="0" cellpadding="0" cellspacing="0">
<tr>
<td style="color:#9ab;font:normal 12px helvetica,sans-serif;text-align:center;padding:10px 0 20px 0">
<?php echo $theme_options['theme_pre_message']; ?>
</td>
</tr>
<tr>
<td><img src="<?php echo $theme_url; ?>/bg_header_email.gif" alt=""></td>
</tr>
<tr>
<td style="border:1px dotted #e1e2e3;border-top:none;border-bottom:3px solid #e1e2e3;background:#ffffff">
<table width="100%" align="center" border="0" cellpadding="20" cellspacing="0">
<tr>
<td style="background:#ffffff">
<p style="color:#456;font-family:arial,sans-serif;font-size:24px;line-height:1.2;margin:15px 0;padding:0"><a target="_tab" href="<?php echo get_option('home'); ?>" style="color:#28c;text-decoration:none" target="_blank"><?php echo get_option('blogname'); ?></a></p>
<?php
foreach ($posts as $post) {
setup_postdata($post);
$image = nt_post_image(get_the_ID(), 'thumbnail');
?>
<table style="width:100%;color:#456;font:normal 12px/1.5em helvetica,sans-serif;margin:15px 0 0 0;padding:0 0 15px 0;border-bottom:1px dotted #e1e2e3">
<tbody><tr>
<td style="width:100%;padding:0 10px 0 0;vertical-align:top">
<p style="font-family:arial,sans-serif;color:#456;font-size:20px;line-height:22px;margin:0;padding:0"><strong><a target="_tab" href="<?php echo get_permalink(); ?>" style="color:#456;text-decoration:none" target="_blank"><?php the_title(); ?></a></strong></p>
<p style="font-family:arial,sans-serif;line-height:1.5em;margin:15px 0;padding:0"><?php the_excerpt(); ?>. </p>
</td>
<td style="vertical-align:middle; width: 100px">
<a target="_tab" href="<?php echo get_permalink(); ?>" target="_blank"><img src="<?php echo $image; ?>" alt="" width="100" border="0" height="100"></a>
<p style="background:#2786c2;text-align:center;margin:10px 0 0 0;font-size:11px;line-height:14px;font-family:arial,sans-serif;padding:4px 2px;border-radius:4px"><a target="_tab" href="<?php echo get_permalink(); ?>" style="color:#fff;text-decoration:none" target="_blank"><strong><?php echo $theme_options['theme_read_more']; ?></strong></a></p>
</td>
</tr>
</tbody></table>
<br>
<?php
}
?>
<br><br>
<p style="color:#456;font-family:arial,sans-serif;font-size:12px;line-height:1.6em;font-style:italic;margin:0 0 15px 0;padding:0">
<?php echo $theme_options['theme_footer_message']; ?>
</p>
</td>
</tr>
</table>
</td>
</tr>
<?php if (!isset($theme_options['theme_social_disable'])) { ?>
<tr>
<td style="font:normal 11px helvetica,sans-serif;">
<?php include WP_PLUGIN_DIR . '/newsletter/emails/themes/default/social.php'; ?>
</td>
</tr>
<?php } ?>
</table>
</body>
</html>