#54760 closed enhancement (fixed)
If Site Title is empty don't use '[ ]' as site title in email but domain name
Reported by: | Presskopp | Owned by: | audrasjb |
---|---|---|---|
Milestone: | 6.0 | Priority: | normal |
Severity: | normal | Version: | 5.5 |
Component: | Keywords: | has-patch commit assigned-for-commit | |
Focuses: | administration | Cc: |
Description
In the email you get when a plugin was automatically updated or if core has been updated, if no site title is set, you'll get something like:
[] Your site has updated ...
while it should be something like [site title] Your site has updated ...
In that case I'd like to see the domain name as the title like in
[example.com] Your site has updated ...
This could be archived by something like
if ( '' != $site_title ) {
$site_title = wp_specialchars_decode( get_bloginfo( 'name' ), ENT_QUOTES );
} else {
$site_title = parse_url( home_url(), PHP_URL_HOST );
}
in class-wp-automatic-updater.php
~ L.1350
Change History (13)
This ticket was mentioned in PR #2121 on WordPress/wordpress-develop by kebbet.
3 years ago
#1
- Keywords has-patch added
#2
@
3 years ago
- Keywords needs-testing added
Added the same logics to the function send_plugin_theme_email
that uses the same original pattern in the linked PR.
#4
@
3 years ago
- Milestone changed from Awaiting Review to 6.0
- Owner set to audrasjb
- Status changed from new to reviewing
Looks like a nice improvement for 6.0 :)
#5
@
3 years ago
- Keywords needs-refresh added; needs-testing removed
The patch looks good but the same logic should also be used in other emails that are using [%s]
(where %s
stands for get_bloginfo( 'name' )
.
#6
@
3 years ago
Ok, I can adjust the patch for that, can only find one more place: in user.php on L592.
What about get_option( 'blogname' )
? I.e. user-new.php L130.
3 years ago
#7
Hi @kebbet good work, i have a suggestion, can we wrap the new block in new function, that will be nice as the block is repetitive now. what do you think about?
3 years ago
#8
Thanks @mauriac, I was thinking the same, but was unsure about where to place that functions. Any suggestions?
3 years ago
#9
I'll suggest src/wp-admin/includes/functions.php.
But let's ask committers if they're ok with that, and may be they have any suggestion.
@SergeyBiryukov @audrasjb
3 years ago
#10
wp-admin/includes/functions.php
would work, but I'm not sure a specific function is really needed for this… any thought @SergeyBiryukov ?
#11
@
3 years ago
- Keywords commit assigned-for-commit added; needs-refresh removed
As I'm not sure this feature deserves its own function, let's commit it as it is right now. We can still add the function later if needed.
3 years ago
#13
committed in https://core.trac.wordpress.org/changeset/53063
https://core.trac.wordpress.org/ticket/54760
Trac ticket: