Ticket #25239: pluggable.php.2.diff
File pluggable.php.2.diff, 441 bytes (added by , 8 years ago) |
---|
Line | |
---|---|
1 | 325,331c325,326 |
2 | < // Get the site domain and get rid of www. |
3 | < $sitename = strtolower( $_SERVER['SERVER_NAME'] ); |
4 | < if ( substr( $sitename, 0, 4 ) == 'www.' ) { |
5 | < $sitename = substr( $sitename, 4 ); |
6 | < } |
7 | < |
8 | < $from_email = 'wordpress@' . $sitename; |
9 | --- |
10 | > $dom = parse_url( get_home_url( get_current_blog_id() ), PHP_URL_HOST ); |
11 | > $from_email = 'wordpress@' . preg_replace("/^.*?([^\.]+)\.([^\.]+)$/", "$1.$2", $dom); |
12 | 333a329 |
13 | > |