Ticket #29615: link-template.php.diff
File link-template.php.diff, 735 bytes (added by , 10 years ago) |
---|
-
link-template.php
257 257 258 258 $post_type = get_post_type_object($post->post_type); 259 259 260 if ( $post_type->hierarchical ) 261 $slug = get_page_uri($id); 262 260 263 if ( !empty($post_link) && ( !$draft_or_pending || $sample ) ) { 261 if ( ! $leavename ) { 262 if ( $post_type->hierarchical ) 263 $slug = get_page_uri($id); 264 if ( ! $leavename ) 264 265 $post_link = str_replace("%$post->post_type%", $slug, $post_link); 265 }266 266 $post_link = home_url( user_trailingslashit($post_link) ); 267 267 } else { 268 268 if ( $post_type->query_var && ( isset($post->post_status) && !$draft_or_pending ) )