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


git-svn-id: http://core.svn.wordpress.org/trunk@28027 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Mark Jaquith 2014-04-24 20:45:31 +00:00
parent 77beef348d
commit 8c830cef80
1 changed files with 2 additions and 1 deletions

View File

@ -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>