Changeset 15509 for trunk/wp-admin/includes/default-list-tables.php
- Timestamp:
- 08/19/2010 12:06:51 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/default-list-tables.php
r15508 r15509 1965 1965 $comments_per_page = apply_filters( 'comments_per_page', $comments_per_page, $comment_status ); 1966 1966 1967 if ( isset( $_POST['number'] ) ) 1968 $number = (int) $_POST['number']; 1969 else 1970 $number = $comments_per_page + min( 8, $comments_per_page ); // Grab a few extra 1971 1967 1972 $page = $this->get_pagenum(); 1968 1973 … … 1973 1978 'search' => $search, 1974 1979 'offset' => $start, 1975 'number' => $ comments_per_page + 8, // Grab a few extra1980 'number' => $number, 1976 1981 'post_id' => $post_id, 1977 1982 'plural' => $comment_type, … … 1984 1989 update_comment_cache( $_comments ); 1985 1990 1986 $ args['count'] = true;1987 $ args['offset'] = 0;1988 $args['number'] = 0; 1989 $total_comments = get_comments( $args);1991 $this->items = array_slice( $_comments, 0, $comments_per_page ); 1992 $this->extra_items = array_slice( $_comments, $comments_per_page ); 1993 1994 $total_comments = get_comments( array_merge( $args, array('count' => true, 'offset' => 0, 'number' => 0) ) ); 1990 1995 1991 1996 $_comment_post_ids = array(); … … 1995 2000 1996 2001 $_comment_pending_count = get_pending_comments_num( $_comment_post_ids ); 1997 1998 $this->items = array_slice( $_comments, 0, $comments_per_page );1999 $this->extra_items = array_slice( $_comments, $comments_per_page );2000 2002 2001 2003 $this->set_pagination_args( array( … … 2115 2117 } 2116 2118 2117 function display_rows( $items = array()) {2119 function display_rows( $items = false ) { 2118 2120 global $mode, $comment_status; 2119 2121 2120 if ( empty( $items ))2122 if ( false === $items ) 2121 2123 $items = $this->items; 2122 2124
Note: See TracChangeset
for help on using the changeset viewer.