Version Description
(2014.09.19) = * Allow negative time corrections * Fix links to settings page * Misc UI updates
Download this release
Release Info
Developer | WayneAllen |
Plugin | Postie |
Version | 1.6.1 |
Comparing to | |
See all releases |
Code changes from version 1.6.0 to 1.6.1
- Revision +2 -0
- config_form.php +5 -6
- docs/Changes.txt +5 -0
- docs/Postie.txt +3 -3
- postie-functions.php +10 -10
- postie.php +26 -8
- readme.txt +8 -3
Revision
CHANGED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
Revision: 993341
|
2 |
+
Last Changed Date: 2014-09-18 22:14:45 -0700 (Thu, 18 Sep 2014)
|
config_form.php
CHANGED
@@ -56,11 +56,10 @@
|
|
56 |
}
|
57 |
global $wpdb, $wp_roles;
|
58 |
|
59 |
-
$title = __('Postie Options', 'postie');
|
60 |
-
$parent_file = 'options-general.php';
|
61 |
$config = config_Read();
|
62 |
-
if (empty($config))
|
63 |
$config = config_ResetToDefault();
|
|
|
64 |
|
65 |
$arrays = config_ArrayedSettings();
|
66 |
// some fields are stored as arrays, because that makes back-end processing much easier
|
@@ -181,7 +180,7 @@
|
|
181 |
<br />
|
182 |
<span class='recommendation'><?php _e("Should be the same as your normal offset, but this lets you adjust it in cases where that doesn't work.", 'postie'); ?></span>
|
183 |
</th>
|
184 |
-
<td><input style="width: 50px;" name='postie-settings[time_offset]' type="number" id='postie-settings-time_offset' size="2" value="<?php echo esc_attr($time_offset); ?>"
|
185 |
<?php _e('hours', 'postie') ?>
|
186 |
|
187 |
</td>
|
@@ -452,7 +451,7 @@
|
|
452 |
?>
|
453 |
<tr>
|
454 |
<th>
|
455 |
-
<?php _e("Send post confirmation
|
456 |
</th>
|
457 |
<td>
|
458 |
<select name='postie-settings[confirmation_email]' id='postie-settings-confirmation_email'>
|
@@ -852,7 +851,7 @@
|
|
852 |
|
853 |
<?php $iconDir = get_option('siteurl') . '/' . PLUGINDIR . '/postie/icons'; ?>
|
854 |
<script type="text/javascript">
|
855 |
-
jQuery(document).ready(function() {
|
856 |
jQuery("#simpleTabs").simpleTabs({
|
857 |
fadeSpeed: "medium", // @param : low, medium, fast
|
858 |
defautContent: 1, // @param : number ( simpleTabs-nav-number)
|
56 |
}
|
57 |
global $wpdb, $wp_roles;
|
58 |
|
|
|
|
|
59 |
$config = config_Read();
|
60 |
+
if (empty($config)) {
|
61 |
$config = config_ResetToDefault();
|
62 |
+
}
|
63 |
|
64 |
$arrays = config_ArrayedSettings();
|
65 |
// some fields are stored as arrays, because that makes back-end processing much easier
|
180 |
<br />
|
181 |
<span class='recommendation'><?php _e("Should be the same as your normal offset, but this lets you adjust it in cases where that doesn't work.", 'postie'); ?></span>
|
182 |
</th>
|
183 |
+
<td><input style="width: 50px;" name='postie-settings[time_offset]' type="number" id='postie-settings-time_offset' size="2" value="<?php echo esc_attr($time_offset); ?>" />
|
184 |
<?php _e('hours', 'postie') ?>
|
185 |
|
186 |
</td>
|
451 |
?>
|
452 |
<tr>
|
453 |
<th>
|
454 |
+
<?php _e("Send post confirmation email to", 'postie') ?>:
|
455 |
</th>
|
456 |
<td>
|
457 |
<select name='postie-settings[confirmation_email]' id='postie-settings-confirmation_email'>
|
851 |
|
852 |
<?php $iconDir = get_option('siteurl') . '/' . PLUGINDIR . '/postie/icons'; ?>
|
853 |
<script type="text/javascript">
|
854 |
+
jQuery(document).ready(function () {
|
855 |
jQuery("#simpleTabs").simpleTabs({
|
856 |
fadeSpeed: "medium", // @param : low, medium, fast
|
857 |
defautContent: 1, // @param : number ( simpleTabs-nav-number)
|
docs/Changes.txt
CHANGED
@@ -27,6 +27,11 @@ All script, style and body tags are stripped from html emails.
|
|
27 |
Attachments are now processed in the order they were attached.
|
28 |
|
29 |
== CHANGELOG ==
|
|
|
|
|
|
|
|
|
|
|
30 |
= 1.6.0 (2014.09.18) =
|
31 |
* Updated remote cron url to be more compatible with Wordpress
|
32 |
* The Postie menu has been moved out of the Settings menu to the top level
|
27 |
Attachments are now processed in the order they were attached.
|
28 |
|
29 |
== CHANGELOG ==
|
30 |
+
= 1.6.1 (2014.09.19) =
|
31 |
+
* Allow negative time corrections
|
32 |
+
* Fix links to settings page
|
33 |
+
* Misc UI updates
|
34 |
+
|
35 |
= 1.6.0 (2014.09.18) =
|
36 |
* Updated remote cron url to be more compatible with Wordpress
|
37 |
* The Postie menu has been moved out of the Settings menu to the top level
|
docs/Postie.txt
CHANGED
@@ -6,14 +6,14 @@ Plugin URI: http://PostiePlugin.com/
|
|
6 |
Tags: e-mail, email, post-by-email
|
7 |
Requires at least: 3.0
|
8 |
Tested up to: 4.0
|
9 |
-
Stable tag: 1.6.
|
10 |
License: GPLv2 or later
|
11 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
|
13 |
-
Postie allows you to create posts via
|
14 |
|
15 |
== Description ==
|
16 |
-
Postie offers many advanced features for creating posts via
|
17 |
including the ability to assign categories by name, included pictures and
|
18 |
videos, and automatically strip off signatures. It also has support for both
|
19 |
IMAP and POP3, with the option for ssl with both. For usage notes, see the
|
6 |
Tags: e-mail, email, post-by-email
|
7 |
Requires at least: 3.0
|
8 |
Tested up to: 4.0
|
9 |
+
Stable tag: 1.6.1
|
10 |
License: GPLv2 or later
|
11 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
|
13 |
+
Postie allows you to create posts via email, including many advanced features not found in WordPress's default Post by Email feature.
|
14 |
|
15 |
== Description ==
|
16 |
+
Postie offers many advanced features for creating posts via email,
|
17 |
including the ability to assign categories by name, included pictures and
|
18 |
videos, and automatically strip off signatures. It also has support for both
|
19 |
IMAP and POP3, with the option for ssl with both. For usage notes, see the
|
postie-functions.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
-
$Id: postie-functions.php
|
4 |
*/
|
5 |
|
6 |
//to turn on debug output add the following line to wp-config.php
|
@@ -610,7 +610,7 @@ function make_links($text) {
|
|
610 |
);
|
611 |
}
|
612 |
|
613 |
-
/* we check whether or not the
|
614 |
* a fwd, then we glean the author details from the body of the post.
|
615 |
* Otherwise we get them from the headers
|
616 |
*/
|
@@ -678,7 +678,7 @@ function getPostAuthorDetails(&$subject, &$content, &$mimeDecodedEmail) {
|
|
678 |
return $theDetails;
|
679 |
}
|
680 |
|
681 |
-
/* we check whether or not the
|
682 |
* published post. First we check whether it starts with Re:, and then
|
683 |
* we see if the remainder matches an already existing post. If so,
|
684 |
* then we add that post id to the details array, which will cause the
|
@@ -1328,7 +1328,7 @@ function filter_Etf2HTML($content) {
|
|
1328 |
return trim($content);
|
1329 |
}
|
1330 |
|
1331 |
-
// This function cleans up HTML in the
|
1332 |
function filter_CleanHtml($content) {
|
1333 |
$html = str_get_html($content);
|
1334 |
if ($html) {
|
@@ -2037,7 +2037,7 @@ function filter_PreferedText($mimeDecodedEmail, $preferTextType) {
|
|
2037 |
}
|
2038 |
|
2039 |
/**
|
2040 |
-
* This function can be used to send confirmation or rejection
|
2041 |
* It accepts an object containing the entire message
|
2042 |
*/
|
2043 |
function MailToRecipients(&$mail_content, $testEmail = false, $recipients = array(), $returnToSender, $reject = true) {
|
@@ -2085,10 +2085,10 @@ function MailToRecipients(&$mail_content, $testEmail = false, $recipients = arra
|
|
2085 |
$message = "An unauthorized message has been sent to $blogname.\n";
|
2086 |
$message .= "Sender: $from\n";
|
2087 |
$message .= "Subject: $subject\n";
|
2088 |
-
$message .= "\n\nIf you wish to allow posts from this address, please add " . $from . " to the registered users list and manually add the content of the
|
2089 |
-
$message .= "\n\nOtherwise, the
|
2090 |
$message .= "\n\nIf you would like to prevent postie from forwarding mail in the future, please change the FORWARD_REJECTED_MAIL setting in the Postie settings panel";
|
2091 |
-
$message .= "\n\nThe original content of the
|
2092 |
$mailtext = "--$boundary\r\n";
|
2093 |
$mailtext .= "Content-Type: text/plain;format=flowed;charset=\"iso-8859-1\";reply-type=original\n";
|
2094 |
$mailtext .= "Content-Transfer-Encoding: 7bit\n";
|
@@ -3410,7 +3410,7 @@ function postie_get_mail() {
|
|
3410 |
EchoInfo(sprintf(__("There are %d messages to process", "postie"), count($emails)));
|
3411 |
|
3412 |
if (function_exists('memory_get_usage')) {
|
3413 |
-
DebugEcho(__("memory at start of
|
3414 |
}
|
3415 |
|
3416 |
DebugDump($config);
|
@@ -3447,6 +3447,6 @@ function postie_get_mail() {
|
|
3447 |
EchoInfo("Mail fetch complete, $message_number emails");
|
3448 |
|
3449 |
if (function_exists('memory_get_usage')) {
|
3450 |
-
DebugEcho("memory at end of
|
3451 |
}
|
3452 |
}
|
1 |
<?php
|
2 |
/*
|
3 |
+
$Id: postie-functions.php 993037 2014-09-19 05:14:45Z WayneAllen $
|
4 |
*/
|
5 |
|
6 |
//to turn on debug output add the following line to wp-config.php
|
610 |
);
|
611 |
}
|
612 |
|
613 |
+
/* we check whether or not the email is a forwards or a redirect. If it is
|
614 |
* a fwd, then we glean the author details from the body of the post.
|
615 |
* Otherwise we get them from the headers
|
616 |
*/
|
678 |
return $theDetails;
|
679 |
}
|
680 |
|
681 |
+
/* we check whether or not the email is a reply to a previously
|
682 |
* published post. First we check whether it starts with Re:, and then
|
683 |
* we see if the remainder matches an already existing post. If so,
|
684 |
* then we add that post id to the details array, which will cause the
|
1328 |
return trim($content);
|
1329 |
}
|
1330 |
|
1331 |
+
// This function cleans up HTML in the email
|
1332 |
function filter_CleanHtml($content) {
|
1333 |
$html = str_get_html($content);
|
1334 |
if ($html) {
|
2037 |
}
|
2038 |
|
2039 |
/**
|
2040 |
+
* This function can be used to send confirmation or rejection emails
|
2041 |
* It accepts an object containing the entire message
|
2042 |
*/
|
2043 |
function MailToRecipients(&$mail_content, $testEmail = false, $recipients = array(), $returnToSender, $reject = true) {
|
2085 |
$message = "An unauthorized message has been sent to $blogname.\n";
|
2086 |
$message .= "Sender: $from\n";
|
2087 |
$message .= "Subject: $subject\n";
|
2088 |
+
$message .= "\n\nIf you wish to allow posts from this address, please add " . $from . " to the registered users list and manually add the content of the email found below.";
|
2089 |
+
$message .= "\n\nOtherwise, the email has already been deleted from the server and you can ignore this message.";
|
2090 |
$message .= "\n\nIf you would like to prevent postie from forwarding mail in the future, please change the FORWARD_REJECTED_MAIL setting in the Postie settings panel";
|
2091 |
+
$message .= "\n\nThe original content of the email has been attached.\n\n";
|
2092 |
$mailtext = "--$boundary\r\n";
|
2093 |
$mailtext .= "Content-Type: text/plain;format=flowed;charset=\"iso-8859-1\";reply-type=original\n";
|
2094 |
$mailtext .= "Content-Transfer-Encoding: 7bit\n";
|
3410 |
EchoInfo(sprintf(__("There are %d messages to process", "postie"), count($emails)));
|
3411 |
|
3412 |
if (function_exists('memory_get_usage')) {
|
3413 |
+
DebugEcho(__("memory at start of email processing:") . memory_get_usage());
|
3414 |
}
|
3415 |
|
3416 |
DebugDump($config);
|
3447 |
EchoInfo("Mail fetch complete, $message_number emails");
|
3448 |
|
3449 |
if (function_exists('memory_get_usage')) {
|
3450 |
+
DebugEcho("memory at end of email processing:" . memory_get_usage());
|
3451 |
}
|
3452 |
}
|
postie.php
CHANGED
@@ -3,8 +3,8 @@
|
|
3 |
/*
|
4 |
Plugin Name: Postie
|
5 |
Plugin URI: http://PostiePlugin.com/
|
6 |
-
Description: Signifigantly upgrades the
|
7 |
-
Version: 1.6.
|
8 |
Author: Wayne Allen
|
9 |
Author URI: http://allens-home.com/
|
10 |
License: GPL2
|
@@ -27,10 +27,10 @@
|
|
27 |
*/
|
28 |
|
29 |
/*
|
30 |
-
$Id: postie.php
|
31 |
*/
|
32 |
|
33 |
-
define('POSTIE_VERSION', '1.6.
|
34 |
define("POSTIE_ROOT", dirname(__FILE__));
|
35 |
define("POSTIE_URL", WP_PLUGIN_URL . '/' . basename(dirname(__FILE__)));
|
36 |
|
@@ -44,6 +44,8 @@ add_action('admin_menu', 'postie_admin_menu');
|
|
44 |
add_filter('whitelist_options', 'postie_whitelist');
|
45 |
add_filter('cron_schedules', 'postie_more_reccurences');
|
46 |
add_filter('query_vars', 'postie_query_vars');
|
|
|
|
|
47 |
|
48 |
register_activation_hook(__FILE__, 'activate_postie');
|
49 |
register_activation_hook(__FILE__, 'postie_cron');
|
@@ -51,8 +53,6 @@ register_deactivation_hook(__FILE__, 'postie_decron');
|
|
51 |
|
52 |
if (isset($_GET["postie_read_me"])) {
|
53 |
include_once(ABSPATH . "wp-admin/admin.php");
|
54 |
-
$title = __("Edit Plugins");
|
55 |
-
$parent_file = 'plugins.php';
|
56 |
include(ABSPATH . 'wp-admin/admin-header.php');
|
57 |
postie_ShowReadMe();
|
58 |
include(ABSPATH . 'wp-admin/admin-footer.php');
|
@@ -74,6 +74,24 @@ if (is_admin()) {
|
|
74 |
|
75 |
//****************** functions *************************
|
76 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
function postie_query_vars($vars) {
|
78 |
$vars[] = 'postie';
|
79 |
return $vars;
|
@@ -174,7 +192,7 @@ function postie_warnings() {
|
|
174 |
|
175 |
function postie_enter_info() {
|
176 |
echo "<div id='postie-info-warning' class='updated fade'><p><strong>" . __('Postie is almost ready.', 'postie') . "</strong> "
|
177 |
-
. sprintf(__('You must <a href="%1$s">enter your email settings</a> for it to work.', 'postie'), "
|
178 |
. "</p></div> ";
|
179 |
}
|
180 |
|
@@ -307,7 +325,7 @@ function postie_decron() {
|
|
307 |
wp_clear_scheduled_hook('check_postie_hook');
|
308 |
}
|
309 |
|
310 |
-
/* here we add some more cron options for how often to check for
|
311 |
|
312 |
function postie_more_reccurences($schedules) {
|
313 |
//Do not echo output in filters, it seems to break some installs
|
3 |
/*
|
4 |
Plugin Name: Postie
|
5 |
Plugin URI: http://PostiePlugin.com/
|
6 |
+
Description: Create posts via email. Signifigantly upgrades the Post by Email features of Word Press.
|
7 |
+
Version: 1.6.1
|
8 |
Author: Wayne Allen
|
9 |
Author URI: http://allens-home.com/
|
10 |
License: GPL2
|
27 |
*/
|
28 |
|
29 |
/*
|
30 |
+
$Id: postie.php 993425 2014-09-19 16:52:48Z WayneAllen $
|
31 |
*/
|
32 |
|
33 |
+
define('POSTIE_VERSION', '1.6.1');
|
34 |
define("POSTIE_ROOT", dirname(__FILE__));
|
35 |
define("POSTIE_URL", WP_PLUGIN_URL . '/' . basename(dirname(__FILE__)));
|
36 |
|
44 |
add_filter('whitelist_options', 'postie_whitelist');
|
45 |
add_filter('cron_schedules', 'postie_more_reccurences');
|
46 |
add_filter('query_vars', 'postie_query_vars');
|
47 |
+
add_filter("plugin_action_links_" . plugin_basename(__FILE__), 'postie_plugin_action_links');
|
48 |
+
add_filter('plugin_row_meta', 'postie_plugin_row_meta', 10, 2);
|
49 |
|
50 |
register_activation_hook(__FILE__, 'activate_postie');
|
51 |
register_activation_hook(__FILE__, 'postie_cron');
|
53 |
|
54 |
if (isset($_GET["postie_read_me"])) {
|
55 |
include_once(ABSPATH . "wp-admin/admin.php");
|
|
|
|
|
56 |
include(ABSPATH . 'wp-admin/admin-header.php');
|
57 |
postie_ShowReadMe();
|
58 |
include(ABSPATH . 'wp-admin/admin-footer.php');
|
74 |
|
75 |
//****************** functions *************************
|
76 |
|
77 |
+
function postie_plugin_row_meta($links, $file) {
|
78 |
+
if (strpos($file, plugin_basename(__FILE__)) !== false) {
|
79 |
+
$new_links = array(
|
80 |
+
'<a href="http://postieplugin.com/" target="_blank">Support</a>',
|
81 |
+
'<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=HPK99BJ88V4C2" target="_blank">Donate</a>'
|
82 |
+
);
|
83 |
+
|
84 |
+
$links = array_merge($links, $new_links);
|
85 |
+
}
|
86 |
+
|
87 |
+
return $links;
|
88 |
+
}
|
89 |
+
|
90 |
+
function postie_plugin_action_links($links) {
|
91 |
+
$links[] = '<a href="admin.php?page=postie-settings">Settings</a>';
|
92 |
+
return $links;
|
93 |
+
}
|
94 |
+
|
95 |
function postie_query_vars($vars) {
|
96 |
$vars[] = 'postie';
|
97 |
return $vars;
|
192 |
|
193 |
function postie_enter_info() {
|
194 |
echo "<div id='postie-info-warning' class='updated fade'><p><strong>" . __('Postie is almost ready.', 'postie') . "</strong> "
|
195 |
+
. sprintf(__('You must <a href="%1$s">enter your email settings</a> for it to work.', 'postie'), "admin.php?page=postie-settings")
|
196 |
. "</p></div> ";
|
197 |
}
|
198 |
|
325 |
wp_clear_scheduled_hook('check_postie_hook');
|
326 |
}
|
327 |
|
328 |
+
/* here we add some more cron options for how often to check for email */
|
329 |
|
330 |
function postie_more_reccurences($schedules) {
|
331 |
//Do not echo output in filters, it seems to break some installs
|
readme.txt
CHANGED
@@ -6,14 +6,14 @@ Plugin URI: http://PostiePlugin.com/
|
|
6 |
Tags: e-mail, email, post-by-email
|
7 |
Requires at least: 3.0
|
8 |
Tested up to: 4.0
|
9 |
-
Stable tag: 1.6.
|
10 |
License: GPLv2 or later
|
11 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
|
13 |
-
Postie allows you to create posts via
|
14 |
|
15 |
== Description ==
|
16 |
-
Postie offers many advanced features for creating posts via
|
17 |
including the ability to assign categories by name, included pictures and
|
18 |
videos, and automatically strip off signatures. It also has support for both
|
19 |
IMAP and POP3, with the option for ssl with both. For usage notes, see the
|
@@ -480,6 +480,11 @@ All script, style and body tags are stripped from html emails.
|
|
480 |
Attachments are now processed in the order they were attached.
|
481 |
|
482 |
== CHANGELOG ==
|
|
|
|
|
|
|
|
|
|
|
483 |
= 1.6.0 (2014.09.18) =
|
484 |
* Updated remote cron url to be more compatible with Wordpress
|
485 |
* The Postie menu has been moved out of the Settings menu to the top level
|
6 |
Tags: e-mail, email, post-by-email
|
7 |
Requires at least: 3.0
|
8 |
Tested up to: 4.0
|
9 |
+
Stable tag: 1.6.1
|
10 |
License: GPLv2 or later
|
11 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
|
13 |
+
Postie allows you to create posts via email, including many advanced features not found in WordPress's default Post by Email feature.
|
14 |
|
15 |
== Description ==
|
16 |
+
Postie offers many advanced features for creating posts via email,
|
17 |
including the ability to assign categories by name, included pictures and
|
18 |
videos, and automatically strip off signatures. It also has support for both
|
19 |
IMAP and POP3, with the option for ssl with both. For usage notes, see the
|
480 |
Attachments are now processed in the order they were attached.
|
481 |
|
482 |
== CHANGELOG ==
|
483 |
+
= 1.6.1 (2014.09.19) =
|
484 |
+
* Allow negative time corrections
|
485 |
+
* Fix links to settings page
|
486 |
+
* Misc UI updates
|
487 |
+
|
488 |
= 1.6.0 (2014.09.18) =
|
489 |
* Updated remote cron url to be more compatible with Wordpress
|
490 |
* The Postie menu has been moved out of the Settings menu to the top level
|