From da20e2eb7e8c316cbf91e77c36c781a36f5f3417 Mon Sep 17 00:00:00 2001 From: Himanshu Pathak Date: Thu, 28 May 2026 15:49:12 +0530 Subject: [PATCH] Add home URL to the admin notification email for new user registrations --- src/wp-includes/pluggable.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/pluggable.php b/src/wp-includes/pluggable.php index fd659b600c379..66b8a0c991218 100644 --- a/src/wp-includes/pluggable.php +++ b/src/wp-includes/pluggable.php @@ -2285,6 +2285,8 @@ function wp_new_user_notification( $user_id, $deprecated = null, $notify = '' ) */ $blogname = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES ); + $homeurl = home_url( '/' ); + /** * Filters whether the admin is notified of a new user registration. * @@ -2305,8 +2307,8 @@ function wp_new_user_notification( $user_id, $deprecated = null, $notify = '' ) $switched_locale = switch_to_locale( get_locale() ); } - /* translators: %s: Site title. */ - $message = sprintf( __( 'New user registration on your site %s:' ), $blogname ) . "\r\n\r\n"; + /* translators: 1: Site title. 2: Site URL. */ + $message = sprintf( __( 'New user registration on your site %1$s (%2$s):' ), $blogname, $homeurl ) . "\r\n\r\n"; /* translators: %s: User login. */ $message .= sprintf( __( 'Username: %s' ), $user->user_login ) . "\r\n\r\n"; /* translators: %s: User email address. */