Make WordPress Core

Ticket #6996: get_attachment_link_user_trailingslashit.patch

File get_attachment_link_user_trailingslashit.patch, 461 bytes (added by Sam_a, 17 years ago)

Applies user_trailingslashit() in get_attachment_permalink(). Tested successfully in 2.5.1

  • wp-includes/link-template.php

     
    184184                else
    185185                        $name = $object->post_name;
    186186                if (strpos($parentlink, '?') === false)
    187                         $link = trailingslashit($parentlink) . $name . '/';
     187                        $link = user_trailingslashit( trailingslashit($parentlink) . $name );
    188188        }
    189189
    190190        if (! $link ) {