Make WordPress Core


Ignore:
Timestamp:
04/04/2022 08:19:12 PM (3 years ago)
Author:
audrasjb
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/misc.php

    r53060 r53063  
    14731473    $content      = str_replace( '###SITEURL###', home_url(), $content );
    14741474
     1475    if ( '' !== get_option( 'blogname' ) ) {
     1476        $site_title = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES );
     1477    } else {
     1478        $site_title = parse_url( home_url(), PHP_URL_HOST );
     1479    }
     1480
    14751481    wp_mail(
    14761482        $value,
     
    14781484            /* translators: New admin email address notification email subject. %s: Site title. */
    14791485            __( '[%s] New Admin Email Address' ),
    1480             wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES )
     1486            $site_title
    14811487        ),
    14821488        $content
Note: See TracChangeset for help on using the changeset viewer.