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. git-svn-id: http://core.svn.wordpress.org/trunk@23259 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
ed9743d358
commit
1132f798f7
|
@ -533,10 +533,12 @@
|
|||
if ( 'upload' === content.mode() )
|
||||
this.frame.content.mode('browse');
|
||||
|
||||
// If we're in a workflow that supports multiple attachments,
|
||||
// automatically select any uploading attachments.
|
||||
if ( this.get('multiple') )
|
||||
this.get('selection').add( attachment );
|
||||
// Automatically select any uploading attachments.
|
||||
//
|
||||
// Selections that don't support multiple attachments automatically
|
||||
// limit themselves to one attachment (in this case, the last
|
||||
// attachment in the upload queue).
|
||||
this.get('selection').add( attachment );
|
||||
},
|
||||
|
||||
saveContentMode: function() {
|
||||
|
|
Loading…
Reference in New Issue