Make WordPress Core

Opened 17 years ago

Closed 17 years ago

#5454 closed enhancement (fixed)

Additional metadata in wxr export format

Reported by: tellyworth's profile tellyworth Owned by:
Milestone: 2.5 Priority: normal
Severity: normal Version:
Component: General Keywords: has-patch
Focuses: Cc:


The enclosed patch adds some extra metadata to the wxr xml export file to help support future enhancements and fixes for the importer. The changes should be backwards compatible with previous versions of the importer code.

  • There's a new <wp:wxr_version> tag in the channel element that contains a version number indicating the wxr format version (currently 1.0). The same number is in the xmlns:wp attribute but I included it here for easier access using the importer's get_tag() method; and also so we can distinguish between this version (which has the new tags listed below) and previous versions. We should bump the version number iff there is a change that might affect backwards compatibility.
  • Two new tags <wp:base_site_url> and <wp:base_blog_url> are there to help the importer know whether it is importing from a different site or the same site. In a normal WP install both tags contain the same URL (i.e. siteurl). In MU, base_site_url will show the main url of the MU install, base_blog_url is the individual blog's url.
  • <category> tags now include a nicename attribute so it's possible to fix bug #5447. Each category/tag element is duplicated because the old and existing importer code won't parse the new elements.
  • A new <wp:attachment_url> element is added when post_type is 'attachment'. Normally it's the same as the guid but that is not necessarily a reliable assumption for the importer to make.
  • A new <wp:comment_user_id> is included in comments. The importer could check the <wp:base_site_url> and preserve this value when importing a wxr file from the same site.

Attachments (1)

export-minor-additions-r6367.patch (3.6 KB) - added by tellyworth 17 years ago.

Download all attachments as: .zip

Change History (4)

#1 @tellyworth
17 years ago

  • Keywords has-patch added

#2 @lloydbudd
17 years ago

  • Milestone changed from 2.5 to 2.4

#3 @ryan
17 years ago

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

(In [6375]) Additional metadata for wxr export from tellyworth. fixes #5454

Note: See TracTickets for help on using tickets.