From aa45fd5ee3d12bce873bbe83cb15c5dbad280b98 Mon Sep 17 00:00:00 2001 From: markjaquith Date: Sat, 10 Mar 2007 05:54:12 +0000 Subject: [PATCH] Respect user trailing slash preference for multipage posts and eliminate redundant /1/. fixes #3949 git-svn-id: http://svn.automattic.com/wordpress/trunk@5017 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/post-template.php | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/wp-includes/post-template.php b/wp-includes/post-template.php index cfa56f8e85..10636fe7bc 100644 --- a/wp-includes/post-template.php +++ b/wp-includes/post-template.php @@ -155,10 +155,17 @@ function wp_link_pages($args = '') { $j = str_replace('%',"$i",$pagelink); $output .= ' '; if ( ($i != $page) || ((!$more) && ($page==1)) ) { - if ( '' == get_option('permalink_structure') ) - $output .= ''; - else - $output .= ''; + if ( '' == get_option('permalink_structure') ) { + if ( $i == 1 ) + $output .= ''; + else + $output .= ''; + } else { + if ( $i == 1 ) + $output .= ''; + else + $output .= ''; + } } $output .= $j; if ( ($i != $page) || ((!$more) && ($page==1)) )