bp_get_members_invitations_pagination_count()

Return the pagination count for the current network invitation loop.


Return Return

(string) HTML for the pagination count.


Source Source

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

	function bp_get_members_invitations_pagination_count() {
		$query_loop = buddypress()->members->invitations->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_invitation_count ) ? $query_loop->total_invitation_count : $start_num + ( $query_loop->pag_num - 1 ) );
		$total      = bp_core_number_format( $query_loop->total_invitation_count );

		if ( 1 == $query_loop->total_invitation_count ) {
			$pag = __( 'Viewing 1 invitation', 'buddypress' );
		} else {
			/* translators: 1: Invitations from number. 2: Invitations to number. 3: Total invitations. */
			$pag = sprintf( _nx( 'Viewing %1$s - %2$s of %3$s invitation', 'Viewing %1$s - %2$s of %3$s invitations', $query_loop->total_invitation_count, 'Community invites pagination', 'buddypress' ), $from_num, $to_num, $total );
		}

		/**
		 * Filters the pagination count for the current network invitation loop.
		 *
		 * @since 8.0.0
		 *
		 * @param string $pag HTML for the pagination count.
		 */
		return apply_filters( 'bp_get_members_invitations_pagination_count', $pag );
	}


Top ↑

Changelog Changelog

Changelog
Version Description
8.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.