Simplify logic in wp_get_attachment_link(). see #18491.
git-svn-id: https://develop.svn.wordpress.org/trunk@19212 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
996231e74d
commit
fe2bd09613
@ -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 = '';
|
||||
|
Loading…
Reference in New Issue
Block a user