Changeset 25258
- Timestamp:
- 09/05/2013 05:28:52 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rewrite.php
r24812 r25258 325 325 $url = str_replace( $wp_rewrite->index . '/', '', $url ); 326 326 327 if ( false !== strpos( $url, home_url()) ) {328 // Chop off http://domain.com 327 if ( false !== strpos( trailingslashit( $url ), home_url( '/' ) ) ) { 328 // Chop off http://domain.com/[path] 329 329 $url = str_replace(home_url(), '', $url); 330 330 } else { 331 331 // Chop off /path/to/blog 332 $home_path = parse_url( home_url());332 $home_path = parse_url( home_url( '/' ) ); 333 333 $home_path = isset( $home_path['path'] ) ? $home_path['path'] : '' ; 334 $url = str_replace($home_path, '', $url);334 $url = preg_replace( sprintf( '#^%s#', preg_quote( $home_path ) ), '', trailingslashit( $url ) ); 335 335 } 336 336
Note: See TracChangeset
for help on using the changeset viewer.