mirror of
https://github.com/WordPress/WordPress.git
synced 2024-09-25 13:52:59 +02:00
Export: Add post_modified
and post_modified_gmt
fields to the generated WXR export file.
This allows for more flexibility when determining which version of a post is the latest one, and makes it possible to implement import logic involving updating and adding revisions to existing posts or pages. Props jmdodd. Fixes #52180. Built from https://develop.svn.wordpress.org/trunk@49910 git-svn-id: http://core.svn.wordpress.org/trunk@49609 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
4dc59b954a
commit
fa83e92c76
@ -23,6 +23,7 @@ define( 'WXR_VERSION', '1.2' );
|
||||
* 'auto-draft' status will be skipped.
|
||||
*
|
||||
* @since 2.1.0
|
||||
* @since 5.7.0 Added the `post_modified` and `post_modified_gmt` fields to the export file.
|
||||
*
|
||||
* @global wpdb $wpdb WordPress database abstraction object.
|
||||
* @global WP_Post $post Global post object.
|
||||
@ -576,6 +577,8 @@ function export_wp( $args = array() ) {
|
||||
<wp:post_id><?php echo (int) $post->ID; ?></wp:post_id>
|
||||
<wp:post_date><?php echo wxr_cdata( $post->post_date ); ?></wp:post_date>
|
||||
<wp:post_date_gmt><?php echo wxr_cdata( $post->post_date_gmt ); ?></wp:post_date_gmt>
|
||||
<wp:post_modified><?php echo wxr_cdata( $post->post_modified ); ?></wp:post_modified>
|
||||
<wp:post_modified_gmt><?php echo wxr_cdata( $post->post_modified_gmt ); ?></wp:post_modified_gmt>
|
||||
<wp:comment_status><?php echo wxr_cdata( $post->comment_status ); ?></wp:comment_status>
|
||||
<wp:ping_status><?php echo wxr_cdata( $post->ping_status ); ?></wp:ping_status>
|
||||
<wp:post_name><?php echo wxr_cdata( $post->post_name ); ?></wp:post_name>
|
||||
|
@ -13,7 +13,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.7-alpha-49909';
|
||||
$wp_version = '5.7-alpha-49910';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user