<?php
/**
 * Миниатюра.
 *
 * Шаблон для отображения минитюры.
 * 
 *
 * @author veselka.ua
 * @version 0.1
 *
 * @package veselka_ua/themes
 */

if( is_single() ) {
?>

							<div class="entry-thumbnail">
								<?php the_post_thumbnail('medium', array( 'alt' => the_title('', false, '') )); ?>
							</div>
<?php
} else {
?>
							<div class="entry-thumbnail row">
								<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" itemprop="image" itemscope itemtype="https://schema.org/ImageObject">
									<?php the_post_thumbnail('medium', array( 'alt' => the_title('', false, '') )); ?>
									<?php $image_attributes = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID, '' ), 'thumbnail' ); ?>
									<link itemprop="url" href="<?php echo $image_attributes[0] ?>">
									<meta itemprop="width" content="<?php echo $image_attributes[1] ?>">
									<meta itemprop="height" content="<?php echo $image_attributes[2] ?>">
								</a>
							</div>
<?php
}
?>