Skip to:
Content

BuddyPress.org

Opened 10 months ago

Closed 3 months ago

Last modified 3 months ago

#9317 closed defect (bug) (duplicate)

the_title filter in bp-blogs-template.php is missing an argument

Reported by: shawfactor Owned by:
Priority: normal Milestone:
Component: Blogs 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 (4)

#1 @manhphucofficial
10 months ago

Thanks for the report!

I checked the current master branch and it looks like the the_title filter
in 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!

This ticket was mentioned in ​PR #439 on ​buddypress/buddypress by ​@ravikhadka.


7 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:

#3 @emaralive
3 months ago

  • Component Core → Blogs
  • Milestone Awaiting Review
  • Resolution → invalid
  • Status new → closed

This is a duplicate of #9286 which was fixed during milestone 14.5.0.

#4 @emaralive
3 months ago

  • Resolution invalid → duplicate
Note: See TracTickets for help on using tickets.