Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#9319 closed enhancement (duplicate)

In get_the_title(), pass $post as the second paramter into 'the_title' filter

Reported by: westonruter Owned by:
Milestone: Priority: normal
Severity: trivial Version: 2.7.1
Component: Template Keywords: has-patch dev-feedback
Focuses: Cc:


In order for the 'the_title' filter result in the get_the_title() call to know which post is being filtered, a post object should be made available as the second parameter in the filter.

This is done to the title in adjacent_post_link() already.

Attachments (1)

post-template.php.patch (431 bytes) - added by westonruter 5 years ago.
Addition of $post argument to the apply_filters() call in get_the_title()

Download all attachments as: .zip

Change History (6)

westonruter5 years ago

Addition of $post argument to the apply_filters() call in get_the_title()

comment:1 Denis-de-Bernardy5 years ago

  • Keywords has-patch dev-feedback added; filter removed

we could probably do the same with other such hooks. it would make a *lot* of sense.

comment:2 Denis-de-Bernardy5 years ago

  • Milestone changed from 2.7.2 to 2.8

comment:3 Denis-de-Bernardy5 years ago

see dup: #5746 (suggests passing $post_id instead)

comment:4 Denis-de-Bernardy5 years ago

  • Milestone 2.8 deleted

closing as dup of #9666

comment:5 ryan5 years ago

  • Resolution set to duplicate
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.