[wp-hackers] Re: wp_insert_post & negative post_id ?
Charles Iliya Krempeaux
supercanadian at gmail.com
Sat Jun 9 07:05:15 GMT 2007
Hello,
(I'm answering my own question, but....)
I was digging though the code, and it looks like you can get that this
info from...
$_POST['temp_ID']
Someone should throw that in the documentation for the
"wp_insert_post" hook. (Other would probably find it helpful too.)
See ya
--
Charles Iliya Krempeaux, B.Sc. <http://ChangeLog.ca/>
All the Vlogging News on One Page
http://vlograzor.com/
On 6/8/07, Charles Iliya Krempeaux <supercanadian at gmail.com> wrote:
> Hello,
>
> When a new post is created, the "wp_insert_post" hook is fired off,
> and all functions that registered (via add_action() ) to that hook
> will get activated.
>
> Now... correct me if I'm wrong, but... as I understand the system...
> when a new post is being created, it is given a temporary negative
> "post_id". (Like "-8388432")
>
> When the post is actually created, this gets changed to a real
> positive "post_id". (Like "5".)
>
> In the "wp_insert_post" hook, I know how to get the real positive "post_id"....
>
> BUT... how do you get the temporary negative "post_id" from which it came?
>
>
> See ya
>
> --
> Charles Iliya Krempeaux, B.Sc. <http://ChangeLog.ca/>
>
>
> All the Vlogging News on One Page
> http://vlograzor.com/
>
More information about the wp-hackers
mailing list