mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
Force users to choose a nav menu in the custom nav menu widget, for a better customizer UX
Before, they had to make a dummy change to get it to render. Now they are made to choose a nav menu from the dropdown, which feels more natural. fixes #27878 for trunk. props westonruter git-svn-id: https://develop.svn.wordpress.org/trunk@28197 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
0202625937
commit
65b0b658d7
@ -1348,11 +1348,12 @@ class WP_Widget_Tag_Cloud extends WP_Widget {
|
||||
<p>
|
||||
<label for="<?php echo $this->get_field_id('nav_menu'); ?>"><?php _e('Select Menu:'); ?></label>
|
||||
<select id="<?php echo $this->get_field_id('nav_menu'); ?>" name="<?php echo $this->get_field_name('nav_menu'); ?>">
|
||||
<option value="0"><?php _e( '-- Select --' ) ?></option>
|
||||
<?php
|
||||
foreach ( $menus as $menu ) {
|
||||
echo '<option value="' . $menu->term_id . '"'
|
||||
. selected( $nav_menu, $menu->term_id, false )
|
||||
. '>'. $menu->name . '</option>';
|
||||
. '>'. esc_html( $menu->name ) . '</option>';
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user