Make WordPress Core

Opened 4 years ago

Closed 7 months ago

#14975 closed enhancement (fixed)

Nav-menu system does not always run titles through 'the_title' filter.

Reported by: Goldfrapper Owned by: wonderboymusic
Milestone: 3.7 Priority: normal
Severity: normal Version: 3.0
Component: Menus Keywords: has-patch commit
Focuses: Cc:


I am using the qTranslate plugin that uses the 'the_title' filter to parse its multilingual content (separated with comment tags). All titles are parsed well except for the titles appearing in the menu system's meta boxes; It seems this is because nav-menu functions don't run the titles through this filter.

Attachments (4)

14975.diff (815 bytes) - added by nacin 3 years ago.
14975.2.diff (791 bytes) - added by wonderboymusic 15 months ago.
14975.3.diff (1.4 KB) - added by DrewAPicture 12 months ago.
14975.4.diff (1.7 KB) - added by DrewAPicture 8 months ago.

Download all attachments as: .zip

Change History (17)

comment:1 scribu4 years ago

  • Component changed from General to Menus

comment:2 Denis-de-Bernardy4 years ago

Might they be using the widget_title filter or whatever that filter's name is? Seems more appropriate than the_title in this case, since the latter could end up outputting sifr.

nacin3 years ago

comment:3 nacin3 years ago

  • Keywords has-patch 3.2-early added
  • Milestone changed from Awaiting Review to Future Release
  • Type changed from defect (bug) to enhancement

the_title is used all over the admin as well, so no problem using it. Patch attached leverages the_title.

wonderboymusic15 months ago

comment:4 wonderboymusic15 months ago

  • Milestone changed from Future Release to 3.6

Refreshed against trunk, the old patch failed when applied

comment:5 SergeyBiryukov15 months ago

  • Keywords commit added

comment:6 nacin14 months ago

Looks like we can probably use get_the_title() here? Unsure, but we do use it elsewhere in this file.

Also, there is a $original_title = $original_object->post_title; assignment earlier in the file that could probably benefit from the same change.

DrewAPicture12 months ago


comment:7 DrewAPicture12 months ago

14975.3.diff uses get_the_title() instead per comment:6.

The filter via get_the_title() works as expected for me.

comment:8 DrewAPicture12 months ago

Should get_the_title() have been used on the post_type else as well?

comment:9 ocean9010 months ago

  • Milestone changed from 3.6 to Future Release
  • Version set to 3.0

comment:10 wonderboymusic9 months ago

  • Milestone changed from Future Release to 3.7

comment:11 DrewAPicture8 months ago

  • Keywords needs-refresh added; 3.2-early removed

DrewAPicture8 months ago

comment:12 DrewAPicture8 months ago

  • Keywords needs-refresh removed

comment:13 wonderboymusic7 months ago

  • Owner set to wonderboymusic
  • Resolution set to fixed
  • Status changed from new to closed

In 25285:

Use get_the_title() when dealing with post_type-like items in the admin.

Props nacin, DrewAPicture.
Fixes #14975.

Note: See TracTickets for help on using tickets.