File "event-video.php"

Full Path: /home/londdqdw/public_html/06/wp-content/plugins/sportspress/templates/event-video.php
File size: 638 bytes
MIME-type: text/x-php
Charset: utf-8

<?php
/**
 * Event Video
 *
 * @author      ThemeBoy
 * @package     SportsPress/Templates
 * @version     1.4
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly
}

if ( ! isset( $id ) ) {
	$id = get_the_ID();
}

$video_url = esc_url( get_post_meta( $id, 'sp_video', true ) );
if ( $video_url ) :
	?>
	<div class="sp-template sp-template-event-video sp-event-video">
		<h4 class="sp-table-caption"><?php esc_attr_e( 'Video', 'sportspress' ); ?></h4>
		<?php
		global $wp_embed;
		echo $wp_embed->autoembed( $video_url ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
		?>
	</div>
	<?php
endif;
?>