BP_REST_Signup_Endpoint::get_collection_params()
Get the query params for collections.
Description
Return
(array)
Source
File: bp-members/classes/class-bp-rest-signup-endpoint.php
public function get_collection_params() { $params = parent::get_collection_params(); $params['context']['default'] = 'view'; unset( $params['page'], $params['per_page'], $params['search'] ); $params['number'] = array( 'description' => __( 'Total number of signups to return.', 'buddyboss' ), 'default' => 1, 'type' => 'integer', 'sanitize_callback' => 'absint', 'validate_callback' => 'rest_validate_request_arg', ); $params['offset'] = array( 'description' => __( 'Offset the result set by a specific number of items.', 'buddyboss' ), 'default' => 0, 'type' => 'integer', 'sanitize_callback' => 'absint', 'validate_callback' => 'rest_validate_request_arg', ); $params['include'] = array( 'description' => __( 'Ensure result set includes specific IDs.', 'buddyboss' ), 'default' => array(), 'type' => 'array', 'items' => array( 'type' => 'integer' ), 'sanitize_callback' => 'wp_parse_id_list', 'validate_callback' => 'rest_validate_request_arg', ); $params['order'] = array( 'description' => __( 'Order sort attribute ascending or descending.', 'buddyboss' ), 'default' => 'desc', 'type' => 'string', 'enum' => array( 'asc', 'desc' ), 'sanitize_callback' => 'sanitize_key', 'validate_callback' => 'rest_validate_request_arg', ); $params['orderby'] = array( 'description' => __( 'Order by a specific parameter (default: signup_id).', 'buddyboss' ), 'default' => 'signup_id', 'type' => 'string', 'sanitize_callback' => 'sanitize_key', 'validate_callback' => 'rest_validate_request_arg', ); $params['user_login'] = array( 'description' => __( 'Specific user login to return.', 'buddyboss' ), 'default' => '', 'type' => 'string', 'sanitize_callback' => 'sanitize_key', 'validate_callback' => 'rest_validate_request_arg', ); /** * Filters the collection query params. * * @param array $params Query params. */ return apply_filters( 'bp_rest_signup_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.