Truncate long menu names in the menu locations box. props koopersmith, see #13378.

git-svn-id: http://svn.automattic.com/wordpress/trunk@14671 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2010-05-15 20:00:48 +00:00
parent 09f2cbdfa4
commit f7d0fcb9d0
1 changed files with 4 additions and 1 deletions

View File

@ -416,7 +416,10 @@ function wp_nav_menu_locations_meta_box() {
<option value=""></option>
<?php foreach ( $menus as $menu ) : ?>
<option<?php selected( isset( $menu_locations[ $location ] ) && $menu_locations[ $location ] == $menu->term_id ); ?>
value="<?php echo $menu->term_id; ?>"><?php echo $menu->name; ?></option>
value="<?php echo $menu->term_id; ?>"><?php
$truncated_name = wp_html_excerpt( $menu->name, 40 );
echo $truncated_name == $menu->name ? $menu->name : trim( $truncated_name ) . '&hellip;';
?></option>
<?php endforeach; ?>
</select>
</label>