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.
Built from https://develop.svn.wordpress.org/trunk@59156


git-svn-id: http://core.svn.wordpress.org/trunk@58551 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
joedolson 2024-10-01 18:46:16 +00:00
parent 46b25e1302
commit 9a1570e024
3 changed files with 8 additions and 6 deletions

View File

@ -2282,15 +2282,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;
}

File diff suppressed because one or more lines are too long

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.7-beta1-59155';
$wp_version = '6.7-beta1-59156';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.