Quantcast
Channel: WordPress.org Forums » All Posts
Viewing all articles
Browse latest Browse all 3060

Reply To: Profile picture

$
0
0

@chelminski

For UM Members Directory you also need this code snippet.

add_filter( 'um_ajax_get_members_data', 'um_ajax_custom_user_profile_photo_url', 10, 3 );

function um_ajax_custom_user_profile_photo_url( $data_array, $user_id, $directory_data ) {

    $external_url = 'https://example.com/media/photo/{user_displayname}.png';

    $data_array['avatar'] = str_replace( um_get_default_avatar_uri(),
                                            str_replace( '{user_displayname}',
                                                        um_user( 'display_name' ),
                                                        $external_url ),
                                         $data_array['avatar'] );
    return $data_array;
}

Viewing all articles
Browse latest Browse all 3060

Trending Articles