While coding WP I just wondered about this simple fact:
get_usermeta()
is deprecated since version 3.0. The warning suggests me to use get_user_meta()
. Even the parameters are pretty similar, I wonder why the deprecated function is not making use of the new function as well.
Isn’t that a sign that the new function does not really does what the deprecated did?
I’m wondering because I need to replace deprecated calls and wonder a bit.
What makes me even wondering more is the simple fact that get_user_meta()
is quite an alias of the 2.9 function get_metadata()
with only a constant value’ed parameter ‘user’ given.
Help 😉
Edit: A counter-example is clean_url()
– it’s deprecated, the error message shows what this is about and the deprecated function aliases the new one: esc_url()
, so it’s clear what to do.
Indeed,
get_usermeta()
behaves differently fromget_user_meta()
and all the otherget_*_meta()
functions. That’s why it was deprecated.Unfortunately, the subtle differences couldn’t be explained properly in a deprecation notice.