bp_blogs_comments_clauses_select_by_id

Only select comments by ID instead of all fields when using get_comments().

Description

(array) bp_blogs_comments_clauses_select_by_id( (array) $retval ); 

Returns (array)

Parameters (1)

0. $retval (array)
Current SQL clauses in array format.

Usage

  1. if ( !function_exists( 'bp_blogs_comments_clauses_select_by_id' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-blogs/bp-blogs-filters.php'; 
  3.  
  4. // Current SQL clauses in array format. 
  5. $retval = array(); 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = bp_blogs_comments_clauses_select_by_id($retval); 
  9.  

Defined (1)

The function is defined in the following location(s).

/bp-blogs/bp-blogs-filters.php  
  1. function bp_blogs_comments_clauses_select_by_id( $retval ) { 
  2. $retval['fields'] = 'comment_ID'; 
  3.  
  4. return $retval;