[wp-hackers] hooks & future posts
John Blackbourn
johnbillion+wp at gmail.com
Sat Sep 19 16:10:24 UTC 2009
Pretty sure scheduled posts are published with cron, so you'll never
see the var dump yourself as it's always called asynchronously.
Instead of var_dump()ing you could mail() the results to yourself.
2009/9/19 Ozh <ozh at planetozh.com>:
> Peeps,
>
> I have code with:
>
> add_action('future_to_publish', 'do_stuff');
> function do_stuff( $post ) {
> var_dump( $post ); die();
> }
>
> Then I schedule a post, refresh the blog home page like mad till the
> scheduled post is supposed to show, and instead of the expected ugly
> var_dump() & die(), the scheduled blog post just appears as a new post
> and function do_stuff() has been bypassed.
>
> What am I not getting with future posts ? :)
> (or: how can I catch it when a post goes from 'future' to 'publish')
>
> Ozh
> --
> http://planetOzh.com ~ Blog and WordPress Stuff
> http://FrenchFragFactory.net ~ Daily Quake News
> _______________________________________________
> 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