Changeset 7859 for trunk/wp-admin/edit-comments.php
- Timestamp:
- 04/30/2008 08:05:25 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/edit-comments.php
r7855 r7859 132 132 <?php 133 133 134 $comments_per_page = apply_filters('comments_per_page', 20, $comment_status); 135 134 136 if ( isset( $_GET['apage'] ) ) 135 137 $page = abs( (int) $_GET['apage'] ); … … 137 139 $page = 1; 138 140 139 $start = $offset = ( $page - 1 ) * 20;140 141 list($_comments, $total) = _wp_get_comment_list( $comment_status, $search_dirty, $start, 25 ); // Grab a few extra142 143 $comments = array_slice($_comments, 0, 20);144 $extra_comments = array_slice($_comments, 20);141 $start = $offset = ( $page - 1 ) * $comments_per_page; 142 143 list($_comments, $total) = _wp_get_comment_list( $comment_status, $search_dirty, $start, $comments_per_page + 5 ); // Grab a few extra 144 145 $comments = array_slice($_comments, 0, $comments_per_page); 146 $extra_comments = array_slice($_comments, $comments_per_page); 145 147 146 148 $page_links = paginate_links( array( 147 149 'base' => add_query_arg( 'apage', '%#%' ), 148 150 'format' => '', 149 'total' => ceil($total / 20),151 'total' => ceil($total / $comments_per_page), 150 152 'current' => $page 151 153 ));
Note: See TracChangeset
for help on using the changeset viewer.