[wp-trac] [WordPress Trac] #7622: wp_get_attachment_url() uses the
GUID as the URL
WordPress Trac
wp-trac at lists.automattic.com
Thu Aug 28 02:43:05 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 | Keywords: has-patch
----------------------+-----------------------------------------------------
At present wp_get_attachment_url() relies upon the GUID for the URL of the
attachment, As discussed on wp-hackers ("Re: [wp-hackers] Re: permalinks
redirected despite WP_SITEURL") this shouldnt be done due to the fact that
''it just so happens that the guid is the url in wordpress''
The attached patch attempts to use the attachment metadata to workout the
files location, followed by using the filtered uploads directory to
determine the real location (See comments in patch).
--
Ticket URL: <http://trac.wordpress.org/ticket/7622>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list