[wp-hackers] BUG? Custom values not set early enough on publish?
alister at alistercameron.com
Thu Aug 26 02:40:56 UTC 2010
I've hooked up a function to the "future_to_publish" hook.
That function is essentially sending out an email when a new post is
published in a particular category.
However one interesting thing I've discovered...
I need to add a custom value into the body of the email and I do this with a
So my function calls the get_post_custom_values() function to retrieve the
value I want, for insertion into that email.
HOWEVER... as best I can tell, the custom value is not yet set at the point
where the "future_to_publish" hook fires, and I'm getting no data returned
from the call to get_post_custom_values().
Is it possible that this is the case? That if you save custom values they're
not correctly associated to the published post until AFTER the
"future_to_publish" hook has fired?
I've not got into it any deeper than this, but asking for help!
Any ideas Westy??
*Click to connect online...* <http://about.alistercameron.com>
Lvl 1, 234 Whitehorse Rd
*Work:* 03 9008 0900
*Mobile:* 04 0404 5555
*Fax:* 03 8610 0050
*Email:* alister at alistercameron.com
More information about the wp-hackers