BP_REST_Attachments_Group_Avatar_Endpoint::get_item_collection_params()
Get the query params for the get_item
.
Description
Return
(array)
Source
File: bp-groups/classes/class-bp-rest-attachments-group-avatar-endpoint.php
517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 | public function get_item_collection_params() { $params = parent::get_collection_params(); $params [ 'context' ][ 'default' ] = 'view' ; // Removing unused params. unset( $params [ 'search' ], $params [ 'page' ], $params [ 'per_page' ] ); $params [ 'html' ] = array ( 'description' => __( 'Whether to return an <img> HTML element, vs a raw URL to a group avatar.' , 'buddyboss' ), 'default' => false, 'type' => 'boolean' , 'sanitize_callback' => 'rest_sanitize_boolean' , 'validate_callback' => 'rest_validate_request_arg' , ); $params [ 'alt' ] = array ( 'description' => __( 'The alt attribute for the <img> element.' , 'buddyboss' ), 'default' => '' , 'type' => 'string' , 'sanitize_callback' => 'sanitize_text_field' , 'validate_callback' => 'rest_validate_request_arg' , ); /** * Filters the item collection query params. * * @param array $params Query params. */ return apply_filters( 'bp_rest_attachments_group_avatar_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.