Add examples and update the documentation to the wp post term#398
Conversation
danielbachhuber
left a comment
There was a problem hiding this comment.
Thanks for the PR, @Rahmon ! I left a few comments to chat through.
src/WP_CLI/CommandWithTerms.php
Outdated
| * | ||
| * [<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. |
There was a problem hiding this comment.
| * : 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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Do you think this is not necessary because of the examples added in the
wp post termpage?
Yes, and that it's standard behavior across all WP-CLI commands.
src/WP_CLI/CommandWithTerms.php
Outdated
| * | ||
| * <term>... | ||
| * : The slug of the term or terms to be updated. | ||
| * : The slug of the term or terms (space-separated) to be updated. |
There was a problem hiding this comment.
| * : 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. | |||
There was a problem hiding this comment.
Should we update this one too? Are there others in the file?
There was a problem hiding this comment.
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.
This PR tries to make more clear the usage of the command
wp post termby adding more examples and updating the documentation.