if ( is_front_page() ) { $redirect_url .=
user_trailingslashit( "
$wp_rewrite->pagination_base/
$page", 'paged'
);
} else { $redirect_url .=
user_trailingslashit( $page, 'single_paged'
);
} } $redirect['query'
] =
remove_query_arg( 'page',
$redirect['query'
] );
} if ( get_query_var( 'sitemap'
) ) { $redirect_url =
get_sitemap_url( get_query_var( 'sitemap'
),
get_query_var( 'sitemap-subtype'
),
get_query_var( 'paged'
) );
$redirect['query'
] =
remove_query_arg( array
( 'sitemap', 'sitemap-subtype', 'paged'
),
$redirect['query'
] );
} elseif ( get_query_var( 'paged'
) ||
is_feed() ||
get_query_var( 'cpage'
) ) { // Paging and feeds.
$paged =
get_query_var( 'paged'
);
$feed =
get_query_var( 'feed'
);
$cpage =
get_query_var( 'cpage'
);
while ( preg_match( "#/
$wp_rewrite->pagination_base/?[0-9]+?(/+)?$#",
$redirect['path'
] ) ||
preg_match( '#/(comments/?)?(feed|rss2?|rdf|atom)(/+)?$#',
$redirect['path'
] ) ||
preg_match( "#/{
$wp_rewrite->comments_pagination_base
}-[0-9]+(/+)?$#",
$redirect['path'
] ) ) {