On this page
WP_REST_Request::get_attributes(): array
Retrieves the attributes for the request.
Description
These are the options for the route that was matched.
Return
array Attributes for the request.
Source
File: wp-includes/rest-api/class-wp-rest-request.php. View all references
public function get_attributes() {
return $this->attributes;
}
Related
Used By
| Used By | Description |
|---|---|
| WP_REST_Request::sanitize_params() wp-includes/rest-api/class-wp-rest-request.php | Sanitizes (where possible) the params on the request. |
| WP_REST_Request::has_valid_params() wp-includes/rest-api/class-wp-rest-request.php | Checks whether this request is valid according to its attributes. |
Changelog
| Version | Description |
|---|---|
| 4.4.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_rest_request/get_attributes