git-svn-id: https://develop.svn.wordpress.org/trunk@16761 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
108e48f206
commit
a63bf413ad
@ -156,10 +156,10 @@ function edit_post( $post_data = null ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$post_data = _wp_translate_postdata( true, $post_data );
|
$post_data = _wp_translate_postdata( true, $post_data );
|
||||||
if ( 'autosave' != $post_data['action'] && 'auto-draft' == $post_data['post_status'] )
|
|
||||||
$post_data['post_status'] = 'draft';
|
|
||||||
if ( is_wp_error($post_data) )
|
if ( is_wp_error($post_data) )
|
||||||
wp_die( $post_data->get_error_message() );
|
wp_die( $post_data->get_error_message() );
|
||||||
|
if ( 'autosave' != $post_data['action'] && 'auto-draft' == $post_data['post_status'] )
|
||||||
|
$post_data['post_status'] = 'draft';
|
||||||
|
|
||||||
if ( isset($post_data['visibility']) ) {
|
if ( isset($post_data['visibility']) ) {
|
||||||
switch ( $post_data['visibility'] ) {
|
switch ( $post_data['visibility'] ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user