[wp-trac] Re: [WordPress Trac] #7622: wp_get_attachment_url() uses the GUID as the URL

WordPress Trac wp-trac at lists.automattic.com
Thu Aug 28 03:10:06 GMT 2008


#7622: wp_get_attachment_url() uses the GUID as the URL
-----------------------+----------------------------------------------------
 Reporter:  DD32       |        Owner:  anonymous
     Type:  defect     |       Status:  new      
 Priority:  normal     |    Milestone:  2.7      
Component:  Template   |      Version:  2.7      
 Severity:  normal     |   Resolution:           
 Keywords:  has-patch  |  
-----------------------+----------------------------------------------------
Comment (by DD32):

 A possibly better option would be to use _wp_attached_file metadata, see
 the attached patch.

 Also note, That in the event the metadata fails, the uploads folder is not
 located, or the file does not exist within the uploads folder, it fails
 back to using the GUID

-- 
Ticket URL: <http://trac.wordpress.org/ticket/7622#comment:1>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list