[wp-hackers] email warning of pending posts
Christopher Ross
cross at thisismyurl.com
Thu Apr 28 19:19:54 UTC 2011
Leo, when save_post is called you can check the status and send emails accordingly.
I use this code for a similar task (on publish in my case but you should be able to modify it quick enough.
function send_report($post) {
extract($_POST);
if ($_POST['post_status'] == 'publish' && $_POST['post_type'] == 'post') {
//blah
}
}
add_action('save_post', 'send_report');
On 2011-04-28, at 4:10 PM, Leo Baiano wrote:
> I need to send an email to the administrator whenever a post is pending so
> he canreview and publish, I thought the hook publish_post but it does not
> work when the post is submitted for review, there is a hook for this
> or an easier
> way?
>
> --
> Amplexos,
>
> Leo Baiano
> http://www.leobaiano.com
> http://www.blog.ljunior.com
> http://www.mcelebridades.com
> http://www.twitter.com/leobaiano
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
__
Christopher Ross
Online Portfolio - http://christopherross.ca
Personal Blog - http://thisismyurl.com
Fredericton - 506.238.4661
San Diego - 858.201.4912
More information about the wp-hackers
mailing list