bp_get_notifications_pagination_count()

Return the pagination count for the current notification loop.

Description

Return

(string) HTML for the pagination count.

Source

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

	function bp_get_notifications_pagination_count() {
		$query_loop = buddypress()->notifications->query_loop;
		$start_num  = intval( ( $query_loop->pag_page - 1 ) * $query_loop->pag_num ) + 1;
		$from_num   = bp_core_number_format( $start_num );
		$to_num     = bp_core_number_format( ( $start_num + ( $query_loop->pag_num - 1 ) > $query_loop->total_notification_count ) ? $query_loop->total_notification_count : $start_num + ( $query_loop->pag_num - 1 ) );
		$total      = bp_core_number_format( $query_loop->total_notification_count );

		$pag = sprintf( _n( 'Viewing 1 notification', 'Viewing %1$s - %2$s of %3$s notifications', $query_loop->total_notification_count, 'buddyboss' ), $from_num, $to_num, $total );

		/**
		 * Filters the pagination count for the current notification loop.
		 *
		 * @since BuddyPress 1.9.0
		 *
		 * @param string $pag HTML for the pagination count.
		 */
		return apply_filters( 'bp_notifications_pagination_count', $pag );
	}

Changelog

Changelog
Version Description
BuddyPress 1.9.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.