Menus: Hide bulk-select on new menu page.

Prevent the bulk-select option from displaying when adding a new menu. This also prevents the option from displaying when an administrator first visits the menu page and no menus are set.

Props dlh, sabernhardt.
Fixes #53654.


Built from https://develop.svn.wordpress.org/trunk@51539


git-svn-id: http://core.svn.wordpress.org/trunk@51150 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Peter Wilson 2021-08-04 05:00:59 +00:00
parent eff1c81de6
commit 7829821c62
2 changed files with 25 additions and 17 deletions

View File

@ -981,12 +981,16 @@ require_once ABSPATH . 'wp-admin/admin-header.php';
<div class="drag-instructions post-body-plain" <?php echo $hide_style; ?>>
<p><?php echo $starter_copy; ?></p>
</div>
<?php if ( ! $add_new_screen ) : ?>
<div id="nav-menu-bulk-actions-top" class="bulk-actions">
<label class="bulk-select-button" for="bulk-select-switcher-top">
<input type="checkbox" id="bulk-select-switcher-top" name="bulk-select-switcher-top" class="bulk-select-switcher">
<span class="bulk-select-button-label"><?php _e( 'Bulk Select' ); ?></span>
</label>
</div>
<?php endif; ?>
<?php
if ( isset( $edit_markup ) && ! is_wp_error( $edit_markup ) ) {
echo $edit_markup;
@ -1012,6 +1016,8 @@ require_once ABSPATH . 'wp-admin/admin-header.php';
$no_menus_style = 'style="display: none;"';
}
?>
<?php if ( ! $add_new_screen ) : ?>
<div id="nav-menu-bulk-actions-bottom" class="bulk-actions">
<label class="bulk-select-button" for="bulk-select-switcher-bottom">
<input type="checkbox" id="bulk-select-switcher-bottom" name="bulk-select-switcher-top" class="bulk-select-switcher">
@ -1023,6 +1029,8 @@ require_once ABSPATH . 'wp-admin/admin-header.php';
<ul></ul>
</div>
</div>
<?php endif; ?>
<div class="menu-settings" <?php echo $no_menus_style; ?>>
<h3><?php _e( 'Menu Settings' ); ?></h3>
<?php

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.9-alpha-51538';
$wp_version = '5.9-alpha-51539';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.