WordPress.org

Make WordPress Core

Opened 5 months ago

#47446 assigned enhancement

Tools > Export does not include term meta data for a custom post type

Reported by: mclaurent Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 5.2.1
Component: Export Keywords:
Focuses: Cc:
PR Number:

Description

Steps:
# Register a public custom post type
# Register a custom taxonomy with a custom term_meta
# populate with dummy posts, terms and term meta values
# go to tools > export and select your custom post type
# The resulting XML is perfectly valid and includes all posts along with the terms of the taxonomy. Observe that none of the terms have their corresponding term_meta

Expected:
When exporting content of one custom post type, the term_meta should be included.

Solution:
I have not found one. Looking at wp-admin/includes/export.php:148 I can see that $terms is only populated when $argscontent? is set to all ("All Content"). Here the source I am referring to: https://github.com/WordPress/WordPress/blob/5.2.1/wp-admin/includes/export.php#L148

Environment: WP 5.2.1, WAMP, PHP7.2

Change History (0)

Note: See TracTickets for help on using tickets.