Make WordPress Core

Changeset 36174


Ignore:
Timestamp:
01/05/2016 04:26:53 PM (9 years ago)
Author:
ocean90
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/nav-menu.php

    r36095 r36174  
    740740
    741741                $original_object = get_post( $menu_item->object_id );
    742                 $original_title = $original_object->post_title;
     742                /** This filter is documented in wp-includes/post-template.php */
     743                $original_title = apply_filters( 'the_title', $original_object->post_title, $original_object->ID );
    743744
    744745                if ( '' === $original_title ) {
Note: See TracChangeset for help on using the changeset viewer.