BP_REST_Invites_Endpoint::get_collection_params()
Get the query params for collections of invites.
Description
Return
(array)
Source
File: bp-invites/classes/class-bp-rest-invites-endpoint.php
public function get_collection_params() { $params = parent::get_collection_params(); $params['context']['default'] = 'view'; unset( $params['search'] ); $params['order'] = array( 'description' => __( 'Designates ascending or descending order of invites.', 'buddyboss' ), 'default' => 'desc', 'type' => 'string', 'enum' => array( 'asc', 'desc' ), 'sanitize_callback' => 'sanitize_key', 'validate_callback' => 'rest_validate_request_arg', ); $params['orderby'] = array( 'description' => __( 'Sort retrieved invites by parameter.', 'buddyboss' ), 'type' => 'array', 'items' => array( 'type' => 'string', 'enum' => array( 'date', 'ID', 'rand', ), ), 'sanitize_callback' => 'bp_rest_sanitize_string_list', 'validate_callback' => 'rest_validate_request_arg', ); /** * Filters the collection query params. * * @param array $params Query params. */ return apply_filters( 'bp_rest_invites_collection_params', $params ); }
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.