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

git-svn-id: http://core.svn.wordpress.org/trunk@23041 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2012-12-04 20:51:37 +00:00
parent affabf29f4
commit d47267224c
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',