Postie - Version 1.6.19

Version Description

(2015-05-04) = * Reduced the number of messages sent to the log for successful runs * Rename the disable_kses_content() function to postie_disable_kses_content() to fix a conflict with DAP WP LiveLinks Plugin

Download this release

Release Info

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

Code changes from version 1.6.18 to 1.6.19

Files changed (6) hide show
  1. docs/Changes.txt +4 -0
  2. docs/Postie.txt +2 -2
  3. docs/TODO.txt +0 -20
  4. postie-functions.php +12 -14
  5. postie.php +8 -8
  6. readme.txt +6 -2
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.18 (2015-04-27) =
31
  * Fixed a bug that prevented Postie from detecting categories with an ampersand in them.
32
  * Added support for "future" post status
27
  Attachments are now processed in the order they were attached.
28
 
29
  == CHANGELOG ==
30
+ = 1.6.19 (2015-05-04) =
31
+ * Reduced the number of messages sent to the log for successful runs
32
+ * Rename the disable_kses_content() function to postie_disable_kses_content() to fix a conflict with DAP WP LiveLinks Plugin
33
+
34
  = 1.6.18 (2015-04-27) =
35
  * Fixed a bug that prevented Postie from detecting categories with an ampersand in them.
36
  * Added support for "future" post status
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.3.0
8
- Tested up to: 4.2
9
- Stable tag: 1.6.18
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.3.0
8
+ Tested up to: 4.2.1
9
+ Stable tag: 1.6.19
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
docs/TODO.txt CHANGED
@@ -25,22 +25,6 @@ use wordpress plugin template
25
  WordPress-Plugin-Template https://github.com/hlashbrooke/WordPress-Plugin-Template
26
  configurable message for "post confirmation" - variable substitution
27
 
