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: 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>