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:
parent
46b25e1302
commit
9a1570e024
|
@ -2282,15 +2282,17 @@ var State = Backbone.Model.extend(/** @lends wp.media.controller.State.prototype
|
||||||
_menu: function() {
|
_menu: function() {
|
||||||
var menu = this.frame.menu,
|
var menu = this.frame.menu,
|
||||||
mode = this.get('menu'),
|
mode = this.get('menu'),
|
||||||
view,
|
actionMenuItems,
|
||||||
actionMenuItems = this.frame.menu.get('views'),
|
actionMenuLength,
|
||||||
actionMenuLength = actionMenuItems ? actionMenuItems.views.get().length : 0;
|
view;
|
||||||
|
|
||||||
if ( this.frame.menu ) {
|
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.
|
// Show action menu only if it is active and has more than one default element.
|
||||||
this.frame.$el.toggleClass( 'hide-menu', ! mode || actionMenuLength < 2 );
|
this.frame.$el.toggleClass( 'hide-menu', ! mode || actionMenuLength < 2 );
|
||||||
}
|
}
|
||||||
if ( ! mode || actionMenuLength < 2 ) {
|
if ( ! mode ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -16,7 +16,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @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.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue