Changeset 5642
- Timestamp:
- 03/17/2015 03:18:31 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/common/functions.php
r5640 r5642 1007 1007 * using `admin_email` instead, though this is not normally publicized. 1008 1008 * 1009 * We use `$_SERVER['SERVER_NAME']` here to mimic similar functionality in 1010 * WordPress core. Previously, we used `get_home_url()` to use already validated 1011 * user input, but it was causing issues in some installations. 1012 * 1009 1013 * @since bbPress (r5409) 1010 1014 * 1015 * @see wp_mail 1016 * @see wp_notify_postauthor 1017 * @link https://bbpress.trac.wordpress.org/ticket/2618 1018 * 1011 1019 * @return string 1012 1020 */ 1013 1021 function bbp_get_do_not_reply_address() { 1014 $email = 'noreply@' . preg_replace( '@^https?://(www\.)?@i', '', get_home_url() ); 1015 return apply_filters( 'bbp_get_do_not_reply_address', $email ); 1022 $sitename = strtolower( $_SERVER['SERVER_NAME'] ); 1023 if ( substr( $sitename, 0, 4 ) === 'www.' ) { 1024 $sitename = substr( $sitename, 4 ); 1025 } 1026 return apply_filters( 'bbp_get_do_not_reply_address', 'noreply@' . $sitename ); 1016 1027 } 1017 1028
Note: See TracChangeset
for help on using the changeset viewer.