bp_activity_comments_user_join_filter

  • apply_filters( 'bp_activity_comments_user_join_filter', $wpdb->prepare( "SELECT a.*, u.user_email, u.user_nicename, u.user_login, u.display_name{$fullname_select} FROM {$bp->activity->table_name} a, {$wpdb->users} u{$fullname_from} WHERE u.ID 

    Source Reference:

    • Component: BuddyPress :: bp-activity
      File: /bp-activity/bp-activity-classes.php :: Trac Source Line: 394
      				$fullname_from = ", {$bp->profile->table_name_data} pd ";
      				$fullname_where = "AND pd.user_id = a.user_id AND pd.field_id = 1";
      
      			// Prevent debug errors
      			} else {
      				$fullname_select = $fullname_from = $fullname_where = '';
      			}
      
      			// Retrieve all descendants of the $root node
      			$descendants = $wpdb->get_results( apply_filters( 'bp_activity_comments_user_join_filter', $wpdb->prepare( "SELECT a.*, u.user_email, u.user_nicename, u.user_login, u.display_name{$fullname_select} FROM {$bp->activity->table_name} a, {$wpdb->users} u{$fullname_from} WHERE u.ID = a.user_id {$fullname_where} AND a.type = 'activity_comment' AND a.item_id = %d AND a.mptt_left BETWEEN %d AND %d ORDER BY a.date_recorded ASC", $activity_id, $left, $right ), $activity_id, $left, $right ) );
      
      			// Loop descendants and build an assoc array
      			foreach ( (array)$descendants as $d ) {
      				$d->children = array();
      
      				// If we have a reference on the parent
      				if ( isset( $ref[ $d->secondary_item_id ] ) ) {
      					$ref[ $d->secondary_item_id ]->children[ $d->id ] = $d;
      					$ref[ $d->id ] =& $ref[ $d->secondary_item_id ]->children[ $d->id ];
      

Comments are closed.