From 0b6c5744dca20ee9069a2e2bf011be2dfef62cd2 Mon Sep 17 00:00:00 2001 From: Dominik Schilling Date: Tue, 5 Jan 2016 16:27:26 +0000 Subject: [PATCH] Nav Menus: Apply the `the_title` filter on original post titles in `wp_setup_nav_menu_item()`. The filter is already used in `Walker_Nav_Menu_Checklist` and `Walker_Nav_Menu_Edit`. This ensures that titles are consistent across the admin and front end. Fixes #35317. Built from https://develop.svn.wordpress.org/trunk@36174 git-svn-id: http://core.svn.wordpress.org/trunk@36141 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/nav-menu.php | 3 ++- wp-includes/version.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/wp-includes/nav-menu.php b/wp-includes/nav-menu.php index 356b3b0160..450938991f 100644 --- a/wp-includes/nav-menu.php +++ b/wp-includes/nav-menu.php @@ -739,7 +739,8 @@ function wp_setup_nav_menu_item( $menu_item ) { $menu_item->url = get_permalink( $menu_item->object_id ); $original_object = get_post( $menu_item->object_id ); - $original_title = $original_object->post_title; + /** This filter is documented in wp-includes/post-template.php */ + $original_title = apply_filters( 'the_title', $original_object->post_title, $original_object->ID ); if ( '' === $original_title ) { /* translators: %d: ID of a post */ diff --git a/wp-includes/version.php b/wp-includes/version.php index c628828e7b..1f56044672 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.5-alpha-36173'; +$wp_version = '4.5-alpha-36174'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.