Changeset 29045 for trunk/src/wp-includes/comment.php
- Timestamp:
- 07/09/2014 06:15:42 PM (12 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/comment.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/comment.php
r28922 r29045 246 246 $defaults = array( 247 247 'author_email' => '', 248 'fields' => '', 248 249 'ID' => '', 249 250 'karma' => '', … … 369 370 $fields = 'COUNT(*)'; 370 371 } else { 371 $fields = '*'; 372 } 372 switch ( strtolower( $this->query_vars['fields'] ) ) { 373 case 'ids': 374 $fields = "$wpdb->comments.comment_ID"; 375 break; 376 default: 377 $fields = "*"; 378 break; 379 } 380 } 381 373 382 $join = ''; 374 383 $where = $approved; … … 461 470 return $wpdb->get_var( $query ); 462 471 } 472 473 if ( 'ids' == $this->query_vars['fields'] ) { 474 $this->comments = $wpdb->get_col( $query ); 475 return array_map( 'intval', $this->comments ); 476 } 477 463 478 $results = $wpdb->get_results( $query ); 464 479 /**
Note: See TracChangeset
for help on using the changeset viewer.