Make WordPress Core


Ignore:
Timestamp:
11/14/2012 05:05:34 AM (12 years ago)
Author:
nacin
Message:

Pass the post ID from the_shortlink() to wp_get_shortlink() to avoid a change in filters. props SergeyBiryukov, fixes #21309.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/link-template.php

    r22472 r22564  
    24222422 */
    24232423function the_shortlink( $text = '', $title = '', $before = '', $after = '' ) {
     2424    $post = get_post();
     2425
    24242426    if ( empty( $text ) )
    24252427        $text = __('This is the short link.');
     
    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 ) ) {
Note: See TracChangeset for help on using the changeset viewer.