wp-cli / export-command

Exports WordPress content to a WXR file.
MIT License
12 stars 27 forks source link

Allow orphan terms to be exported with `--allow_orphan_terms` flag #109

Closed jacksonwp closed 12 months ago

jacksonwp commented 1 year ago

Fixes https://github.com/wp-cli/export-command/issues/108

This PR adds a flag --allow_orphan_terms, that when set allows the export to proceed when orphan terms are found.

When the flag is set, the orphaned terms have their parent set to 0 and the export proceeds.

When the flag is not set, an exception is thrown and the export fails.

Related https://github.com/wp-cli/wp-cli/issues/5832