Make WordPress Core

Changeset 5967


Ignore:
Timestamp:
08/29/2007 05:24:42 PM (17 years ago)
Author:
ryan
Message:

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

Location:
trunk/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/post.php

    r5796 r5967  
    286286    $post_ID = wp_insert_post( $_POST );
    287287
     288    if ( empty($post_ID) )
     289        return 0;
     290
    288291    add_meta( $post_ID );
    289292
  • trunk/wp-admin/post.php

    r5875 r5967  
    3838    if ( isset($_POST['save']) )
    3939        $location = "post.php?action=edit&post=$post_ID";
     40
     41    if ( empty($post_ID) )
     42        $location = 'post-new.php';
    4043
    4144    wp_redirect($location);
Note: See TracChangeset for help on using the changeset viewer.