From 61577966d4f4dba70f269949f1ac6a5f8d01e066 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Wed, 14 Nov 2012 05:05:34 +0000 Subject: [PATCH] Pass the post ID from the_shortlink() to wp_get_shortlink() to avoid a change in filters. props SergeyBiryukov, fixes #21309. git-svn-id: http://core.svn.wordpress.org/trunk@22564 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/link-template.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wp-includes/link-template.php b/wp-includes/link-template.php index 2c815542ad..de76f45aae 100644 --- a/wp-includes/link-template.php +++ b/wp-includes/link-template.php @@ -2421,13 +2421,15 @@ function wp_shortlink_header() { * @param string $after Optional HTML to display after the link. */ function the_shortlink( $text = '', $title = '', $before = '', $after = '' ) { + $post = get_post(); + if ( empty( $text ) ) $text = __('This is the short link.'); if ( empty( $title ) ) $title = the_title_attribute( array( 'echo' => false ) ); - $shortlink = wp_get_shortlink(); + $shortlink = wp_get_shortlink( $post->ID ); if ( !empty( $shortlink ) ) { $link = '' . $text . '';