Shortcode AddOn enhanced

The most recent release of the Shortcode AddOn has been enhanced to support setting array elements in the pcustom shortcode.

A number of other plugins add custom fields to posts to support their specific functionality. Some of the plugins use arrays rather than multiple simple values. This update allows you to set the array element values in those cases.

For example:

[pcustom name="myarray{name}" value="Wayne"]
[pcustom name="myarray{email}" value="wayne@postieplugin.com"]

This will set the element “name” of myarray to “wayne” and the element “email” of myarray to “wayne@postieplugin.com”

This is the PHP equivalent of:

$myarray['name'] = 'Wayne';
$myarray['email'] = 'wayne@postieplugin.com';

Because WordPress does not allow square brackets (“[” and “]”) in shortcode values Postie uses curly brackets instead.

Filter: postie_bare_link

This filter is called for each bare link Postie finds in your message. Bare links are plain URLs without any markup. I.e. “http://www.example.com” is a bare link. “Not a bare link” is not a bare link. Note some email clients will transform bare links into non-bare links especially if you are using rich text/html. Generally if you want to take advantage of this filter consistently you will want to set Preferred Text Type to Plain.

Parameters:

  • $html – the html that will be inserted into the post.
  • $URL – the original URL (bare link).
  • $oembed – whether WordPress thinks this bare link can be handled by the “Easy Embed” feature. See https://codex.wordpress.org/Embeds

You must return a string that will be placed at the spot where the bare URL was found.

Example

add_filter('postie_bare_link', 'my_postie_bare_link', 10, 3);

function my_postie_bare_link($html, $url, $oembed) {
    if ($oembed)
        return htmlspecialchars($url);
    else
        return "<div class='mylinkclass'>$html</div>";
}

Support AddOn

We released a free AddOn that can capture a Postie session and send the log files to Postie support. Very useful if you’re have trouble with Postie.

action: postie_raw

This action is called when Postie retrieves an email from the server.

Parameters:

  • $rawEmail

The $rawEmail parameter the email as retrieved from the server. Note you can’t make changes to the email at this point.

Example

add_action('postie_raw', 'my_postie_raw');

function my_postie_raw($rawemail) {
    //Do something
}

 

1.8.24 Released

  • Fix bug where debug output was displaying plaintext passwords.
  • Fix bug where categories specified with a colon required a space after the colon.
  • Postie now works off blog time rather than GMT.
  • Fix bug where oEmbed::get_provider() is not available on WP versions prior to 4.0.

1.8.23 Released

  • Fix bug where long subject lines are missing a space.
  • Fix bug where {CAPTION} placeholder not being removed if no caption.