Changeset 4276 for trunk/wp-includes/general-template.php
- Timestamp:
- 10/03/2006 03:40:26 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/general-template.php
r4275 r4276 903 903 // Who knows what else people pass in $args 904 904 $total = (int) $total; 905 if ( $total < 2 ) 906 return; 905 907 $current = (int) $current; 906 908 $end_size = 0 < (int) $end_size ? (int) $end_size : 1; // Out of bounds? Make it the default. … … 913 915 914 916 if ( $prev_next && $current && 1 < $current ) : 915 $link = str_replace('%_%', 2 == $current ? '' : str_replace('%#%', $current - 1, $format), $base); 917 $link = str_replace('%_%', 2 == $current ? '' : $format, $base); 918 $link = str_replace('%#%', $current - 1, $link); 916 919 if ( $add_args ) 917 920 $link = add_query_arg( $add_args, $link ); … … 924 927 else : 925 928 if ( $show_all || ( $n <= $end_size || ( $current && $n >= $current - $mid_size && $n <= $current + $mid_size ) || $n > $total - $end_size ) ) : 926 $link = str_replace('%_%', 1 == $n ? '' : str_replace('%#%', $n, $format), $base); 929 $link = str_replace('%_%', 1 == $n ? '' : $format, $base); 930 $link = str_replace('%#%', $n, $link); 927 931 if ( $add_args ) 928 932 $link = add_query_arg( $add_args, $link ); … … 936 940 endfor; 937 941 if ( $prev_next && $current && ( $current < $total || -1 == $total ) ) : 938 $link = str_replace('%_%', str_replace('%#%', $current + 1, $format), $base); 942 $link = str_replace('%_%', $format, $base); 943 $link = str_replace('%#%', $current + 1, $link); 939 944 if ( $add_args ) 940 945 $link = add_query_arg( $add_args, $link );
Note: See TracChangeset
for help on using the changeset viewer.