Changeset 15582 for trunk/wp-includes/canonical.php
- Timestamp:
- 09/07/2010 01:18:42 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/canonical.php
r15462 r15582 192 192 $redirect_url = $requested_url; 193 193 $paged_redirect = @parse_url($redirect_url); 194 while ( preg_match( '#/page/?[0-9]+?(/+)?$#', $paged_redirect['path'] ) || preg_match( '#/(comments/?)?(feed|rss|rdf|atom|rss2)(/+)?$#', $paged_redirect['path'] ) || preg_match( '#/comment-page-[0-9]+(/+)?$#', $paged_redirect['path'] ) ) {194 while ( preg_match( "#/$wp_rewrite->pagination_base/?[0-9]+?(/+)?$#", $paged_redirect['path'] ) || preg_match( '#/(comments/?)?(feed|rss|rdf|atom|rss2)(/+)?$#', $paged_redirect['path'] ) || preg_match( '#/comment-page-[0-9]+(/+)?$#', $paged_redirect['path'] ) ) { 195 195 // Strip off paging and feed 196 $paged_redirect['path'] = preg_replace( '#/page/?[0-9]+?(/+)?$#', '/', $paged_redirect['path']); // strip off any existing paging196 $paged_redirect['path'] = preg_replace("#/$wp_rewrite->pagination_base/?[0-9]+?(/+)?$#", '/', $paged_redirect['path']); // strip off any existing paging 197 197 $paged_redirect['path'] = preg_replace('#/(comments/?)?(feed|rss2?|rdf|atom)(/+|$)#', '/', $paged_redirect['path']); // strip off feed endings 198 198 $paged_redirect['path'] = preg_replace('#/comment-page-[0-9]+?(/+)?$#', '/', $paged_redirect['path']); // strip off any existing comment paging … … 213 213 if ( !is_feed() ) { 214 214 if ( $paged > 1 && !is_single() ) { 215 $addl_path = ( !empty( $addl_path ) ? trailingslashit($addl_path) : '' ) . user_trailingslashit(" page/$paged", 'paged');215 $addl_path = ( !empty( $addl_path ) ? trailingslashit($addl_path) : '' ) . user_trailingslashit("$wp_rewrite->pagination_base/$paged", 'paged'); 216 216 } elseif ( !is_single() ) { 217 217 $addl_path = !empty( $addl_path ) ? trailingslashit($addl_path) : '';
Note: See TracChangeset
for help on using the changeset viewer.