This action is called just after Postie saves the post.
At the point the action is called the post has been created and all attachments have been uploaded and associated with this post.
There is one parameter to this filter: $post
The $post parameter is an array describing the post extracted from the email.
Essentially any field described here can show up.
Any changes you may make to the array elements are ignored. If you want to change the post use postie_post_before.
<?php function my_postie_post_after($post) { //do something here like update the meta data add_post_meta($post['ID'], 'mymeta', 0); } add_action('postie_post_after', 'my_postie_post_after'); ?>
Array index | Notes |
---|---|
post_author | the WordPress user that is the author of the post. |
post_date | the localized date of the post. |
post_date_gmt | the GMT/UMT date of the post. |
post_content | the actual content of the post. |
post_title | the post title (email subject line). |
post_name | the sanitized post title. |
post_excerpt | the post excerpt. |
ID | the post id. |
post_status | the post status. |
post_category | an array of category IDs |
ping_status | |
comment_status | |
post_type |
Note that if Postie detects a email reply it will add a comment to the original post and the data in the array will be as follows:
comment_author |
---|
comment_post_ID |
comment_author_email |
comment_date |
comment_date_gmt |
comment_content |
comment_author_url |
comment_author_IP |
comment_approved |
comment_agent |
comment_type |
comment_parent |
user_id |
See this for more details.