equal
deleted
inserted
replaced
217 } else { |
217 } else { |
218 $caption_size = _wp_get_image_size_from_meta( $instance['size'], wp_get_attachment_metadata( $attachment->ID ) ); |
218 $caption_size = _wp_get_image_size_from_meta( $instance['size'], wp_get_attachment_metadata( $attachment->ID ) ); |
219 $width = empty( $caption_size[0] ) ? 0 : $caption_size[0]; |
219 $width = empty( $caption_size[0] ) ? 0 : $caption_size[0]; |
220 } |
220 } |
221 |
221 |
222 $image_attributes['class'] .= sprintf( ' attachment-%1$s size-%1$s', is_array( $size ) ? join( 'x', $size ) : $size ); |
222 $image_attributes['class'] .= sprintf( ' attachment-%1$s size-%1$s', is_array( $size ) ? implode( 'x', $size ) : $size ); |
223 |
223 |
224 $image = wp_get_attachment_image( $attachment->ID, $size, false, $image_attributes ); |
224 $image = wp_get_attachment_image( $attachment->ID, $size, false, $image_attributes ); |
225 |
225 |
226 } else { |
226 } else { |
227 if ( empty( $instance['url'] ) ) { |
227 if ( empty( $instance['url'] ) ) { |