<?php
/**
 * Video latest content
 *
 * @package wpstream-theme
 */

$wpstream_get_post_type = $post->post_type;
$author_id              = wpstream_get_author_id( $post->ID );
$use_transient          = wpstream_theme_return_use_transient();
$transient_key          = 'wpstream_latest_video_added';

$broadcaster_video_query_args = array(
	'post_type'      => $wpstream_get_post_type,
	'post_status'    => 'publish',
	'posts_per_page' => 4,
	'orderby'        => 'date',
	'order'          => 'DESC',
);

$query = wpstream_theme_custom_query( $broadcaster_video_query_args, $transient_key, $use_transient );

if ( $query->found_posts > 0 ) { ?>

	<section class="wpstream_section wpstream_latest_videos">
		<div class="<?php echo esc_attr( wpstream_theme_container_class() ); ?>">

			<div class="wpstream-grid-main">
				<h2 class="title-more">

					<?php
					echo esc_html( $wpstream_section_title ?? '' );
					?>
				</h2>
				<div class="row">

					<?php
					include get_template_directory() . '/template-parts/single/video-loop-content.php';
					?>

				</div>
			</div>
		</div>
	</section>
	
<?php } ?>
