lifterlms_loop_featured_video()

Output a featured video on the course tile in a LifterLMS Loop.


Return Return

(void)


Top ↑

Source Source

File: includes/functions/llms.functions.templates.loop.php

function lifterlms_loop_featured_video() {
	global $post;
	if ( 'course' === $post->post_type || 'llms_membership' === $post->post_type ) {
		$product = llms_get_post( $post );
		if ( 'yes' === $product->get( 'tile_featured_video' ) ) {
			$video = $product->get_video();
			if ( $video ) {
				// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
				echo '<div class="llms-video-wrapper">' . $video . '</div>';
			}
		}
	}
}


Top ↑

Changelog Changelog

Changelog
Version Description
7.1.3 Add div tag to wrap featured video output in loop.
3.3.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.