Skip to content

Commit be5f917

Browse files
committed
deploy: 6789b1f
1 parent c01f206 commit be5f917

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

ableplayer.php.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,12 @@
532532
$o .= ' preload="' . esc_attr( $preload ) . '"';
533533
}
534534
if ( ! empty( $all_atts['poster'] ) ) {
535-
$o .= ' poster="' . esc_attr( $all_atts['poster'] ) . '"';
535+
// Allow passing an attachment ID as poster.
536+
$poster = $all_atts['poster'];
537+
if ( is_numeric( $poster ) ) {
538+
$poster = wp_get_attachment_image_url( $poster, 'large' );
539+
}
540+
$o .= ' poster="' . esc_attr( $poster ) . '"';
536541
}
537542
if ( ! empty( $all_atts['width'] ) ) {
538543
$o .= ' width="' . esc_attr( $all_atts['width'] ) . '"';

0 commit comments

Comments
 (0)