We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 660aa8d commit d6e99f7Copy full SHA for d6e99f7
1 file changed
src/ableplayer.php
@@ -447,6 +447,8 @@ function ableplayer_shortcode( $atts, $content = null ) {
447
$atts,
448
'ableplayer'
449
);
450
+ // Globally remove white space on attributes.
451
+ $all_atts = map_deep( $all_atts, 'trim' );
452
// If vimeo ID is set, enqueue the vimeo player.
453
if ( $all_atts['vimeo-id'] ) {
454
$debug = ( SCRIPT_DEBUG || ABLEPLAYER_DEBUG ) ? true : false;
@@ -545,6 +547,7 @@ function ableplayer_shortcode( $atts, $content = null ) {
545
547
// Allow passing an attachment ID as poster.
546
548
$poster = $all_atts['poster'];
549
if ( is_numeric( $poster ) ) {
550
+ $poster = absint( $poster );
551
$poster = wp_get_attachment_image_url( $poster, 'large' );
552
}
553
$o .= ' poster="' . esc_attr( $poster ) . '"';
0 commit comments