Changeset 5713 for branches/2.2/wp-includes/general-template.php
- Timestamp:
- 06/15/2007 05:35:56 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2/wp-includes/general-template.php
r5625 r5713 958 958 } 959 959 960 function paginate_links( $arg = '' ) { 961 if ( is_array($arg) ) 962 $a = &$arg; 963 else 964 parse_str($arg, $a); 965 966 // Defaults 967 $base = '%_%'; // http://example.com/all_posts.php%_% : %_% is replaced by format (below) 968 $format = '?page=%#%'; // ?page=%#% : %#% is replaced by the page number 969 $total = 1; 970 $current = 0; 971 $show_all = false; 972 $prev_next = true; 973 $prev_text = __('« Previous'); 974 $next_text = __('Next »'); 975 $end_size = 1; // How many numbers on either end including the end 976 $mid_size = 2; // How many numbers to either side of current not including current 977 $type = 'plain'; 978 $add_args = false; // array of query args to aadd 979 980 extract($a); 960 function paginate_links( $args = '' ) { 961 $defaults = array( 962 'base' => '%_%', // http://example.com/all_posts.php%_% : %_% is replaced by format (below) 963 'format' => '?page=%#%', // ?page=%#% : %#% is replaced by the page number 964 'total' => 1, 965 'current' => 0, 966 'show_all' => false, 967 'prev_next' => true, 968 'prev_text' => __('« Previous'), 969 'next_text' => __('Next »'), 970 'end_size' => 1, // How many numbers on either end including the end 971 'mid_size' => 2, // How many numbers to either side of current not including current 972 'type' => 'plain', 973 'add_args' => false // array of query args to aadd 974 ); 975 976 $args = wp_parse_args( $args, $defaults ); 977 extract($args, EXTR_SKIP); 981 978 982 979 // Who knows what else people pass in $args
Note: See TracChangeset
for help on using the changeset viewer.