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.
Return Return
(string) This vehicle's YouTube URL or empty string
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; }
Expand full source code Collapse full source code View on Github