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/user-new.php

    r52978 r53063  
    113113            $switched_locale = switch_to_locale( get_user_locale( $user_details ) );
    114114
     115            if ( '' !== get_option( 'blogname' ) ) {
     116                $site_title = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES );
     117            } else {
     118                $site_title = parse_url( home_url(), PHP_URL_HOST );
     119            }
     120
    115121            /* translators: 1: Site title, 2: Site URL, 3: User role, 4: Activation URL. */
    116122            $message = __(
     
    128134                /* translators: Joining confirmation notification email subject. %s: Site title. */
    129135                __( '[%s] Joining Confirmation' ),
    130                 wp_specialchars_decode( get_option( 'blogname' ) )
     136                $site_title
    131137            );
    132138            $new_user_email['message'] = sprintf(
Note: See TracChangeset for help on using the changeset viewer.