Definition:
function wp_shortlink_wp_head() {}
Inject rel=shortlink into head if a shortlink is defined for the current page.
Attached to the wp_head action.
Source code
function wp_shortlink_wp_head() {
$shortlink = wp_get_shortlink( 0, 'query' );
if ( empty( $shortlink ) )
return;
echo "<link rel='shortlink' href='" . esc_url( $shortlink ) . "' />\n";
}
4125

February 12, 2011 


No comments yet... Be the first to leave a reply!