WordPress.org

Make WordPress Core

Ticket #21309: 21309.13.diff

File 21309.13.diff, 791 bytes (added by SergeyBiryukov, 17 months ago)
  • wp-includes/link-template.php

     
    24212421 * @param string $after Optional HTML to display after the link. 
    24222422 */ 
    24232423function the_shortlink( $text = '', $title = '', $before = '', $after = '' ) { 
     2424        $post = get_post(); 
     2425 
    24242426        if ( empty( $text ) ) 
    24252427                $text = __('This is the short link.'); 
    24262428 
    24272429        if ( empty( $title ) ) 
    24282430                $title = the_title_attribute( array( 'echo' => false ) ); 
    24292431 
    2430         $shortlink = wp_get_shortlink(); 
     2432        $shortlink = wp_get_shortlink( $post->ID ); 
    24312433 
    24322434        if ( !empty( $shortlink ) ) { 
    24332435                $link = '<a rel="shortlink" href="' . esc_url( $shortlink ) . '" title="' . $title . '">' . $text . '</a>';