Ticket #25239: 25239.3.diff
File 25239.3.diff, 2.7 KB (added by , 4 years ago) |
---|
-
src/wp-includes/ms-functions.php
952 952 $admin_email = get_site_option( 'admin_email' ); 953 953 954 954 if ( '' === $admin_email ) { 955 $admin_email = 'support@' . $_SERVER['SERVER_NAME'];955 $admin_email = 'support@' . wp_parse_url( network_home_url(), PHP_URL_HOST ); 956 956 } 957 957 958 958 $from_name = ( '' !== get_site_option( 'site_name' ) ) ? esc_html( get_site_option( 'site_name' ) ) : 'WordPress'; … … 1079 1079 $admin_email = get_site_option( 'admin_email' ); 1080 1080 1081 1081 if ( '' === $admin_email ) { 1082 $admin_email = 'support@' . $_SERVER['SERVER_NAME'];1082 $admin_email = 'support@' . wp_parse_url( network_home_url(), PHP_URL_HOST ); 1083 1083 } 1084 1084 1085 1085 $from_name = ( '' !== get_site_option( 'site_name' ) ) ? esc_html( get_site_option( 'site_name' ) ) : 'WordPress'; … … 1663 1663 $admin_email = get_site_option( 'admin_email' ); 1664 1664 1665 1665 if ( '' === $admin_email ) { 1666 $admin_email = 'support@' . $_SERVER['SERVER_NAME'];1666 $admin_email = 'support@' . wp_parse_url( network_home_url(), PHP_URL_HOST ); 1667 1667 } 1668 1668 1669 1669 $from_name = ( '' !== get_site_option( 'site_name' ) ) ? esc_html( get_site_option( 'site_name' ) ) : 'WordPress'; … … 1755 1755 $admin_email = get_site_option( 'admin_email' ); 1756 1756 1757 1757 if ( '' === $admin_email ) { 1758 $admin_email = 'support@' . $_SERVER['SERVER_NAME'];1758 $admin_email = 'support@' . wp_parse_url( network_home_url(), PHP_URL_HOST ); 1759 1759 } 1760 1760 1761 1761 $from_name = ( '' !== get_site_option( 'site_name' ) ) ? esc_html( get_site_option( 'site_name' ) ) : 'WordPress'; -
src/wp-includes/pluggable.php
330 330 */ 331 331 if ( ! isset( $from_email ) ) { 332 332 // Get the site domain and get rid of www. 333 $sitename = strtolower( $_SERVER['SERVER_NAME']);333 $sitename = wp_parse_url( network_home_url(), PHP_URL_HOST ); 334 334 if ( 'www.' === substr( $sitename, 0, 4 ) ) { 335 335 $sitename = substr( $sitename, 4 ); 336 336 } … … 1650 1650 $notify_message .= sprintf( __( 'Spam it: %s' ), admin_url( "comment.php?action=spam&c={$comment->comment_ID}#wpbody-content" ) ) . "\r\n"; 1651 1651 } 1652 1652 1653 $wp_email = 'wordpress@' . preg_replace( '#^www\.#', '', strtolower( $_SERVER['SERVER_NAME']) );1653 $wp_email = 'wordpress@' . preg_replace( '#^www\.#', '', wp_parse_url( network_home_url(), PHP_URL_HOST ) ); 1654 1654 1655 1655 if ( '' === $comment->comment_author ) { 1656 1656 $from = "From: \"$blogname\" <$wp_email>"; … … 2831 2831 return $r; 2832 2832 } 2833 2833 endif; 2834