Make WordPress Core

Ticket #25239: pluggable.php.2.diff

File pluggable.php.2.diff, 441 bytes (added by tsimmons, 8 years ago)

Replaces domain part with the typical email domain for a site, which includes the last domain part + TLD

Line 
1325,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);
12333a329
13>