Opened 10 years ago
Last modified 7 years ago
#32234 new enhancement
Streamline parameter order of get_user_option()
Reported by: | mechter | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 4.2.1 |
Component: | Users | Keywords: | |
Focuses: | Cc: |
Description
get_user_meta()
expects $user_id
, followed by $meta_key
. So do update_user_meta()
, delete_user_meta()
, update_user_option()
and delete_user_option()
.
get_user_option()
sticks out in that it expects these parameters in reversed order, which just caused me some major frustration even though I had looked it up before.
To enable backwards compability, we could test which of the two parameters is an integer and then swap them if necessary (unless of course meta keys can be integers too, I have not checked that, but it seems unlikely).
Change History (4)
Note: See
TracTickets for help on using
tickets.
This just caused me some frustration too and I would love to see this updated for consistency.