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
This commit is contained in:
parent
e51c790844
commit
0b6c5744dc
|
@ -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 */
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue