wpseek.com
Outil de recherche WordPress pour les développeurs et auteurs de thèmes



wp_shortlink_wp_head › WordPress Function

Depuis3.0.0
Dépréciéen/a
wp_shortlink_wp_head ( Pas de paramètres )
Défini(e) dans:
Codex:

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

Attached to the {@see 'wp_head'} action.


Source

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

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

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