3

The codex has a function called get_user_option() but it requires me to pass the name of the option. Is there a wp function to retrieve all user options? I just need to see a list of all options set for a specific user. The only other similar function I found is get_alloptions() but that has been deprecated.

3

You will get all the meta for the user by using get_user_meta function

$all_meta_for_user = get_user_meta( [user ID] );
echo "<pre>";
print_r( $all_meta_for_user );
  • Adding a echo "<pre">; before the print_r() can improve readability. :) – Bruno Monteiro Jun 18 '15 at 13:55
  • Thanks. I failed to realize that get_user_meta would retrieve all options. – gdaniel Jun 18 '15 at 13:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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