diff --git a/src/bp-core/bp-core-filters.php b/src/bp-core/bp-core-filters.php
index e033972..ee21e41 100644
a
|
b
|
function bp_core_menu_highlight_nav_menu_item( $retval, $item ) { |
243 | 243 | add_filter( 'nav_menu_css_class', 'bp_core_menu_highlight_nav_menu_item', 10, 2 ); |
244 | 244 | |
245 | 245 | /** |
| 246 | * Set "From" name in outgoing email to the site name. |
| 247 | * |
| 248 | * @since 1.0.0 |
| 249 | * |
| 250 | * @return string The blog name for the root blog. |
| 251 | */ |
| 252 | function bp_core_email_from_name_filter() { |
| 253 | _deprecated_function( __FUNCTION__, '2.5' ); |
| 254 | |
| 255 | /** |
| 256 | * Filters the "From" name in outgoing email to the site name. |
| 257 | * |
| 258 | * @since 1.2.0 |
| 259 | * |
| 260 | * @param string $value Value to set the "From" name to. |
| 261 | */ |
| 262 | return apply_filters( 'bp_core_email_from_name_filter', bp_get_option( 'blogname', 'WordPress' ) ); |
| 263 | } |
| 264 | add_filter( 'wp_mail_from_name', 'bp_core_email_from_name_filter' ); |
| 265 | |
| 266 | /** |
246 | 267 | * Filter the blog post comments array and insert BuddyPress URLs for users. |
247 | 268 | * |
248 | 269 | * @since 1.2.0 |
diff --git a/src/bp-core/classes/class-bp-email.php b/src/bp-core/classes/class-bp-email.php
index f4de900..3b50be9 100644
a
|
b
|
class BP_Email { |
171 | 171 | $domain = 'localhost.localdomain'; |
172 | 172 | } |
173 | 173 | |
174 | | // This was escaped with esc_html on the way into the database in sanitize_option(). |
175 | | $from_name = wp_specialchars_decode( bp_get_option( 'blogname' ), ENT_QUOTES ); |
176 | | $from_address = "wordpress@$domain"; |
177 | | |
178 | 174 | /** This filter is documented in wp-includes/pluggable.php */ |
179 | | $from_address = apply_filters( 'wp_mail_from', $from_address ); |
| 175 | $from_address = apply_filters( 'wp_mail_from', "wordpress@$domain" ); |
180 | 176 | |
| 177 | // This was escaped with esc_html on the way into the database in sanitize_option(). |
181 | 178 | /** This filter is documented in wp-includes/pluggable.php */ |
182 | | $from_name = apply_filters( 'wp_mail_from_name', $from_name ); |
| 179 | $from_name = wp_specialchars_decode( apply_filters( 'wp_mail_from_name', 'WordPress' ), ENT_QUOTES ); |
183 | 180 | |
184 | 181 | $this->set_from( $from_address, $from_name ); |
185 | 182 | $this->set_reply_to( bp_get_option( 'admin_email' ), $from_name ); |
diff --git a/src/bp-core/deprecated/2.5.php b/src/bp-core/deprecated/2.5.php
index 8656353..bcea2d2 100644
a
|
b
|
|
9 | 9 | defined( 'ABSPATH' ) || exit; |
10 | 10 | |
11 | 11 | /** |
12 | | * Set "From" name in outgoing email to the site name. |
13 | | * |
14 | | * @since 1.0.0 |
15 | | * @deprecated 2.5.0 Not used. Was hooked to WordPress' "wp_mail_from_name" action. |
16 | | * Use the "bp_email_get_from" action instead. |
17 | | * |
18 | | * @return string The blog name for the root blog. |
19 | | */ |
20 | | function bp_core_email_from_name_filter() { |
21 | | _deprecated_function( __FUNCTION__, '2.5' ); |
22 | | |
23 | | /** |
24 | | * Filters the "From" name in outgoing email to the site name. |
25 | | * |
26 | | * @since 1.2.0 |
27 | | * @deprecated 2.5.0 Not used. |
28 | | * |
29 | | * @param string $value Value to set the "From" name to. |
30 | | */ |
31 | | return apply_filters( 'bp_core_email_from_name_filter', bp_get_option( 'blogname', 'WordPress' ) ); |
32 | | } |
33 | | |
34 | | /** |
35 | 12 | * Add support for pre-2.5 email filters. |
36 | 13 | * |
37 | 14 | * @since 2.5.0 |