WordPress.org

Make WordPress Core

Ticket #10640: 13693.diff

File 13693.diff, 674 bytes (added by sirzooro, 12 years ago)
  • wp-includes/link-template.php

     
    21542154
    21552155        $shortlink = wp_get_shortlink($post->ID);
    21562156
    2157         if ( !empty($shortlink) )
    2158                 echo "$before<a rel='shortlink' href='$shortlink' title='$title'>$text</a>$after";
     2157        if ( !empty( $shortlink ) ) {
     2158                $link = '<a rel="shortlink" href="' . esc_attr( $shortlink ) . '" title="'
     2159                        . esc_attr( $title ) . '">' . $text . '</a>';
     2160                $link = apply_filters( 'the_shortlink', $link, $shortlink, $text, $title );
     2161                echo $before, $link, $after;
     2162        }
    21592163}
    21602164
    21612165?>