Postie - Version 1.6.10

Version Description

(2015-1-2) = * Testing against 4.1 * New icon in admin

Download this release

Release Info

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

Code changes from version 1.6.9 to 1.6.10

Files changed (7) hide show
  1. config_form.php +16 -12
  2. docs/Changes.txt +4 -0
  3. docs/Postie.txt +2 -2
  4. docs/TODO.txt +9 -31
  5. postie-functions.php +12 -5
  6. postie.php +14 -3
  7. readme.txt +6 -2
config_form.php CHANGED
@@ -242,6 +242,7 @@
242
  </td>
243
  </tr>
244
  <?php echo BuildBooleanSelect(__("Delete email after posting", "postie"), 'postie-settings[delete_mail_after_processing]', $delete_mail_after_processing, __("Only set to no for testing purposes", "postie")); ?>
 
245
  </table>
246
  </div>
247
 
@@ -310,7 +311,7 @@
310
  <div id = "simpleTabs-content-3" class = "simpleTabs-content">
311
  <table class = 'form-table'>
312
  <tr valign = "top">
313
- <th scope = "row"><?php _e('Default post by mail category', 'postie') ?></th>
314
  <td>
315
  <?php
316
  $defaultCat = $default_post_category;
@@ -322,7 +323,7 @@
322
 
323
  <tr valign="top">
324
  <th scope="row">
325
- <?php _e('Default post by mail tag(s)', 'postie') ?>:<br />
326
  </th>
327
  <td>
328
  <input type='text' name='postie-settings[default_post_tags]' id='postie-settings-default_post_tags' value='<?php echo esc_attr($default_post_tags) ?>' />
@@ -409,28 +410,28 @@
409
  </td>
410
  </tr>
411
  <?php echo BuildBooleanSelect(__("Forward Rejected Mail", "postie"), "postie-settings[forward_rejected_mail]", $forward_rejected_mail); ?>
412
- <?php echo BuildBooleanSelect(__("Allow Subject In Mail", "postie"), "postie-settings[allow_subject_in_mail]", $allow_subject_in_mail); ?>
413
  <?php echo BuildBooleanSelect(__("Allow HTML In Mail Subject", "postie"), "postie-settings[allow_html_in_subject]", $allow_html_in_subject); ?>
414
  <?php echo BuildBooleanSelect(__("Allow HTML In Mail Body", "postie"), "postie-settings[allow_html_in_body]", $allow_html_in_body); ?>
415
  <tr>
416
  <th scope="row"><?php _e('Text for Message Start', 'postie') ?> </th>
417
  <td>
418
  <input name='postie-settings[message_start]' type="text" id='postie-settings-message_start' value="<?php echo esc_attr($message_start); ?>" size="50" /><br />
419
- <p class='description'><?php _e('Use to remove any text from a message that the email provider puts at the top of the message', 'postie') ?></p>
420
  </td>
421
  </tr>
422
  <tr>
423
  <th scope="row"><?php _e('Text for Message End', 'postie') ?> </th>
424
  <td>
425
  <input name='postie-settings[message_end]' type="text" id='postie-settings-message_end' value="<?php echo esc_attr($message_end); ?>" size="50" /><br />
426
- <p class='description'><?php _e('Use to remove any text from a message that the email provider puts at the end of the message', 'postie') ?></p>
427
  </td>
428
  </tr>
429
 
430
  <?php
431
  echo BuildBooleanSelect(__("Wrap content in pre tags", "postie"), "postie-settings[wrap_pre]", $wrap_pre);
432
  echo BuildBooleanSelect(__("Filter newlines", "postie"), "postie-settings[filternewlines]", $filternewlines, __("Retain newlines from plain text. Set to no if using markdown or textitle syntax", "postie"));
433
- echo BuildBooleanSelect(__("Replace newline characters with html line breaks (&lt;br /&gt;)", "postie"), "postie-settings[convertnewline]", $convertnewline, __("Filter newlines must be turned on for this option to take effect.", "postie"));
434
  echo BuildBooleanSelect(__("Return rejected mail to sender", "postie"), "postie-settings[return_to_sender]", $return_to_sender);
435
  ?>
436
  <tr>
@@ -460,11 +461,8 @@
460
  </td>
461
  </tr>
