[wp-trac] [WordPress Trac] #35069: Allow short-circuiting wp_mail
WordPress Trac
noreply at wordpress.org
Tue Sep 26 13:25:03 UTC 2017
#35069: Allow short-circuiting wp_mail
-------------------------------------------------+-------------------------
Reporter: DvanKooten | Owner:
Type: enhancement | Status: assigned
Priority: low | Milestone: Future
Component: Mail | Release
Severity: normal | Version:
Keywords: has-patch has-unit-tests needs- | Resolution:
refresh | Focuses:
-------------------------------------------------+-------------------------
Comment (by Mte90):
I am trying to understand what are the next steps to improve that patch
but I didn't got it.
Actually if the filter return false is fine, `wp_mail` works without issue
but if there are other values `wp_mail` stop and return that value.
So if an alternative mailer wants to add a different behaviour can hook in
that filter and can return everything. Only false is not allowed but the
alternative mailer needs to sent also that value.
In the docs of the filter we are talking of a Trusthy value so it can be a
boolean or not. Using `null` as suggested can help the dev to output the
status that he prefer like `true` or `false` and we don't have any issue
because the alternative mailer can handle as it prefer.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35069#comment:26>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list