Uses
Uses | Description |
---|---|
wp-includes/rest-api/class-wp-rest-request.php: WP_REST_Request::set_header() | Sets the header on request. |
Sets headers on the request.
(array) (Required) Map of header name to value.
(bool) (Optional) If true, replace the request's headers. Otherwise, merge with existing.
Default value: true
File: wp-includes/rest-api/class-wp-rest-request.php
public function set_headers( $headers, $override = true ) { if ( true === $override ) { $this->headers = array(); } foreach ( $headers as $key => $value ) { $this->set_header( $key, $value ); } }
Version | Description |
---|---|
4.4.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_rest_request/set_headers