wp/wp-includes/widgets/class-wp-widget-media-image.php
changeset 18 be944660c56a
parent 16 a86126ab1dd4
child 19 3d72ae0968f4
equal deleted inserted replaced
17:34716fd837a4 18:be944660c56a
   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'] ) ) {