Make WordPress Core


Ignore:
Timestamp:
01/04/2015 02:31:29 AM (10 years ago)
Author:
wonderboymusic
Message:

Improve the handling of comma-separated mime-types in wp_match_mime_types(), particularly as pertains to the mime-type selector on the Media list table screen.

Props mdgl.
Fixes #30788.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-media-list-table.php

    r30813 r31042  
    7676                $selected = ' selected="selected"';
    7777            if ( !empty( $num_posts[$mime_type] ) )
    78                 $type_links[$mime_type] = '<option value="post_mime_type:' . sanitize_mime_type( $mime_type ) . '"' . $selected . '>' . sprintf( translate_nooped_plural( $label[2], $num_posts[$mime_type] ), number_format_i18n( $num_posts[$mime_type] )) . '</option>';
     78                $type_links[$mime_type] = '<option value="post_mime_type:' . esc_attr( $mime_type ) . '"' . $selected . '>' . sprintf( translate_nooped_plural( $label[2], $num_posts[$mime_type] ), number_format_i18n( $num_posts[$mime_type] )) . '</option>';
    7979        }
    8080        $type_links['detached'] = '<option value="detached"' . ( $this->detached ? ' selected="selected"' : '' ) . '>' . sprintf( _nx( 'Unattached (%s)', 'Unattached (%s)', $total_orphans, 'detached files' ), number_format_i18n( $total_orphans ) ) . '</option>';
Note: See TracChangeset for help on using the changeset viewer.