From eea78748453ce889f89e9a82e2ab29f73f10b22f Mon Sep 17 00:00:00 2001 From: nacin Date: Tue, 8 Nov 2011 14:22:42 +0000 Subject: [PATCH] Simplify logic in wp_get_attachment_link(). see #18491. git-svn-id: http://svn.automattic.com/wordpress/trunk@19212 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/post-template.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/post-template.php b/wp-includes/post-template.php index 36e1d437b..d2780573d 100644 --- a/wp-includes/post-template.php +++ b/wp-includes/post-template.php @@ -1166,7 +1166,7 @@ function wp_get_attachment_link( $id = 0, $size = 'thumbnail', $permalink = fals if ( $text ) $link_text = esc_attr( $text ); - elseif ( ( is_int( $size ) && $size != 0 ) || ( is_string( $size ) && $size != 'none' ) || $size != false ) + elseif ( $size && 'none' != $size ) $link_text = wp_get_attachment_image( $id, $size, $icon ); else $link_text = '';