[wp-hackers] Race condition with custom field and wp_insert_post?

Bjorn Wijers burobjorn at gmail.com
Tue Aug 31 21:47:56 UTC 2010


I've built a script which adds a post to WordPress using 
wp_insert_post() and then after successfully adding the post to the 
database adds some custom fields.

My question is: which action(s) can I use after the posts has been 
published or updated including the customfield(s) so that a plugin can 
use both the post content and it's post meta data?

Currently the plugin I use makes use of the publish change actions and 
the post meta data has not been written yet, so I cannot check for any 
post meta key value pairs. Basically a race condition, which I would 
like to prevent. So any pointers would be much appreciated!

Hope this makes sense,



met vriendelijke groet,
Bjorn Wijers

* b u r o b j o r n .nl *
digitaal vakmanschap | digital craftsmanship

Van maandag t/m donderdag vanaf 10:00
Vrijdag is voor experimenteren en eigen projecten.

Concordiastraat 68-126
3551 EM Utrecht
The Netherlands

tel: +31 6 49 74 78 70

More information about the wp-hackers mailing list