Strip index.php/ before adding it in get_pagenum_link(). Insert index.php/ for the first page when blog is on a page. fixes #4945
git-svn-id: https://develop.svn.wordpress.org/trunk@6068 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
cf23955caa
commit
4292b0af36
|
@ -491,10 +491,11 @@ function get_pagenum_link($pagenum = 1) {
|
|||
}
|
||||
|
||||
$request = preg_replace( '|page/(.+)/?$|', '', $request);
|
||||
$request = preg_replace( '|^index\.php/|', '', $request);
|
||||
|
||||
$base = trailingslashit( get_bloginfo( 'url' ) );
|
||||
|
||||
if ( $wp_rewrite->using_index_permalinks() && $pagenum > 1 ) {
|
||||
if ( $wp_rewrite->using_index_permalinks() && ( $pagenum > 1 || ( 'page' == get_option('show_on_front') && get_option('page_on_front') )) ) {
|
||||
$base .= 'index.php/';
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue