mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-09 15:14:37 +00:00
Mail: Replace empty site title with domain name in email subjects.
This change replaces site title with domain name in email subjects when the `blogname` option is empty. Props Presskopp, kebbet, audrasjb, azouamauriac. Fixes #54760. git-svn-id: https://develop.svn.wordpress.org/trunk@53063 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -578,6 +578,12 @@ function admin_created_user_email( $text ) {
|
||||
$roles = get_editable_roles();
|
||||
$role = $roles[ $_REQUEST['role'] ];
|
||||
|
||||
if ( '' !== get_bloginfo( 'name' ) ) {
|
||||
$site_title = wp_specialchars_decode( get_bloginfo( 'name' ), ENT_QUOTES );
|
||||
} else {
|
||||
$site_title = parse_url( home_url(), PHP_URL_HOST );
|
||||
}
|
||||
|
||||
return sprintf(
|
||||
/* translators: 1: Site title, 2: Site URL, 3: User role. */
|
||||
__(
|
||||
@@ -590,7 +596,7 @@ this email. This invitation will expire in a few days.
|
||||
Please click the following link to activate your user account:
|
||||
%%s'
|
||||
),
|
||||
wp_specialchars_decode( get_bloginfo( 'name' ), ENT_QUOTES ),
|
||||
$site_title,
|
||||
home_url(),
|
||||
wp_specialchars_decode( translate_user_role( $role['name'] ) )
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user