diff --git a/wp-includes/nav-menu-template.php b/wp-includes/nav-menu-template.php index 13a9e735f4..8c74758b09 100644 --- a/wp-includes/nav-menu-template.php +++ b/wp-includes/nav-menu-template.php @@ -160,10 +160,24 @@ class Walker_Nav_Menu extends Walker { } } + /** This filter is documented in wp-includes/post-template.php */ + $title = apply_filters( 'the_title', $item->title, $item->ID ); + + /** + * Filter a menu item's title. + * + * @since 4.4.0 + * + * @param string $title The menu item's title. + * @param object $item The current menu item. + * @param array $args An array of {@see wp_nav_menu()} arguments. + * @param int $depth Depth of menu item. Used for padding. + */ + $title = apply_filters( 'nav_menu_item_title', $title, $item, $args, $depth ); + $item_output = $args->before; $item_output .= ''; - /** This filter is documented in wp-includes/post-template.php */ - $item_output .= $args->link_before . apply_filters( 'the_title', $item->title, $item->ID ) . $args->link_after; + $item_output .= $args->link_before . $title . $args->link_after; $item_output .= ''; $item_output .= $args->after; diff --git a/wp-includes/version.php b/wp-includes/version.php index f36f3291c7..5eab0dc0ce 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.4-alpha-34665'; +$wp_version = '4.4-alpha-34666'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.