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:
parent
655a36fa21
commit
84c50056b7
|
@ -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 );
|
||||
|
|
Loading…
Reference in New Issue