1

i created an frontend profile for users, where they can add some informations to there profile. All the infos are stored in the usermeta. To show these informations on the frontend profile of the user i created multiple shortcodes (functions)

For every single function it does the same thing on startup. It searches for the user profile id and then fetches the informations from that user.

$profile_id = um_profile_id; // get the acutal profile id
um_fetch_user( $profile_id ); // fetch the user data

So all of these functions start with the code above and i asked myself if there is a better way to do this?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.