Make WordPress Core

Opened 16 years ago

Closed 13 years ago

#14975 closed enhancement (fixed)

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

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

Description

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 16 years ago.
14975.2.diff​ (791 bytes ) - added by wonderboymusic 14 years ago.
14975.3.diff​ (1.4 KB ) - added by DrewAPicture 14 years ago.
get_the_title()
14975.4.diff​ (1.7 KB ) - added by DrewAPicture 13 years ago.

Download all attachments as: .zip

Change History (17)

#1 @scribu
16 years ago

  • Component General → Menus

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

#3 @nacin
16 years ago

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

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

#4 @wonderboymusic
14 years ago

  • Milestone Future Release → 3.6

Refreshed against trunk, the old patch failed when applied

#5 @SergeyBiryukov
14 years ago

  • Keywords commit added

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

@DrewAPicture
14 years ago

get_the_title()

#7 @DrewAPicture
14 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
14 years ago

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

#9 @ocean90
13 years ago

  • Milestone 3.6 → Future Release
  • Version → 3.0

#10 @wonderboymusic
13 years ago

  • Milestone Future Release → 3.7

#11 @DrewAPicture
13 years ago

  • Keywords needs-refresh added; 3.2-early removed

#12 @DrewAPicture
13 years ago

  • Keywords needs-refresh removed

#13 @wonderboymusic
13 years ago

  • Owner set to wonderboymusic
  • Resolution → fixed
  • Status new → 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.