Bp_Search_Activities::generate_html( $template_type = '' )
Description
Source
File: bp-search/classes/class-bp-search-activities.php
151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 | 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 ); do_action( 'bp_before_search_activity_html' ); if ( bp_has_activities( array ( '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' , $template_type , false ), ); $this ->search_results[ 'items' ][bp_get_activity_id()] = $result ; } } do_action( 'bp_after_search_activity_html' ); } |
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.