WP_REST_Widgets_Controller::get_collection_params() WordPress Method
The WP_REST_Widgets_Controller::get_collection_params() method allows developers to specify the parameters that will be used when querying widget collections. This is useful for specifying which fields should be included in the response, or for pagination parameters.
WP_REST_Widgets_Controller::get_collection_params() #
Gets the list of collection params.
Return
(array[])
Source
File: wp-includes/rest-api/endpoints/class-wp-rest-widgets-controller.php
778 779 780 781 782 783 784 785 786 | public function get_collection_params() { return array ( 'context' => $this ->get_context_param( array ( 'default' => 'view' ) ), 'sidebar' => array ( 'description' => __( 'The sidebar to return widgets for.' ), 'type' => 'string' , ), ); } |
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
5.8.0 | Introduced. |