mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
Simplify logic in wp_get_attachment_link(). see #18491.
git-svn-id: http://svn.automattic.com/wordpress/trunk@19212 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
81a03236ec
commit
eea7874845
@ -1166,7 +1166,7 @@ function wp_get_attachment_link( $id = 0, $size = 'thumbnail', $permalink = fals
|
|||||||
|
|
||||||
if ( $text )
|
if ( $text )
|
||||||
$link_text = esc_attr( $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 );
|
$link_text = wp_get_attachment_image( $id, $size, $icon );
|
||||||
else
|
else
|
||||||
$link_text = '';
|
$link_text = '';
|
||||||
|
Loading…
Reference in New Issue
Block a user