Media: Restore correct upload errors displaying after [37610].

Props codegeass, MatheusGimenez, joemcgill.
Merges [40126] to the 4.7 branch.
Fixes #39516.

Built from https://develop.svn.wordpress.org/branches/4.7@40132


git-svn-id: http://core.svn.wordpress.org/branches/4.7@40069 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Joe McGill 2017-02-27 19:21:36 +00:00
parent ecf9c19e04
commit c2a90ea28d
3 changed files with 10 additions and 5 deletions

View File

@ -3772,9 +3772,14 @@ AttachmentsBrowser = View.extend({
this.controller.on( 'toggle:upload:attachment', this.toggleUploader, this ); this.controller.on( 'toggle:upload:attachment', this.toggleUploader, this );
this.controller.on( 'edit:selection', this.editSelection ); this.controller.on( 'edit:selection', this.editSelection );
this.createToolbar(); this.createToolbar();
// In the Media Library, the sidebar is used to display errors before the attachments grid.
if ( this.options.sidebar && 'errors' === this.options.sidebar ) {
this.createSidebar();
}
this.createUploader(); this.createUploader();
this.createAttachments(); this.createAttachments();
if ( this.options.sidebar ) { // For accessibility reasons, place the normal sidebar after the attachments, see ticket #36909.
if ( this.options.sidebar && 'errors' !== this.options.sidebar ) {
this.createSidebar(); this.createSidebar();
} }
this.updateContent(); this.updateContent();

File diff suppressed because one or more lines are too long

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '4.7.3-alpha-40119'; $wp_version = '4.7.3-alpha-40132';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.