PHP4 compat in nav menu name truncation. props blepoxp, fixes #13295.

git-svn-id: http://svn.automattic.com/wordpress/trunk@14505 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2010-05-07 20:49:45 +00:00
parent 2bf6d14767
commit 00ff1537d6
1 changed files with 3 additions and 1 deletions

View File

@ -369,10 +369,12 @@ if ( ! $nav_menu_selected_title && is_nav_menu( $nav_menu_selected_id ) ) {
}
// Generate truncated menu names
foreach( (array) $nav_menus as $_nav_menu ) {
foreach( (array) $nav_menus as $key => $_nav_menu ) {
$_nav_menu->truncated_name = trim( wp_html_excerpt( $_nav_menu->name, 40 ) );
if ( $_nav_menu->truncated_name != $_nav_menu->name )
$_nav_menu->truncated_name .= '…';
$nav_menus[$key]->truncated_name = $_nav_menu->truncated_name;
}
// The theme supports menus