Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 10 commits into from
Sep 18, 2023

Conversation

jacksonwp
Copy link
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
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.

features/export.feature Show resolved Hide resolved
src/Export_Command.php Outdated Show resolved Hide resolved
src/WP_Export_Query.php Show resolved Hide resolved
@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
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add parameter to ignore orphaned terms
2 participants