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

git-svn-id: https://develop.svn.wordpress.org/trunk@14671 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2010-05-15 20:00:48 +00:00
parent 24ad763cfc
commit 8df4668ce6

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>