Make WordPress Core

Changeset 23890


Ignore:
Timestamp:
04/03/2013 04:37:50 AM (12 years ago)
Author:
nacin
Message:

Replace $user_id removed in [23889] with a direct function call. see #23665.

File:
1 edited

Legend:

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

    r23889 r23890  
    10631063    if ( ! empty( $_POST['autosave'] ) ) {
    10641064        // Drafts and auto-drafts are just overwritten by autosave for the same user
    1065         if ( $user_id == $post->post_author && ( 'auto-draft' == $post->post_status || 'draft' == $post->post_status ) ) {
     1065        if ( get_current_user_id() == $post->post_author && ( 'auto-draft' == $post->post_status || 'draft' == $post->post_status ) ) {
    10661066            $id = edit_post();
    10671067        } else { // Non drafts are not overwritten. The autosave is stored in a special post revision for each user.
Note: See TracChangeset for help on using the changeset viewer.