Make WordPress Core

Changeset 40132


Ignore:
Timestamp:
02/27/2017 07:20:58 PM (8 years ago)
Author:
joemcgill
Message:

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

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

Location:
branches/4.7
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/4.7

  • branches/4.7/src/wp-includes/js/media-views.js

    r38795 r40132  
    37733773        this.controller.on( 'edit:selection', this.editSelection );
    37743774        this.createToolbar();
     3775        // In the Media Library, the sidebar is used to display errors before the attachments grid.
     3776        if ( this.options.sidebar && 'errors' === this.options.sidebar ) {
     3777            this.createSidebar();
     3778        }
    37753779        this.createUploader();
    37763780        this.createAttachments();
    3777         if ( this.options.sidebar ) {
     3781        // For accessibility reasons, place the normal sidebar after the attachments, see ticket #36909.
     3782        if ( this.options.sidebar && 'errors' !== this.options.sidebar ) {
    37783783            this.createSidebar();
    37793784        }
  • branches/4.7/src/wp-includes/js/media/views/attachments/browser.js

    r37755 r40132  
    4242        this.controller.on( 'edit:selection', this.editSelection );
    4343        this.createToolbar();
     44        // In the Media Library, the sidebar is used to display errors before the attachments grid.
     45        if ( this.options.sidebar && 'errors' === this.options.sidebar ) {
     46            this.createSidebar();
     47        }
    4448        this.createUploader();
    4549        this.createAttachments();
    46         if ( this.options.sidebar ) {
     50        // For accessibility reasons, place the normal sidebar after the attachments, see ticket #36909.
     51        if ( this.options.sidebar && 'errors' !== this.options.sidebar ) {
    4752            this.createSidebar();
    4853        }
Note: See TracChangeset for help on using the changeset viewer.