[wp-trac] [WordPress Trac] #37920: `the_title` filter called in 2 places inconsistently

WordPress Trac noreply at wordpress.org
Wed Oct 19 01:19:30 UTC 2016

#37920: `the_title` filter called in 2 places inconsistently
 Reporter:  joelworsham   |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Menus         |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  needs-patch   |     Focuses:
Changes (by welcher):

 * keywords:   => needs-patch


 Thanks for the ticket and welcome!

 At first glance, I'm not sure if this isn't expected behaviour. I can see
 a use case where you may want to only run the filter on one of the two
 calls. For example, to only affect the `nav_menu` item title.

 In both cases, the ID parameter belongs to an item in the `wp_posts` table
 so doing a `get_post_type( $ID )` call would allow developers to apply any
 filter to one or both.

 All that being said, did you want to write up a patch?

Ticket URL: <https://core.trac.wordpress.org/ticket/37920#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list