Fix get_pagenum_link() for query strings. fixes #3930
git-svn-id: http://svn.automattic.com/wordpress/trunk@5610 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
fb2f7fb6b0
commit
544f18ce7d
|
@ -474,8 +474,6 @@ function get_pagenum_link($pagenum = 1) {
|
||||||
$result = $base . $request;
|
$result = $base . $request;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$request = preg_replace( '|/?page/(.+)/?$|', '', $request);
|
|
||||||
|
|
||||||
$qs_regex = '|\?.*?$|';
|
$qs_regex = '|\?.*?$|';
|
||||||
preg_match( $qs_regex, $request, $qs_match );
|
preg_match( $qs_regex, $request, $qs_match );
|
||||||
|
|
||||||
|
@ -486,6 +484,8 @@ function get_pagenum_link($pagenum = 1) {
|
||||||
$query_string = '';
|
$query_string = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$request = preg_replace( '|/?page/(.+)/?$|', '', $request);
|
||||||
|
|
||||||
$base = trailingslashit( get_bloginfo( 'url' ) );
|
$base = trailingslashit( get_bloginfo( 'url' ) );
|
||||||
|
|
||||||
if ( $wp_rewrite->using_index_permalinks() && $pagenum > 1 ) {
|
if ( $wp_rewrite->using_index_permalinks() && $pagenum > 1 ) {
|
||||||
|
|
Loading…
Reference in New Issue