BP_Invitation::get_total_count( array $args )

Get a count of total invitations matching a set of arguments.


Description Description

See also See also


Top ↑

Parameters Parameters

$args

(Required) See BP_Invitation::get().


Top ↑

Return Return

(int) Count of located items.


Top ↑

Source Source

File: bp-core/classes/class-bp-invitation.php

	public static function get_total_count( $args ) {
		global $wpdb;
		$invites_table_name = BP_Invitation_Manager::get_table_name();

		// Build the query
		$select_sql = "SELECT COUNT(*)";
		$from_sql   = "FROM {$invites_table_name}";
		$where_sql  = self::get_where_sql( $args );
		$sql        = "{$select_sql} {$from_sql} {$where_sql}";

		// Return the queried results
		return $wpdb->get_var( $sql );
	}

Top ↑

Changelog Changelog

Changelog
Version Description
5.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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