Correct sample URL's for custom post_type's. uses pretty permalinks if possible. Props duck_. See #12870

git-svn-id: https://develop.svn.wordpress.org/trunk@14068 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dion Hulse 2010-04-11 08:58:40 +00:00
parent 57749e1d2c
commit 602b9f05b3

View File

@ -108,7 +108,7 @@ function get_permalink($id = 0, $leavename = false) {
elseif ( $post->post_type == 'attachment' )
return get_attachment_link($post->ID);
elseif ( in_array($post->post_type, get_post_types( array('_builtin' => false) ) ) )
return get_post_permalink($post, $leavename);
return get_post_permalink($post, $leavename, $sample);
$permalink = get_option('permalink_structure');