File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -447,6 +447,8 @@ function ableplayer_shortcode( $atts, $content = null ) {
447447 $ atts ,
448448 'ableplayer '
449449 );
450+ // Globally remove white space on attributes.
451+ $ all_atts = map_deep ( $ all_atts , 'trim ' );
450452 // If vimeo ID is set, enqueue the vimeo player.
451453 if ( $ all_atts ['vimeo-id ' ] ) {
452454 $ debug = ( SCRIPT_DEBUG || ABLEPLAYER_DEBUG ) ? true : false ;
@@ -545,6 +547,7 @@ function ableplayer_shortcode( $atts, $content = null ) {
545547 // Allow passing an attachment ID as poster.
546548 $ poster = $ all_atts ['poster ' ];
547549 if ( is_numeric ( $ poster ) ) {
550+ $ poster = absint ( $ poster );
548551 $ poster = wp_get_attachment_image_url ( $ poster , 'large ' );
549552 }
550553 $ o .= ' poster=" ' . esc_attr ( $ poster ) . '" ' ;
You can’t perform that action at this time.
0 commit comments