28
- Shortcodes
29
- Note: Postie will need to temporarily save the global $shortcode_tags variable off to the side, register its own
30
- shortcodes (action for user supplied shortcodes?) process the emails then restore the global $shortcode_tags.
31
- [postie_status draft | publish | pending | private]
32
- [postie_date <the date>]
33
- [postie_delay [0-99d][0-99h][0-99m]]
34
- [postie_comments 0 | 1 | 2]
35
- [postie_excerpt]<excerpt>[/postie_excerpt]
36
- [postie_type <posttype>]
37
- [postie_format <postformat>]
38
- [postie_category <comma separated categories>]
39
- [postie_tag <comma separated tags>]
40
- [postie_title <title>]
41
- [postie_image <image #> caption="<optional caption>"]
42
- [postie_more]
43
-
44
  Hooks
45
  add hooks for post meta data change
46
  post type
@@ -89,10 +73,6 @@ Original text is never modified
89
  There are filters that modify
90
  meta data (tags, categories, date)
91
  content (start, end, newlines, linkifying)
92
- =========
93
- AddOn Ideas
94
- (done) Google Alerts - turn each alert into a post
95
- (done) HTML cleaning - use http://htmlpurifier.org/ to convert Word Html and other bad html into standard html
96
 
97
  =========
98
  Postie 2.0
25
  WordPress-Plugin-Template https://github.com/hlashbrooke/WordPress-Plugin-Template
26
  configurable message for "post confirmation" - variable substitution
27
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
28
  Hooks
29
  add hooks for post meta data change
30
  post type
73
  There are filters that modify
74
  meta data (tags, categories, date)
75
  content (start, end, newlines, linkifying)
 
 
 
 
76
 
77
  =========
78
  Postie 2.0
postie-functions.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
  /*
3
- $Id: postie-functions.php 1147484 2015-04-27 19:23:13Z WayneAllen $
4
  */
5
 
6
  //to turn on debug output add the following line to wp-config.php
@@ -69,38 +69,38 @@ function postie_environment() {
69
  if (!isPostieInCorrectDirectory()) {
70
  EchoInfo("Warning! Postie expects to be in its own directory named postie.");
71
  } else {
72
- EchoInfo("Postie is in " . plugin_dir_path(__FILE__));
73
  }
74
 
75
  if (defined('ALTERNATE_WP_CRON') && ALTERNATE_WP_CRON) {
76
- EchoInfo("Alternate cron is enabled");
77
  }
78
 
79
  if (defined('DISABLE_WP_CRON') && DISABLE_WP_CRON) {
80
- EchoInfo("WordPress cron is disabled. Postie will not run unless you have an external cron set up.");
81
  }
82
 
83
- EchoInfo("Cron: " . (defined('DISABLE_WP_CRON') && DISABLE_WP_CRON === true ? "Off" : "On"));
84
- EchoInfo("Alternate Cron: " . (defined('ALTERNATE_WP_CRON') && ALTERNATE_WP_CRON === true ? "On" : "Off"));
85
 
86
  if (defined('WP_CRON_LOCK_TIMEOUT') && WP_CRON_LOCK_TIMEOUT === true) {
87
- EchoInfo("Cron lock timeout is:" . WP_CRON_LOCK_TIMEOUT);
88
  }
89
 
90
  if (HasIconvInstalled()) {
91
- EchoInfo("iconv: installed");
92
  } else {
93
  EchoInfo("Warning! Postie requires that iconv be enabled.");
94
  }
95
 
96
  if (function_exists('imap_mime_header_decode')) {
97
- EchoInfo("imap: installed");
98
  } else {
99
- EchoInfo("Warning! Postie requires that imap be enabled if you are using IMAP, IMAP-SSL or POP3-SSL.");
100
  }
101
 
102
  if (HasMbStringInstalled()) {
103
- EchoInfo("mbstring: installed");
104
  } else {
105
  EchoInfo("Warning! Postie requires that mbstring be enabled.");
106
  }
@@ -888,8 +888,6 @@ function POP3MessageFetch($server = NULL, $port = NULL, $email = NULL, $password
888
 
889
  /**
890
  * This function handles putting the actual entry into the database
891
- * @param array - categories to be posted to
892
- * @param array - details of the post
893
  */
894
  function PostToDB($details, $isReply, $customImageField, $postmodifiers) {
895
  $post_ID = 0;
@@ -2770,7 +2768,7 @@ function lookup_category($trial_category, $category_match) {
2770
  $term = get_term_by('name', esc_attr($trial_category), 'category');
2771
  if (!empty($term)) {
2772
  DebugEcho("category: found by name $trial_category");
2773
- DebugDump($term);
2774
  //then category is a named and found
2775
  return $term->term_id;
2776
  }
1
  <?php
2
  /*
3
+ $Id: postie-functions.php 1149645 2015-04-29 23:25:51Z WayneAllen $
4
  */
5
 
6
  //to turn on debug output add the following line to wp-config.php
69
  if (!isPostieInCorrectDirectory()) {
70
  EchoInfo("Warning! Postie expects to be in its own directory named postie.");
71
  } else {
72
+ DebugEcho("Postie is in " . plugin_dir_path(__FILE__));
73
  }
74
 
75
  if (defined('ALTERNATE_WP_CRON') && ALTERNATE_WP_CRON) {
76
+ DebugEcho("Alternate cron is enabled");
77
  }
78
 
79
  if (defined('DISABLE_WP_CRON') && DISABLE_WP_CRON) {
80
+ DebugEcho("WordPress cron is disabled. Postie will not run unless you have an external cron set up.");
81
  }
82
 
83
+ DebugEcho("Cron: " . (defined('DISABLE_WP_CRON') && DISABLE_WP_CRON === true ? "Off" : "On"));
84
+ DebugEcho("Alternate Cron: " . (defined('ALTERNATE_WP_CRON') && ALTERNATE_WP_CRON === true ? "On" : "Off"));
85
 
86
  if (defined('WP_CRON_LOCK_TIMEOUT') && WP_CRON_LOCK_TIMEOUT === true) {
87
+ DebugEcho("Cron lock timeout is:" . WP_CRON_LOCK_TIMEOUT);
88
  }
89
 
90
  if (HasIconvInstalled()) {
91
+ DebugEcho("iconv: installed");
92
  } else {
93
  EchoInfo("Warning! Postie requires that iconv be enabled.");
94
  }
95
 
96
  if (function_exists('imap_mime_header_decode')) {
97
+ DebugEcho("imap: installed");
98
  } else {
99
+ DebugEcho("Warning! Postie requires that imap be enabled if you are using IMAP, IMAP-SSL or POP3-SSL.");
100
  }
101
 
102
  if (HasMbStringInstalled()) {
103
+ DebugEcho("mbstring: installed");
104
  } else {
105
  EchoInfo("Warning! Postie requires that mbstring be enabled.");
106
  }
888
 
889
  /**
890
  * This function handles putting the actual entry into the database
 
 
891
  */
892
  function PostToDB($details, $isReply, $customImageField, $postmodifiers) {
893
  $post_ID = 0;
2768
  $term = get_term_by('name', esc_attr($trial_category), 'category');
2769
  if (!empty($term)) {
2770
  DebugEcho("category: found by name $trial_category");
2771
+ //DebugDump($term);
2772
  //then category is a named and found
2773
  return $term->term_id;
2774
  }
postie.php CHANGED
@@ -4,13 +4,13 @@
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.18
8
  Author: Wayne Allen
9
- Author URI: http://allens-home.com/
10
  License: GPL2
11
  */
12
 
13
- /* Copyright (c) 2012 Wayne Allen (email : wayne@allens-home.com)
14
 
15
  This program is free software; you can redistribute it and/or modify
16
  it under the terms of the GNU General Public License, version 2, as
@@ -27,16 +27,16 @@
27
  */
28
 
29
  /*
30
- $Id: postie.php 1147498 2015-04-27 19:35:23Z WayneAllen $
31
  */
32
  require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "postie-functions.php");
33
 
34
- define('POSTIE_VERSION', '1.6.18');
35
  define("POSTIE_ROOT", dirname(__FILE__));
36
  define("POSTIE_URL", WP_PLUGIN_URL . '/' . basename(dirname(__FILE__)));
37
 
38
  //register the hooks early in the page in case some method needs the result of one of them (i.e. cron_schedules)
39
- add_action('init', 'disable_kses_content', 20);
40
  add_action('check_postie_hook', 'check_postie');
41
  add_action('parse_request', 'postie_parse_request');
42
  add_action('admin_init', 'postie_admin_init');
@@ -255,7 +255,7 @@ function postie_warnings() {
255
  }
256
  }
257
 
258
- function disable_kses_content() {
259
  remove_filter('content_save_pre', 'wp_filter_post_kses');
260
  }
261
 
@@ -267,7 +267,7 @@ function postie_whitelist($options) {
267
 
268
  //don't use DebugEcho or EchoInfo here as it is not defined when called as an action
269
  function check_postie() {
270
- error_log("check_postie");
271
  postie_get_mail();
272
  }
273
 
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.19
8
  Author: Wayne Allen
9
+ Author URI: http://PostiePlugin.com/
10
  License: GPL2
11
  */
12
 
13
+ /* Copyright (c) 2015 Wayne Allen (email : wayne@allens-home.com)
14
 
15
  This program is free software; you can redistribute it and/or modify
16
  it under the terms of the GNU General Public License, version 2, as
27
  */
28
 
29
  /*
30
+ $Id: postie.php 1153167 2015-05-04 18:36:09Z WayneAllen $
31
  */
32
  require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "postie-functions.php");
33
 
34
+ define('POSTIE_VERSION', '1.6.19');
35
  define("POSTIE_ROOT", dirname(__FILE__));
36
  define("POSTIE_URL", WP_PLUGIN_URL . '/' . basename(dirname(__FILE__)));
37
 
38
  //register the hooks early in the page in case some method needs the result of one of them (i.e. cron_schedules)
39
+ add_action('init', 'postie_disable_kses_content', 20);
40
  add_action('check_postie_hook', 'check_postie');
41
  add_action('parse_request', 'postie_parse_request');
42
  add_action('admin_init', 'postie_admin_init');
255
  }
256
  }
257
 
258
+ function postie_disable_kses_content() {
259
  remove_filter('content_save_pre', 'wp_filter_post_kses');
260
  }
261
 
267
 
268
  //don't use DebugEcho or EchoInfo here as it is not defined when called as an action
269
  function check_postie() {
270
+ //error_log("check_postie");
271
  postie_get_mail();
272
  }
273
 
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.3.0
8
- Tested up to: 4.2
9
- Stable tag: 1.6.18
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
@@ -234,6 +234,10 @@ All script, style and body tags are stripped from html emails.
234
  Attachments are now processed in the order they were attached.
235
 
236
  == CHANGELOG ==
 
 
 
 
237
  = 1.6.18 (2015-04-27) =
238
  * Fixed a bug that prevented Postie from detecting categories with an ampersand in them.
239
  * Added support for "future" post status
5
  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.2.1
9
+ Stable tag: 1.6.19
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
234
  Attachments are now processed in the order they were attached.
235
 
236
  == CHANGELOG ==
237
+ = 1.6.19 (2015-05-04) =
238
+ * Reduced the number of messages sent to the log for successful runs
239
+ * Rename the disable_kses_content() function to postie_disable_kses_content() to fix a conflict with DAP WP LiveLinks Plugin
240
+
241
  = 1.6.18 (2015-04-27) =
242
  * Fixed a bug that prevented Postie from detecting categories with an ampersand in them.
243
  * Added support for "future" post status