What I was missing is add the headers to the mail function.
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
wp_mail($user_email, sprintf(__('Your New User Account on %s'), $blogname), $message, $headers);
Thanks for the guidance!
Thanks both for your answers.
But wrapping %s in strong tags didn't do the trick, it prints everything also.
The $message string is used as text to send an email
wp_mail($user_email, sprintf(__('Your New User Account on %s'), $blogname), $message);
Just the admin is allow to create the users, so there isn't risk to have dangerous code as username.
Hello!
I'm very new with php, I just have to update some functions in a wordpress site.
Having this:
$message .= sprintf(__('Your username is %s'), $user_login);
I would like to have the user login variable in bold.
Have tried many things, as
$user_login = '<strong>' . $user_login . '</strong>';
Or embedding the HTML tags inside sprintf function, however everything I tried always print the tags itself.
How this could be done?
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.