179 | | if ( 'number' == $next_or_number ) { |
180 | | $output .= $before; |
| 179 | $output .= $before; |
| 180 | if( 'next' == $next_or_number || 'next_and_number' == $next_or_number ) { |
| 181 | $i = $page - 1; |
| 182 | if ( $i && $more ) { |
| 183 | if ( 1 == $i ) { |
| 184 | $output .= '<a href="' . get_permalink() . '">' . $previouspagelink . '</a>'; |
| 185 | } else { |
| 186 | if ( '' == get_option('permalink_structure') || in_array($post->post_status, array('draft', 'pending')) ) |
| 187 | $output .= '<a href="' . get_permalink() . '&page=' . $i . '">' . $previouspagelink . '</a>'; |
| 188 | else |
| 189 | $output .= '<a href="' . trailingslashit(get_permalink()) . user_trailingslashit($i, 'single_paged') . '">' . $previouspagelink . '</a>'; |
| 190 | } |
| 191 | } |
| 192 | } |
| 193 | if ( 'number' == $next_or_number || 'next_and_number' == $next_or_number ) { |
198 | | $output .= $after; |
199 | | } else { |
200 | | if ( $more ) { |
201 | | $output .= $before; |
202 | | $i = $page - 1; |
203 | | if ( $i && $more ) { |
204 | | if ( 1 == $i ) { |
205 | | $output .= '<a href="' . get_permalink() . '">' . $previouspagelink . '</a>'; |
206 | | } else { |
207 | | if ( '' == get_option('permalink_structure') || in_array($post->post_status, array('draft', 'pending')) ) |
208 | | $output .= '<a href="' . get_permalink() . '&page=' . $i . '">' . $previouspagelink . '</a>'; |
209 | | else |
210 | | $output .= '<a href="' . trailingslashit(get_permalink()) . user_trailingslashit($i, 'single_paged') . '">' . $previouspagelink . '</a>'; |
211 | | } |
| 211 | |
| 212 | } |
| 213 | if( 'next' == $next_or_number || 'next_and_number' == $next_or_number ) { |
| 214 | $i = $page + 1; |
| 215 | if ( $i <= $numpages && $more ) { |
| 216 | if ( 1 == $i ) { |
| 217 | $output .= '<a href="' . get_permalink() . '">' . $nextpagelink . '</a>'; |
| 218 | } else { |
| 219 | if ( '' == get_option('permalink_structure') || in_array($post->post_status, array('draft', 'pending')) ) |
| 220 | $output .= '<a href="' . get_permalink() . '&page=' . $i . '">' . $nextpagelink . '</a>'; |
| 221 | else |
| 222 | $output .= '<a href="' . trailingslashit(get_permalink()) . user_trailingslashit($i, 'single_paged') . '">' . $nextpagelink . '</a>'; |