WordPress.org

Make WordPress Core

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

File class-wp-media-list-table2.diff.txt, 1.3 KB (added by birgire, 5 years ago)
Line 
1Index: class-wp-media-list-table.php
2===================================================================
3--- class-wp-media-list-table.php       (revision 30041)
4+++ class-wp-media-list-table.php       (working copy)
5@@ -70,7 +70,7 @@
6                        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'] ) ) )
7                                $selected = ' selected="selected"';
8                        if ( !empty( $num_posts[$mime_type] ) )
9-                               $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>';
10+                               $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>';
11                }
12                $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>';
13