A WordPress-centric search engine for devs and theme authors



rest_output_link_header ›

Since4.4.0
Deprecatedn/a
rest_output_link_header ( No parameters )
Defined at:
Codex:

Sends a Link header for the REST API.



Source

function rest_output_link_header() {
	if ( headers_sent() ) {
		return;
	}

	$api_root = get_rest_url();

	if ( empty( $api_root ) ) {
		return;
	}

	header( 'Link: <' . esc_url_raw( $api_root ) . '>; rel="https://api.w.org/"', false );
}