Category How To

Action: postie_register_shortcode_pre

This action is called just before postie_post_before. You use this action to register any Postie specific shortcodes. <?php function my_postie_register_shortcode_pre() { //register any Postie shortcodes add_shortcode(‘myshortcode’, ‘my_shortcode’); } add_action(‘postie_register_shortcode_pre’, ‘my_postie_register_shortcode_pre’); // works like a standard shortcode function my_shortcode($att, $content = null) {…

Filter: postie_parent_post

This filter is called to determine if there should be a parent post. Parameters: $parentid – an integer which is the post ID that Postie thinks should be the parent. If Postie doesn’t think there is a parent the value…

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…

Action: postie_file_added_pre

This action is called after Postie successfully extracts an email attachment and before it adds it as a media item to the post. At the point it is called there is only a placeholder post, e.g. the content and metadata is…

Previous versions

You can download the last 35 releases of Postie here in case you need to roll back for some reason.

Filter: postie_category

This filter is called after the category is detected in the subject line. You could use this filter to create a missing category or force it to be one of a list of approved categories. Note this filter will be…

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…

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…

Filter: postie_place_media_after

This filter is called after the image/audio/video/attachment template has been filled out and the “Image Location” setting is “After” and gives you the opportunity to change the markup referring to the media. Parameters: $html – the html fragment that will replace…

Filter: postie_place_media_before

This filter is called after the image/audio/video/attachment template has been filled out and the “Image Location” setting is “Before” and gives you the opportunity to change the markup referring to the media. Parameters: $html – the html fragment that will replace…