Opened 6 months ago
Last modified 4 months ago
#9317 new defect (bug)
the_title filter in bp-blogs-template.php is missing an argument
| Reported by: | shawfactor | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | Core | Version: | |
| Severity: | normal | Keywords: | has-patch |
| Cc: |
Description
Line 763 of buddypress/bp-blogs/bp-blogs-template.php
does this:
apply_filters( 'the_title', $retval )
but its also requires the $post_id as an argument, please see
https://developer.wordpress.org/reference/hooks/the_title/
Can this please be fixed asap?
Change History (2)
This ticket was mentioned in PR #439 on buddypress/buddypress by @ravikhadka.
4 months ago
#2
- Keywords has-patch added
Adds the latest post ID as the second parameter when applying the_title. This ensures better compatibility with plugins and themes that rely on the post ID for context-aware title filtering.
Trac ticket:
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Thanks for the report!
I checked the current
masterbranch and it looks like thethe_titlefilterin
bp_get_blog_latest_post()is already passing the second argument(
$post_id), e.g.apply_filters( 'the_title', $retval, $post_id ).Could you let us know which BuddyPress version or specific revision you’re seeing
this on? If it’s from an older release, we can look into whether a backport is
needed. Otherwise, it may already be resolved in
master.Thanks again for flagging this!