Make WordPress Core

Changeset 23259


Ignore:
Timestamp:
01/04/2013 06:44:21 AM (12 years ago)
Author:
koopersmith
Message:

Media: Automatically select uploading attachments in single-select workflows.

The code now automatically selects uploading attachments in all workflows. In a workflow that selects multiple attachments, all attachments added to the upload queue are selected. In a workflow that selects a single attachment (e.g. selecting a featured image), the last attachment added to the upload queue is selected.

see #22817.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/js/media-views.js

    r23163 r23259  
    534534                this.frame.content.mode('browse');
    535535
    536             // If we're in a workflow that supports multiple attachments,
    537             // automatically select any uploading attachments.
    538             if ( this.get('multiple') )
    539                 this.get('selection').add( attachment );
     536            // Automatically select any uploading attachments.
     537            //
     538            // Selections that don't support multiple attachments automatically
     539            // limit themselves to one attachment (in this case, the last
     540            // attachment in the upload queue).
     541            this.get('selection').add( attachment );
    540542        },
    541543
Note: See TracChangeset for help on using the changeset viewer.