Summery Summery
Retrieves the query params for the collections.
Syntax Syntax
Return Return
(array) Query parameters for the collection.
Source Source
File: wp-includes/rest-api/endpoints/class-wp-rest-controller.php
), ); } /** * Retrieves the magical context param. * * Ensures consistent descriptions between endpoints, and populates enum from schema. * * @since 4.7.0 * * @param array $args Optional. Additional arguments for context parameter. Default empty array. * @return array Context parameter details. */ public function get_context_param( $args = array() ) { $param_details = array( 'description' => __( 'Scope under which the request is made; determines fields present in response.' ), 'type' => 'string', 'sanitize_callback' => 'sanitize_key', 'validate_callback' => 'rest_validate_request_arg', ); $schema = $this->get_item_schema(); if ( empty( $schema['properties'] ) ) { return array_merge( $param_details, $args ); }
Advertisement
Changelog Changelog
Version | Description |
---|---|
4.7.0 | Introduced. |