Opened 7 years ago
Last modified 2 months ago
#47446 assigned enhancement
Tools > Export does not include term meta data for a custom post type
| Reported by: | mclaurent | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | Export | Version: | 5.2.1 |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
Description (last modified by )
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 $args['content'] 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
Note:
See TracTickets
for help on using tickets.