Helper::get_video_data_attributes( string $before = " ", string $after = "", bool $echo = true )
Parameters
- $before
-
(Optional)
Default value: " "
- $after
-
(Optional)
Default value: ""
- $echo
-
(Optional)
Default value: true
Return
(string|void)
Source
File: includes/libs/themes/helper.class.php
public static function get_video_data_attributes( $before = " ", $after="", $echo = true ){ $video = self::current_video_post(); if( !$video ){ return; } $options = $video->get_embed_options(); $data = [ 'video_id' => $video->video_id, 'autoplay' => $options['autoplay'], 'volume' => $options['volume'], 'size_ratio' => $video->size['ratio'], 'aspect_ratio'=> $options['aspect_ratio'] ]; $output = \Vimeotheque\Helper::data_attributes( $data, false ); if( $echo ){ echo $before . $output . $after; } return $before . $output . $after; }