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
317 | public static function embed_video( $post , $options = [], $echo = true ){ |
318 | $_post = self::get_video_post( $post ); |
319 | if ( ! $_post ->is_video() ){ |
323 | $player = new Player\Player( $_post , $options ); |
324 | return $player ->get_output( $echo ); |
Expand full source code
Collapse full source code