462
  <?php echo BuildBooleanSelect(__("Decode Quoted Printable Data", "postie"), "postie-settings[message_dequote]", $message_dequote); ?>
463
- <?php echo BuildTextArea(__("Supported MIME Types", "postie"), "postie-settings[supported_file_types]", $supported_file_types, __("Add just the type (not the subtype). Text, Video, Audio, Image and Multipart are always supported. Put each type on a single line.", "postie")); ?>
464
- <?php echo BuildTextArea(__("Banned File Names", "postie"), "postie-settings[banned_files_list]", $banned_files_list, __("Put each file name on a single line.Files matching this list will never be posted to your blog. You can use wildcards such as *.xls, or *.* for all files", "postie")); ?>
465
  <?php echo BuildBooleanSelect(__("Drop The Signature From Mail", "postie"), "postie-settings[drop_signature]", $drop_signature); ?>
466
- <?php echo BuildTextArea(__("Signature Patterns", "postie"), "postie-settings[sig_pattern_list]", $sig_pattern_list, __("Put each pattern on a separate line. Patterns are <a href='http://regex101.com/' target='_blank'>regular expressions</a>.", "postie")); ?>
467
- <?php echo BuildTextArea(__("Allowed SMTP servers", "postie"), "postie-settings[smtp]", $smtp, __("Only allow messages which have been sent throught the following smtp servers. Put each server on a separate line. Leave blank to not check smtp servers.", "postie")); ?>
468
  </table>
469
  </div>
470
 
@@ -475,8 +473,8 @@
475
  echo BuildBooleanSelect(__("Use First Image as Featured Image", "postie"), "postie-settings[featured_image]", $featured_image, __("If any images are attached, the first one will be the featured image for the post", "postie"));
476
  echo BuildBooleanSelect(__("Automatically insert image gallery", "postie"), "postie-settings[auto_gallery]", $auto_gallery, __("If any images are attached, they will automatically be inserted as a gallery", "postie"));
477
  echo BuildBooleanSelect(__("Image Location", "postie"), "postie-settings[images_append]", $images_append, __("Location of attachments if using 'plain' format. Before or After content.", "postie"), array('After', 'Before'));
 
478
  echo BuildBooleanSelect(__("Start Image Count At", "postie"), "postie-settings[start_image_count_at_zero]", $start_image_count_at_zero, __('For use if using "Image Place Holder Tag" below.', "postie"), array('Start at 0', 'Start at 1'));
479
- echo BuildBooleanSelect(__("Generate Thumbnails", "postie"), "postie-settings[generate_thumbnails]", $generate_thumbnails, __("Some hosts crash during thumbnail generation. Set this to 'No' if you have this issue.", "postie"));
480
  ?>
481
  <tr>
482
  <th scope="row"><?php _e('Image Place Holder Tag', 'postie') ?></th>
@@ -702,8 +700,14 @@
702
  </table>
703
  </div>
704
 
 
 
 
 
705
  <div id="simpleTabs-content-6" class="simpleTabs-content">
706
  <table class='form-table'>
 
 
707
 
708
  <tr>
709
  <th scope='row'><?php _e('Attachment icon set', 'postie') ?></th>
@@ -797,7 +801,7 @@
797
  name='postie-settings[generaltemplate]'><?php echo esc_attr($generaltemplate) ?></textarea>
798
  </td>
799
  </tr>
800
- <?php echo BuildBooleanSelect(__("Use custom image field for attachments", "postie"), "postie-settings[custom_image_field]", $custom_image_field, __("When set to 'Yes' no attachments will appear in the post (including images, video &amp; sound files). Instead the url to the attachment will be put into a custom field named 'image'. Your theme will need logic to display these attachments.", "postie")); ?>
801
  </table>
802
  </div>
803
  <div id="simpleTabs-content-7" class="simpleTabs-content">
242
  </td>
243
  </tr>
244
  <?php echo BuildBooleanSelect(__("Delete email after posting", "postie"), 'postie-settings[delete_mail_after_processing]', $delete_mail_after_processing, __("Only set to no for testing purposes", "postie")); ?>
