WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 2 years ago

#18280 closed defect (bug) (fixed)

WXR Export should allow for plugins (or core) to filter what is exported

Reported by: westi Owned by: westi
Milestone: 3.3 Priority: normal
Severity: normal Version: 3.2.1
Component: Export Keywords: westi-likes commit has-patch
Focuses: Cc:

Description

Core currently has a "hack" to filter our the _edit_lock post_meta data and no way for a plugin to filter out things which don't make sense to be exported.

We should have a filter which allows for this filtering to be done by core and plugins without a "hack"

Attachments (1)

export_postmeta_filter.diff (1.4 KB) - added by westi 3 years ago.
Add a filter and use it in core.

Download all attachments as: .zip

Change History (6)

comment:1 follow-up: nacin3 years ago

Sounds like a good argument for an $args array at the end of register_meta().

westi3 years ago

Add a filter and use it in core.

comment:2 in reply to: ↑ 1 westi3 years ago

Replying to nacin:

Sounds like a good argument for an $args array at the end of register_meta().

I guess we could rework the filter and have another argument of register_meta instead which does something similar to the protected meta and hooks a function onto a key name based filter instead of a generic one.

comment:3 chacha1023 years ago

  • Cc chacha102 added

comment:4 nacin2 years ago

  • Keywords commit has-patch added

Per IRC: Let's start with the filter for 3.3. The improvements to meta registering may be nice in the future, but also can feel over-abstracted.

comment:5 nacin2 years ago

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

In [19233]:

Add wxr_export_skip_postmeta filter for skipping postmeta in exports. props westi, fixes #18280.

Note: See TracTickets for help on using tickets.