Modifica l'URL autore in WP per il profilo Discourse

For users who have set their Discourse username on WordPress, you can get the username with:

get_user_meta( $user_id, 'discourse_username', true );

$user_id needs to be set to the user’s WordPress user ID. Since it’s possible that not all authors will have set their Discourse username, you should probably check that the value returned isn’t empty before creating the link.