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: https://develop.svn.wordpress.org/trunk@23259 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
46e1c12b98
commit
45d01dad51
|
@ -533,9 +533,11 @@
|
||||||
if ( 'upload' === content.mode() )
|
if ( 'upload' === content.mode() )
|
||||||
this.frame.content.mode('browse');
|
this.frame.content.mode('browse');
|
||||||
|
|
||||||
// If we're in a workflow that supports multiple attachments,
|
// Automatically select any uploading attachments.
|
||||||
// automatically select any uploading attachments.
|
//
|
||||||
if ( this.get('multiple') )
|
// 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 );
|
this.get('selection').add( attachment );
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue