Helper::get_player_size( string $before = ' style="', string $after = '"', bool $echo = true )
Parameters
- $before
-
(Optional)
Default value: ' style="'
- $after
-
(Optional)
Default value: '"'
- $echo
-
(Optional)
Default value: true
Return
(string)
Source
File: includes/libs/themes/helper.class.php
public static function get_player_size( $before = ' style="', $after='"', $echo = true ){ $player = \Vimeotheque\Helper::get_embed_options( self::get_player_options() ); $height = \Vimeotheque\Helper::calculate_player_height( $player['aspect_ratio'], $player['width'] ); $output = sprintf( 'width: %dpx; height: %dpx;', $player['width'], $height ); if( $echo ){ echo $before . $output . $after; } return $before . $output . $after; }