WordPress.org

Make WordPress Core

Changeset 11840


Ignore:
Timestamp:
08/19/2009 02:30:42 AM (9 years ago)
Author:
azaozz
Message:

Use the current user as author for autosave, fixes #10004

File:
1 edited

Legend:

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

    r11807 r11840  
    10921092        $new_autosave = _wp_post_revision_fields( $_POST, true );
    10931093        $new_autosave['ID'] = $old_autosave->ID;
     1094        $current_user = wp_get_current_user();
     1095        $new_autosave['post_author'] = $current_user->ID;
    10941096        return wp_update_post( $new_autosave );
    10951097    }
Note: See TracChangeset for help on using the changeset viewer.