Make WordPress Core


Ignore:
Timestamp:
03/26/2008 08:17:31 PM (18 years ago)
Author:
ryan
Message:

Fix attachment links for permalink structures containing category tag. Props andy. fixes #4699

File:
1 edited

Legend:

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

    r7437 r7531  
    180180        else
    181181            $parentlink = get_permalink( $object->post_parent );
    182         if ( ctype_digit($object->post_name) )
     182        if ( ctype_digit($object->post_name) || false !== strpos(get_option('permalink_structure'), '%category%') )
    183183            $name = 'attachment/' . $object->post_name; // <permalink>/<int>/ is paged so we use the explicit attachment marker
    184184        else
Note: See TracChangeset for help on using the changeset viewer.