<?php
/**
 * Template part for displaying page featured image.
 *
 * @link https://codex.wordpress.org/Template_Hierarchy
 *
 * @package     Business Interface
 * @author  WPInterface Team
 * @since   1.0.0
 */

/**
 * Do not allow direct script access.
 */
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

// Get default post media.
$business_interface_media = business_interface_get_post_media( '' );

if ( ! $business_interface_media || post_password_required() ) {
	return;
}

$business_interface_media = apply_filters( 'business_interface_post_thumbnail', $business_interface_media, get_the_ID() );

$business_interface_classes = array( 'post-thumb', 'entry-media', 'thumbnail' );

$business_interface_classes = apply_filters( 'business_interface_post_thumbnail_wrapper_classes', $business_interface_classes, get_the_ID() );
$business_interface_classes = trim( implode( ' ', array_unique( $business_interface_classes ) ) );

// Print the post thumbnail.
echo wp_kses_post(
	sprintf(
		'<div class="%2$s">%1$s</div>',
		$business_interface_media,
		esc_attr( $business_interface_classes )
	)
);
