Bp_Search_Activity_Comment::generate_html( $template_type = '' )
Description
Source
File: bp-search/classes/class-bp-search-activity-comments.php
protected function generate_html( $template_type='' ){ $post_ids_arr = array(); foreach( $this->search_results['items'] as $item_id=>$item_html ){ $post_ids_arr[] = $item_id; } $post_ids = implode( ',', $post_ids_arr ); if( bp_has_activities( array( 'display_comments' => 'stream', 'include'=>$post_ids, 'per_page'=>count($post_ids_arr) ) ) ){ while ( bp_activities() ){ bp_the_activity(); $result = array( 'id' => bp_get_activity_id(), 'type' => $this->type, 'title' => $this->search_term, 'html' => bp_search_buffer_template_part( 'loop/activity-comment', $template_type, false ), ); $this->search_results['items'][bp_get_activity_id()] = $result; } } }
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.