Changeset 6115
- Timestamp:
- 09/14/2007 07:41:23 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/canonical.php
r6112 r6115 73 73 $redirect_url = $requested_url; 74 74 $paged_redirect = @parse_url($redirect_url); 75 $paged_redirect['path'] = preg_replace('|/page/[0-9]+? /?$|', '/', $paged_redirect['path']); // strip off any existing paging75 $paged_redirect['path'] = preg_replace('|/page/[0-9]+?(/+)?$|', '/', $paged_redirect['path']); // strip off any existing paging 76 76 $paged_redirect['path'] = preg_replace('|/index.php/?$|', '/', $paged_redirect['path']); // strip off trailing /index.php/ 77 if ( $paged > 1 && !is_sing ular() ) {77 if ( $paged > 1 && !is_single() ) { 78 78 $paged_redirect['path'] = trailingslashit($paged_redirect['path']); 79 79 if ( $wp_rewrite->using_index_permalinks() && strpos($paged_redirect['path'], '/index.php/') === false ) 80 80 $paged_redirect['path'] .= 'index.php/'; 81 81 $paged_redirect['path'] .= user_trailingslashit("page/$paged", 'paged'); 82 } elseif ( !is_home() && !is_sing ular() ){82 } elseif ( !is_home() && !is_single() ){ 83 83 $paged_redirect['path'] = user_trailingslashit($paged_redirect['path'], 'paged'); 84 84 } … … 133 133 } 134 134 $redirect['path'] = user_trailingslashit($redirect['path'], $user_ts_type); 135 } elseif ( is_home() ) { 136 $redirect['path'] = trailingslashit($redirect['path']); 135 137 } 136 138
Note: See TracChangeset
for help on using the changeset viewer.