mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
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: http://svn.automattic.com/wordpress/trunk@6068 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
7931d5eca5
commit
d59743c972
@ -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
Block a user