publish_post action must be subsequent to draft_save, which calls entry_prepare, which in turn sets global $post
This commit is contained in:
parent
925eeb979a
commit
ea2de810ac
@ -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
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user