From bb3e16e9745abc5d625a8254303c3875c7a04ebf Mon Sep 17 00:00:00 2001 From: donncha Date: Mon, 8 Jan 2007 18:25:37 +0000 Subject: WP Merge to 4701 git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@832 7be80a69-a1ef-0310-a953-fb0f7c49ff36 --- wp-includes/post-template.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'wp-includes/post-template.php') diff --git a/wp-includes/post-template.php b/wp-includes/post-template.php index 443f0c6..5ecebd9 100644 --- a/wp-includes/post-template.php +++ b/wp-includes/post-template.php @@ -378,7 +378,7 @@ function get_attachment_icon( $id = 0, $fullsize = false, $max_dims = false ) { if ( !$post = & get_post($id) ) return false; - if ( !$src = get_attachment_icon_src( $id, $fullsize ) ) + if ( !$src = get_attachment_icon_src( $post->ID, $fullsize ) ) return false; list($src, $src_file) = $src; @@ -415,11 +415,12 @@ function get_attachment_icon( $id = 0, $fullsize = false, $max_dims = false ) { function get_attachment_innerHTML($id = 0, $fullsize = false, $max_dims = false) { $id = (int) $id; + if ( !$post = & get_post($id) ) + return false; - if ( $innerHTML = get_attachment_icon($id, $fullsize, $max_dims)) + if ( $innerHTML = get_attachment_icon($post->ID, $fullsize, $max_dims)) return $innerHTML; - $post = & get_post($id); $innerHTML = attribute_escape($post->post_title); -- cgit