Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use RSS's <enclosure> element instead of <wxr:attachment_url> #5

Open
pbiron opened this issue Jul 11, 2017 · 0 comments
Open

use RSS's <enclosure> element instead of <wxr:attachment_url> #5

pbiron opened this issue Jul 11, 2017 · 0 comments
Assignees

Comments

@pbiron
Copy link
Owner

pbiron commented Jul 11, 2017

The RSS Advisory Board's "Best Practices" profile says, in part

When a namespace element duplicates the functionality of an element defined in RSS, the core element should be used.

and the semantics of RSS's exactly matches the semantics of <wxr:attachment_url>.

RSS's <enclosure> has 3 required attributes:

  • The length attribute indicates the size of the file in bytes
  • The type attribute identifies the file's MIME media type
  • The url attribute identifies the URL of the file

The file size and mime-type is available at the time an export is generated (and of course, so is the URL), so there would be no problem with using <enclosure> in newly generated WXR instances.

Making this change would slightly complicate matters for the transform from WXR 1.0, 1.1 and 1.2 instances into WXR 1.3-proposed instances that is part of the WordPress Importer Redux. However, the complication is only slight, since the response headers returned by a call to wp_remote_head() on the URL SHOULD provide the necessary information.

@pbiron pbiron self-assigned this Jul 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant