-
Notifications
You must be signed in to change notification settings - Fork 90
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
Add examples and update the documentation to the wp post term
#398
Conversation
There was a problem hiding this 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.
src/WP_CLI/CommandWithTerms.php
Outdated
@@ -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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* : 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it. Removed.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* : 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.
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?
There was a problem hiding this comment.
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.
This PR tries to make more clear the usage of the command
wp post term
by adding more examples and updating the documentation.