Make WordPress Core

Changeset 23270


Ignore:
Timestamp:
01/04/2013 08:03:39 PM (11 years ago)
Author:
nacin
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.

Merges [23259] to the 3.5 branch.

props koopersmith.
fixes #22817.

File:
1 edited

Legend:

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

    r23268 r23270  
    537537                this.frame.content.mode('browse');
    538538
    539             // If we're in a workflow that supports multiple attachments,
    540             // automatically select any uploading attachments.
    541             if ( this.get('multiple') )
    542                 this.get('selection').add( attachment );
     539            // Automatically select any uploading attachments.
     540            //
     541            // Selections that don't support multiple attachments automatically
     542            // limit themselves to one attachment (in this case, the last
     543            // attachment in the upload queue).
     544            this.get('selection').add( attachment );
    543545        },
    544546
Note: See TracChangeset for help on using the changeset viewer.