Shortcode AddOn Enhanced

The pcustom shortcode now lets you specify more complex data for the value.

[pcustom name=fieldname]
my long value with 
carriage returns.

Rather than specifying the value in an attribute you can provide it between the begin and end tags. This allows you to specify values that are not legal in attributes such as carriage returns or html markup.

Filter: postie_include_attachment

This filter is called before Postie saves the attachment to media library. Typically you would use this filter if you wanted to prevent Postie from processing certain files. I.e. all non-image files or you could exclude all executable files or use your own whitelist or exclude all files.
  • $attachment – an array of information about the attachment
    • filename – the name of the file as specified in the email.
    • mimetype – the mimetype of the file.
    • data – the content of the file.
add_filter('postie_include_attachment', 'my_postie_include_attachment', 10, 2);

function my_postie_include_attachment($include, $attachment) {
    return false; //don't include any attachments