Ensure the parentlink is trailingslashed when building the url - don't trim / off the front. Fixes #2801 props Libertus
git-svn-id: http://svn.automattic.com/wordpress/trunk@6095 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
2f44508e9b
commit
223182463d
|
@ -167,7 +167,7 @@ function get_attachment_link($id = false) {
|
|||
else
|
||||
$parentlink = get_permalink( $object->post_parent );
|
||||
if (strpos($parentlink, '?') === false)
|
||||
$link = trim($parentlink, '/') . '/' . $object->post_name . '/';
|
||||
$link = trailingslashit($parentlink) . $object->post_name . '/';
|
||||
}
|
||||
|
||||
if (! $link ) {
|
||||
|
|
Loading…
Reference in New Issue