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