Make WordPress Core


Ignore:
Timestamp:
05/22/2014 09:35:36 PM (11 years ago)
Author:
wonderboymusic
Message:

Fix parsing in wp_match_mime_types() to allow some mime-types with + in them to appear in the list of filter links shown above the list table on upload.php.

Props _duck.
Fixes #20672.

File:
1 edited

Legend:

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

    r28497 r28553  
    6565                $class = ' class="current"';
    6666            if ( !empty( $num_posts[$mime_type] ) )
    67                 $type_links[$mime_type] = "<a href='upload.php?post_mime_type=$mime_type'$class>" . sprintf( translate_nooped_plural( $label[2], $num_posts[$mime_type] ), number_format_i18n( $num_posts[$mime_type] )) . '</a>';
     67                $type_links[$mime_type] = '<a href="upload.php?post_mime_type=' . urlencode( $mime_type ) . '"' . $class . '>' . sprintf( translate_nooped_plural( $label[2], $num_posts[$mime_type] ), number_format_i18n( $num_posts[$mime_type] )) . '</a>';
    6868        }
    6969        $type_links['detached'] = '<a href="upload.php?detached=1"' . ( $this->detached ? ' class="current"' : '' ) . '>' . sprintf( _nx( 'Unattached <span class="count">(%s)</span>', 'Unattached <span class="count">(%s)</span>', $total_orphans, 'detached files' ), number_format_i18n( $total_orphans ) ) . '</a>';
Note: See TracChangeset for help on using the changeset viewer.