bp_the_topic_pagination_count

  • apply_filters( 'bp_the_topic_pagination_count', sprintf( __( 'Viewing post %1$s to %2$s (%3$s total posts)', 'buddypress' ), $from_num, $to_num, $total ) )

    Source Reference:

    • Component: BuddyPress :: bp-forums
      File: /bp-forums/bp-forums-template.php :: Trac Source Line: 1293
      function bp_the_topic_pagination_count() {
      	global $bp, $topic_template;
      
      	$start_num = intval( ( $topic_template->pag_page - 1 ) * $topic_template->pag_num ) + 1;
      	$from_num = bp_core_number_format( $start_num );
      	$to_num = bp_core_number_format( ( $start_num + ( $topic_template->pag_num - 1  ) > $topic_template->total_post_count ) ? $topic_template->total_post_count : $start_num + ( $topic_template->pag_num - 1 ) );
      	$total = bp_core_number_format( $topic_template->total_post_count );
      
      	echo apply_filters( 'bp_the_topic_pagination_count', sprintf( __( 'Viewing post %1$s to %2$s (%3$s total posts)', 'buddypress' ), $from_num, $to_num, $total ) );
      }
      
      function bp_the_topic_is_last_page() {
      	echo bp_get_the_topic_is_last_page();
      }
      	function bp_get_the_topic_is_last_page() {
      		global $topic_template;
      
      		return apply_filters( 'bp_get_the_topic_is_last_page', $topic_template->pag_page == $topic_template->pag->total_pages );
      	}
      

Comments are closed.