When adding images to a gallery, use "Images" as the filter name, rather than "All media items". props koopersmith. fixes #22722.

git-svn-id: https://develop.svn.wordpress.org/trunk@23041 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2012-12-04 20:51:37 +00:00
parent 60b3adaa09
commit 6d580e34db
1 changed files with 9 additions and 1 deletions

View File

@ -3317,6 +3317,7 @@
initialize: function() {
this.createFilters();
_.extend( this.filters, this.options.filters );
// Build `<option>` elements.
this.$el.html( _.chain( this.filters ).map( function( filter, value ) {
@ -3361,9 +3362,16 @@
media.view.AttachmentFilters.Uploaded = media.view.AttachmentFilters.extend({
createFilters: function() {
var type = this.model.get('type'),
types = media.view.settings.mimeTypes,
text;
if ( types && type )
text = types[ type ];
this.filters = {
all: {
text: l10n.allMediaItems,
text: text || l10n.allMediaItems,
props: {
uploadedTo: null,
orderby: 'date',