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

git-svn-id: http://svn.automattic.com/wordpress/trunk@5967 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2007-08-29 17:24:42 +00:00
parent 0cb5968afc
commit f78592cf01
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;