BP_REST_Members_Details_Endpoint::get_profile_dropdown_items( WP_REST_Request $request )
Retrieve profile dropdown.
Description
Parameters
- $request
-
(Required) Full details about the request.
Return
(WP_REST_Response) | WP_Error
Source
File: bp-members/classes/class-bp-rest-members-details-endpoint.php
public function get_profile_dropdown_items( $request ) { $default = $request->get_param( 'default' ); $navigations = $this->get_profile_navigation( $default ); $retval = array(); if ( ! empty( $navigations ) ) { foreach ( $navigations as $navigation ) { $retval[] = $this->prepare_response_for_collection( $this->prepare_item_for_response( (object) $navigation, $request ) ); } } $response = rest_ensure_response( $retval ); /** * Fires after a list of members 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_members_detail_get_items', $response, $request ); return $response; }
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.