BP_REST_XProfile_Repeater_Endpoint::get_collection_params()
Get the query params for XProfile Repeater field.
Description
Return
(array)
Source
File: bp-xprofile/classes/class-bp-rest-xprofile-repeater-endpoint.php
799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 | public function get_collection_params() { $params = parent::get_collection_params(); $params [ 'context' ][ 'default' ] = 'edit' ; // Removing unused params. unset( $params [ 'search' ], $params [ 'page' ], $params [ 'per_page' ] ); $params [ 'id' ] = array ( 'description' => __( 'A unique numeric ID for the group of profile fields.' , 'buddyboss' ), 'type' => 'integer' , ); $params [ 'fetch_fields' ] = array ( 'description' => __( 'Whether to fetch the fields for each group.' , 'buddyboss' ), 'default' => true, 'type' => 'boolean' , 'sanitize_callback' => 'rest_sanitize_boolean' , 'validate_callback' => 'rest_validate_request_arg' , ); $params [ 'fetch_field_data' ] = array ( 'description' => __( 'Whether to fetch data for each field. Requires a $user_id.' , 'buddyboss' ), 'default' => true, 'type' => 'boolean' , 'sanitize_callback' => 'rest_sanitize_boolean' , 'validate_callback' => 'rest_validate_request_arg' , ); $params [ 'fetch_visibility_level' ] = array ( 'description' => __( 'Whether to fetch the visibility level for each field.' , 'buddyboss' ), 'default' => true, 'type' => 'boolean' , 'sanitize_callback' => 'rest_sanitize_boolean' , 'validate_callback' => 'rest_validate_request_arg' , ); /** * Filters the collection query params. * * @param array $params Query params. */ return apply_filters( 'bp_rest_xprofile_repeater_fields_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.