
Need help with a simple line of php in wordpress
I beleive that this line $title = sprintf(__('[%s] Password Reset'), $blogname); is in reference to the subject, but I'm not sure what I can take out to make it right. Right now the subject shows up as [Pro Illusion] Passord Reset, and I want to get rid of the brackets around my blog title and just type my own subject line. I haven't located the from field code at all, so help with both these things is much appreciated. Below are the two codes for the two emails.
Thanks in advance for your help.
wp_set_password($new_pass, $user->ID);
update_usermeta($user->ID, 'default_password_nag', true); //Set up the Password change nag.
$message = sprintf(__('Username: %s'), $user->user_login) . "\r\n";
$message .= sprintf(__('Password: %s'), $new_pass) . "\r\n";
$message .= site_url('wp-login.php', 'login') . "\r\n";
// The blogname option is escaped with esc_html on the way into the database in sanitize_option
// we want to reverse this for the plain text arena of emails.
$blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);
$title = sprintf(__('[%s] Your new password'), $blogname);
$title = apply_filters('password_reset_title', $title);
$message = apply_filters('password_reset_message', $message, $new_pass);
if ( $message && !wp_mail($user->user_email, $title, $message) )
die('<p>' . __('The e-mail could not be sent.') . "<br />\n" . __('Possible reason: your host may have disabled the mail() function...') . '</p>');
wp_password_change_notification($user);
return true;
}
The other email is
}
$message = __('Someone has asked to reset the password for the following site and username.') . "\r\n\r\n";
$message .= get_option('siteurl') . "\r\n\r\n";
$message .= sprintf(__('Username: %s'), $user_login) . "\r\n\r\n";
$message .= __('To reset your password visit the following address, otherwise just ignore this email and nothing will happen.') . "\r\n\r\n";
$message .= site_url("wp-login.php?action=rp&key=$key&login=" . rawurlencode($user_login), 'login') . "\r\n";
// The blogname option is escaped with esc_html on the way into the database in sanitize_option
// we want to reverse this for the plain text arena of emails.
$blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);
$title = sprintf(__('[%s] Password Reset'), $blogname);
$title = apply_filters('retrieve_password_title', $title);
$message = apply_filters('retrieve_password_message', $message, $key);
if ( $message && !wp_mail($user_email, $title, $message) )
die('<p>' . __('The e-mail could not be sent.') . "<br />\n" . __('Possible reason: your host may have disabled the mail() function...') . '</p>');
return true;
-
imarketstuff -
[ 1 ] Thanks
SignatureI MARKET STUFF{{ DiscussionBoard.errors[1842334].message }} -
-
Bruce Hearder -
[ 1 ] Thanks
{{ DiscussionBoard.errors[1842341].message }} -
-
Jacob Kettner -
Thanks - 1 reply
{{ DiscussionBoard.errors[1843655].message }}-
imarketstuff -
[ 1 ] Thanks
SignatureI MARKET STUFF{{ DiscussionBoard.errors[1844239].message }} -
-
-
Jacob Kettner -
Thanks
{{ DiscussionBoard.errors[1855491].message }} -