LLMS_Post_Model::get_embed( string $type = 'video', string $prop = '' )

Get media embeds


Description Description


Parameters Parameters

$type

(string) (Optional) embed type [video|audio]

Default value: 'video'

$prop

(string) (Optional) postmeta property name, defaults to {$type}_embed

Default value: ''


Top ↑

Return Return

(string)


Top ↑

Source Source

File: includes/abstracts/abstract.llms.post.model.php

	protected function get_embed( $type = 'video', $prop = '' ) {

		$ret = '';

		$prop = $prop ? $prop : $type . '_embed';
		$url = $this->get( $prop );
		if ( $url ) {

			$ret = wp_oembed_get( $url );

			if ( ! $ret ) {

				$ret = do_shortcode( sprintf( '[%1$s src="%2$s"]', $type, $url ) );

			}
		}

		return apply_filters( sprintf( 'llms_%1$s_get_%2$s', $this->model_post_type, $type ), $ret, $this, $type, $prop );

	}

Top ↑

Changelog Changelog

Changelog
Version Description
3.17.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

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





Permalink: