Media: Allow contextually generated images to show in Media Library grid view.
In grid view, contextually generated or cropped media is filtered out causing page numbering to be offset and incorrect. This also impacted any media utilizing `media-models.js`. Props webmandesign, audrasjb, afercia, pbiron, mista-flo. Fixes #46127, #50410, #47215. git-svn-id: https://develop.svn.wordpress.org/trunk@48989 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
f5fc714cf6
commit
7da52b8eae
@ -151,14 +151,6 @@ var Attachments = Backbone.Collection.extend(/** @lends wp.media.model.Attachmen
|
||||
*/
|
||||
validator: function( attachment ) {
|
||||
|
||||
// Filter out contextually created attachments (e.g. headers, logos, etc.).
|
||||
if (
|
||||
! _.isUndefined( attachment.attributes.context ) &&
|
||||
'' !== attachment.attributes.context
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( ! this.validateDestroyed && attachment.destroyed ) {
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user