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:
parent
24ad763cfc
commit
8df4668ce6
@ -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 ) . '…';
|
||||
?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</label>
|
||||
|
Loading…
Reference in New Issue
Block a user