BP_REST_Groups_Details_Endpoint::get_items( WP_REST_Request $request )

Retrieve groups details.

Description

Parameters

$request

(Required) Full details about the request.

Return

(WP_REST_Response) | WP_Error List of groups object data.

Source

File: bp-groups/classes/class-bp-rest-groups-details-endpoint.php

	public function get_items( $request ) {
		$retval = array();

		$retval['tabs']          = $this->get_groups_tabs( $request );
		$retval['order_options'] = bp_nouveau_get_component_filters( 'group', 'groups' );

		$response = rest_ensure_response( $retval );

		/**
		 * Fires after a list of groups details is fetched via the REST API.
		 *
		 * @param WP_REST_Response $response The response data.
		 * @param WP_REST_Request  $request  The request sent to the API.
		 *
		 * @since 0.1.0
		 */
		do_action( 'bp_rest_groups_get_items', $response, $request );

		return $response;
	}

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.