BP_REST_Group_Membership_Request_Endpoint::get_collection_params()

Get the query params for collections of group invites.

Description

Return

(array)

Source

File: bp-groups/classes/class-bp-rest-group-membership-request-endpoint.php

	public function get_collection_params() {
		$params                       = $this->invites_endpoint->get_collection_params();
		$params['context']['default'] = 'view';

		// Adapt some item schema property descriptions to this endpoint.
		$params['user_id']['description']  = __( 'Return only Membership requests made by a specific user.', 'buddyboss' );
		$params['group_id']['description'] = __( 'The ID of the group the user requested a membership for.', 'buddyboss' );

		// Remove unused properties.
		unset( $params['invite_sent'], $params['inviter_id'] );

		/**
		 * Filters the collection query params.
		 *
		 * @param array $params Query params.
		 */
		return apply_filters( 'bp_rest_group_membership_requests_collection_params', $params );
	}

Changelog

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