1.8.15 Released

  • Fix bug where inline images were not being replaced correctly if WordPress changed the name of the attachment via sanitize_file_name()

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 the placeholder. This html is based on the template specified in the settings for the file type.
  • $media_id –  the ID of the media being used to replace the placeholder.
add_filter('postie_place_media_after', 'my_postie_place_media_after', 10, 2);

function my_postie_place_media_after($html, $media_id) {
    $type = get_post_mime_type($media_id);
    if ($type == 'image/jpeg') {
        $html .= '<p>This is copyright by me</p>';
    }
    return $html;
}

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 the placeholder. This html is based on the template specified in the settings for the file type.
  • $media_id –  the ID of the media being used to replace the placeholder.
add_filter('postie_place_media_before', 'my_postie_place_media_before', 10, 2);

function my_postie_place_media_before($html, $media_id) {
    $type = get_post_mime_type($media_id);
    if ($type == 'image/jpeg') {
        $html .= '<p>This is copyright by me</p>';
    }
    return $html;
}

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 ID of the media (image) being used to replace the placeholder.
add_filter('postie_place_media', 'my_postie_place_media', 10, 2);

function my_postie_place_media($html, $media_id) {
    return $html . '<p>This image is copyright by me</p>';
}

1.8.9 Released

  • Fix bug when calling new postie_email_* filters
  • Fix bug where inline and related attachments were not being considered for #img#

1.8.8 Released

  • Fix bug where success/fail email notifications had missing info.
  • Fix bug where galley wan’t being inserted on some plain text messages
  • Enhance auto linkification to recognize links like <http://example.com/>
  • Separate success and failure emails.
  • Fix readme
  • New filter: postie_email_reject_recipients – allows recipients list to be altered when sending failure message
  • New filter: postie_email_reject_subject – allows the subject to be altered when sending failure message
  • New filter: postie_email_reject_body – allows message content to be altered when sending failure message
  • New filter: postie_email_notify_recipients – allows recipients list to be altered when sending success message
  • New filter: postie_email_notify_subject – allows the subject to be altered when sending success message
  • New filter: postie_email_notify_body – allows message content to be altered when sending success message