Changeset 14408
- Timestamp:
- 05/03/2010 08:40:32 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/nav-menus.php
r14404 r14408 303 303 } 304 304 305 // Generate truncated menu names 306 foreach( (array) $nav_menus as $_nav_menu ) { 307 $_nav_menu->truncated_name = trim( wp_html_excerpt( $_nav_menu->name, 40 ) ); 308 if ( $_nav_menu->truncated_name != $_nav_menu->name ) 309 $_nav_menu->truncated_name .= '…'; 310 } 311 305 312 // The theme supports menus 306 313 if ( current_theme_supports('nav-menus') ) { … … 354 361 <?php foreach( (array) $nav_menus as $_nav_menu ) : ?> 355 362 <option value="<?php echo esc_attr($_nav_menu->term_id) ?>" <?php selected($nav_menu_selected_id, $_nav_menu->term_id); ?>> 356 <?php echo esc_html( $_nav_menu-> name ); ?>363 <?php echo esc_html( $_nav_menu->truncated_name ); ?> 357 364 </option> 358 365 <?php endforeach; ?> … … 381 388 else 382 389 echo ' hide-if-no-js'; 383 ?>"><?php echo esc_html( $_nav_menu-> name ); ?></a><?php390 ?>"><?php echo esc_html( $_nav_menu->truncated_name ); ?></a><?php 384 391 endforeach; 385 392 ?><a href="<?php
Note: See TracChangeset
for help on using the changeset viewer.