Make WordPress Core

Changeset 29024


Ignore:
Timestamp:
07/08/2014 03:47:20 PM (10 years ago)
Author:
johnbillion
Message:

Pass the post object rather than the post ID between the post permalink functions. Fixes #28425. Props arnee

File:
1 edited

Legend:

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

    r28977 r29024  
    137137
    138138    if ( $post->post_type == 'page' )
    139         return get_page_link($post->ID, $leavename, $sample);
     139        return get_page_link($post, $leavename, $sample);
    140140    elseif ( $post->post_type == 'attachment' )
    141         return get_attachment_link( $post->ID, $leavename );
     141        return get_attachment_link( $post, $leavename );
    142142    elseif ( in_array($post->post_type, get_post_types( array('_builtin' => false) ) ) )
    143         return get_post_permalink($post->ID, $leavename, $sample);
     143        return get_post_permalink($post, $leavename, $sample);
    144144
    145145    $permalink = get_option('permalink_structure');
Note: See TracChangeset for help on using the changeset viewer.