Ignore case differences when checking file extension in wp_audio_shortcode() and wp_video_shortcode(). props nofearinc, bhengh. fixes #25140.
git-svn-id: https://develop.svn.wordpress.org/trunk@25128 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
35e43e187d
commit
6d050b262f
@ -871,7 +871,7 @@ function wp_audio_shortcode( $attr ) {
|
||||
$primary = false;
|
||||
if ( ! empty( $src ) ) {
|
||||
$type = wp_check_filetype( $src, wp_get_mime_types() );
|
||||
if ( ! in_array( $type['ext'], $default_types ) )
|
||||
if ( ! in_array( strtolower( $type['ext'] ), $default_types ) )
|
||||
return sprintf( '<a class="wp-embedded-audio" href="%s">%s</a>', esc_url( $src ), esc_html( $src ) );
|
||||
$primary = true;
|
||||
array_unshift( $default_types, 'src' );
|
||||
@ -879,7 +879,7 @@ function wp_audio_shortcode( $attr ) {
|
||||
foreach ( $default_types as $ext ) {
|
||||
if ( ! empty( $$ext ) ) {
|
||||
$type = wp_check_filetype( $$ext, wp_get_mime_types() );
|
||||
if ( $type['ext'] === $ext )
|
||||
if ( strtolower( $type['ext'] ) === $ext )
|
||||
$primary = true;
|
||||
}
|
||||
}
|
||||
@ -1010,7 +1010,7 @@ function wp_video_shortcode( $attr ) {
|
||||
$primary = false;
|
||||
if ( ! empty( $src ) ) {
|
||||
$type = wp_check_filetype( $src, wp_get_mime_types() );
|
||||
if ( ! in_array( $type['ext'], $default_types ) )
|
||||
if ( ! in_array( strtolower( $type['ext'] ), $default_types ) )
|
||||
return sprintf( '<a class="wp-embedded-video" href="%s">%s</a>', esc_url( $src ), esc_html( $src ) );
|
||||
$primary = true;
|
||||
array_unshift( $default_types, 'src' );
|
||||
@ -1018,7 +1018,7 @@ function wp_video_shortcode( $attr ) {
|
||||
foreach ( $default_types as $ext ) {
|
||||
if ( ! empty( $$ext ) ) {
|
||||
$type = wp_check_filetype( $$ext, wp_get_mime_types() );
|
||||
if ( $type['ext'] === $ext )
|
||||
if ( strtolower( $type['ext'] ) === $ext )
|
||||
$primary = true;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user