Opened 14 years ago
Closed 12 years ago
#23724 closed enhancement (fixed)
Pass $post into 'protected_title_format' and 'private_title_format' filters
| Reported by: | johnjamesjacoby | Owned by: | SergeyBiryukov |
|---|---|---|---|
| Priority: | low | Milestone: | 4.0 |
| Component: | Posts, Post Types | Version: | 3.5 |
| Severity: | minor | Keywords: | has-patch |
| Cc: | Focuses: | template |
Description
Currently it's only possible to change these prefixes globally.
Being able to change these prefixes based on specific $post data would be helpful for narrowing down the scope, say to specific custom post types.
I noticed also that we don't pass $post into the 'the_title' filter, which could cut down on an additional get_post() call later if we pass it here. Obviously not essential, but wouldn't hurt.
Attachments (3)
Change History (10)
#2
in reply to: ↑ 1
@
14 years ago
Replying to SergeyBiryukov:
I've found 14 instances of applying
the_titlefilter in current trunk. Changing it in one place would be inconsistent, so this should be done a separate ticket. Previous inconsistencies (passing only one parameter) were fixed in #13558 and #16688.
I hadn't considered these. Agree adding anything to 'the_title' should be consistent. Will repatch with that bit. Thanks for the heads up there.
#6
@
12 years ago
- Keywords needs-refresh removed
- Milestone Awaiting Review → 4.0
23724.3.patch adds the hook doc updates.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
I've found 14 instances of applying
the_titlefilter in current trunk. Changing it in one place would be inconsistent, so this should be done a separate ticket. Previous inconsistencies (passing only one parameter) were fixed in #13558 and #16688.Passing
$posttoprotected_title_formatandprivate_title_formatmakes sense to me.