wp_shortlink_header()
Sends a Link: rel=shortlink header if a shortlink is defined for the current page.
Description Description
Attached to the ‘wp’ action.
Source Source
File: wp-includes/link-template.php
function wp_shortlink_header() {
if ( headers_sent() ) {
return;
}
$shortlink = wp_get_shortlink( 0, 'query' );
if ( empty( $shortlink ) ) {
return;
}
header( 'Link: <' . $shortlink . '>; rel=shortlink', false );
}
Expand full source code Collapse full source code View on Trac
Changelog Changelog
| Version | Description |
|---|---|
| 3.0.0 | Introduced. |