245
+ <?php echo BuildTextArea(__("Allowed SMTP servers", "postie"), "postie-settings[smtp]", $smtp, __("Only allow messages which have been sent throught the following SMTP servers. Put each server on a separate line. Leave blank to allow any SMTP server.", "postie")); ?>
246
  </table>
247
  </div>
248
 
311
  <div id = "simpleTabs-content-3" class = "simpleTabs-content">
312
  <table class = 'form-table'>
313
  <tr valign = "top">
314
+ <th scope = "row"><?php _e('Default category', 'postie') ?></th>
315
  <td>
316
  <?php
317
  $defaultCat = $default_post_category;
323
 
324
  <tr valign="top">
325
  <th scope="row">
326
+ <?php _e('Default tag(s)', 'postie') ?><br />
327
  </th>
328
  <td>
329
  <input type='text' name='postie-settings[default_post_tags]' id='postie-settings-default_post_tags' value='<?php echo esc_attr($default_post_tags) ?>' />
410
  </td>
411
  </tr>
412
  <?php echo BuildBooleanSelect(__("Forward Rejected Mail", "postie"), "postie-settings[forward_rejected_mail]", $forward_rejected_mail); ?>
413
+ <?php echo BuildBooleanSelect(__("Allow Subject In Mail", "postie"), "postie-settings[allow_subject_in_mail]", $allow_subject_in_mail, "Enclose the subject between '#' on the very first line. E.g. #this is my subject#"); ?>
414
  <?php echo BuildBooleanSelect(__("Allow HTML In Mail Subject", "postie"), "postie-settings[allow_html_in_subject]", $allow_html_in_subject); ?>
415
  <?php echo BuildBooleanSelect(__("Allow HTML In Mail Body", "postie"), "postie-settings[allow_html_in_body]", $allow_html_in_body); ?>
416
  <tr>
417
  <th scope="row"><?php _e('Text for Message Start', 'postie') ?> </th>
418
  <td>
419
  <input name='postie-settings[message_start]' type="text" id='postie-settings-message_start' value="<?php echo esc_attr($message_start); ?>" size="50" /><br />
420
+ <p class='description'><?php _e('Remove all text from the beginning of the message up to the point where this is found.', 'postie') ?></p>
421
  </td>
422
  </tr>
423
  <tr>
424
  <th scope="row"><?php _e('Text for Message End', 'postie') ?> </th>
425
  <td>
426
  <input name='postie-settings[message_end]' type="text" id='postie-settings-message_end' value="<?php echo esc_attr($message_end); ?>" size="50" /><br />
427
+ <p class='description'><?php _e('Remove all text from the point this is found to the end of the message.', 'postie') ?></p>
428
  </td>
429
  </tr>
430
 
431
  <?php
432
  echo BuildBooleanSelect(__("Wrap content in pre tags", "postie"), "postie-settings[wrap_pre]", $wrap_pre);
433
  echo BuildBooleanSelect(__("Filter newlines", "postie"), "postie-settings[filternewlines]", $filternewlines, __("Retain newlines from plain text. Set to no if using markdown or textitle syntax", "postie"));
434
+ echo BuildBooleanSelect(__("Replace newline characters with html line breaks (&lt;br /&gt;)", "postie"), "postie-settings[convertnewline]", $convertnewline, __("Filter newlines must be turned on for this option to take effect", "postie"));
435
  echo BuildBooleanSelect(__("Return rejected mail to sender", "postie"), "postie-settings[return_to_sender]", $return_to_sender);
436
  ?>
437
  <tr>
461
  </td>
462
  </tr>
463
  <?php echo BuildBooleanSelect(__("Decode Quoted Printable Data", "postie"), "postie-settings[message_dequote]", $message_dequote); ?>
 
 
464
  <?php echo BuildBooleanSelect(__("Drop The Signature From Mail", "postie"), "postie-settings[drop_signature]", $drop_signature); ?>
465
+ <?php echo BuildTextArea(__("Signature Patterns", "postie"), "postie-settings[sig_pattern_list]", $sig_pattern_list, __("Put each pattern on a separate line. Patterns are <a href='http://regex101.com/' target='_blank'>regular expressions</a>", "postie")); ?>
 
466
  </table>
467
  </div>
468
 
473
  echo BuildBooleanSelect(__("Use First Image as Featured Image", "postie"), "postie-settings[featured_image]", $featured_image, __("If any images are attached, the first one will be the featured image for the post", "postie"));
