Make WordPress Core


Ignore:
Timestamp:
04/04/2022 08:19:12 PM (2 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/user.php

    r53060 r53063  
    579579    $role  = $roles[ $_REQUEST['role'] ];
    580580
     581    if ( '' !== get_bloginfo( 'name' ) ) {
     582        $site_title = wp_specialchars_decode( get_bloginfo( 'name' ), ENT_QUOTES );
     583    } else {
     584        $site_title = parse_url( home_url(), PHP_URL_HOST );
     585    }
     586
    581587    return sprintf(
    582588        /* translators: 1: Site title, 2: Site URL, 3: User role. */
     
    591597%%s'
    592598        ),
    593         wp_specialchars_decode( get_bloginfo( 'name' ), ENT_QUOTES ),
     599        $site_title,
    594600        home_url(),
    595601        wp_specialchars_decode( translate_user_role( $role['name'] ) )
Note: See TracChangeset for help on using the changeset viewer.