WordPress.org

Make WordPress Core

Changeset 7437


Ignore:
Timestamp:
03/21/08 03:08:22 (7 years ago)
Author:
ryan
Message:

use explicit attachment permalink marker for int names. Props andy. fixes #6280

File:
1 edited

Legend:

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

    r7262 r7437  
    180180        else 
    181181            $parentlink = get_permalink( $object->post_parent ); 
     182        if ( ctype_digit($object->post_name) ) 
     183            $name = 'attachment/' . $object->post_name; // <permalink>/<int>/ is paged so we use the explicit attachment marker 
     184        else 
     185            $name = $object->post_name; 
    182186        if (strpos($parentlink, '?') === false) 
    183             $link = trailingslashit($parentlink) . $object->post_name . '/'; 
     187            $link = trailingslashit($parentlink) . $name . '/'; 
    184188    } 
    185189 
Note: See TracChangeset for help on using the changeset viewer.