Skip to:

Opened 9 years ago

Closed 7 years ago

#2759 closed enhancement (duplicate)

subforum links classes should be generated by a (filterable) function

Reported by: grosbouff's profile grosbouff Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Component - Forums Keywords: has-patch needs-codex


in function bbp_list_forums (templates.php),
the class bbp-forum-link is hardcoded.
I made a plugin that checks wether forums/topic/replies/categories... have been already read or not, and I'm stuck because of this hardcoded class.
subforum links classes should be generated by a (filterable) function, like eg.

  $classes = array('bbp-forum-link');
  $classes = apply_filters('bbp_get_forum_link_class', $classes, $forum_id);
  return implode(' ',$classes);

Attachments (1)

2759.diff (1.7 KB) - added by netweb 9 years ago.

Download all attachments as: .zip

Change History (5)

9 years ago

#2 @netweb
9 years ago

  • Component changed from General to Component - Forums
  • Keywords has-patch needs-codex added
  • Milestone changed from Awaiting Review to Under Consideration

I think you can achieve the functionality you are looking for with the code example I listed in #2760 for the most part.

That said bbp-forum-link shouldn't be hard coded either.

Attached patch 2759.diff removes the hard coded CSS class for sub forum links and allows you to filter it using bbp_before_list_forums_parse_args, see

#3 @grosbouff
9 years ago

Hi ! Thanks for your reply.
Does that means that attached patch 2759 will be merged into bbPress "official" code ?

#4 @netweb
7 years ago

  • Milestone Under Consideration deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Closing as duplicate of #2760, this was fixed in r6315

Note: See TracTickets for help on using tickets.