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
1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 | 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.