We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c01f206 commit be5f917Copy full SHA for be5f917
ableplayer.php.html
@@ -532,7 +532,12 @@
532
$o .= ' preload="' . esc_attr( $preload ) . '"';
533
}
534
if ( ! empty( $all_atts['poster'] ) ) {
535
- $o .= ' poster="' . esc_attr( $all_atts['poster'] ) . '"';
+ // 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 ) . '"';
541
542
if ( ! empty( $all_atts['width'] ) ) {
543
$o .= ' width="' . esc_attr( $all_atts['width'] ) . '"';
0 commit comments