bp_get_media_pagination_count()

Return the media pagination count.

Description

Return

(string) The pagination text.

Source

File: bp-media/bp-media-template.php

function bp_get_media_pagination_count() {
	global $media_template;

	$start_num = intval( ( $media_template->pag_page - 1 ) * $media_template->pag_num ) + 1;
	$from_num  = bp_core_number_format( $start_num );
	$to_num    = bp_core_number_format( ( $start_num + ( $media_template->pag_num - 1 ) > $media_template->total_media_count ) ? $media_template->total_media_count : $start_num + ( $media_template->pag_num - 1 ) );
	$total     = bp_core_number_format( $media_template->total_media_count );

	$message = sprintf( _n( 'Viewing 1 item', 'Viewing %1$s - %2$s of %3$s items', $media_template->total_media_count, 'buddyboss' ), $from_num, $to_num, $total );

	return $message;
}

Changelog

Changelog
Version Description
BuddyBoss 1.0.0 Introduced.

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.