Return post_ID from write_post() and pass it along when doing a save and continue redirect. Props: CŽedric

git-svn-id: http://svn.automattic.com/wordpress/trunk@2654 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2005-06-19 23:44:22 +00:00
parent de05283f30
commit 16efd6a7f3
2 changed files with 3 additions and 1 deletions

View File

@ -52,6 +52,8 @@ function write_post() {
// Create the post.
$post_ID = wp_insert_post($_POST);
add_meta($post_ID);
return $post_ID;
}
// Update an existing post with values provided in $_POST.

View File

@ -30,7 +30,7 @@ $editing = true;
switch($action) {
case 'post':
write_post();
$post_ID = write_post();
// Redirect.
if (!empty($_POST['mode'])) {