Redirect back to post-new.php when doing a save and continue with empty post fields. fixes #4855

git-svn-id: https://develop.svn.wordpress.org/trunk@5967 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2007-08-29 17:24:42 +00:00
parent be259a7a72
commit 682ac07750
2 changed files with 6 additions and 0 deletions

View File

@ -285,6 +285,9 @@ function wp_write_post() {
// Create the post.
$post_ID = wp_insert_post( $_POST );
if ( empty($post_ID) )
return 0;
add_meta( $post_ID );
// Reunite any orphaned attachments with their parent

View File

@ -38,6 +38,9 @@ case 'post':
if ( isset($_POST['save']) )
$location = "post.php?action=edit&post=$post_ID";
if ( empty($post_ID) )
$location = 'post-new.php';
wp_redirect($location);
exit();
break;