Fix wp_get_attachment_link(), props noel, fixes #9036
git-svn-id: http://svn.automattic.com/wordpress/trunk@10520 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
8c7d54a9dc
commit
4b9c9777d7
|
@ -930,11 +930,12 @@ function wp_get_attachment_link($id = 0, $size = 'thumbnail', $permalink = false
|
|||
$link_text = attribute_escape($text);
|
||||
} elseif ( ( is_int($size) && $size != 0 ) or ( is_string($size) && $size != 'none' ) or $size != false ) {
|
||||
$link_text = wp_get_attachment_image($id, $size, $icon);
|
||||
} else {
|
||||
$link_text = $_post->post_title;
|
||||
}
|
||||
|
||||
if( trim($link_text) == '' )
|
||||
$link_text = $_post->post_title;
|
||||
|
||||
return apply_filters( 'wp_get_attachment_link', "<a href='$url' title='$post_title'>$link_text</a>", $id, $size, $permalink, $icon );
|
||||
return apply_filters( 'wp_get_attachment_link', "<a href='$url' title='$post_title'>$link_text</a>", $id, $size, $permalink, $icon, $text );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue