Postie - Version 1.8.29

Version Description

(2017-02-06) = * Fixed bug where "Include Featured Image in Post"

Download this release

Release Info

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

Code changes from version 1.8.28 to 1.8.29

Files changed (5) hide show
  1. docs/Changes.txt +4 -1
  2. docs/Postie.txt +1 -1
  3. postie-functions.php +29 -5
  4. postie.php +3 -3
  5. readme.txt +5 -2
docs/Changes.txt CHANGED
@@ -35,7 +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.27 (2017-01-26) =
 
 
 
39
  * Fixed bug where having ignored files can cause email body to be blank.
40
 
41
  = 1.8.27 (2017-01-26) =
35
  Attachments are now processed in the order they were attached.
36
 
37
  == CHANGELOG ==
38
+ = 1.8.29 (2017-02-06) =
39
+ * Fixed bug where "Include Featured Image in Post" = No was not being respected with inline images (iOS mail)
40
+
41
+ = 1.8.28 (2017-01-26) =
42
  * Fixed bug where having ignored files can cause email body to be blank.
43
 
44
  = 1.8.27 (2017-01-26) =
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.2
9
- Stable tag: 1.8.28
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.2
9
+ Stable tag: 1.8.29
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
postie-functions.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
  /*
3
- $Id: postie-functions.php 1582899 2017-01-26 19:46:46Z WayneAllen $
4
  */
5
 
