Skip to content

Commit

Permalink
Revert [59139] due to broad side effects in media library.
Browse files Browse the repository at this point in the history
The change in [59139] caused all media modal menus to disappear.

Unprops joedolson.
See #60666.

git-svn-id: https://develop.svn.wordpress.org/trunk@59156 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
joedolson committed Oct 1, 2024
1 parent 522a909 commit 1ec0abb
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/js/media/controllers/state.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,15 +165,17 @@ var State = Backbone.Model.extend(/** @lends wp.media.controller.State.prototype
_menu: function() {
var menu = this.frame.menu,
mode = this.get('menu'),
view,
actionMenuItems = this.frame.menu.get('views'),
actionMenuLength = actionMenuItems ? actionMenuItems.views.get().length : 0;
actionMenuItems,
actionMenuLength,
view;

if ( this.frame.menu ) {
actionMenuItems = this.frame.menu.get('views'),
actionMenuLength = actionMenuItems ? actionMenuItems.views.get().length : 0,
// Show action menu only if it is active and has more than one default element.
this.frame.$el.toggleClass( 'hide-menu', ! mode || actionMenuLength < 2 );
}
if ( ! mode || actionMenuLength < 2 ) {
if ( ! mode ) {
return;
}

Expand Down

0 comments on commit 1ec0abb

Please sign in to comment.