Postie - Version 1.9.43

Version Description

(2020-02-18) = * Begin migration of shortcode support into Postie main

Download this release

Release Info

Developer WayneAllen
Plugin Icon 128x128 Postie
Version 1.9.43
Comparing to
See all releases

Code changes from version 1.9.42 to 1.9.43

Files changed (5) hide show
  1. docs/Changes.txt +3 -0
  2. docs/Postie.txt +1 -1
  3. postie.class.php +25 -1
  4. postie.php +2 -2
  5. readme.txt +4 -2
docs/Changes.txt CHANGED
@@ -35,6 +35,9 @@ 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.9.42 (2020-02-18) =
39
  * Fix: signature stripping in html emails was failing sometimes
40
 
35
  Attachments are now processed in the order they were attached.
36
 
37
  == CHANGELOG ==
38
+ = 1.9.43 (2020-02-18) =
39
+ * Begin migration of shortcode support into Postie main
40
+
41
  = 1.9.42 (2020-02-18) =
42
  * Fix: signature stripping in html emails was failing sometimes
43
 
docs/Postie.txt CHANGED
@@ -7,7 +7,7 @@ Tags: e-mail, email, post-by-email
7
  Requires PHP: 5.3
8
  Requires at least: 4.0
9
  Tested up to: 5.3
10
- Stable tag: 1.9.42
11
  License: GPLv2 or later
12
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
13
 
7
  Requires PHP: 5.3
8
  Requires at least: 4.0
9
  Tested up to: 5.3
10
+ Stable tag: 1.9.43
11
  License: GPLv2 or later
12
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
13
 
postie.class.php CHANGED
@@ -1269,10 +1269,11 @@ class Postie {
1269
 
1270
  $details = apply_filters('postie_post', $details);
1271
  $details = apply_filters('postie_post_before', $details, $mimeDecodedEmail['headers']);
1272
-
1273
  DebugEcho("post_email: After postie_post_before filter");
1274
  DebugDump($details);
1275
 
 
 
1276
  if (empty($details)) {
1277
  // It is possible that the filter has removed the post, in which case, it should not be posted.
1278
  // And if we created a placeholder post (because this was not a reply to an existing post),
@@ -1284,6 +1285,29 @@ class Postie {
1284
  DebugEcho("post_email: postie_post ended up with no post array.");
1285
  }
1286
  } else {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1287
  $postid = $this->save_post($details, $is_reply);
1288
 
1289
  $recipients = array();
1269
 
1270
  $details = apply_filters('postie_post', $details);
1271
  $details = apply_filters('postie_post_before', $details, $mimeDecodedEmail['headers']);
 
1272
  DebugEcho("post_email: After postie_post_before filter");
1273
  DebugDump($details);
1274
 
1275
+
1276
+
1277
  if (empty($details)) {
1278
  // It is possible that the filter has removed the post, in which case, it should not be posted.
1279
  // And if we created a placeholder post (because this was not a reply to an existing post),
1285
  DebugEcho("post_email: postie_post ended up with no post array.");
1286
  }
1287
  } else {
1288
+ //get and save WP shortcodes
1289
+ global $shortcode_tags;
1290
+ $tmpshortcode = $shortcode_tags;
1291
+ $shortcode_tags = array();
1292
+
1293
+ //add Postie specific shortcodes
1294
+ do_action('postie_register_shortcode');
1295
+
1296
+ //make the post details available to the shortcode handlers
1297
+ global $postie_post;
1298
+ $postie_post = $details;
1299
+
1300
+ //fix quoting
1301
+ $content = $postie_post['post_content'];
1302
+ $char = array('"', '‘', '’', '“', '”', '′', '″');
1303
+ $replace = array('"', "'", "'", '"', '"', "'", '"');
1304
+ $content = str_replace($char, $replace, $content);
1305
+
1306
+ $postie_post['post_content'] = do_shortcode($content);
1307
+
1308
+ //restore the WP shortcodes
1309
+ $shortcode_tags = $tmpshortcode;
1310
+
1311
  $postid = $this->save_post($details, $is_reply);
1312
 
1313
  $recipients = array();
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.9.42
8
  Author: Wayne Allen
9
  Author URI: http://PostiePlugin.com/
10
  License: GPL3
@@ -28,7 +28,7 @@
28
  */
29
 
30
  /*
31
- $Id: postie.php 2246483 2020-02-18 22:54:51Z WayneAllen $
32
  */
33
 
34
  if (!defined('WPINC')) {
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.9.43
8
  Author: Wayne Allen
9
  Author URI: http://PostiePlugin.com/
10
  License: GPL3
28
  */
29
 
30
  /*
31
+ $Id: postie.php 2246605 2020-02-19 05:59:59Z WayneAllen $
32
  */
33
 
34
  if (!defined('WPINC')) {
readme.txt CHANGED
@@ -7,7 +7,7 @@ Tags: e-mail, email, post-by-email
7
  Requires PHP: 5.3
8
  Requires at least: 4.0
9
  Tested up to: 5.3
10
- Stable tag: 1.9.42
11
  License: GPLv2 or later
12
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
13
 
@@ -107,6 +107,9 @@ All script, style and body tags are stripped from html emails.
107
  Attachments are now processed in the order they were attached.
108
 
109
  == CHANGELOG ==
 
 
 
110
  = 1.9.42 (2020-02-18) =
111
  * Fix: signature stripping in html emails was failing sometimes
112
 
@@ -1562,4 +1565,3 @@ plugin. And the rest is history :)
1562
  *
1563
  = 0.1 - 2004-06 =
1564
  * First release
1565
-
7
  Requires PHP: 5.3
8
  Requires at least: 4.0
9
  Tested up to: 5.3
10
+ Stable tag: 1.9.43
11
  License: GPLv2 or later
12
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
13
 
107
  Attachments are now processed in the order they were attached.
108
 
109
  == CHANGELOG ==
110
+ = 1.9.43 (2020-02-18) =
111
+ * Begin migration of shortcode support into Postie main
112
+
113
  = 1.9.42 (2020-02-18) =
114
  * Fix: signature stripping in html emails was failing sometimes
115
 
1565
  *
1566
  = 0.1 - 2004-06 =
1567
  * First release