474
  echo BuildBooleanSelect(__("Automatically insert image gallery", "postie"), "postie-settings[auto_gallery]", $auto_gallery, __("If any images are attached, they will automatically be inserted as a gallery", "postie"));
475
  echo BuildBooleanSelect(__("Image Location", "postie"), "postie-settings[images_append]", $images_append, __("Location of attachments if using 'plain' format. Before or After content.", "postie"), array('After', 'Before'));
476
+ echo BuildBooleanSelect(__("Generate Thumbnails", "postie"), "postie-settings[generate_thumbnails]", $generate_thumbnails, __("Some hosts crash during thumbnail generation. Set this to 'No' if you have this issue", "postie"));
477
  echo BuildBooleanSelect(__("Start Image Count At", "postie"), "postie-settings[start_image_count_at_zero]", $start_image_count_at_zero, __('For use if using "Image Place Holder Tag" below.', "postie"), array('Start at 0', 'Start at 1'));
 
478
  ?>
479
  <tr>
480
  <th scope="row"><?php _e('Image Place Holder Tag', 'postie') ?></th>
700
  </table>
701
  </div>
702
 
703
+ <!--
704
+ ## Attachments
705
+ -->
706
+
707
  <div id="simpleTabs-content-6" class="simpleTabs-content">
708
  <table class='form-table'>
709
+ <?php echo BuildTextArea(__("Supported MIME Types", "postie"), "postie-settings[supported_file_types]", $supported_file_types, __("Add just the type (not the subtype). Text, Video, Audio, Image and Multipart are always supported. Put each type on a single line", "postie")); ?>
710
+ <?php echo BuildTextArea(__("Banned File Names", "postie"), "postie-settings[banned_files_list]", $banned_files_list, __("Put each file name on a single line.Files matching this list will never be posted to your blog. You can use wildcards such as *.xls, or *.* for all files", "postie")); ?>
711
 
712
  <tr>
713
  <th scope='row'><?php _e('Attachment icon set', 'postie') ?></th>
801
  name='postie-settings[generaltemplate]'><?php echo esc_attr($generaltemplate) ?></textarea>
802
  </td>
803
  </tr>
804
+ <?php echo BuildBooleanSelect(__("Use custom image field for attachments", "postie"), "postie-settings[custom_image_field]", $custom_image_field, __("When set to 'Yes' no attachments will appear in the post (including images, video &amp; sound files). Instead the url to the attachment will be put into a custom field named 'image'. Your theme will need logic to display these attachments", "postie")); ?>
805
  </table>
806
  </div>
807
  <div id="simpleTabs-content-7" class="simpleTabs-content">
docs/Changes.txt CHANGED
@@ -27,6 +27,10 @@ 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.9 (2014.12.1) =
31
  * Post status list is now read from WordPress settings, rather than being a hard-coded list.
32
  * Settings look & feel matching WP default style.
27
  Attachments are now processed in the order they were attached.
28
 
29
  == CHANGELOG ==
30
+ = 1.6.10 (2015-1-2) =
31
+ * Testing against 4.1
32
+ * New icon in admin
33
+
34
  = 1.6.9 (2014.12.1) =
35
  * Post status list is now read from WordPress settings, rather than being a hard-coded list.
36
  * Settings look & feel matching WP default style.
docs/Postie.txt CHANGED
@@ -5,8 +5,8 @@ Author URI: http://allens-home.com/
5
  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.1
9
- Stable tag: 1.6.9
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
5
  Plugin URI: http://PostiePlugin.com/
6
  Tags: e-mail, email, post-by-email
7
  Requires at least: 3.0
8
+ Tested up to: 4.1
9
+ Stable tag: 1.6.10
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
docs/TODO.txt CHANGED
@@ -1,3 +1,4 @@
 
1
  Add Message-ID header value to custom field (postie_message_id?) to both posts and comments.
2
  Use In-Reply-To header value as a better way to detect replies
3
  Verify that {TITLE} is doing the right thing.
@@ -12,7 +13,8 @@ dynamically determine video size (height/width) - https://code.google.com/p/phpv
12
  gallery logic does not handle both images and non-images
13
  plugin conflict - Image Rotation Fixer/Image Rotation Repair
