WordPress.org

Make WordPress Core

Ticket #30123: class-wp-media-list-table2.diff

File class-wp-media-list-table2.diff, 1.3 KB (added by birgire, 5 years ago)

sorry, hopefully this is the correct .diff file, not the txt version as my previous ones ;-)

  • class-wp-media-list-table.php

     
    7070                        if ( !empty( $_GET['attachment-filter'] ) && strpos( $_GET['attachment-filter'], 'post_mime_type:' ) === 0 && wp_match_mime_types( $mime_type, str_replace( 'post_mime_type:', '', $_GET['attachment-filter'] ) ) )
    7171                                $selected = ' selected="selected"';
    7272                        if ( !empty( $num_posts[$mime_type] ) )
    73                                 $type_links[$mime_type] = '<option value="post_mime_type:' . urlencode( $mime_type ) . '"' . $selected . '>' . sprintf( translate_nooped_plural( $label[2], $num_posts[$mime_type] ), number_format_i18n( $num_posts[$mime_type] )) . '</option>';
     73                                $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>';
    7474                }
    7575                $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>';
    7676