WordPress.org

Make WordPress Core

Ticket #18642: autosave_ping.diff

File autosave_ping.diff, 558 bytes (added by benbalter, 3 years ago)

proposed non-autosave edit_lock patch

  • wp-admin/admin-ajax.php

     
    988988                        $id = $post->ID; 
    989989        } 
    990990 
    991         if ( $do_lock && ( isset( $_POST['auto_draft'] ) && ( $_POST['auto_draft'] != '1' ) ) && $id && is_numeric($id) ) 
     991        //auto_draft will either be 1 (and thus ID ='s 0) or not POST'd at all 
     992        if ( $do_lock && !isset( $_POST['auto_draft'] ) && $id && is_numeric($id) ) 
    992993                wp_set_post_lock( $id ); 
    993994 
    994995        if ( $nonce_age == 2 ) {