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; }