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:
parent
2bf6d14767
commit
00ff1537d6
|
@ -369,10 +369,12 @@ if ( ! $nav_menu_selected_title && is_nav_menu( $nav_menu_selected_id ) ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Generate truncated menu names
|
// 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 ) );
|
$_nav_menu->truncated_name = trim( wp_html_excerpt( $_nav_menu->name, 40 ) );
|
||||||
if ( $_nav_menu->truncated_name != $_nav_menu->name )
|
if ( $_nav_menu->truncated_name != $_nav_menu->name )
|
||||||
$_nav_menu->truncated_name .= '…';
|
$_nav_menu->truncated_name .= '…';
|
||||||
|
|
||||||
|
$nav_menus[$key]->truncated_name = $_nav_menu->truncated_name;
|
||||||
}
|
}
|
||||||
|
|
||||||
// The theme supports menus
|
// The theme supports menus
|
||||||
|
|
Loading…
Reference in New Issue