Skip to content

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

Merged
danielbachhuber merged 5 commits intowp-cli:mainfrom
Rahmon:fix/update-post-term-command-doc
May 8, 2023
Merged

Add examples and update the documentation to the wp post term#398
danielbachhuber merged 5 commits intowp-cli:mainfrom
Rahmon:fix/update-post-term-command-doc

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.

*
* [<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.

@Rahmon Rahmon requested a review from danielbachhuber May 6, 2023 12:15
@danielbachhuber danielbachhuber added this to the 2.4.3 milestone May 8, 2023
@danielbachhuber danielbachhuber added the scope:documentation Related to documentation label May 8, 2023
@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

Labels

scope:documentation Related to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants