Make WordPress Core

Opened 9 years ago

Last modified 4 years ago

#36340 new enhancement

Other options ignored when using a custom post type with export_wp()

Reported by: themiked's profile theMikeD Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version:
Component: Export Keywords: needs-patch
Focuses: Cc:

Description (last modified by DrewAPicture)

While writing the improved docblock for export_wp(), I noticed something that may be an issue when a custom post type is supplied.

For the built-in post types you can filter the exported content by start date, end date and/or author. But not with a custom post type: with them it's everything. Is this by design?

The fix could be to modify line 113 to include the custom post type option because by that point we know that it's both valid and can_export is true thanks to the stuff starting on line 88.

I don't use this code myself but it did jump out at me. Thoughts?

Change History (3)

#1 @DrewAPicture
9 years ago

  • Description modified (diff)
  • Summary changed from Other options ignored when using a custom post type with wp_export to Other options ignored when using a custom post type with export_wp()

#2 @chriscct7
9 years ago

  • Version trunk deleted

#3 @earnjam
4 years ago

  • Keywords needs-patch added
  • Milestone set to Future Release
  • Type changed from defect (bug) to enhancement

The UI on the export screen doesn't allow filtering when exporting just an individual custom post type or when exporting all content, so this is just going to occur on direct calls to the export_wp() function itself.

The documentation for the function arguments of author, start_date and end_date each say:

Used only when $content is 'post', 'page' or 'attachment'

Given all of that, I think this is an enhancement and not a bug, since it's a documented design.

Note: See TracTickets for help on using tickets.