Ticket #6534: link-template.php.diff

File link-template.php.diff, 0.7 kB (added by mtekk, 5 months ago)
  • link-template.php

    old new  
    179179                        $parentlink = _get_page_link( $object->post_parent ); // Ignores page_on_front 
    180180                else 
    181181                        $parentlink = get_permalink( $object->post_parent ); 
    182                 if ( ctype_digit($object->post_name) || false !== strpos(get_option('permalink_structure'), '%category%') ) 
     182                if ( is_numeric($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 
    185185                        $name = $object->post_name;