Add wp user update_meta#117
Conversation
There was a problem hiding this comment.
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_metato allow meta fields on a user to be updated.