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:
parent
09f2cbdfa4
commit
f7d0fcb9d0
|
@ -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