mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-10-05 23:27:04 +00:00
Image fixes from andy. see #5911
git-svn-id: https://develop.svn.wordpress.org/trunk@7263 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user