Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#52180 closed enhancement (fixed)

Add post modified fields to WXR export format

Reported by: jmdodd's profile jmdodd Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 5.7 Priority: normal
Severity: normal Version: 5.7
Component: Export Keywords: has-patch has-dev-note
Focuses: Cc:

Description

The WXR export format can be used to merge blogs' content without needing to resort to direct database manipulation. However, its usefulness is limited when doing so because the importer cannot programmatically determine which version of a post is "fresher" as the only date information included with a given post is the post date.

I would like to add the post_modified and post_modified_gmt fields to the generated WXR export file to allow for the possibility of import logic involving updating and adding revisions to, rather than skipping, existing posts/pages.

I have tested these additions with the WordPress importer with no issues in either export or import.

Attachments (1)

52180.diff (901 bytes) - added by jmdodd 4 years ago.

Download all attachments as: .zip

Change History (6)

@jmdodd
4 years ago

#1 @SergeyBiryukov
4 years ago

  • Milestone changed from Awaiting Review to 5.7

#2 @SergeyBiryukov
4 years ago

  • Owner set to SergeyBiryukov
  • Status changed from new to reviewing

#3 @SergeyBiryukov
4 years ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 49910:

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.

#4 @audrasjb
4 years ago

  • Keywords needs-dev-note added

It would be nice to mention this change in the Miscellaneous Changes dev note.

Note: See TracTickets for help on using tickets.