vimeotheque_the_post_thumbnail( $size = 'post-thumbnail', $attr = '', $with_overlay = true )
Get the video image.
Description
Returns the video image HTML with or without the play button and duration overlay.
Parameters
- $size
-
(Optional)
Default value: 'post-thumbnail'
- $attr
-
(Optional)
Default value: ''
- $with_overlay
-
(Optional)
Default value: true
Return
(void)
Source
File: includes/libs/templates/post-template.php
function vimeotheque_the_post_thumbnail( $size = 'post-thumbnail', $attr = '', $with_overlay = true ){ $thumbnail = get_the_post_thumbnail( null, $size, $attr ); if( !empty( $thumbnail ) && $with_overlay ){ $overlay = sprintf( '<div class="play-btn" style="display: none;"><img src="%s" class="overlay" /></div>', \Vimeotheque\Helper::get_url() . 'assets/front-end/svg/play-solid.svg' ); $timer = sprintf( '<div class="duration" style="display: none;">%s</div>', vimeotheque_get_the_video_duration() ); $thumbnail = sprintf( '<div class="vimeotheque-featured-image with-overlay">%s%s%s</div>', $thumbnail, $overlay, $timer ); } echo $thumbnail; }