WP_REST_Request::remove_header()
Removes all values for a header.
Method of the class: WP_REST_Request{}
No Hooks.
Return
null
. Nothing (null).
Usage
$WP_REST_Request = new WP_REST_Request(); $WP_REST_Request->remove_header( $key );
- $key(string) (required)
- Header name.
Changelog
Since 4.4.0 | Introduced. |
WP_REST_Request::remove_header() WP REST Request::remove header code WP 6.6.2
public function remove_header( $key ) { $key = $this->canonicalize_header_name( $key ); unset( $this->headers[ $key ] ); }