diff --git a/src/js/_enqueues/lib/nav-menu.js b/src/js/_enqueues/lib/nav-menu.js
index 7633d92453..10b1330a8d 100644
a
|
b
|
|
1557 | 1557 | }); |
1558 | 1558 | }); |
1559 | 1559 | |
| 1560 | // Show bulk action |
| 1561 | $( document ).on( 'menu-item-added', function() { |
| 1562 | if ( ! $( '.bulk-actions' ).is( ':visible' ) ) { |
| 1563 | $( '.bulk-actions' ).show(); |
| 1564 | } |
| 1565 | } ); |
| 1566 | |
| 1567 | // Hide bulk action |
| 1568 | $( document ).on( 'menu-removing-item', function( e, el ) { |
| 1569 | var menuElement = $( el ).parents( '#menu-to-edit' ); |
| 1570 | if ( menuElement.find( 'li' ).length === 1 && $( '.bulk-actions' ).is( ':visible' ) ) { |
| 1571 | $( '.bulk-actions' ).hide(); |
| 1572 | } |
| 1573 | } ); |
| 1574 | |
1560 | 1575 | })(jQuery); |
diff --git a/src/wp-admin/nav-menus.php b/src/wp-admin/nav-menus.php
index c3674358fa..e95bb68a90 100644
a
|
b
|
require_once ABSPATH . 'wp-admin/admin-header.php'; |
1000 | 1000 | </div> |
1001 | 1001 | |
1002 | 1002 | <?php if ( ! $add_new_screen ) : ?> |
1003 | | <div id="nav-menu-bulk-actions-top" class="bulk-actions"> |
| 1003 | <div id="nav-menu-bulk-actions-top" class="bulk-actions" <?php echo $hide_style; ?>> |
1004 | 1004 | <label class="bulk-select-button" for="bulk-select-switcher-top"> |
1005 | 1005 | <input type="checkbox" id="bulk-select-switcher-top" name="bulk-select-switcher-top" class="bulk-select-switcher"> |
1006 | 1006 | <span class="bulk-select-button-label"><?php _e( 'Bulk Select' ); ?></span> |
… |
… |
require_once ABSPATH . 'wp-admin/admin-header.php'; |
1035 | 1035 | ?> |
1036 | 1036 | |
1037 | 1037 | <?php if ( ! $add_new_screen ) : ?> |
1038 | | <div id="nav-menu-bulk-actions-bottom" class="bulk-actions"> |
| 1038 | <div id="nav-menu-bulk-actions-bottom" class="bulk-actions" <?php echo $hide_style; ?>> |
1039 | 1039 | <label class="bulk-select-button" for="bulk-select-switcher-bottom"> |
1040 | 1040 | <input type="checkbox" id="bulk-select-switcher-bottom" name="bulk-select-switcher-top" class="bulk-select-switcher"> |
1041 | 1041 | <span class="bulk-select-button-label"><?php _e( 'Bulk Select' ); ?></span> |