mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-30 14:00:17 +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:
@@ -112,6 +112,12 @@ if ( isset( $_REQUEST['action'] ) && 'adduser' === $_REQUEST['action'] ) {
|
||||
|
||||
$switched_locale = switch_to_locale( get_user_locale( $user_details ) );
|
||||
|
||||
if ( '' !== get_option( 'blogname' ) ) {
|
||||
$site_title = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES );
|
||||
} else {
|
||||
$site_title = parse_url( home_url(), PHP_URL_HOST );
|
||||
}
|
||||
|
||||
/* translators: 1: Site title, 2: Site URL, 3: User role, 4: Activation URL. */
|
||||
$message = __(
|
||||
'Hi,
|
||||
@@ -127,7 +133,7 @@ Please click the following link to confirm the invite:
|
||||
$new_user_email['subject'] = sprintf(
|
||||
/* translators: Joining confirmation notification email subject. %s: Site title. */
|
||||
__( '[%s] Joining Confirmation' ),
|
||||
wp_specialchars_decode( get_option( 'blogname' ) )
|
||||
$site_title
|
||||
);
|
||||
$new_user_email['message'] = sprintf(
|
||||
$message,
|
||||
|
||||
Reference in New Issue
Block a user