Version Description
(2017-05-05) = * Organizational changes in prep for move to more OO approach * Fix error when time offset is negative.
Download this release
Release Info
Developer | WayneAllen |
Plugin | Postie |
Version | 1.8.41 |
Comparing to | |
See all releases |
Code changes from version 1.8.40 to 1.8.41
- docs/Changes.txt +4 -0
- docs/Postie.txt +1 -1
- lib_autolink.php → lib/autolink.php +0 -0
- simple_html_dom.php → lib/simple_html_dom.php +0 -0
- postie-functions.php +33 -32
- postie.php +8 -7
- readme.txt +5 -1
docs/Changes.txt
CHANGED
@@ -35,6 +35,10 @@ All script, style and body tags are stripped from html emails.
|
|
35 |
Attachments are now processed in the order they were attached.
|
36 |
|
37 |
== CHANGELOG ==
|
|
|
|
|
|
|
|
|
38 |
= 1.8.40 (2017-04-24) =
|
39 |
* Ensure date set to current date when configured
|
40 |
* Compatibility testing with WordPress 4.7.4
|
35 |
Attachments are now processed in the order they were attached.
|
36 |
|
37 |
== CHANGELOG ==
|
38 |
+
= 1.8.41 (2017-05-05) =
|
39 |
+
* Organizational changes in prep for move to more OO approach
|
40 |
+
* Fix error when time offset is negative.
|
41 |
+
|
42 |
= 1.8.40 (2017-04-24) =
|
43 |
* Ensure date set to current date when configured
|
44 |
* Compatibility testing with WordPress 4.7.4
|
docs/Postie.txt
CHANGED
@@ -6,7 +6,7 @@ Plugin URI: http://PostiePlugin.com/
|
|
6 |
Tags: e-mail, email, post-by-email
|
7 |
Requires at least: 3.3.0
|
8 |
Tested up to: 4.7.4
|
9 |
-
Stable tag: 1.8.
|
10 |
License: GPLv2 or later
|
11 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
|
6 |
Tags: e-mail, email, post-by-email
|
7 |
Requires at least: 3.3.0
|
8 |
Tested up to: 4.7.4
|
9 |
+
Stable tag: 1.8.41
|
10 |
License: GPLv2 or later
|
11 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
|
lib_autolink.php → lib/autolink.php
RENAMED
File without changes
|
simple_html_dom.php → lib/simple_html_dom.php
RENAMED
File without changes
|
postie-functions.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
-
$Id: postie-functions.php
|
4 |
*/
|
5 |
|
6 |
class PostiePostModifiers {
|
@@ -130,6 +130,12 @@ function postie_environment($force_display = false) {
|
|
130 |
DebugEcho("WP_CRON_LOCK_TIMEOUT: " . WP_CRON_LOCK_TIMEOUT, $force_display);
|
131 |
}
|
132 |
|
|
|
|
|
|
|
|
|
|
|
|
|
133 |
DebugEcho('Active plugins', $force_display);
|
134 |
DebugDump(get_option('active_plugins'));
|
135 |
|
@@ -187,7 +193,7 @@ function postie_log_debug($data) {
|
|
187 |
|
188 |
function tag_Date(&$content, $message_date) {
|
189 |
//don't apply any offset here as it is accounted for later
|
190 |
-
$html =
|
191 |
if ($html !== false) {
|
192 |
$es = $html->find('text');
|
193 |
//DebugEcho("tag_Date: html " . count($es));
|
@@ -393,7 +399,7 @@ function postie_create_post($poster, $mimeDecodedEmail, $post_id, &$is_reply, $c
|
|
393 |
DebugEcho("post excerpt: $content");
|
394 |
}
|
395 |
|
396 |
-
$postAuthorDetails =
|
397 |
if ($fulldebug) {
|
398 |
DebugEcho("post author: $content");
|
399 |
}
|
@@ -489,7 +495,7 @@ function postie_create_post($poster, $mimeDecodedEmail, $post_id, &$is_reply, $c
|
|
489 |
}
|
490 |
if ((strlen($newContents) <> strlen($content)) && ('html' == $config['prefer_text_type'])) {
|
491 |
DebugEcho("Attempting to fix reply html (before): $newContents");
|
492 |
-
$newContents =
|
493 |
DebugEcho("Attempting to fix reply html (after): $newContents");
|
494 |
}
|
495 |
$content = $newContents;
|
@@ -688,7 +694,7 @@ function filter_Linkify($text) {
|
|
688 |
return $al->autolink_email($text);
|
689 |
}
|
690 |
|
691 |
-
function
|
692 |
return str_get_html($text, true, true, DEFAULT_TARGET_CHARSET, false);
|
693 |
}
|
694 |
|
@@ -697,7 +703,7 @@ function LoadDOM($text) {
|
|
697 |
* Otherwise we get them from the headers
|
698 |
*/
|
699 |
|
700 |
-
function
|
701 |
|
702 |
$theEmail = $mimeDecodedEmail['headers']['from']['mailbox'] . '@' . $mimeDecodedEmail['headers']['from']['host'];
|
703 |
|
@@ -936,7 +942,7 @@ function postie_save_post($details, $isReply, $customImageField, $postmodifiers)
|
|
936 |
* @param string
|
937 |
* @return boolean
|
938 |
*/
|
939 |
-
function
|
940 |
if (preg_match('/ATT\d\d\d\d\d.txt/i', $filename)) {
|
941 |
return true;
|
942 |
}
|
@@ -998,7 +1004,7 @@ function postie_save_attachments_worker(&$attachments, $post_id, $poster, $confi
|
|
998 |
if (array_key_exists('filename', $attachment) && !empty($attachment['filename'])) {
|
999 |
DebugEcho('postie_save_attachments_worker: ' . $attachment['filename']);
|
1000 |
|
1001 |
-
if (
|
1002 |
DebugEcho("postie_save_attachments_worker: skipping banned filename " . $attachment['filename']);
|
1003 |
break;
|
1004 |
}
|
@@ -1024,7 +1030,7 @@ function postie_save_attachments_worker(&$attachments, $post_id, $poster, $confi
|
|
1024 |
switch ($mimetype_primary) {
|
1025 |
case 'text':
|
1026 |
DebugEcho("postie_save_attachments_worker: text attachment");
|
1027 |
-
$icon =
|
1028 |
$attachment['template'] = "<a href='$file'>" . $icon . $filename . '</a>' . "\n";
|
1029 |
break;
|
1030 |
|
@@ -1040,7 +1046,7 @@ function postie_save_attachments_worker(&$attachments, $post_id, $poster, $confi
|
|
1040 |
$audioTemplate = $config['audiotemplate'];
|
1041 |
} else {
|
1042 |
DebugEcho("postie_save_attachments_worker: using default audio template: $mimetype_secondary");
|
1043 |
-
$icon =
|
1044 |
$audioTemplate = '<a href="{FILELINK}">' . $icon . '{FILENAME}</a>';
|
1045 |
}
|
1046 |
$attachment['template'] = parseTemplate($file_id, $mimetype_primary, $audioTemplate, $filename);
|
@@ -1056,7 +1062,7 @@ function postie_save_attachments_worker(&$attachments, $post_id, $poster, $confi
|
|
1056 |
$videoTemplate = $config['video2template'];
|
1057 |
} else {
|
1058 |
DebugEcho("postie_save_attachments_worker: using default template: $fileext");
|
1059 |
-
$icon =
|
1060 |
$videoTemplate = '<a href="{FILELINK}">' . $icon . '{FILENAME}</a>';
|
1061 |
}
|
1062 |
$attachment['template'] = parseTemplate($file_id, $mimetype_primary, $videoTemplate, $filename);
|
@@ -1064,7 +1070,7 @@ function postie_save_attachments_worker(&$attachments, $post_id, $poster, $confi
|
|
1064 |
|
1065 |
default :
|
1066 |
DebugEcho("postie_save_attachments_worker: generic attachment ($mimetype_primary)");
|
1067 |
-
$icon =
|
1068 |
$attachment['template'] = parseTemplate($file_id, $mimetype_primary, $config['generaltemplate'], $filename, $icon) . "\n";
|
1069 |
break;
|
1070 |
}
|
@@ -1241,7 +1247,7 @@ function filter_CleanHtml($content) {
|
|
1241 |
* Determines if the sender is a valid user.
|
1242 |
* @return integer|NULL
|
1243 |
*/
|
1244 |
-
function
|
1245 |
extract($config);
|
1246 |
$poster = NULL;
|
1247 |
$from = "";
|
@@ -1301,7 +1307,7 @@ function ValidatePoster(&$mimeDecodedEmail, $config) {
|
|
1301 |
$user_ID = "";
|
1302 |
}
|
1303 |
}
|
1304 |
-
if (empty($user_ID) && ($config['turn_authorization_off'] ||
|
1305 |
DebugEcho("ValidatePoster: looking up default user " . $config['admin_username']);
|
1306 |
$user = get_user_by('login', $config['admin_username']);
|
1307 |
if ($user === false) {
|
@@ -1375,7 +1381,7 @@ function filter_RemoveSignature($content, $config) {
|
|
1375 |
$pattern = '/^(' . implode('|', $config['sig_pattern_list']) . ')\s?$/miu';
|
1376 |
DebugEcho("filter_RemoveSignature: pattern: $pattern");
|
1377 |
|
1378 |
-
$html =
|
1379 |
if ($html !== false) {
|
1380 |
filter_RemoveSignatureWorker($html->root, $pattern);
|
1381 |
$content = $html->save();
|
@@ -1611,7 +1617,7 @@ function tag_Delay(&$content, $message_date, $config) {
|
|
1611 |
$corrected_date = $delayeddateInSeconds->add(new DateInterval('PT' . $offset . 'H'));
|
1612 |
}
|
1613 |
if ($offset < 0) {
|
1614 |
-
$corrected_date = $delayeddateInSeconds->sub(new DateInterval('PT' . $offset . 'H'));
|
1615 |
}
|
1616 |
if ($offset == 0) {
|
1617 |
$corrected_date = clone $delayeddateInSeconds;
|
@@ -1811,7 +1817,7 @@ function postie_email_reject($email, $recipients, $returnToSender) {
|
|
1811 |
* @param string - email address
|
1812 |
* @return boolean
|
1813 |
*/
|
1814 |
-
function
|
1815 |
$r = false;
|
1816 |
if (is_array($authorized)) {
|
1817 |
$a = strtolower(trim($address));
|
@@ -1863,7 +1869,7 @@ function postie_get_name_from_email($address) {
|
|
1863 |
* Choose an appropriate file icon based on the extension and mime type of
|
1864 |
* the attachment
|
1865 |
*/
|
1866 |
-
function
|
1867 |
if ($iconSet == 'none') {
|
1868 |
return('');
|
1869 |
}
|
@@ -2446,7 +2452,7 @@ function config_ResetToDefault() {
|
|
2446 |
* @return boolean
|
2447 |
*/
|
2448 |
function config_Update($data) {
|
2449 |
-
|
2450 |
// We also update the cron settings
|
2451 |
postie_cron($data['interval']);
|
2452 |
}
|
@@ -2825,14 +2831,9 @@ function config_ArrayedSettings() {
|
|
2825 |
"\n" => array('smtp', 'authorized_addresses', 'supported_file_types', 'banned_files_list', 'sig_pattern_list'));
|
2826 |
}
|
2827 |
|
2828 |
-
function
|
2829 |
-
$function_list = array(
|
2830 |
-
return(
|
2831 |
-
}
|
2832 |
-
|
2833 |
-
function HasIconvInstalled($display = true) {
|
2834 |
-
$function_list = array("iconv");
|
2835 |
-
return(HasFunctions($function_list, $display));
|
2836 |
}
|
2837 |
|
2838 |
/**
|
@@ -2840,7 +2841,7 @@ function HasIconvInstalled($display = true) {
|
|
2840 |
* @return boolean
|
2841 |
* @param array
|
2842 |
*/
|
2843 |
-
function
|
2844 |
foreach ($function_list as $function) {
|
2845 |
if (!function_exists($function)) {
|
2846 |
if ($display) {
|
@@ -2855,7 +2856,7 @@ function HasFunctions($function_list, $display = true) {
|
|
2855 |
/**
|
2856 |
* This function looks for markdown which causes problems with postie
|
2857 |
*/
|
2858 |
-
function
|
2859 |
if (in_array("markdown.php", get_option("active_plugins"))) {
|
2860 |
return true;
|
2861 |
}
|
@@ -2914,7 +2915,7 @@ function config_ValidateSettings($in) {
|
|
2914 |
/**
|
2915 |
* This function handles setting up the basic permissions
|
2916 |
*/
|
2917 |
-
function
|
2918 |
global $wp_roles;
|
2919 |
if (is_object($wp_roles)) {
|
2920 |
$admin = $wp_roles->get_role("administrator");
|
@@ -3018,7 +3019,7 @@ function postie_test_config() {
|
|
3018 |
$default_charset = ini_get('default_charset');
|
3019 |
if (version_compare(phpversion(), '5.6.0', '<')) {
|
3020 |
if (empty($default_charset)) {
|
3021 |
-
DebugEcho("default_charset: WARNING
|
3022 |
} else {
|
3023 |
DebugEcho("default_charset: $default_charset", true);
|
3024 |
}
|
@@ -3213,7 +3214,7 @@ function postie_get_mail() {
|
|
3213 |
}
|
3214 |
|
3215 |
//Check poster to see if a valid person
|
3216 |
-
$poster =
|
3217 |
if (!empty($poster)) {
|
3218 |
PostEmail($poster, $email, $tmp_config);
|
3219 |
DebugEcho("$message_number: processed");
|
1 |
<?php
|
2 |
/*
|
3 |
+
$Id: postie-functions.php 1651745 2017-05-05 17:58:24Z WayneAllen $
|
4 |
*/
|
5 |
|
6 |
class PostiePostModifiers {
|
130 |
DebugEcho("WP_CRON_LOCK_TIMEOUT: " . WP_CRON_LOCK_TIMEOUT, $force_display);
|
131 |
}
|
132 |
|
133 |
+
if (postie_IsIconvInstalled()) {
|
134 |
+
DebugEcho("iconv: present", $force_display);
|
135 |
+
} else {
|
136 |
+
DebugEcho("iconv: missing", $force_display);
|
137 |
+
}
|
138 |
+
|
139 |
DebugEcho('Active plugins', $force_display);
|
140 |
DebugDump(get_option('active_plugins'));
|
141 |
|
193 |
|
194 |
function tag_Date(&$content, $message_date) {
|
195 |
//don't apply any offset here as it is accounted for later
|
196 |
+
$html = postie_LoadDOM($content);
|
197 |
if ($html !== false) {
|
198 |
$es = $html->find('text');
|
199 |
//DebugEcho("tag_Date: html " . count($es));
|
399 |
DebugEcho("post excerpt: $content");
|
400 |
}
|
401 |
|
402 |
+
$postAuthorDetails = postie_getPostAuthorDetails($mimeDecodedEmail);
|
403 |
if ($fulldebug) {
|
404 |
DebugEcho("post author: $content");
|
405 |
}
|
495 |
}
|
496 |
if ((strlen($newContents) <> strlen($content)) && ('html' == $config['prefer_text_type'])) {
|
497 |
DebugEcho("Attempting to fix reply html (before): $newContents");
|
498 |
+
$newContents = postie_LoadDOM($newContents)->__toString();
|
499 |
DebugEcho("Attempting to fix reply html (after): $newContents");
|
500 |
}
|
501 |
$content = $newContents;
|
694 |
return $al->autolink_email($text);
|
695 |
}
|
696 |
|
697 |
+
function postie_LoadDOM($text) {
|
698 |
return str_get_html($text, true, true, DEFAULT_TARGET_CHARSET, false);
|
699 |
}
|
700 |
|
703 |
* Otherwise we get them from the headers
|
704 |
*/
|
705 |
|
706 |
+
function postie_getPostAuthorDetails($mimeDecodedEmail) {
|
707 |
|
708 |
$theEmail = $mimeDecodedEmail['headers']['from']['mailbox'] . '@' . $mimeDecodedEmail['headers']['from']['host'];
|
709 |
|
942 |
* @param string
|
943 |
* @return boolean
|
944 |
*/
|
945 |
+
function postie_isBannedFileName($filename, $bannedFiles) {
|
946 |
if (preg_match('/ATT\d\d\d\d\d.txt/i', $filename)) {
|
947 |
return true;
|
948 |
}
|
1004 |
if (array_key_exists('filename', $attachment) && !empty($attachment['filename'])) {
|
1005 |
DebugEcho('postie_save_attachments_worker: ' . $attachment['filename']);
|
1006 |
|
1007 |
+
if (postie_isBannedFileName($attachment['filename'], $config['banned_files_list'])) {
|
1008 |
DebugEcho("postie_save_attachments_worker: skipping banned filename " . $attachment['filename']);
|
1009 |
break;
|
1010 |
}
|
1030 |
switch ($mimetype_primary) {
|
1031 |
case 'text':
|
1032 |
DebugEcho("postie_save_attachments_worker: text attachment");
|
1033 |
+
$icon = postie_chooseAttachmentIcon($file, $mimetype_primary, $mimetype_secondary, $config['icon_set'], $config['icon_size']);
|
1034 |
$attachment['template'] = "<a href='$file'>" . $icon . $filename . '</a>' . "\n";
|
1035 |
break;
|
1036 |
|
1046 |
$audioTemplate = $config['audiotemplate'];
|
1047 |
} else {
|
1048 |
DebugEcho("postie_save_attachments_worker: using default audio template: $mimetype_secondary");
|
1049 |
+
$icon = postie_chooseAttachmentIcon($file, $mimetype_primary, $mimetype_secondary, $config['icon_set'], $config['icon_size']);
|
1050 |
$audioTemplate = '<a href="{FILELINK}">' . $icon . '{FILENAME}</a>';
|
1051 |
}
|
1052 |
$attachment['template'] = parseTemplate($file_id, $mimetype_primary, $audioTemplate, $filename);
|
1062 |
$videoTemplate = $config['video2template'];
|
1063 |
} else {
|
1064 |
DebugEcho("postie_save_attachments_worker: using default template: $fileext");
|
1065 |
+
$icon = postie_chooseAttachmentIcon($file, $mimetype_primary, $mimetype_secondary, $config['icon_set'], $config['icon_size']);
|
1066 |
$videoTemplate = '<a href="{FILELINK}">' . $icon . '{FILENAME}</a>';
|
1067 |
}
|
1068 |
$attachment['template'] = parseTemplate($file_id, $mimetype_primary, $videoTemplate, $filename);
|
1070 |
|
1071 |
default :
|
1072 |
DebugEcho("postie_save_attachments_worker: generic attachment ($mimetype_primary)");
|
1073 |
+
$icon = postie_chooseAttachmentIcon($file, $mimetype_primary, $mimetype_secondary, $config['icon_set'], $config['icon_size']);
|
1074 |
$attachment['template'] = parseTemplate($file_id, $mimetype_primary, $config['generaltemplate'], $filename, $icon) . "\n";
|
1075 |
break;
|
1076 |
}
|
1247 |
* Determines if the sender is a valid user.
|
1248 |
* @return integer|NULL
|
1249 |
*/
|
1250 |
+
function postie_ValidatePoster(&$mimeDecodedEmail, $config) {
|
1251 |
extract($config);
|
1252 |
$poster = NULL;
|
1253 |
$from = "";
|
1307 |
$user_ID = "";
|
1308 |
}
|
1309 |
}
|
1310 |
+
if (empty($user_ID) && ($config['turn_authorization_off'] || postie_isEmailAddressAuthorized($from, $config['authorized_addresses']) || postie_isEmailAddressAuthorized($resentFrom, $config['authorized_addresses']))) {
|
1311 |
DebugEcho("ValidatePoster: looking up default user " . $config['admin_username']);
|
1312 |
$user = get_user_by('login', $config['admin_username']);
|
1313 |
if ($user === false) {
|
1381 |
$pattern = '/^(' . implode('|', $config['sig_pattern_list']) . ')\s?$/miu';
|
1382 |
DebugEcho("filter_RemoveSignature: pattern: $pattern");
|
1383 |
|
1384 |
+
$html = postie_LoadDOM($content);
|
1385 |
if ($html !== false) {
|
1386 |
filter_RemoveSignatureWorker($html->root, $pattern);
|
1387 |
$content = $html->save();
|
1617 |
$corrected_date = $delayeddateInSeconds->add(new DateInterval('PT' . $offset . 'H'));
|
1618 |
}
|
1619 |
if ($offset < 0) {
|
1620 |
+
$corrected_date = $delayeddateInSeconds->sub(new DateInterval('PT' . abs($offset) . 'H'));
|
1621 |
}
|
1622 |
if ($offset == 0) {
|
1623 |
$corrected_date = clone $delayeddateInSeconds;
|
1817 |
* @param string - email address
|
1818 |
* @return boolean
|
1819 |
*/
|
1820 |
+
function postie_isEmailAddressAuthorized($address, $authorized) {
|
1821 |
$r = false;
|
1822 |
if (is_array($authorized)) {
|
1823 |
$a = strtolower(trim($address));
|
1869 |
* Choose an appropriate file icon based on the extension and mime type of
|
1870 |
* the attachment
|
1871 |
*/
|
1872 |
+
function postie_chooseAttachmentIcon($file, $primary, $secondary, $iconSet = 'silver', $size = '32') {
|
1873 |
if ($iconSet == 'none') {
|
1874 |
return('');
|
1875 |
}
|
2452 |
* @return boolean
|
2453 |
*/
|
2454 |
function config_Update($data) {
|
2455 |
+
postie_UpdatePermissions($data['role_access']);
|
2456 |
// We also update the cron settings
|
2457 |
postie_cron($data['interval']);
|
2458 |
}
|
2831 |
"\n" => array('smtp', 'authorized_addresses', 'supported_file_types', 'banned_files_list', 'sig_pattern_list'));
|
2832 |
}
|
2833 |
|
2834 |
+
function postie_IsIconvInstalled($display = true) {
|
2835 |
+
$function_list = array('iconv');
|
2836 |
+
return(postie_HasFunctions($function_list, $display));
|
|
|
|
|
|
|
|
|
|
|
2837 |
}
|
2838 |
|
2839 |
/**
|
2841 |
* @return boolean
|
2842 |
* @param array
|
2843 |
*/
|
2844 |
+
function postie_HasFunctions($function_list, $display = true) {
|
2845 |
foreach ($function_list as $function) {
|
2846 |
if (!function_exists($function)) {
|
2847 |
if ($display) {
|
2856 |
/**
|
2857 |
* This function looks for markdown which causes problems with postie
|
2858 |
*/
|
2859 |
+
function postie_isMarkdownInstalled() {
|
2860 |
if (in_array("markdown.php", get_option("active_plugins"))) {
|
2861 |
return true;
|
2862 |
}
|
2915 |
/**
|
2916 |
* This function handles setting up the basic permissions
|
2917 |
*/
|
2918 |
+
function postie_UpdatePermissions($role_access) {
|
2919 |
global $wp_roles;
|
2920 |
if (is_object($wp_roles)) {
|
2921 |
$admin = $wp_roles->get_role("administrator");
|
3019 |
$default_charset = ini_get('default_charset');
|
3020 |
if (version_compare(phpversion(), '5.6.0', '<')) {
|
3021 |
if (empty($default_charset)) {
|
3022 |
+
DebugEcho("default_charset: WARNING no default_charset set see http://php.net/manual/en/ini.core.php#ini.default-charset", true);
|
3023 |
} else {
|
3024 |
DebugEcho("default_charset: $default_charset", true);
|
3025 |
}
|
3214 |
}
|
3215 |
|
3216 |
//Check poster to see if a valid person
|
3217 |
+
$poster = postie_ValidatePoster($email, $tmp_config);
|
3218 |
if (!empty($poster)) {
|
3219 |
PostEmail($poster, $email, $tmp_config);
|
3220 |
DebugEcho("$message_number: processed");
|
postie.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
Plugin Name: Postie
|
5 |
Plugin URI: http://PostiePlugin.com/
|
6 |
Description: Create posts via email. Significantly upgrades the Post by Email features of WordPress.
|
7 |
-
Version: 1.8.
|
8 |
Author: Wayne Allen
|
9 |
Author URI: http://PostiePlugin.com/
|
10 |
License: GPL2
|
@@ -28,7 +28,7 @@
|
|
28 |
*/
|
29 |
|
30 |
/*
|
31 |
-
$Id: postie.php
|
32 |
*/
|
33 |
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "lib/fException.php");
|
34 |
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "lib/fUnexpectedException.php");
|
@@ -46,7 +46,8 @@ require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "lib/pSocketConnection.ph
|
|
46 |
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "lib/pMailServer.php");
|
47 |
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "lib/pImapMailServer.php");
|
48 |
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "lib/pPop3MailServer.php");
|
49 |
-
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "
|
|
|
50 |
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "postie-functions.php");
|
51 |
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "postie-api.php");
|
52 |
|
@@ -57,10 +58,10 @@ require_once(ABSPATH . 'wp-admin/includes/file.php'); //wp_tempnam()
|
|
57 |
require_once( ABSPATH . WPINC . '/class-oembed.php' );
|
58 |
|
59 |
if (!function_exists('file_get_html')) {
|
60 |
-
require_once (plugin_dir_path(__FILE__) . 'simple_html_dom.php');
|
61 |
}
|
62 |
|
63 |
-
define('POSTIE_VERSION', '1.8.
|
64 |
define("POSTIE_ROOT", dirname(__FILE__));
|
65 |
define("POSTIE_URL", WP_PLUGIN_URL . '/' . basename(dirname(__FILE__)));
|
66 |
|
@@ -228,7 +229,7 @@ function postie_warnings() {
|
|
228 |
add_action('admin_notices', 'postie_enter_info');
|
229 |
}
|
230 |
|
231 |
-
if (
|
232 |
|
233 |
function postie_markdown_warning() {
|
234 |
echo "<div id='postie-lst-warning' class='error'><p><strong>";
|
@@ -239,7 +240,7 @@ function postie_warnings() {
|
|
239 |
add_action('admin_notices', 'postie_markdown_warning');
|
240 |
}
|
241 |
|
242 |
-
if (!
|
243 |
|
244 |
function postie_iconv_warning() {
|
245 |
echo "<div id='postie-lst-warning' class='error'><p><strong>";
|
4 |
Plugin Name: Postie
|
5 |
Plugin URI: http://PostiePlugin.com/
|
6 |
Description: Create posts via email. Significantly upgrades the Post by Email features of WordPress.
|
7 |
+
Version: 1.8.41
|
8 |
Author: Wayne Allen
|
9 |
Author URI: http://PostiePlugin.com/
|
10 |
License: GPL2
|
28 |
*/
|
29 |
|
30 |
/*
|
31 |
+
$Id: postie.php 1651747 2017-05-05 18:12:39Z WayneAllen $
|
32 |
*/
|
33 |
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "lib/fException.php");
|
34 |
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "lib/fUnexpectedException.php");
|
46 |
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "lib/pMailServer.php");
|
47 |
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "lib/pImapMailServer.php");
|
48 |
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "lib/pPop3MailServer.php");
|
49 |
+
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "lib/autolink.php");
|
50 |
+
|
51 |
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "postie-functions.php");
|
52 |
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "postie-api.php");
|
53 |
|
58 |
require_once( ABSPATH . WPINC . '/class-oembed.php' );
|
59 |
|
60 |
if (!function_exists('file_get_html')) {
|
61 |
+
require_once (plugin_dir_path(__FILE__) . 'lib/simple_html_dom.php');
|
62 |
}
|
63 |
|
64 |
+
define('POSTIE_VERSION', '1.8.41');
|
65 |
define("POSTIE_ROOT", dirname(__FILE__));
|
66 |
define("POSTIE_URL", WP_PLUGIN_URL . '/' . basename(dirname(__FILE__)));
|
67 |
|
229 |
add_action('admin_notices', 'postie_enter_info');
|
230 |
}
|
231 |
|
232 |
+
if (postie_isMarkdownInstalled() && $config['prefer_text_type'] == 'html') {
|
233 |
|
234 |
function postie_markdown_warning() {
|
235 |
echo "<div id='postie-lst-warning' class='error'><p><strong>";
|
240 |
add_action('admin_notices', 'postie_markdown_warning');
|
241 |
}
|
242 |
|
243 |
+
if (!postie_IsIconvInstalled()) {
|
244 |
|
245 |
function postie_iconv_warning() {
|
246 |
echo "<div id='postie-lst-warning' class='error'><p><strong>";
|
readme.txt
CHANGED
@@ -6,7 +6,7 @@ Plugin URI: http://PostiePlugin.com/
|
|
6 |
Tags: e-mail, email, post-by-email
|
7 |
Requires at least: 3.3.0
|
8 |
Tested up to: 4.7.4
|
9 |
-
Stable tag: 1.8.
|
10 |
License: GPLv2 or later
|
11 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
|
@@ -242,6 +242,10 @@ All script, style and body tags are stripped from html emails.
|
|
242 |
Attachments are now processed in the order they were attached.
|
243 |
|
244 |
== CHANGELOG ==
|
|
|
|
|
|
|
|
|
245 |
= 1.8.40 (2017-04-24) =
|
246 |
* Ensure date set to current date when configured
|
247 |
* Compatibility testing with WordPress 4.7.4
|
6 |
Tags: e-mail, email, post-by-email
|
7 |
Requires at least: 3.3.0
|
8 |
Tested up to: 4.7.4
|
9 |
+
Stable tag: 1.8.41
|
10 |
License: GPLv2 or later
|
11 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
|
242 |
Attachments are now processed in the order they were attached.
|
243 |
|
244 |
== CHANGELOG ==
|
245 |
+
= 1.8.41 (2017-05-05) =
|
246 |
+
* Organizational changes in prep for move to more OO approach
|
247 |
+
* Fix error when time offset is negative.
|
248 |
+
|
249 |
= 1.8.40 (2017-04-24) =
|
250 |
* Ensure date set to current date when configured
|
251 |
* Compatibility testing with WordPress 4.7.4
|