WordPress.org

Make WordPress Core

Changeset 24945 for branches/3.6


Ignore:
Timestamp:
08/01/2013 01:33:56 PM (8 years ago)
Author:
nacin
Message:

Use wp_get_mime_types() when calling wp_check_filetype() in the audio and video shortcodes. fixes #24911.

Merges [24911] to the 3.6 branch.

Location:
branches/3.6
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/3.6

  • branches/3.6/wp-includes/media.php

    r24932 r24945  
    871871    $primary = false;
    872872    if ( ! empty( $src ) ) {
    873         $type = wp_check_filetype( $src );
     873        $type = wp_check_filetype( $src, wp_get_mime_types() );
    874874        if ( ! in_array( $type['ext'], $default_types ) )
    875875            return sprintf( '<a class="wp-embedded-audio" href="%s">%s</a>', esc_url( $src ), esc_html( $src ) );
     
    879879        foreach ( $default_types as $ext ) {
    880880            if ( ! empty( $$ext ) ) {
    881                 $type = wp_check_filetype( $$ext );
     881                $type = wp_check_filetype( $$ext, wp_get_mime_types() );
    882882                if ( $type['ext'] === $ext )
    883883                    $primary = true;
     
    935935            if ( empty( $fileurl ) )
    936936                $fileurl = $$fallback;
    937             $type = wp_check_filetype( $$fallback );
     937            $type = wp_check_filetype( $$fallback, wp_get_mime_types() );
    938938            $html .= sprintf( $source, $type['type'], esc_url( $$fallback ) );
    939939        }
     
    10091009    $primary = false;
    10101010    if ( ! empty( $src ) ) {
    1011         $type = wp_check_filetype( $src );
     1011        $type = wp_check_filetype( $src, wp_get_mime_types() );
    10121012        if ( ! in_array( $type['ext'], $default_types ) )
    10131013            return sprintf( '<a class="wp-embedded-video" href="%s">%s</a>', esc_url( $src ), esc_html( $src ) );
     
    10171017        foreach ( $default_types as $ext ) {
    10181018            if ( ! empty( $$ext ) ) {
    1019                 $type = wp_check_filetype( $$ext );
     1019                $type = wp_check_filetype( $$ext, wp_get_mime_types() );
    10201020                if ( $type['ext'] === $ext )
    10211021                    $primary = true;
     
    10761076            if ( empty( $fileurl ) )
    10771077                $fileurl = $$fallback;
    1078             $type = wp_check_filetype( $$fallback );
     1078            $type = wp_check_filetype( $$fallback, wp_get_mime_types() );
    10791079            // m4v sometimes shows up as video/mpeg which collides with mp4
    10801080            if ( 'm4v' === $type['ext'] )
Note: See TracChangeset for help on using the changeset viewer.