wp_shortlink_wp_head()

Injects rel=shortlink into the head if a shortlink is defined for the current page.


Description Description

Attached to the ‘wp_head’ action.


Source Source

File: wp-includes/link-template.php

function wp_shortlink_wp_head() {
	$shortlink = wp_get_shortlink( 0, 'query' );

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

	echo "<link rel='shortlink' href='" . esc_url( $shortlink ) . "' />\n";
}

Top ↑

Changelog Changelog

Changelog
Version Description
3.0.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.