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: ''
Return Return
(string)
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 ); }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.17.0 | Introduced. |
User Contributed Notes User Contributed Notes
Permalink: