[wp-trac] [WordPress Trac] #49661: mails, Howdy, wp_mail() and filters spreading
WordPress Trac
noreply at wordpress.org
Fri Jul 11 14:38:37 UTC 2025
#49661: mails, Howdy, wp_mail() and filters spreading
-----------------------------+------------------------------
Reporter: arena | Owner: (none)
Type: feature request | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Mail | Version: 5.4
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
-----------------------------+------------------------------
Comment (by SirLouen):
Generally, it's very complex to get this kind of features getting through
(specially nowadays).
Although I like most of the proposal, but with some caveats:
1. I'm not 100% confident about Mustache in 2025. PHP support was dropped
a time ago, and for example, other projects like CLI that adopted Mustache
had to fork the PHP project to keep maintaining it in newer versions. But
all of a sudden the maintainer
[https://github.com/bobthecow/mustache.php/commits/main/?since=2025-06-09&until=2025-06-09
returned like 1 month ago] and merged a bunch of pending PRs in the repo…
Still, personally I would not trust PHP-Mustache and would rather opt for
Twig, which is better maintained, but unlikely because I doubt there will
be much love in WP for such, or simply use a custom templating or
microtemplating).
2. Another problem I'm seeing in this report is that you want to approach
all in one place. Ideally multiple reports should be done, one per idea,
one at a time. I support most of the ideas you are proposing, although
some others are better suited to be left for extenders.
To avoid digging further on this without results (like has already
happened) and spending a ton of time on something that maybe will not even
be ever executed, I think we could start from one point and continue from
there, firstly selecting a potential templating engine to normalize all
emails structure feels a great feature for me.
Also, I've been thinking a lot lately on the idea of encapsulating WP_Mail
into a class, specially for testing purposes. Nowadays, as a pluggable is
a complete mess. But here we have two topics in the table, as I say, one a
time is the right way to proceed.
I would like to review your patch for this specific task, and probably
open a new report just to approach this. If we can manage to make this
happen, we could move into further improvement as the ones suggested
afterwards, one at a time. Anyway, I want to hear about other WP members
opinions on templating. Currently, only JavaScript microtemplating is
being used for many of the admin interfaces.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/49661#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list