Reinstate 'label' property of nav menu items. Fixes a regression from [22234].

Fixes #24840. Props johnbillion.

git-svn-id: https://develop.svn.wordpress.org/trunk@24798 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mark Jaquith 2013-07-27 06:50:59 +00:00
parent 54d6613428
commit 30a17c9ab9
1 changed files with 2 additions and 0 deletions

View File

@ -264,6 +264,8 @@ class Walker_Nav_Menu_Checklist extends Walker_Nav_Menu {
if ( property_exists( $item, 'front_or_home' ) && $item->front_or_home ) {
$title = sprintf( _x( 'Home: %s', 'nav menu front page title' ), $item->post_title );
$output .= ' add-to-top';
} elseif ( property_exists( $item, 'label' ) ) {
$title = $item->label;
}
$output .= '" name="menu-item[' . $possible_object_id . '][menu-item-object-id]" value="'. esc_attr( $item->object_id ) .'" /> ';
$output .= isset( $title ) ? esc_html( $title ) : esc_html( $item->title );