Changeset 21797
- Timestamp:
- 09/10/2012 07:37:08 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/functions.php
r21681 r21797 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, '/');
Note: See TracChangeset
for help on using the changeset viewer.