From af92eb9142faf69fecba8a23645321b8992939a4 Mon Sep 17 00:00:00 2001 From: Mark Jaquith 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: https://develop.svn.wordpress.org/trunk@5017 602fd350-edb4-49c9-b593-d223f7449a82 --- 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)) )