if ( is_array( $r->
get_error_data() ) ) { $response =
array_merge( $response,
$r->
get_error_data() );
} else { $response['data'
] =
$r->
get_error_data();
} } else { $response =
$r;
$changeset_post =
get_post( $this->
changeset_post_id() );
// Dismiss all other auto-draft changeset posts for this user (they serve like autosave revisions), as there should only be one.
if ( $is_new_changeset ) { $this->
dismiss_user_auto_draft_changesets();
} // Note that if the changeset status was publish, then it will get set to Trash if revisions are not supported.
$response['changeset_status'
] =
$changeset_post->post_status;
if ( $is_publish && 'trash' ===
$response['changeset_status'
] ) { $response['changeset_status'
] = 'publish';
} if ( 'publish' !==
$response['changeset_status'
] ) { $this->
set_changeset_lock( $changeset_post->ID
);
}