bp_get_album_pagination_count()
Return the album pagination count.
Description
Return
(string) The pagination text.
Source
File: bp-media/bp-media-template.php
function bp_get_album_pagination_count() { global $media_album_template; $start_num = intval( ( $media_album_template->pag_page - 1 ) * $media_album_template->pag_num ) + 1; $from_num = bp_core_number_format( $start_num ); $to_num = bp_core_number_format( ( $start_num + ( $media_album_template->pag_num - 1 ) > $media_album_template->total_album_count ) ? $media_album_template->total_album_count : $start_num + ( $media_album_template->pag_num - 1 ) ); $total = bp_core_number_format( $media_album_template->total_album_count ); $message = sprintf( _n( 'Viewing 1 item', 'Viewing %1$s - %2$s of %3$s items', $media_album_template->total_media_count, 'buddyboss' ), $from_num, $to_num, $total ); return $message; }
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.