Skip to content

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

Merged
danielbachhuber merged 10 commits intowp-cli:mainfrom
jacksonwp:contributor-day
Sep 18, 2023
Merged

Allow orphan terms to be exported with --allow_orphan_terms flag#109
danielbachhuber merged 10 commits intowp-cli:mainfrom
jacksonwp:contributor-day

Conversation

@jacksonwp
Copy link
Copy Markdown
Contributor

@jacksonwp jacksonwp commented Aug 24, 2023

Fixes #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 wp-cli/wp-cli#5832

@jacksonwp jacksonwp requested a review from a team as a code owner August 24, 2023 20:36
@swissspidy swissspidy linked an issue Aug 24, 2023 that may be closed by this pull request
1 task
Copy link
Copy Markdown
Member

@danielbachhuber danielbachhuber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty solid 👍 Just a few nits to polish up.

@danielbachhuber danielbachhuber added the command:export Related to 'export' command label Aug 30, 2023
@danielbachhuber danielbachhuber added this to the 2.1.12 milestone Sep 18, 2023
@danielbachhuber danielbachhuber self-requested a review September 18, 2023 21:34
Copy link
Copy Markdown
Member

@danielbachhuber danielbachhuber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work on this, @jacksonwp. I made a few additional tweaks you might want to look through.

@danielbachhuber danielbachhuber merged commit 31e3d71 into wp-cli:main Sep 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

command:export Related to 'export' command

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add parameter to ignore orphaned terms

2 participants