6
  class PostiePostModifiers {
@@ -327,7 +327,7 @@ function postie_create_post($poster, $mimeDecodedEmail, $post_id, &$is_reply, $c
327
 
328
  $fulldebug = IsDebugMode();
329
  $fulldebugdump = false;
330
-
331
  if (array_key_exists('message-id', $mimeDecodedEmail['headers'])) {
332
  DebugEcho("Message Id is :" . htmlentities($mimeDecodedEmail['headers']['message-id']));
333
  if ($fulldebugdump) {
@@ -2057,8 +2057,11 @@ function filter_ReplaceImageCIDs($content, &$email) {
2057
 
2058
  function filter_ReplaceInlineImage($content, &$email, $config) {
2059
  DebugEcho('filter_ReplaceInlineImage: start');
 
2060
  foreach ($email['inline'] as &$inlineImage) {
2061
- if (($inlineImage['primary'] == 'image' && $config['auto_gallery']) || $config['custom_image_field']) {
 
 
2062
  //remove inline placeholder if we're not showing the image here
2063
  DebugEcho('filter_ReplaceInlineImage: do not add inline due to config');
2064
  $template = '';
@@ -2073,6 +2076,7 @@ function filter_ReplaceInlineImage($content, &$email, $config) {
2073
  } else {
2074
  DebugEcho('filter_ReplaceInlineImage: not found: ' . $inlineImage['filename']);
2075
  }
 
2076
  }
2077
  return $content;
2078
  }
@@ -3057,15 +3061,35 @@ function postie_test_config() {
3057
  ?>
3058
  <h2>Encoding</h2>
3059
  <?php
3060
- DebugEcho("default_charset: " . ini_get('default_charset'), true);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3061
  if (defined('DB_CHARSET')) {
3062
  DebugEcho("DB_CHARSET: " . DB_CHARSET, true);
3063
  } else {
3064
  DebugEcho("DB_CHARSET: undefined (utf8)", true);
3065
  }
 
3066
  if (defined('DB_COLLATE')) {
3067
- DebugEcho("DB_COLLATE: " . DB_COLLATE, true);
 
 
 
 
3068
  }
 
3069
  DebugEcho("WordPress encoding: " . esc_attr(get_option('blog_charset')), true);
3070
  DebugEcho("Postie encoding: " . $config['message_encoding'], true);
3071
  ?>
1
  <?php
2
  /*
3
+ $Id: postie-functions.php 1590355 2017-02-07 00:00:53Z WayneAllen $
4
  */
5
 
6
  class PostiePostModifiers {
327
 
328
  $fulldebug = IsDebugMode();
329
  $fulldebugdump = false;
330
+
331
  if (array_key_exists('message-id', $mimeDecodedEmail['headers'])) {
332
  DebugEcho("Message Id is :" . htmlentities($mimeDecodedEmail['headers']['message-id']));
333
  if ($fulldebugdump) {
2057
 
2058
  function filter_ReplaceInlineImage($content, &$email, $config) {
2059
  DebugEcho('filter_ReplaceInlineImage: start');
2060
+ $i = 1;
2061
  foreach ($email['inline'] as &$inlineImage) {
2062
+ if (($inlineImage['primary'] == 'image' && $config['auto_gallery']) ||
2063
+ $config['custom_image_field'] ||
2064
+ $config['featured_image'] && !$config['include_featured_image'] && $i == 1) {
2065
  //remove inline placeholder if we're not showing the image here
2066
  DebugEcho('filter_ReplaceInlineImage: do not add inline due to config');
2067
  $template = '';
2076
  } else {
2077
  DebugEcho('filter_ReplaceInlineImage: not found: ' . $inlineImage['filename']);
2078
  }
2079
+ $i++;
2080
  }
2081
  return $content;
2082
  }
3061
  ?>
3062
  <h2>Encoding</h2>
3063
  <?php
3064
+ $default_charset = ini_get('default_charset');
3065
+ if (version_compare(phpversion(), '5.6.0', '<')) {
3066
+ if (empty($default_charset)) {
3067
+ DebugEcho("default_charset: WARNING not default_charset set see http://php.net/manual/en/ini.core.php#ini.default-charset", true);
3068
+ } else {
3069
+ DebugEcho("default_charset: $default_charset", true);
3070
+ }
3071
+ } else {
3072
+ if (empty($default_charset)) {
3073
+ DebugEcho("default_charset: UTF-8 (default)", true);
3074
+ } else {
3075
+ DebugEcho("default_charset: $default_charset", true);
3076
+ }
3077
+ }
3078
+
3079
  if (defined('DB_CHARSET')) {
3080
  DebugEcho("DB_CHARSET: " . DB_CHARSET, true);
3081
  } else {
3082
  DebugEcho("DB_CHARSET: undefined (utf8)", true);
3083
  }
3084
+
3085
  if (defined('DB_COLLATE')) {
3086
+ if (empty(DB_COLLATE)) {
3087
+ DebugEcho("DB_COLLATE: database default", true);
3088
+ } else {
3089
+ DebugEcho("DB_COLLATE: " . DB_COLLATE, true);
3090
+ }
3091
  }
3092
+
3093
  DebugEcho("WordPress encoding: " . esc_attr(get_option('blog_charset')), true);
3094
  DebugEcho("Postie encoding: " . $config['message_encoding'], true);
3095
  ?>
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.28
8
  Author: Wayne Allen
9
  Author URI: http://PostiePlugin.com/
10
  License: GPL2
@@ -28,7 +28,7 @@
28
  */
29
 
30
  /*
31
- $Id: postie.php 1582901 2017-01-26 19:47:32Z WayneAllen $
32
  */
33
  require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "lib/fException.php");
34
  require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "lib/fUnexpectedException.php");
@@ -49,7 +49,7 @@ require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "lib/pPop3MailServer.php"
49
  require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "lib_autolink.php");
50
  require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "postie-functions.php");
51
 
52
- define('POSTIE_VERSION', '1.8.28');
53
  define("POSTIE_ROOT", dirname(__FILE__));
54
  define("POSTIE_URL", WP_PLUGIN_URL . '/' . basename(dirname(__FILE__)));
55
 
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.29
8
  Author: Wayne Allen
9
  Author URI: http://PostiePlugin.com/
10
  License: GPL2
28
  */
29
 
30
  /*
31
+ $Id: postie.php 1590356 2017-02-07 00:03:11Z WayneAllen $
32
  */
33
  require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "lib/fException.php");
34
  require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "lib/fUnexpectedException.php");
49
  require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "lib_autolink.php");
50
  require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "postie-functions.php");
51
 
52
+ define('POSTIE_VERSION', '1.8.29');
53
  define("POSTIE_ROOT", dirname(__FILE__));
54
  define("POSTIE_URL", WP_PLUGIN_URL . '/' . basename(dirname(__FILE__)));
55
 
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.2
9
- Stable tag: 1.8.28
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
@@ -242,7 +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.27 (2017-01-26) =
 
 
 
246
  * Fixed bug where having ignored files can cause email body to be blank.
247
 
248
  = 1.8.27 (2017-01-26) =
6
  Tags: e-mail, email, post-by-email
7
  Requires at least: 3.3.0
8
  Tested up to: 4.7.2
9
+ Stable tag: 1.8.29
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.29 (2017-02-06) =
246
+ * Fixed bug where "Include Featured Image in Post" = No was not being respected with inline images (iOS mail)
247
+
248
+ = 1.8.28 (2017-01-26) =
249
  * Fixed bug where having ignored files can cause email body to be blank.
250
 
251
  = 1.8.27 (2017-01-26) =