14
  send email notice when attachments are rejected.
15
- review http://wp.smashingmagazine.com/2011/11/23/improve-wordpress-plugins-readme-txt/
 
16
  use wordpress plugin template
17
  boilerplate http://wppb.io/
18
  starter-plugin https://github.com/mattyza/starter-plugin
@@ -62,10 +64,13 @@ after session filter
62
 
63
  convert plain text to html using same logic as wp - i.e. all text is html
64
  Original text is never modified
 
 
 
65
  =========
66
  AddOn Ideas
67
  (done) Google Alerts - turn each alert into a post
68
- HTML cleaning - use http://htmlpurifier.org/ to convert Word Html and other bad html into standard html
69
 
70
  =========
71
  Postie 2.0
@@ -80,35 +85,8 @@ Make sure all failures are sent to admin (option?) failed attachments, etc.
80
  Option to send logs to support
81
  Enhance #img# to specify the featured image
82
  "yoast" style admin sidebar - see clicky by yoast
83
- replace native imap MIME parser with flourish - http://flourishlib.com/docs/fMailbox
84
  provide a location for custom icons. update docs about location.
85
  handle condition where only one of text/plain & text/html is supplied, but Preferred Text Type is set to the opposite.
86
  change all Postie command to use a more consistent and easy to parse syntax
87
-
88
- Use standard shortcode syntax? I.e. [postie date="Jan 1, 2014"]
89
-
90
- commands with multiple data
91
- #custom name="field name" data="field value" custom#
92
-
93
- commands with single data
94
- #img the caption img#
95
- #tags one, two, three tags#
96
- #cat one, two, three cat#
97
- #date tomorrow date#
98
- #excerpt the excerpt excerpt#
99
- #post-type custom post type post-type#
100
- #post-format image post-format#
101
- #subject title subject#
102
- #delay 1 day delay#
103
- #content the post content# - replacement for :start/:end
104
-
105
- tag w/o data
106
- @more (new)
107
- @comments-open, @comments-closed, @comments-registeredonly
108
- @status-draft, @status-publish, @status-pending, @status-private
109
-
110
- alternate syntax
111
- {{@cmd data }}
112
- {{@status draft}}
113
- {{@category one, two, three}}
114
- {{@custom name="field name" data="field value" }}
1
+ Separate out video linkifying from normal url linkifying - separate settings
2
  Add Message-ID header value to custom field (postie_message_id?) to both posts and comments.
3
  Use In-Reply-To header value as a better way to detect replies
4
  Verify that {TITLE} is doing the right thing.
13
  gallery logic does not handle both images and non-images
14
  plugin conflict - Image Rotation Fixer/Image Rotation Repair
15
  send email notice when attachments are rejected.
16
+ readme tips http://wp.smashingmagazine.com/2011/11/23/improve-wordpress-plugins-readme-txt/
17
+ review http://codex.wordpress.org/Settings_API
18
  use wordpress plugin template
19
  boilerplate http://wppb.io/
20
  starter-plugin https://github.com/mattyza/starter-plugin
64
 
65
  convert plain text to html using same logic as wp - i.e. all text is html
66
  Original text is never modified
67
+ There are filters that modify
68
+ meta data (tags, categories, date)
69
+ content (start, end, newlines, linkifying)
70
  =========
71
  AddOn Ideas
72
  (done) Google Alerts - turn each alert into a post
73
+ (done) HTML cleaning - use http://htmlpurifier.org/ to convert Word Html and other bad html into standard html
74
 
75
  =========
76
  Postie 2.0
85
  Option to send logs to support
86
  Enhance #img# to specify the featured image
87
  "yoast" style admin sidebar - see clicky by yoast
88
+ replace native imap MIME parser with flourish - http://flourishlib.com/docs/fMailbox or Hoard - see "Post By Email" plugin https://wordpress.org/plugins/post-by-email/
89
  provide a location for custom icons. update docs about location.
90
  handle condition where only one of text/plain & text/html is supplied, but Preferred Text Type is set to the opposite.
91
  change all Postie command to use a more consistent and easy to parse syntax
92
+ Use standard shortcode syntax. I.e. [postie date="Jan 1, 2014"]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
postie-functions.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
  /*
3
- $Id: postie-functions.php 1036173 2014-12-01 20:03:04Z WayneAllen $
4
  */
