WordPress.org

Make WordPress Core

Opened 6 months ago

Last modified 6 months ago

#47605 new enhancement

Email sender name change with site title in wp-includes/pluggable.php

Reported by: viitorcloudvc Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 2.2
Component: Mail Keywords: has-patch
Focuses: Cc:
PR Number:

Description

A variable $from_name has default WordPress name as sender on line 316 in file name pluggable.php exist in wp-include folder.

Where there is a line replacement with site name of WordPress website. The result will show in email with Site title of website in email of sender name.

Attachments (3)

45562.patch.patch (509 bytes) - added by viitorcloudvc 6 months ago.
45562.patch.2.patch (506 bytes) - added by viitorcloudvc 6 months ago.
45562.patch (507 bytes) - added by viitorcloudvc 6 months ago.

Download all attachments as: .zip

Change History (10)

#1 follow-ups: @audrasjb
6 months ago

  • Component changed from General to Mail
  • Version 5.2.2 deleted

Hello @viitorcloudvc and welcome to WordPress Trac,

Thanks for the ticket, I'm moving it to the Mail component.

By the way, there is already a hook to filter the From Name parameter for all WP mails: https://developer.wordpress.org/reference/hooks/wp_mail_from_name/

Also, looks like there is an extra space that should be removed in the patch provided :-)

#2 @viitorcloudvc
6 months ago

Hello @audrasjb,

Thank you.

Thank you again for suggestion. I am aware about hook but it would be great to have default inbuilt function for sender name. For this purpose I am requesting to add in core functionality.

Last edited 6 months ago by viitorcloudvc (previous) (diff)

#3 in reply to: ↑ 1 @mukesh27
6 months ago

  • Keywords needs-refresh added
  • Version set to 2.2

As @audrasjb said there is already filter available to change default $from_name . please remove an extra space from 45562.patch.patch patch.

Replying to audrasjb:

Also, looks like there is an extra space that should be removed in the patch provided :-)

#4 @viitorcloudvc
6 months ago

Hello @audrasjb,

I have added new patch file. Please review it.

#5 in reply to: ↑ 1 @viitorcloudvc
6 months ago

Hello @audrasjb,

I have added new patch file named as:45562.patch.2.patch . Please review it.

Replying to audrasjb:

Hello @viitorcloudvc and welcome to WordPress Trac,

Thanks for the ticket, I'm moving it to the Mail component.

By the way, there is already a hook to filter the From Name parameter for all WP mails: https://developer.wordpress.org/reference/hooks/wp_mail_from_name/

Also, looks like there is an extra space that should be removed in the patch provided :-)

#6 @chetan200891
6 months ago

@viitorcloudvc Welcome to trac!

Looks like you have removed extra space before variable, but due to WPCS, you need to fix below errors,

Expected 1 space after opening bracket;
Expected 1 space before closing bracket;

:)

#7 @SergeyBiryukov
6 months ago

  • Keywords needs-refresh removed
Note: See TracTickets for help on using tickets.