Make WordPress Core

Changeset 59156


Ignore:
Timestamp:
10/01/2024 06:44:01 PM (11 days ago)
Author:
joedolson
Message:

Revert [59139] due to broad side effects in media library.

The change in [59139] caused all media modal menus to disappear.

Unprops joedolson.
See #60666.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/js/media/controllers/state.js

    r59139 r59156  
    166166        var menu = this.frame.menu,
    167167            mode = this.get('menu'),
    168             view,
     168            actionMenuItems,
     169            actionMenuLength,
     170            view;
     171
     172        if ( this.frame.menu ) {
    169173            actionMenuItems = this.frame.menu.get('views'),
    170             actionMenuLength = actionMenuItems ? actionMenuItems.views.get().length : 0;
    171 
    172         if ( this.frame.menu ) {
     174            actionMenuLength = actionMenuItems ? actionMenuItems.views.get().length : 0,
    173175            // Show action menu only if it is active and has more than one default element.
    174176            this.frame.$el.toggleClass( 'hide-menu', ! mode || actionMenuLength < 2 );
    175177        }
    176         if ( ! mode || actionMenuLength < 2 ) {
     178        if ( ! mode ) {
    177179            return;
    178180        }
Note: See TracChangeset for help on using the changeset viewer.