publish_post action must be subsequent to draft_save, which calls entry_prepare, which in turn sets global $post

This commit is contained in:
real_nowhereman 2010-09-16 09:16:05 +00:00
parent 925eeb979a
commit ea2de810ac

View File

@ -748,13 +748,14 @@
$id = bdb_idfromtime(BDB_ENTRY, $entry['date']);
}
do_action('publish_post', $id, $entry);
// PHASE 2 : Store
// secure data as DRAFT
// (entry is also implicitly entry_prepare()'d here)
$ret = draft_save($entry, $id);
do_action('publish_post', $id, $entry);
if ($ret === false) {
return -1; // FAILURE: ABORT
}