WordPress.org

Make WordPress Core

Changeset 15411


Ignore:
Timestamp:
07/13/10 21:56:49 (5 years ago)
Author:
nacin
Message:

get_post_permalink() should take a post ID and pass the post object to the filter. Note that the filter received a post object previously as the variable. props filosofo, fixes #14299 for trunk.

File:
1 edited

Legend:

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

    r15355 r15411  
    109109        return get_attachment_link($post->ID); 
    110110    elseif ( in_array($post->post_type, get_post_types( array('_builtin' => false) ) ) ) 
    111         return get_post_permalink($post, $leavename, $sample); 
     111        return get_post_permalink($post->ID, $leavename, $sample); 
    112112 
    113113    $permalink = get_option('permalink_structure'); 
     
    205205    } 
    206206 
    207     return apply_filters('post_type_link', $post_link, $id, $leavename, $sample); 
     207    return apply_filters('post_type_link', $post_link, $post, $leavename, $sample); 
    208208} 
    209209 
Note: See TracChangeset for help on using the changeset viewer.