From ea2de810ac0486fe9f6bc1e9fc78b7700739bc64 Mon Sep 17 00:00:00 2001 From: real_nowhereman Date: Thu, 16 Sep 2010 09:16:05 +0000 Subject: [PATCH] publish_post action must be subsequent to draft_save, which calls entry_prepare, which in turn sets global $post --- fp-includes/core/core.entry.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fp-includes/core/core.entry.php b/fp-includes/core/core.entry.php index c4bfc63..7c19f31 100755 --- a/fp-includes/core/core.entry.php +++ b/fp-includes/core/core.entry.php @@ -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 }