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:
markjaquith 2007-09-10 15:06:21 +00:00
parent 7931d5eca5
commit d59743c972

View File

@ -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/';
}