Ticket #20759: 20759.2.diff
File 20759.2.diff, 806 bytes (added by , 12 years ago) |
---|
-
wp-includes/functions.php
2981 2981 * @return string 2982 2982 */ 2983 2983 function wp_guess_url() { 2984 if ( defined('WP_SITEURL') && '' != WP_SITEURL ) 2984 if ( defined('WP_SITEURL') && '' != WP_SITEURL ) { 2985 2985 $url = WP_SITEURL; 2986 else 2987 $url = set_url_scheme( preg_replace( '#/(wp-admin/.*|wp-login.php)#i', '', 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] ) ); 2986 } else { 2987 $schema = is_ssl() ? 'https://' : 'http://'; // set_url_scheme() is not defined yet 2988 $url = preg_replace( '#/(wp-admin/.*|wp-login.php)#i', '', $schema . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] ); 2989 } 2988 2990 2989 2991 return rtrim($url, '/'); 2990 2992 }