<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[BuddyPress][12353] trunk/src: Emails: Improve performance when setting Reply-To and From headers.</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { white-space: pre-line; overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="http://buddypress.trac.wordpress.org/changeset/12353">12353</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"http://buddypress.trac.wordpress.org/changeset/12353","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>boonebgorges</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2019-03-06 16:31:35 +0000 (Wed, 06 Mar 2019)</dd>
</dl>
<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>Emails: Improve performance when setting Reply-To and From headers.
The new `BP_Email_Participant` framework allows the Reply-To and From email
headers to be set without requiring an empty and potentially expensive WP
user lookup.
Fixes <a href="http://buddypress.trac.wordpress.org/ticket/8003">#8003</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcbpcoreclassesclassbpemailrecipientphp">trunk/src/bp-core/classes/class-bp-email-recipient.php</a></li>
<li><a href="#trunksrcbpcoreclassesclassbpemailphp">trunk/src/bp-core/classes/class-bp-email.php</a></li>
<li><a href="#trunksrcclassbuddypressphp">trunk/src/class-buddypress.php</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunksrcbpcoreclassesclassbpemailaddressphp">trunk/src/bp-core/classes/class-bp-email-address.php</a></li>
<li><a href="#trunksrcbpcoreclassesclassbpemailparticipantphp">trunk/src/bp-core/classes/class-bp-email-participant.php</a></li>
<li><a href="#trunksrcbpcoreclassesclassbpemailsenderphp">trunk/src/bp-core/classes/class-bp-email-sender.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcbpcoreclassesclassbpemailaddressphp"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: trunk/src/bp-core/classes/class-bp-email-address.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/bp-core/classes/class-bp-email-address.php (rev 0)
+++ trunk/src/bp-core/classes/class-bp-email-address.php 2019-03-06 16:31:35 UTC (rev 12353)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,40 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<?php
+/**
+ * Interface for objects that have email address properties (address, name).
+ *
+ * @since 5.0.0
+ */
+
+interface BP_Email_Address {
+ /**
+ * Gets the email address of the user.
+ *
+ * @since 5.0.0
+ */
+ public function get_address();
+
+ /**
+ * Gets the display name of the user.
+ *
+ * @since 5.0.0
+ */
+ public function get_name();
+
+ /**
+ * Sets the email address of the user.
+ *
+ * @since 5.0.0
+ *
+ * @param string $email_address Email address.
+ */
+ public function set_address( $email_address );
+
+ /**
+ * Sets the name of the user.
+ *
+ * @since 5.0.0
+ *
+ * @param string $name Name.
+ */
+ public function set_name( $name );
+}
</ins></span></pre></div>
<a id="trunksrcbpcoreclassesclassbpemailparticipantphp"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: trunk/src/bp-core/classes/class-bp-email-participant.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/bp-core/classes/class-bp-email-participant.php (rev 0)
+++ trunk/src/bp-core/classes/class-bp-email-participant.php 2019-03-06 16:31:35 UTC (rev 12353)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,84 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<?php
+/**
+ * Base class for email "participants" (recipient, sender, Reply-To, etc).
+ *
+ * @since 5.0.0
+ */
+
+abstract class BP_Email_Participant implements BP_Email_Address {
+ /**
+ * Recipient's email address.
+ *
+ * @since 5.0.0
+ *
+ * @var string
+ */
+ protected $address = '';
+
+ /**
+ * Recipient's name.
+ *
+ * @since 5.0.0
+ *
+ * @var string
+ */
+ protected $name = '';
+
+ /**
+ * Gets the email address of the user.
+ *
+ * @since 5.0.0
+ */
+ public function get_address() {
+ /**
+ * Filters an email user's address before it's returned.
+ *
+ * @since 5.0.0
+ *
+ * @param string $address User's address.
+ * @param BP_Email_User $user Current instance of the email user class.
+ */
+ return apply_filters( 'bp_email_user_get_address', $this->address, $this );
+ }
+
+ /**
+ * Gets the email name of the user.
+ *
+ * @since 5.0.0
+ *
+ * @return string
+ */
+ public function get_name() {
+ /**
+ * Filters an email user's name before it's returned.
+ *
+ * @since 5.0.0
+ *
+ * @param string $name Recipient's name.
+ * @param BP_Email_User $user Current instance of the email user class.
+ */
+ return apply_filters( 'bp_email_recipient_get_name', $this->name, $this );
+ }
+
+ /**
+ * Sets the email address of the user.
+ *
+ * @since 5.0.0
+ *
+ * @param string $email_address Email address.
+ */
+ public function set_address( $email_address ) {
+ $this->address = $email_address;
+ }
+
+ /**
+ * Sets the name of the user.
+ *
+ * @since 5.0.0
+ *
+ * @param string $name Name.
+ */
+ public function set_name( $name ) {
+ $this->name = $name;
+ }
+}
</ins></span></pre></div>
<a id="trunksrcbpcoreclassesclassbpemailrecipientphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/bp-core/classes/class-bp-email-recipient.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/bp-core/classes/class-bp-email-recipient.php 2019-03-04 23:20:50 UTC (rev 12352)
+++ trunk/src/bp-core/classes/class-bp-email-recipient.php 2019-03-06 16:31:35 UTC (rev 12353)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -14,27 +14,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 2.5.0
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-class BP_Email_Recipient {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+class BP_Email_Recipient extends BP_Email_Participant {
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Recipient's email address.
- *
- * @since 2.5.0
- *
- * @var string
- */
- protected $address = '';
-
- /**
- * Recipient's name.
- *
- * @since 2.5.0
- *
- * @var string
- */
- protected $name = '';
-
- /**
</del><span class="cx" style="display: block; padding: 0 10px"> * Optional. A `WP_User` object relating to this recipient.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 2.5.0
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -88,7 +70,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Set address if we have one.
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! empty( $address ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->address = sanitize_email( $address );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->set_address( sanitize_email( $address ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Still no user object; try to query user by email address.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -101,14 +83,14 @@
</span><span class="cx" style="display: block; padding: 0 10px"> // This is escaped with esc_html in bp_core_get_user_displayname()
</span><span class="cx" style="display: block; padding: 0 10px"> $wp_name = wp_specialchars_decode( bp_core_get_user_displayname( $this->user_object->ID ), ENT_QUOTES );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->address = $this->user_object->user_email;
- $this->name = sanitize_text_field( $wp_name );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->set_address( $this->user_object->user_email );
+ $this->set_name( $wp_name );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Custom name override.
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $name ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->name = $name;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->set_name( $name );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -132,6 +114,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @return string
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function get_address() {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $address = parent::get_address();
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Filters the recipient's address before it's returned.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -138,10 +121,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 2.5.0
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param string $address Recipient's address.
- * @param BP_Email $recipient $this Current instance of the email recipient class.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param string $address Recipient's address.
+ * @param BP_Email_Recipient $recipient Current instance of the email recipient class.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- return apply_filters( 'bp_email_recipient_get_address', $this->address, $this );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ return apply_filters( 'bp_email_recipient_get_address', $address, $this );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -152,6 +135,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @return string
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function get_name() {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $name = parent::get_name();
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Filters the recipient's name before it's returned.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -158,10 +142,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 2.5.0
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param string $name Recipient's name.
- * @param BP_Email $recipient $this Current instance of the email recipient class.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param string $name Recipient's name.
+ * @param BP_Email_Recipient $recipient Current instance of the email recipient class.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- return apply_filters( 'bp_email_recipient_get_name', $this->name, $this );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ return apply_filters( 'bp_email_recipient_get_name', $name, $this );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span></span></pre></div>
<a id="trunksrcbpcoreclassesclassbpemailsenderphp"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: trunk/src/bp-core/classes/class-bp-email-sender.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/bp-core/classes/class-bp-email-sender.php (rev 0)
+++ trunk/src/bp-core/classes/class-bp-email-sender.php 2019-03-06 16:31:35 UTC (rev 12353)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,8 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<?php
+/**
+ * Email sender object (From, Reply-To).
+ *
+ * @since 5.0.0
+ */
+
+class BP_Email_Sender extends BP_Email_Participant {}
</ins></span></pre></div>
<a id="trunksrcbpcoreclassesclassbpemailphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/bp-core/classes/class-bp-email.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/bp-core/classes/class-bp-email.php 2019-03-04 23:20:50 UTC (rev 12352)
+++ trunk/src/bp-core/classes/class-bp-email.php 2019-03-06 16:31:35 UTC (rev 12353)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -65,7 +65,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 2.5.0
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @var BP_Email_Recipient Sender details.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @var BP_Email_Sender Sender details.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> protected $from = null;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -101,7 +101,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 2.5.0
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @var BP_Email_Recipient "Reply to" details.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @var BP_Email_Sender "Reply to" details.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> protected $reply_to = null;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -430,7 +430,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $transform Optional. How to transform the return value.
</span><span class="cx" style="display: block; padding: 0 10px"> * Accepts 'raw' (default) or 'replace-tokens'.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @return BP_Email_Recipient "From" recipient.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @return BP_Email_Sender "From" recipient.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function get_from( $transform = 'raw' ) {
</span><span class="cx" style="display: block; padding: 0 10px"> return $this->get( 'from', $transform );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -738,8 +738,11 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @return BP_Email
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function set_from( $email_address, $name = '' ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $from = new BP_Email_Recipient( $email_address, $name );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $from = new BP_Email_Sender();
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $from->set_address( $email_address );
+ $from->set_name( $name );
+
</ins><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Filters the new value of the email's "from" property.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -810,8 +813,11 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @return BP_Email
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function set_reply_to( $email_address, $name = '' ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $reply_to = new BP_Email_Recipient( $email_address, $name );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $reply_to = new BP_Email_Sender();
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $reply_to->set_address( $email_address );
+ $reply_to->set_name( $name );
+
</ins><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Filters the new value of the email's "reply to" property.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span></span></pre></div>
<a id="trunksrcclassbuddypressphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/class-buddypress.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/class-buddypress.php 2019-03-04 23:20:50 UTC (rev 12352)
+++ trunk/src/class-buddypress.php 2019-03-06 16:31:35 UTC (rev 12353)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -555,7 +555,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'BP_Customizer_Control_Range' => 'core',
</span><span class="cx" style="display: block; padding: 0 10px"> 'BP_Date_Query' => 'core',
</span><span class="cx" style="display: block; padding: 0 10px"> 'BP_Email_Delivery' => 'core',
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'BP_Email_Address' => 'core',
</ins><span class="cx" style="display: block; padding: 0 10px"> 'BP_Email_Recipient' => 'core',
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'BP_Email_Sender' => 'core',
+ 'BP_Email_Participant' => 'core',
</ins><span class="cx" style="display: block; padding: 0 10px"> 'BP_Email' => 'core',
</span><span class="cx" style="display: block; padding: 0 10px"> 'BP_Embed' => 'core',
</span><span class="cx" style="display: block; padding: 0 10px"> 'BP_Media_Extractor' => 'core',
</span></span></pre>
</div>
</div>
</body>
</html>