mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 17:18:32 +01:00
Set the post ID when calling wp_get_attachment_url(). Props chess64. fixes #4104
git-svn-id: http://svn.automattic.com/wordpress/trunk@5199 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
d82463f788
commit
4a4d37f9f3
@ -345,7 +345,7 @@ function get_the_attachment_link($id = 0, $fullsize = false, $max_dims = false)
|
||||
$id = (int) $id;
|
||||
$_post = & get_post($id);
|
||||
|
||||
if ( ('attachment' != $_post->post_type) || !$url = wp_get_attachment_url() )
|
||||
if ( ('attachment' != $_post->post_type) || !$url = wp_get_attachment_url($_post->ID) )
|
||||
return __('Missing Attachment');
|
||||
|
||||
$post_title = attribute_escape($_post->post_title);
|
||||
|
Loading…
Reference in New Issue
Block a user