WordPress.org

Make WordPress Core

Opened 6 months ago

Last modified 6 months ago

#47004 assigned enhancement

WordPress email subject update - phase 2

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

Description

WordPress send emails, using wp_mail() function, to inform the site admin when some important tasks are done and when it needs user confirmation.

In #37940 we standardized email subjects used by WordPress. We updated subject texts, added unified translation comments and added site title as a prefix to all the email subjects.

Now we should standardized the filters used to filter WordPress emails. Why? Because not all emails can be filtered.

I prefer to do this in two steps:

  1. Separate the email subject from the wp_mail() function.
  2. Add new filters to filter the email subject.

See the attached patches.

Attachments (1)

47004.patch (8.6 KB) - added by ramiy 6 months ago.

Download all attachments as: .zip

Change History (4)

@ramiy
6 months ago

#1 @ramiy
6 months ago

  • Keywords has-patch added

This patch removed the email subject translation string from the wp_mail() functions into a separate $subject var.

I should mention that this conventions is used in other places in the code.

As a separate variable, we will be able to filter those email subjects.

#2 @johnbillion
6 months ago

  • Focuses administration removed
  • Type changed from defect (bug) to enhancement

Related:

Unofficial wp_mail() usage docs for reference: https://github.com/johnbillion/wp_mail

#3 @ramiy
6 months ago

@johnbillion Awesome job with the docs!

Let's try to promote the email tickets in 5.3 milestone.

Note: See TracTickets for help on using tickets.