Make WordPress Core

Ticket #46127: 46127.1.patch

File 46127.1.patch, 651 bytes (added by Mista-Flo, 4 years ago)
  • src/js/media/models/attachments.js

    diff --git a/src/js/media/models/attachments.js b/src/js/media/models/attachments.js
    index 2819093093..f80cac42f6 100644
    a b var Attachments = Backbone.Collection.extend(/** @lends wp.media.model.Attachmen 
    151151         */
    152152        validator: function( attachment ) {
    153153
    154                 // Filter out contextually created attachments (e.g. headers, logos, etc.).
    155                 if (
    156                         ! _.isUndefined( attachment.attributes.context ) &&
    157                         '' !== attachment.attributes.context
    158                 ) {
    159                         return false;
    160                 }
    161 
    162154                if ( ! this.validateDestroyed && attachment.destroyed ) {
    163155                        return false;
    164156                }