[wp-hackers] Data on scheduled publish?

Christopher Ross cross at thisismyurl.com
Wed Feb 16 00:25:35 UTC 2011


Thanks Ryan, I thought of that but $post_id isn't set either.  What's really driving me mad is that the function is being triggered but not I can't find a way to identify the post :)


On 2011-02-15, at 8:10 PM, Ryan Bilesky wrote:

> idk why $post isn't set, might be a bug but thee might be a reason too, so
> you might want to confirm that with someone else.  But as long as $post_id
> is set you can use that with get_post();
> 
> So you can to this
> 
> function do_backup ($post_id, $post) {
>       if (!isset($post)) {
>              $post = get_post(intval($post_id));
>       }
>       my_backup($post);
> }


__

Christopher Ross

http://christopherross.ca
http://www.thisismyurl.com



More information about the wp-hackers mailing list