[wp-trac] [WordPress Trac] #7040: Link to File changes to Link to Attachment IF PAGE IS STARTPAGE

WordPress Trac wp-trac at lists.automattic.com
Mon Mar 29 09:41:04 UTC 2010


#7040: Link to File changes to Link to Attachment IF PAGE IS STARTPAGE
--------------------------+-------------------------------------------------
 Reporter:  shusha        |        Owner:  westi   
     Type:  defect (bug)  |       Status:  reopened
 Priority:  high          |    Milestone:  3.0     
Component:  Media         |      Version:  2.5.1   
 Severity:  major         |   Resolution:          
 Keywords:                |  
--------------------------+-------------------------------------------------

Comment(by dd32):

 Traced it down to this line: http://core.trac.wordpress.org/browser/trunk
 /wp-admin/includes/media.php#L465
 {{{
 if ( strpos($attachment['url'], 'attachment_id') || false !==
 strpos($attachment['url'], get_permalink($_POST['post_id'])) )
     $rel = " rel='attachment wp-att-" . esc_attr($send_id)."'";
 }}}

 The 2nd case will always be matched for page_on_front, as the post
 permalink is home_url(), So as long as uploads are stored in a
 subdirectory of homeurl at least..

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/7040#comment:14>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list