invp_get_the_youtube_url( $post_ID = null )

invp_get_the_youtube_url


Description Description

Returns this vehicle's YouTube video URL or empty string.


Top ↑

Return Return

(string) This vehicle's YouTube URL or empty string


Top ↑

Source Source

File: includes/template-tags.php

 */
function invp_get_the_youtube_url( $post_ID = null )
{
	if( empty( $post_ID ) )
	{
		$post_ID = get_the_ID();
	}

	$video_id = INVP::get_meta( 'youtube', $post_ID );
	if ( empty( $video_id ) )
	{
		return '';
	}

	return 'https://www.youtube.com/watch?v=' . $video_id;