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

Add examples and update the documentation to the wp post term #398

Merged

Conversation

Rahmon
Copy link
Contributor

@Rahmon Rahmon commented Apr 30, 2023

This PR tries to make more clear the usage of the command wp post term by adding more examples and updating the documentation.

@Rahmon Rahmon requested a review from a team as a code owner April 30, 2023 18:03
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.

Thanks for the PR, @Rahmon ! I left a few comments to chat through.

@@ -121,11 +121,12 @@ public function list_( $args, $assoc_args ) {
* : The name of the term's taxonomy.
*
* [<term>...]
* : The name of the term or terms to be removed from the object.
* : The slug of the term or terms (space-separated) to be removed from the object.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
* : The slug of the term or terms (space-separated) to be removed from the object.
* : The slug of the term or terms to be removed from the object.

"(space-separated)" isn't necessary here because it's the same behavior across all commands.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @danielbachhuber

I've added space-separated through all commands so the user can have this information without having to visit another page. Do you think this is not necessary because of the examples added in the wp post term page?

Copy link
Member

Choose a reason for hiding this comment

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

Do you think this is not necessary because of the examples added in the wp post term page?

Yes, and that it's standard behavior across all WP-CLI commands.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Got it. Removed.

*
* <term>...
* : The slug of the term or terms to be updated.
* : The slug of the term or terms (space-separated) to be updated.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
* : The slug of the term or terms (space-separated) to be updated.
* : The slug of the term or terms to be updated.

@@ -121,11 +121,12 @@ public function list_( $args, $assoc_args ) {
* : The name of the term's taxonomy.
Copy link
Member

Choose a reason for hiding this comment

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

Should we update this one too? Are there others in the file?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think so. By default, the slug is the taxonomy key but it can be different. I've updated the doc of the command set that was using slug instead of name to the taxonomy option.

@danielbachhuber danielbachhuber merged commit 99ff533 into wp-cli:main May 8, 2023
@Rahmon Rahmon deleted the fix/update-post-term-command-doc branch May 8, 2023 20:45
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.

2 participants