As the Codex states for the antispambot()
function:
Return Values (string) Converted email address.
You have to do one of the following:
echo antispambot( $curauth->publicemail );
// OR...
print antispambot( $curauth->publicemail );
So your full example would look like the following:
if ( ! empty( $curauth->publicemail ) )
{
echo 'Email <a href="https://wordpress.stackexchange.com/questions/43732/mailto:".antispambot( $curauth->publicemail ).'?subject=Webmail">
<img src="'.get_bloginfo('template_url').'/images/email_16.png"></a>';
}
About the difference between echo, print and (just) return
echo
andprint
are just synonyms/alias for each other and actually display something on the screen. The only difference in usage is, that you can’t useecho
in combination withreturn
.return
just gives something back as a functions output. In combination withprint
, a function can actually display something in a template, etc.