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
880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 | 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.