WordPress.org

Make WordPress Core

Ticket #23408: 23408.patch

File 23408.patch, 636 bytes (added by SergeyBiryukov, 14 months ago)
  • wp-includes/link-template.php

     
    485485                $type = get_post_field('post_type', $post_id); 
    486486                if ( 'page' == $type ) 
    487487                        $url = add_query_arg( array( 'feed' => $feed, 'page_id' => $post_id ), home_url( '/' ) ); 
     488                elseif ( 'attachment' == $type ) 
     489                        $url = add_query_arg( array( 'feed' => $feed, 'attachment_id' => $post_id ), home_url( '/' ) ); 
    488490                else 
    489491                        $url = add_query_arg( array( 'feed' => $feed, 'p' => $post_id ), home_url( '/' ) ); 
    490492        }