From 4292b0af363ee1203508e63425ebcdddb5200853 Mon Sep 17 00:00:00 2001 From: Mark Jaquith Date: Mon, 10 Sep 2007 15:06:21 +0000 Subject: [PATCH] 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 --- wp-includes/link-template.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wp-includes/link-template.php b/wp-includes/link-template.php index 9c123250dd..6182729ced 100644 --- a/wp-includes/link-template.php +++ b/wp-includes/link-template.php @@ -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/'; }