Make WordPress Core

Ticket #25239: pluggable.php.diff

File pluggable.php.diff, 700 bytes (added by mt8.biz, 8 years ago)
  • pluggable.php

    # This patch can be applied using context Tools: Patch action on respective folder.
    # It uses platform neutral UTF-8 encoding and \n newlines.
    # Above lines and this line are ignored by the patching process.
     
    323323
    324324        if ( !isset( $from_email ) ) {
    325325                // Get the site domain and get rid of www.
    326                 $sitename = strtolower( $_SERVER['SERVER_NAME'] );
     326                $server_name = parse_url( get_home_url( get_current_blog_id() ), PHP_URL_HOST );
     327                $sitename = strtolower( $server_name );
    327328                if ( substr( $sitename, 0, 4 ) == 'www.' ) {
    328329                        $sitename = substr( $sitename, 4 );
    329330                }