Skip to content

Commit 0fc037e

Browse files
committed
Invalid comparison set all types to video/mp4
1 parent 89d174c commit 0fc037e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ableplayer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ function ableplayer_shortcode( $atts, $content = null ) {
429429
$source = '';
430430
$datasource = '';
431431
if ( ! ( $all_atts['youtube-id'] || $all_atts['vimeo-id'] || $all_atts['media-id'] ) ) {
432-
// Shortcode must have one of YouTube, Vimeo, or local video source.
432+
// Shortcode must have one of YouTube, Vimeo, or a local source.
433433
return false;
434434
} else {
435435
if ( $all_atts['media-id'] ) {
@@ -439,7 +439,7 @@ function ableplayer_shortcode( $atts, $content = null ) {
439439
return false;
440440
} else {
441441
$type = get_post_mime_type( $all_atts['media-id'] );
442-
$type = ( 'video/quicktime' ) ? 'video/mp4' : $type;
442+
$type = ( $type === 'video/quicktime' ) ? 'video/mp4' : $type;
443443
$source = '<source type="' . esc_attr( $type ) . '" src="' . esc_url( $media_id ) . '"%datasrc%>' . PHP_EOL;
444444
}
445445
}

0 commit comments

Comments
 (0)