mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +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:
@@ -1236,9 +1236,15 @@ class WP_Automatic_Updater {
|
||||
$body[] = __( 'https://wordpress.org/support/forums/' );
|
||||
$body[] = "\n" . __( 'The WordPress Team' );
|
||||
|
||||
if ( '' !== get_option( 'blogname' ) ) {
|
||||
$site_title = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES );
|
||||
} else {
|
||||
$site_title = parse_url( home_url(), PHP_URL_HOST );
|
||||
}
|
||||
|
||||
$body = implode( "\n", $body );
|
||||
$to = get_site_option( 'admin_email' );
|
||||
$subject = sprintf( $subject, wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES ) );
|
||||
$subject = sprintf( $subject, $site_title );
|
||||
$headers = '';
|
||||
|
||||
$email = compact( 'to', 'subject', 'body', 'headers' );
|
||||
@@ -1347,7 +1353,11 @@ class WP_Automatic_Updater {
|
||||
$body[] = '';
|
||||
}
|
||||
|
||||
$site_title = wp_specialchars_decode( get_bloginfo( 'name' ), ENT_QUOTES );
|
||||
if ( '' !== get_bloginfo( 'name' ) ) {
|
||||
$site_title = wp_specialchars_decode( get_bloginfo( 'name' ), ENT_QUOTES );
|
||||
} else {
|
||||
$site_title = parse_url( home_url(), PHP_URL_HOST );
|
||||
}
|
||||
|
||||
if ( $failures ) {
|
||||
$body[] = trim(
|
||||
|
||||
Reference in New Issue
Block a user