Changeset 37043
- Timestamp:
- 03/22/2016 03:09:05 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-xmlrpc-server.php
r37025 r37043 1365 1365 } 1366 1366 1367 // Default to not flagging the post date to be edited unless it's intentional. 1368 $post_data['edit_date'] = false; 1369 1367 1370 if ( ! empty( $dateCreated ) ) { 1368 1371 $post_data['post_date'] = get_date_from_gmt( iso8601_to_datetime( $dateCreated ) ); 1369 1372 $post_data['post_date_gmt'] = iso8601_to_datetime( $dateCreated, 'GMT' ); 1373 1374 // Flag the post date to be edited. 1375 $post_data['edit_date'] = true; 1370 1376 } 1371 1377 … … 5376 5382 $dateCreated = $content_struct['dateCreated']->getIso(); 5377 5383 5384 // Default to not flagging the post date to be edited unless it's intentional. 5385 $edit_date = false; 5386 5378 5387 if ( !empty( $dateCreated ) ) { 5379 5388 $post_date = get_date_from_gmt(iso8601_to_datetime($dateCreated)); 5380 5389 $post_date_gmt = iso8601_to_datetime($dateCreated, 'GMT'); 5390 5391 // Flag the post date to be edited. 5392 $edit_date = true; 5381 5393 } else { 5382 5394 $post_date = $postdata['post_date']; … … 5385 5397 5386 5398 // We've got all the data -- post it. 5387 $newpost = compact('ID', 'post_content', 'post_title', 'post_category', 'post_status', 'post_excerpt', 'comment_status', 'ping_status', ' post_date', 'post_date_gmt', 'to_ping', 'post_name', 'post_password', 'post_parent', 'menu_order', 'post_author', 'tags_input', 'page_template');5399 $newpost = compact('ID', 'post_content', 'post_title', 'post_category', 'post_status', 'post_excerpt', 'comment_status', 'ping_status', 'edit_date', 'post_date', 'post_date_gmt', 'to_ping', 'post_name', 'post_password', 'post_parent', 'menu_order', 'post_author', 'tags_input', 'page_template'); 5388 5400 5389 5401 $result = wp_update_post($newpost, true);
Note: See TracChangeset
for help on using the changeset viewer.