Ticket #32082: 32082.patch
File 32082.patch, 1.3 KB (added by , 9 years ago) |
---|
-
src/wp-includes/media.php
2463 2463 $primary = false; 2464 2464 if ( ! empty( $atts['src'] ) ) { 2465 2465 $is_vimeo = ( preg_match( $vimeo_pattern, $atts['src'] ) ); 2466 $is_youtube = ( 2466 $is_youtube = ( preg_match( $yt_pattern, $atts['src'] ) ); 2467 2467 if ( ! $is_youtube && ! $is_vimeo ) { 2468 $type = wp_check_filetype( $atts['src'], wp_get_mime_types() ); 2468 $filename = basename( parse_url( $atts['src'], PHP_URL_PATH ) ); 2469 $type = wp_check_filetype( $filename, wp_get_mime_types() ); 2469 2470 if ( ! in_array( strtolower( $type['ext'] ), $default_types ) ) { 2470 2471 return sprintf( '<a class="wp-embedded-video" href="%s">%s</a>', esc_url( $atts['src'] ), esc_html( $atts['src'] ) ); 2471 2472 } … … 2480 2481 } else { 2481 2482 foreach ( $default_types as $ext ) { 2482 2483 if ( ! empty( $atts[ $ext ] ) ) { 2483 $type = wp_check_filetype( $atts[ $ext ], wp_get_mime_types() ); 2484 $filename = basename( parse_url( $atts[ $ext ], PHP_URL_PATH ) ); 2485 $type = wp_check_filetype( $filename, wp_get_mime_types() ); 2484 2486 if ( strtolower( $type['ext'] ) === $ext ) { 2485 2487 $primary = true; 2486 2488 }