bp_group_has_membership_requests( array|string $args = '' )

Initialize a group membership request template loop.


Parameters Parameters

$args

(array|string) (Optional)

  • 'group_id'
    (int) ID of the group. Defaults to current group.
  • 'per_page'
    (int) Number of records to return per page. Default: 10.
  • 'page'
    (int) Page of results to return. Default: 1.
  • 'max'
    (int) Max number of items to return. Default: false.

Default value: ''


Top ↑

Return Return

(bool) True if there are requests, otherwise false.


Source Source

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

function bp_group_has_membership_requests( $args = '' ) {
	global $requests_template;

	$r = bp_parse_args( $args, array(
		'group_id' => bp_get_current_group_id(),
		'per_page' => 10,
		'page'     => 1,
		'max'      => false
	), 'group_has_membership_requests' );

	$requests_template = new BP_Groups_Membership_Requests_Template( $r );

	/**
	 * Filters whether or not a group membership query has requests to display.
	 *
	 * @since 1.1.0
	 *
	 * @param bool                                   $value             Whether there are requests to display.
	 * @param BP_Groups_Membership_Requests_Template $requests_template Object holding the requests query results.
	 */
	return apply_filters( 'bp_group_has_membership_requests', $requests_template->has_requests(), $requests_template );
}


Top ↑

Changelog Changelog

Changelog
Version Description
1.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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