Changeset 9046 for trunk/wp-admin/includes/template.php
- Timestamp:
- 10/01/2008 03:48:45 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/template.php
r9045 r9046 1532 1532 } 1533 1533 1534 function _wp_get_comment_list( $status = '', $s = false, $start, $num, $post = 0 ) {1534 function _wp_get_comment_list( $status = '', $s = false, $start, $num, $post = 0, $type = '' ) { 1535 1535 global $wpdb; 1536 1536 … … 1552 1552 else 1553 1553 $post = ''; 1554 1555 if ( 'comment' == $type ) 1556 $typesql = "AND comment_type = ''"; 1557 elseif ( 'pingback' == $type ) 1558 $typesql = "AND comment_type = 'pingback'"; 1559 elseif ( 'trackback' == $type ) 1560 $typesql = "AND comment_type = 'trackback'"; 1561 else 1562 $typesql = ''; 1554 1563 1555 1564 if ( $s ) { … … 1562 1571 comment_content LIKE ('%$s%') ) AND 1563 1572 $approved 1573 $typesql 1564 1574 ORDER BY comment_date_gmt DESC LIMIT $start, $num"); 1565 1575 } else { 1566 $comments = $wpdb->get_results( "SELECT SQL_CALC_FOUND_ROWS * FROM $wpdb->comments WHERE $approved $post ORDER BY comment_date_gmt DESC LIMIT $start, $num" );1576 $comments = $wpdb->get_results( "SELECT SQL_CALC_FOUND_ROWS * FROM $wpdb->comments WHERE $approved $post $typesql ORDER BY comment_date_gmt DESC LIMIT $start, $num" ); 1567 1577 } 1568 1578
Note: See TracChangeset
for help on using the changeset viewer.