-
Notifications
You must be signed in to change notification settings - Fork 999
Add wp user update_meta #117
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 wp user update_meta #117
Conversation
} | ||
|
||
private function get_arg_or_error( $args, $index, $name ) { | ||
$value = $args[$index]; |
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.
This will produce a notice. Should use isset()
.
How about instead of
It would be more consistent with |
|
You can treat 'set' as just another parameter to the 'meta' sub-command. The alternative would be to introduce a user-meta command:
In this case, we could have a helper class which we could reuse for |
True, but then you don't get the nice error messages for free when you leave off the sub-sub-command, like you do when you leave off a sub-command. You'd have to implement those messages yourself, which doesn't seem like a great solution. Adding a user-meta command feels slightly neater in terms of implementation, but not quite as nice when you're calling code. Might be the simplest solution though. |
Even if we implemented sub-sub-commands, we'd still likely need them to be in a separate class, so it's worth having |
* rename 'user-meta set' to 'user-meta update' * add 'user-meta add' and 'user-meta delete' See #117
I merged everything except the --url commit. |
Adds the command
wp user update_meta
to allow meta fields on a user to be updated.