wp_shortlink_wp_head

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

Description

wp_shortlink_wp_head(); 

Attached to the action.


Usage

  1. if ( !function_exists( 'wp_shortlink_wp_head' ) ) { 
  2. require_once ABSPATH . WPINC . '/link-template.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = wp_shortlink_wp_head(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/link-template.php  
  1. function wp_shortlink_wp_head() { 
  2. $shortlink = wp_get_shortlink( 0, 'query' ); 
  3.  
  4. if ( empty( $shortlink ) ) 
  5. return; 
  6.  
  7. echo "<link rel='shortlink' href='" . esc_url( $shortlink ) . "' />\n";