Do I always need to call wp_get_current_user() before accessing $current_user?
Yes, as a best practice, you should call wp_current_user() because you can’t assume that $current_user is set (or if it is set correctly with the user you’re after). Of course, there’s a third option that’s only just sprung to mind… test whether $current_user is already set/defined and if it isn’t, call wp_get_current_user(). Actually, that’s kind … Read more