WordPress.org

Make WordPress Core

Changeset 15412


Ignore:
Timestamp:
07/13/2010 09:57:05 PM (8 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 3.0.

File:
1 edited

Legend:

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

    r15117 r15412  
    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.