WP_REST_Server::remove_header()publicWP 4.8.0

Removes an HTTP header from the current response.

Method of the class: WP_REST_Server{}

No Hooks.

Return

null. Nothing (null).

Usage

$WP_REST_Server = new WP_REST_Server();
$WP_REST_Server->remove_header( $key );
$key(string) (required)
Header key.

Changelog

Since 4.8.0 Introduced.

WP_REST_Server::remove_header() code WP 6.4.3

public function remove_header( $key ) {
	header_remove( $key );
}