WP_REST_Server::send_headers()publicWP 4.4.0

Sends multiple HTTP headers.

Method of the class: WP_REST_Server{}

No Hooks.

Return

null. Nothing.

Usage

$WP_REST_Server = new WP_REST_Server();
$WP_REST_Server->send_headers( $headers );
$headers(array) (required)
Map of header name to header value.

Changelog

Since 4.4.0 Introduced.

WP_REST_Server::send_headers() code WP 6.1.1

public function send_headers( $headers ) {
	foreach ( $headers as $key => $value ) {
		$this->send_header( $key, $value );
	}
}