Version Description
(2015-04-27) = * Fixed a bug that prevented Postie from detecting categories with an ampersand in them. * Added support for "future" post status * Move "Use shortcode for embedding video" setting to Video tab and clarified usage. * Added setting to specify the link type used with galleries
Download this release
Release Info
Developer | WayneAllen |
Plugin | Postie |
Version | 1.6.18 |
Comparing to | |
See all releases |
Code changes from version 1.6.17 to 1.6.18
- config_form.php +4 -2
- docs/Changes.txt +6 -0
- docs/Postie.txt +2 -2
- postie-functions.php +39 -7
- postie.php +3 -3
- readme.txt +9 -3
config_form.php
CHANGED
@@ -454,7 +454,6 @@
|
|
454 |
|
455 |
<?php
|
456 |
echo BuildBooleanSelect(__("Automatically convert urls to links", "postie"), "postie-settings[converturls]", $converturls);
|
457 |
-
echo BuildBooleanSelect(__("Use shortcode for embedding video (youtube and others)", "postie"), "postie-settings[shortcode]", $shortcode);
|
458 |
?>
|
459 |
<tr>
|
460 |
<th scope="row"><?php _e('Encoding for pages and feeds', 'postie') ?> </th>
|
@@ -476,6 +475,7 @@
|
|
476 |
<?php
|
477 |
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"));
|
478 |
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"));
|
|
|
479 |
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'));
|
480 |
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"));
|
481 |
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'));
|
@@ -561,7 +561,9 @@
|
|
561 |
|
562 |
<div id="simpleTabs-content-5" class="simpleTabs-content">
|
563 |
<table class='form-table'>
|
564 |
-
|
|
|
|
|
565 |
<tr>
|
566 |
<th scope='row'><?php _e('Video template 1', 'postie') ?></th>
|
567 |
<?php $templateDir = get_option('siteurl') . '/' . PLUGINDIR . '/postie/templates'; ?>
|
454 |
|
455 |
<?php
|
456 |
echo BuildBooleanSelect(__("Automatically convert urls to links", "postie"), "postie-settings[converturls]", $converturls);
|
|
|
457 |
?>
|
458 |
<tr>
|
459 |
<th scope="row"><?php _e('Encoding for pages and feeds', 'postie') ?> </th>
|
475 |
<?php
|
476 |
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"));
|
477 |
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"));
|
478 |
+
echo BuildSelect(__("Gallery Link Type", "postie"), "postie-settings[auto_gallery_link]", $auto_gallery_link, array('Default', 'Post', 'File', 'None'),"Select the type of link the gallery should use");
|
479 |
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'));
|
480 |
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"));
|
481 |
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'));
|
561 |
|
562 |
<div id="simpleTabs-content-5" class="simpleTabs-content">
|
563 |
<table class='form-table'>
|
564 |
+
<?php
|
565 |
+
echo BuildBooleanSelect(__("Use shortcode for embedding video (youtube or vimeo)", "postie"), "postie-settings[shortcode]", $shortcode, "Only change this value to 'Yes' if you have another plugin that will process the shortcode.");
|
566 |
+
?>
|
567 |
<tr>
|
568 |
<th scope='row'><?php _e('Video template 1', 'postie') ?></th>
|
569 |
<?php $templateDir = get_option('siteurl') . '/' . PLUGINDIR . '/postie/templates'; ?>
|
docs/Changes.txt
CHANGED
@@ -27,6 +27,12 @@ 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.17 (2015-03-28) =
|
31 |
* Add a setting to attempt a user login based on the from address of the email if a matching Wordpress user exists.
|
32 |
|
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
|
33 |
+
* Move "Use shortcode for embedding video" setting to Video tab and clarified usage.
|
34 |
+
* Added setting to specify the link type used with galleries
|
35 |
+
|
36 |
= 1.6.17 (2015-03-28) =
|
37 |
* Add a setting to attempt a user login based on the from address of the email if a matching Wordpress user exists.
|
38 |
|
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.
|
9 |
-
Stable tag: 1.6.
|
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
|
9 |
+
Stable tag: 1.6.18
|
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
|
4 |
*/
|
5 |
|
6 |
//to turn on debug output add the following line to wp-config.php
|
@@ -80,7 +80,7 @@ function postie_environment() {
|
|
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 ? "
|
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) {
|
@@ -1715,7 +1715,7 @@ function tag_AllowCommentsOnPost(&$content) {
|
|
1715 |
function tag_Status(&$content, $currentstatus) {
|
1716 |
$poststatus = $currentstatus;
|
1717 |
$matches = array();
|
1718 |
-
if (preg_match("/status:\s*(draft|publish|pending|private)/i", $content, $matches)) {
|
1719 |
DebugEcho("tag_Status: found status $matches[1]");
|
1720 |
DebugDump($matches);
|
1721 |
$content = preg_replace("/$matches[0]/i", "", $content);
|
@@ -2482,7 +2482,13 @@ function filter_ReplaceImagePlaceHolders(&$content, $attachments, $config, $post
|
|
2482 |
DebugDump($images);
|
2483 |
|
2484 |
if ((count($images) > 0) && $config['auto_gallery']) {
|
2485 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
2486 |
if ($config['images_append']) {
|
2487 |
$content .= "\n$imageTemplate";
|
2488 |
DebugEcho("Auto gallery: append");
|
@@ -2761,7 +2767,7 @@ function lookup_category($trial_category, $category_match) {
|
|
2761 |
$found_category = NULL;
|
2762 |
DebugEcho("lookup_category: $trial_category");
|
2763 |
|
2764 |
-
$term = get_term_by('name', $trial_category, 'category');
|
2765 |
if (!empty($term)) {
|
2766 |
DebugEcho("category: found by name $trial_category");
|
2767 |
DebugDump($term);
|
@@ -2783,7 +2789,7 @@ function lookup_category($trial_category, $category_match) {
|
|
2783 |
|
2784 |
if ($category_match) {
|
2785 |
DebugEcho("category wildcard lookup: $trial_category");
|
2786 |
-
$sql_sub_name = 'SELECT term_id FROM ' . $wpdb->terms . ' WHERE name LIKE \'' . addslashes($trial_category) . '%\' limit 1';
|
2787 |
$found_category = $wpdb->get_var($sql_sub_name);
|
2788 |
DebugEcho("category wildcard found: $found_category");
|
2789 |
}
|
@@ -2811,6 +2817,31 @@ function DisplayEmailPost($details) {
|
|
2811 |
//DebugEcho('Posted content: '.$details["post_content"]);
|
2812 |
}
|
2813 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2814 |
/**
|
2815 |
* Takes a value and builds a simple simple yes/no select box
|
2816 |
* @param string
|
@@ -2974,7 +3005,8 @@ function config_GetDefaults() {
|
|
2974 |
'selected_generaltemplate' => 'postie_default',
|
2975 |
'generate_thumbnails' => true,
|
2976 |
'reply_as_comment' => true,
|
2977 |
-
'force_user_login' => false
|
|
|
2978 |
);
|
2979 |
}
|
2980 |
|
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
|
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) {
|
1715 |
function tag_Status(&$content, $currentstatus) {
|
1716 |
$poststatus = $currentstatus;
|
1717 |
$matches = array();
|
1718 |
+
if (preg_match("/status:\s*(draft|publish|pending|private|future)/i", $content, $matches)) {
|
1719 |
DebugEcho("tag_Status: found status $matches[1]");
|
1720 |
DebugDump($matches);
|
1721 |
$content = preg_replace("/$matches[0]/i", "", $content);
|
2482 |
DebugDump($images);
|
2483 |
|
2484 |
if ((count($images) > 0) && $config['auto_gallery']) {
|
2485 |
+
$linktype = strtolower($config['auto_gallery_link']);
|
2486 |
+
if ($linktype == 'default') {
|
2487 |
+
$imageTemplate = '[gallery]';
|
2488 |
+
} else {
|
2489 |
+
DebugEcho("Auto gallery: link type $linktype");
|
2490 |
+
$imageTemplate = "[gallery link='$linktype']";
|
2491 |
+
}
|
2492 |
if ($config['images_append']) {
|
2493 |
$content .= "\n$imageTemplate";
|
2494 |
DebugEcho("Auto gallery: append");
|
2767 |
$found_category = NULL;
|
2768 |
DebugEcho("lookup_category: $trial_category");
|
2769 |
|
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);
|
2789 |
|
2790 |
if ($category_match) {
|
2791 |
DebugEcho("category wildcard lookup: $trial_category");
|
2792 |
+
$sql_sub_name = 'SELECT term_id FROM ' . $wpdb->terms . ' WHERE name LIKE \'' . addslashes(esc_attr($trial_category)) . '%\' limit 1';
|
2793 |
$found_category = $wpdb->get_var($sql_sub_name);
|
2794 |
DebugEcho("category wildcard found: $found_category");
|
2795 |
}
|
2817 |
//DebugEcho('Posted content: '.$details["post_content"]);
|
2818 |
}
|
2819 |
|
2820 |
+
/**
|
2821 |
+
* Takes a value and builds a simple simple yes/no select box
|
2822 |
+
* @param string
|
2823 |
+
* @param string
|
2824 |
+
* @param string
|
2825 |
+
* @param string
|
2826 |
+
*/
|
2827 |
+
function BuildSelect($label, $id, $current_value, $options, $recommendation = NULL) {
|
2828 |
+
|
2829 |
+
$html = "<tr>
|
2830 |
+
<th scope='row'><label for='$id'>$label</label>";
|
2831 |
+
|
2832 |
+
$html.="</th><td><select name='$id' id='$id'>";
|
2833 |
+
foreach ($options as $value) {
|
2834 |
+
$html.="<option value='$value' " . ($value == $current_value ? "selected='selected'" : "") . ">" . __($value, 'postie') . '</option>';
|
2835 |
+
}
|
2836 |
+
$html.='</select>';
|
2837 |
+
if (!empty($recommendation)) {
|
2838 |
+
$html.='<p class = "description">' . $recommendation . '</p>';
|
2839 |
+
}
|
2840 |
+
$html.="</td>\n</tr>";
|
2841 |
+
|
2842 |
+
return $html;
|
2843 |
+
}
|
2844 |
+
|
2845 |
/**
|
2846 |
* Takes a value and builds a simple simple yes/no select box
|
2847 |
* @param string
|
3005 |
'selected_generaltemplate' => 'postie_default',
|
3006 |
'generate_thumbnails' => true,
|
3007 |
'reply_as_comment' => true,
|
3008 |
+
'force_user_login' => false,
|
3009 |
+
'auto_gallery_link' => 'default'
|
3010 |
);
|
3011 |
}
|
3012 |
|
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.
|
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
|
31 |
*/
|
32 |
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "postie-functions.php");
|
33 |
|
34 |
-
define('POSTIE_VERSION', '1.6.
|
35 |
define("POSTIE_ROOT", dirname(__FILE__));
|
36 |
define("POSTIE_URL", WP_PLUGIN_URL . '/' . basename(dirname(__FILE__)));
|
37 |
|
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
|
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 |
|
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.
|
9 |
-
Stable tag: 1.6.
|
10 |
License: GPLv2 or later
|
11 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
|
@@ -234,6 +234,12 @@ 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.17 (2015-03-28) =
|
238 |
* Add a setting to attempt a user login based on the from address of the email if a matching Wordpress user exists.
|
239 |
|
@@ -1176,4 +1182,4 @@ plugin. And the rest is history :)
|
|
1176 |
* Cleaned up some pear stuff in install
|
1177 |
*
|
1178 |
= 0.1 - 2004-06 =
|
1179 |
-
* First release
|
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 |
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
|
240 |
+
* Move "Use shortcode for embedding video" setting to Video tab and clarified usage.
|
241 |
+
* Added setting to specify the link type used with galleries
|
242 |
+
|
243 |
= 1.6.17 (2015-03-28) =
|
244 |
* Add a setting to attempt a user login based on the from address of the email if a matching Wordpress user exists.
|
245 |
|
1182 |
* Cleaned up some pear stuff in install
|
1183 |
*
|
1184 |
= 0.1 - 2004-06 =
|
1185 |
+
* First release
|