Ticket #8632: 8632-pagination.diff
File 8632-pagination.diff, 784 bytes (added by , 16 years ago) |
---|
-
wp-admin/categories.php
166 166 $cats_per_page = 20; 167 167 $cats_per_page = apply_filters('edit_categories_per_page', $cats_per_page); 168 168 169 if ( !empty($_GET['s']) ) 170 $num_cats = count(get_categories(array('hide_empty' => 0, 'search' => $_GET['s']))); 171 else 172 $num_cats = wp_count_terms('category'); 173 169 174 $page_links = paginate_links( array( 170 175 'base' => add_query_arg( 'pagenum', '%#%' ), 171 176 'format' => '', 172 177 'prev_text' => __('«'), 173 178 'next_text' => __('»'), 174 'total' => ceil( wp_count_terms('category')/ $cats_per_page),179 'total' => ceil($num_cats / $cats_per_page), 175 180 'current' => $pagenum 176 181 )); 177 182