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. Merges [28197] to the 3.9 branch. fixes #27878. props westonruter Built from https://develop.svn.wordpress.org/branches/3.9@28198 git-svn-id: http://core.svn.wordpress.org/branches/3.9@28028 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
3b0cc6d419
commit
09e4a3ca6c
|
@ -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