Changeset 12598 for trunk/wp-includes/rewrite.php
- Timestamp:
- 01/04/2010 05:23:29 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/rewrite.php
r12520 r12598 257 257 258 258 // Add 'www.' if it is absent and should be there 259 if ( false !== strpos( get_option('home'), '://www.') && false === strpos($url, '://www.') )259 if ( false !== strpos(home_url(), '://www.') && false === strpos($url, '://www.') ) 260 260 $url = str_replace('://', '://www.', $url); 261 261 262 262 // Strip 'www.' if it is present and shouldn't be 263 if ( false === strpos( get_option('home'), '://www.') )263 if ( false === strpos(home_url(), '://www.') ) 264 264 $url = str_replace('://www.', '://', $url); 265 265 … … 268 268 $url = str_replace('index.php/', '', $url); 269 269 270 if ( false !== strpos($url, get_option('home')) ) {270 if ( false !== strpos($url, home_url()) ) { 271 271 // Chop off http://domain.com 272 $url = str_replace( get_option('home'), '', $url);272 $url = str_replace(home_url(), '', $url); 273 273 } else { 274 274 // Chop off /path/to/blog 275 $home_path = parse_url( get_option('home'));275 $home_path = parse_url(home_url()); 276 276 $home_path = $home_path['path']; 277 277 $url = str_replace($home_path, '', $url); … … 1646 1646 } 1647 1647 1648 $home_root = parse_url( get_option('home'));1648 $home_root = parse_url(home_url()); 1649 1649 if ( isset( $home_root['path'] ) ) { 1650 1650 $home_root = trailingslashit($home_root['path']);
Note: See TracChangeset
for help on using the changeset viewer.