Don't set fields to empty values in _wp_translate_data(). Props scribu, johnjamesjacoby. fixes #16673
git-svn-id: https://develop.svn.wordpress.org/trunk@18082 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
189a71cda7
commit
d5e77eefbf
@ -25,9 +25,16 @@ function _wp_translate_postdata( $update = false, $post_data = null ) {
|
||||
|
||||
if ( $update )
|
||||
$post_data['ID'] = (int) $post_data['post_ID'];
|
||||
$post_data['post_content'] = isset($post_data['content']) ? $post_data['content'] : '';
|
||||
$post_data['post_excerpt'] = isset($post_data['excerpt']) ? $post_data['excerpt'] : '';
|
||||
$post_data['post_parent'] = isset($post_data['parent_id'])? $post_data['parent_id'] : '';
|
||||
|
||||
if ( isset( $post_data['content'] ) )
|
||||
$post_data['post_content'] = $post_data['content'];
|
||||
|
||||
if ( isset( $post_data['excerpt'] ) )
|
||||
$post_data['post_excerpt'] = $post_data['excerpt'];
|
||||
|
||||
if ( isset( $post_data['parent_id'] ) )
|
||||
$post_data['post_parent'] = (int) $post_data['parent_id'];
|
||||
|
||||
if ( isset($post_data['trackback_url']) )
|
||||
$post_data['to_ping'] = $post_data['trackback_url'];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user