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

Fixes #24840. Props johnbillion.

git-svn-id: http://core.svn.wordpress.org/trunk@24798 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Mark Jaquith 2013-07-27 06:50:59 +00:00
parent 655a36fa21
commit 84c50056b7
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 );