Helper::embed_video( \WP_Post $post, array $options = array(), bool $echo = true )

Embed the video attached to a video post.


Parameters

$post

(Required) The WordPress post that has the video attached to it.

$options

(Optional) Any options passed manually or from block editor parameters.

Default value: array()

$echo

(Optional) Output the result (true) or not (false).

Default value: true


Return

(string|void) The HTML for the embed.


Source

File: includes/libs/helper.class.php

	public static function embed_video( $post, $options = [], $echo = true ){
		$_post = self::get_video_post( $post );
		if( !$_post->is_video() ){
			return;
		}

		$player = new Player\Player( $_post, $options );
		return $player->get_output( $echo );
	}

Start your video site now!

Manage and coordinate your Vimeo channels, albums or videos with your WordPress website. Perfect fit for membership, portfolio, online courses or any type of video collection.

Get Vimeotheque PRO!