summaryrefslogtreecommitdiffstats
path: root/wp-includes/post-template.php
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2007-01-08 18:25:37 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2007-01-08 18:25:37 +0000
commitbb3e16e9745abc5d625a8254303c3875c7a04ebf (patch)
tree105f7abc052be575a643971ab59b3b38f4fa7056 /wp-includes/post-template.php
parent11571c1befd735bd1d69caea2b093164215b4fee (diff)
downloadwordpress-mu-bb3e16e9745abc5d625a8254303c3875c7a04ebf.tar.gz
wordpress-mu-bb3e16e9745abc5d625a8254303c3875c7a04ebf.tar.xz
wordpress-mu-bb3e16e9745abc5d625a8254303c3875c7a04ebf.zip
WP Merge to 4701
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@832 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-includes/post-template.php')
-rw-r--r--wp-includes/post-template.php7
1 files changed, 4 insertions, 3 deletions
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);