Category How To

Filter: postie_place_media

This filter is called before the palceholder (#img1#) is replaced with html markup. Parameters: $html – the html fragment that will replace the placeholder. This html is based on the template specified in the settings for the file type. $media_id –  the…

Filter: postie_email_notify_body

This filter is called before a success notification email is sent and can be used to modify the message body. Parameters: $body – a string that is the email body. The email is sent as text/plain so HTML is not supported. $postemail – an…

Filter: postie_email_reject_body

This filter is called before a reject notification email is sent and can be used to modify the message body. At the point the filter is called there is no post created. Parameters: $body – a string that is the email…

Filter: postie_email_notify_subject

This filter is called before a success notification email is sent and can be used to modify the subject line. Parameters: $subject – a string that is the email subject. $postemail – an array that represents the parsed email. See filter: postie_post_pre for more details. $postid – the…

Filter: postie_email_reject_subject

This filter is called before a reject notification email is sent and can be used to modify the subject line. At the point the filter is called there is no post created. Parameters: $subject – a string that is the email subject.…

Filter: postie_email_notify_recipients

This filter is called before a success notification email is sent and can be used to modify the recipient list. Parameters: $recipients – an array of email address that the email will be delivered to. $postemail – an array that represents the…

Filter: postie_email_reject_recipients

This filter is called before a reject notification email is sent and can be used to modify the recipient list. At the point the filter is called there is no post created. Parameters: $recipients – an array of email address that…

Filter: postie_filter_email3

This filter is called when Postie extracts the “from” email address. Typically you would use this filter if you wanted to use the email headers to decide which email address should be used to identify the WordPress user. At the point…

Filter: postie_preconnect

This filter is called to determine the connection settings for the email server. This filter is called after postie_session_start. add_filter(‘postie_preconnect’, ‘my_postie_preconnect’); // Force Postie to only fetch 1 email regardless of the setting. function my_postie_preconnect($connectionInfo) { connectionInfo[’email_max’] = 1; return…

Action: postie_session_end

This action gets called at the end of each Postie session. I.e. after Postie finishes the process of checking for emails and turning them into posts. add_action(‘postie_session_end’, ‘my_postie_session_end_action’); function my_postie_session_end_action() { //all done processing emails }