Make WordPress Core

Opened 14 years ago

Closed 11 years ago

#14975 closed enhancement (fixed)

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

Reported by: goldfrapper's profile Goldfrapper Owned by: wonderboymusic's profile 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 13 years ago.
14975.2.diff (791 bytes) - added by wonderboymusic 11 years ago.
14975.3.diff (1.4 KB) - added by DrewAPicture 11 years ago.
14975.4.diff (1.7 KB) - added by DrewAPicture 11 years ago.

Download all attachments as: .zip

Change History (17)

#1 @scribu
14 years ago

  • Component changed from General to Menus

#2 @Denis-de-Bernardy
14 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.

13 years ago

#3 @nacin
13 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.

#4 @wonderboymusic
11 years ago

  • Milestone changed from Future Release to 3.6

Refreshed against trunk, the old patch failed when applied

#5 @SergeyBiryukov
11 years ago

  • Keywords commit added

#6 @nacin
11 years 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.

11 years ago


#7 @DrewAPicture
11 years ago

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

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

#8 @DrewAPicture
11 years ago

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

#9 @ocean90
11 years ago

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

#10 @wonderboymusic
11 years ago

  • Milestone changed from Future Release to 3.7

#11 @DrewAPicture
11 years ago

  • Keywords needs-refresh added; 3.2-early removed

#12 @DrewAPicture
11 years ago

  • Keywords needs-refresh removed

#13 @wonderboymusic
11 years 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.