rest_output_link_header()
Sends a Link header for the REST API.
Source
File: wp-includes/rest-api.php
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 );
}
Changelog
Version | Description |
---|---|
WP-4.4.0 | Introduced. |