Image fixes from andy. see #5911

git-svn-id: http://svn.automattic.com/wordpress/trunk@7263 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan
2008-03-12 08:10:00 +00:00
parent 3d0435bb58
commit 31abda9e0f
4 changed files with 49 additions and 14 deletions
+2 -2
View File
@@ -370,7 +370,7 @@ function the_attachment_link($id = 0, $fullsize = false, $deprecated = false, $p
}
// get an attachment page link using an image or icon if possible
function wp_get_attachment_link($id = 0, $size = 'thumbnail', $permalink = false) {
function wp_get_attachment_link($id = 0, $size = 'thumbnail', $permalink = false, $icon = false) {
$_post = & get_post( intval($id) );
if ( ('attachment' != $_post->post_type) || !$url = wp_get_attachment_url($_post->ID) )
@@ -381,7 +381,7 @@ function wp_get_attachment_link($id = 0, $size = 'thumbnail', $permalink = false
$post_title = attribute_escape($_post->post_title);
$link_text = wp_get_attachment_image($id, $size);
$link_text = wp_get_attachment_image($id, $size, $icon);
if ( !$link_text )
$link_text = $_post->post_title;