WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
I don't think there's a hard-and-fast answer to this but it's an interesting question. – editor Feb 9 '11 at 22:16
Yeah I am as well puzzled as curious at once. – hakre Feb 9 '11 at 22:19
up vote 1 down vote accepted

Indeed, get_usermeta() behaves differently from get_user_meta() and all the other get_*_meta() functions. That's why it was deprecated.

Unfortunately, the subtle differences couldn't be explained properly in a deprecation notice.

share|improve this answer
But probably you can here? – hakre Feb 10 '11 at 1:26
Comparing new and old version sources is always an option as well ... . – hakre Jul 4 '11 at 21:14

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.