[wp-hackers] Data on scheduled publish?
Ryan Bilesky
rbilesky at gmail.com
Wed Feb 16 00:10:47 UTC 2011
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);
}
On Tue, Feb 15, 2011 at 10:57 AM, Christopher Ross <cross at thisismyurl.com>wrote:
> In my code example below:
>
> function do_backup ($post_id, $post) {
> my_backup($post);
> }
>
> How would I get the $post to be populated during a scheduled post? It works
> fine in all other cased but when a scheduled post is turned into a published
> post, the code runs but does not populate the $post array.
>
> Any ideas?
>
>
> __
>
> Christopher Ross
>
> http://christopherross.ca
> http://www.thisismyurl.com
>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
More information about the wp-hackers
mailing list