[wp-hackers] email warning of pending posts

Leo Baiano ljunior2005 at gmail.com
Thu Apr 28 19:37:41 UTC 2011


Thank you Christopher! I have not used save_post because I thought the post
beforesending stayed as pending, so many emails were sent while the user
writes the post, butforgot about the draft, while we're actually writing the
 post as a draft and is only earning the status of pending when sent for
review, thanks!

2011/4/28 Christopher Ross <cross at thisismyurl.com>

> 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
>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>



-- 
Amplexos,

Leo Baiano
http://www.leobaiano.com
http://www.blog.ljunior.com
http://www.mcelebridades.com
http://www.twitter.com/leobaiano


More information about the wp-hackers mailing list