#1983 closed enhancement (fixed)
Pass more parameters into bbp_get_forum_freshness_link filter.
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | 2.3 | Priority: | normal |
Severity: | trivial | Version: | 2.1 |
Component: | Front-end | Keywords: | has-patch |
Cc: | jbobich, stephen@… |
Description
In the bbp_get_forum_freshness_link
function, the filtered markup you're returning seems to have three key items:
- URL of the link.
- Title for the link.
- Time since the last thing happened.
It'd make sense if I were going to add a filter and create my own markup for the freshness link, I'd want those three elements available to me, opposed to having to do the work in my function to figure them out again with the $forum_id
passed in or picking out the pieces of the original $anchor
string somehow.
Maybe I'm off-base; you could probably say "Why stop there? Just pass it ALL in." -- who knows, just a suggestion.
Attachments (3)
Change History (8)
#1
follow-up:
↓ 2
@
13 years ago
- Milestone changed from Awaiting Review to 2.2
Could include $active_id here.
There are a few other _freshness_ links that could have things passed into them also.
#2
in reply to:
↑ 1
;
follow-up:
↓ 5
@
13 years ago
Replying to johnjamesjacoby:
Could include $active_id here.
Yeah, definitely. I'm just not sure where the line should be drawn on these kinds of things going through many of the filters, or if it matters.
@
13 years ago
Added same parameters to bbp_get_topic_freshness_link in the same order. Also added $active_id to bbp_get_forum_freshness_link, but note it has been added as the last parameter. This is necessary so someone could theoretically use the same function to filter both of these if they were to disregard $active_id.
#5
in reply to:
↑ 2
@
12 years ago
Replying to jbobich:
Yeah, definitely. I'm just not sure where the line should be drawn on these kinds of things going through many of the filters, or if it matters.
It matters very little. Parameters are broken down into an arrays and passed around, so it's already happening anyways.
Feel free to patch anything else similar to this if you find it. They're easy wins.
In the first patch, I forgot to take into account the fact that it's possible $title and $link_url variables may not exist. This would solve that.