5
 
6
  //to turn on debug output add the following line to wp-config.php
@@ -19,6 +19,14 @@ class PostiePostModifiers {
19
 
20
  }
21
 
 
 
 
 
 
 
 
 
22
  if (!function_exists('mb_str_replace')) {
23
 
24
  function mb_str_replace($search, $replace, $subject, &$count = 0) {
@@ -377,8 +385,6 @@ function CreatePost($poster, $mimeDecodedEmail, $post_id, &$is_reply, $config, $
377
  DebugEcho("post end: $content");
378
  }
379
 
380
- DebugEcho("prefer_text_type: " . $config['prefer_text_type']);
381
-
382
  filter_ReplaceImagePlaceHolders($content, $attachments["html"], $config, $id, $config['image_placeholder'], true);
383
  if ($fulldebug) {
384
  DebugEcho("post body img: $content");
@@ -1143,7 +1149,7 @@ function GetContent($part, &$attachments, $post_id, $poster, $config) {
1143
  if (!is_wp_error($file_id)) {
1144
  //featured image logic
1145
  //set the first image we come across as the featured image
1146
- DebugEcho("GetContent: has_post_thumbnail: " . has_post_thumbnail($post_id));
1147
  //DebugEcho("get_the_post_thumbnail: " .get_the_post_thumbnail($post_id));
1148
 
1149
  if ($featured_image && !has_post_thumbnail($post_id)) {
@@ -1159,7 +1165,7 @@ function GetContent($part, &$attachments, $post_id, $poster, $config) {
1159
 
1160
  $the_post = get_post($file_id);
1161
  $attachments["html"][$filename] = parseTemplate($file_id, $mimetype_primary, $imagetemplate, $filename);
1162
- if ($cid) {
1163
  $attachments["cids"][$cid] = array($file, count($attachments["html"]) - 1);
1164
  DebugEcho("GetContent: CID Attachement: $cid");
1165
  }
@@ -1633,6 +1639,7 @@ function HandleMessageEncoding($contenttransferencoding, $charset, $body, $blogE
1633
  if ($dequote && $contenttransferencoding == 'quoted-printable') {
1634
  DebugEcho("quoted-printable detected");
1635
  $body = quoted_printable_decode($body);
 
1636
  }
1637
 
1638
  DebugEcho("after HandleMessageEncoding");
1
  <?php
2
  /*
3
+ $Id: postie-functions.php 1048679 2014-12-18 23:58:54Z WayneAllen $
4
  */
5
 
6
  //to turn on debug output add the following line to wp-config.php
19
 
20
  }
21
 
22
+ if (!function_exists('boolval')) {
23
+
24
+ function boolval($val) {
25
+ return (bool) $val;
26
+ }
27
+
28
+ }
29
+
30
  if (!function_exists('mb_str_replace')) {
31
 
32
  function mb_str_replace($search, $replace, $subject, &$count = 0) {
385
  DebugEcho("post end: $content");
386
  }
387
 
 
 
388
  filter_ReplaceImagePlaceHolders($content, $attachments["html"], $config, $id, $config['image_placeholder'], true);
389
  if ($fulldebug) {
390
  DebugEcho("post body img: $content");
1149
  if (!is_wp_error($file_id)) {
1150
  //featured image logic
1151
  //set the first image we come across as the featured image
1152
+ DebugEcho("GetContent: has_post_thumbnail: " . boolval(has_post_thumbnail($post_id)));
1153
  //DebugEcho("get_the_post_thumbnail: " .get_the_post_thumbnail($post_id));
1154
 
1155
  if ($featured_image && !has_post_thumbnail($post_id)) {
1165
 
1166
  $the_post = get_post($file_id);
1167
  $attachments["html"][$filename] = parseTemplate($file_id, $mimetype_primary, $imagetemplate, $filename);
1168
+ if (!empty($cid)) {
1169
  $attachments["cids"][$cid] = array($file, count($attachments["html"]) - 1);
1170
  DebugEcho("GetContent: CID Attachement: $cid");
1171
  }
1639
  if ($dequote && $contenttransferencoding == 'quoted-printable') {
1640
  DebugEcho("quoted-printable detected");
1641
  $body = quoted_printable_decode($body);
1642
+ //DebugEcho($body);
1643
  }
1644
 
1645
  DebugEcho("after HandleMessageEncoding");
postie.php CHANGED
@@ -4,7 +4,7 @@
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.9
8
  Author: Wayne Allen
9
  Author URI: http://allens-home.com/
10
  License: GPL2
@@ -27,11 +27,11 @@
27
  */
28
 
29
  /*
30
- $Id: postie.php 1036193 2014-12-01 20:20:35Z WayneAllen $
31
  */
32
  require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "postie-functions.php");
33
 
34
- define('POSTIE_VERSION', '1.6.9');
35
  define("POSTIE_ROOT", dirname(__FILE__));
36
  define("POSTIE_URL", WP_PLUGIN_URL . '/' . basename(dirname(__FILE__)));
37
 
@@ -41,6 +41,7 @@ add_action('check_postie_hook', 'check_postie');
41
  add_action('parse_request', 'postie_parse_request');
42
  add_action('admin_init', 'postie_admin_init');
43
  add_action('admin_menu', 'postie_admin_menu');
 
44
 
45
  add_filter('whitelist_options', 'postie_whitelist');
46
  add_filter('cron_schedules', 'postie_more_reccurences');
@@ -73,6 +74,16 @@ if (is_admin()) {
73
  }
74
 
75
  //****************** functions *************************
 
 
 
 
 
 
 
 
 
 
76
 
77
  function postie_plugin_row_meta($links, $file) {
78
  if (strpos($file, plugin_basename(__FILE__)) !== false) {
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.10
8
  Author: Wayne Allen
9
  Author URI: http://allens-home.com/
10
  License: GPL2
27
  */
28
 
29
  /*
30
+ $Id: postie.php 1058629 2015-01-02 19:49:34Z WayneAllen $
31
  */
32
  require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "postie-functions.php");
33
 
34
+ define('POSTIE_VERSION', '1.6.10');
35
  define("POSTIE_ROOT", dirname(__FILE__));
36
  define("POSTIE_URL", WP_PLUGIN_URL . '/' . basename(dirname(__FILE__)));
37
 
41
  add_action('parse_request', 'postie_parse_request');
42
  add_action('admin_init', 'postie_admin_init');
43
  add_action('admin_menu', 'postie_admin_menu');
44
+ add_action('admin_head', 'postie_admin_head');
45
 
46
  add_filter('whitelist_options', 'postie_whitelist');
47
  add_filter('cron_schedules', 'postie_more_reccurences');
74
  }
75
 
76
  //****************** functions *************************
77
+ function postie_admin_head() {
78
+ ?>
79
+ <style type="text/css">
80
+ #adminmenu #toplevel_page_postie-settings div.wp-menu-image:before {
81
+ content: "\f466";
82
+ }
83
+ </style>
84
+ <?php
85
+
86
+ }
87
 
88
  function postie_plugin_row_meta($links, $file) {
89
  if (strpos($file, plugin_basename(__FILE__)) !== false) {
readme.txt CHANGED
@@ -5,8 +5,8 @@ Author URI: http://allens-home.com/
5
  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.1
9
- Stable tag: 1.6.9
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
@@ -238,6 +238,10 @@ All script, style and body tags are stripped from html emails.
238
  Attachments are now processed in the order they were attached.
239
 
240
  == CHANGELOG ==
 
 
 
 
241
  = 1.6.9 (2014.12.1) =
242
  * Post status list is now read from WordPress settings, rather than being a hard-coded list.
243
  * Settings look & feel matching WP default style.
5
  Plugin URI: http://PostiePlugin.com/
6
  Tags: e-mail, email, post-by-email
7
  Requires at least: 3.0
8
+ Tested up to: 4.1
9
+ Stable tag: 1.6.10
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
238
  Attachments are now processed in the order they were attached.
239
 
240
  == CHANGELOG ==
241
+ = 1.6.10 (2015-1-2) =
242
+ * Testing against 4.1
243
+ * New icon in admin
244
+
245
  = 1.6.9 (2014.12.1) =
246
  * Post status list is now read from WordPress settings, rather than being a hard-coded list.
247
  * Settings look & feel matching WP default style.