Retrieves the query params for the models collection.
Description
See also
Return
(array) Collection parameters.
Source
File: src/db-objects/forms/rest-forms-controller.php
public function get_collection_params() { $query_params = parent::get_collection_params(); $query_params['per_page']['maximum'] = 500; $query_params['orderby']['default'] = 'timestamp'; $query_params['order']['default'] = 'desc'; $query_params['status'] = array( 'description' => __( 'Limit result set to forms with one or more specific statuses.', 'torro-forms' ), 'type' => 'array', 'items' => array( 'type' => 'string', 'enum' => array_keys( get_post_stati( array( 'internal' => false, ) ) ), ), 'default' => 'publish', 'sanitize_callback' => array( $this, 'sanitize_status_param' ), ); return $query_params; }
Changelog
Version | Description |
---|---|
1.0.0 | Introduced. |