Opened 11 years ago
Closed 7 years ago
#5174 closed enhancement (maybelater)
Depending on the context, group name should not be filterable
Reported by: | imath | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 1.8.1 |
Component: | Groups | Keywords: | needs-refresh, trac-tidy-2018 |
Cc: |
Description
As announced in #5173, i think it might be interesting to avoid the group name to be filterable by plugins in some contexts :
- when used inside of a title attribute of links
- when used in an edit field
- when used in a select option
- when used in the title attribute of the rss feed
So far any plugin can filter 'bp_get_group_name' and eventually add some extra html to it after the sanitizing filters occurred (like i do in BP Sticky Groups! sorry :( )
So i think 2 new template tags should be used to avoid the group name to be filtered by plugins in the 4 cases i've listed above.
I've included my suggestion in the attached diff.
Attachments (1)
Change History (9)
#3
@
11 years ago
Replying to boonebgorges:
What do you think?
About 1 ( < thanks again for this one!! ) and 2 : I agree at 100% !!
My first description is a bit confusing. Actually, in 5174.diff i do not touch to bp_get_group_name, i create 2 new template tags bp_group_title() (which echoes bp_get_group_title() ) and bp_current_group_title() (which echoes bp_get_current_group_title() )
These 2 new functions don't use apply_filters() to be sure no plugin or theme can play with it, they just apply the formatting functions that are used for bp_get_group_name().
#4
follow-up:
↓ 5
@
11 years ago
- Milestone changed from Awaiting Review to 2.0
Putting this in 2.0 milestone -- @imath, interested in getting some more feedback on your proposed changes and working to get them into 2.0?
#5
in reply to:
↑ 4
@
11 years ago
Replying to DJPaul:
Putting this in 2.0 milestone -- @imath, interested in getting some more feedback on your proposed changes and working to get them into 2.0?
Yes i am :)
#6
@
11 years ago
- Keywords needs-refresh added; has-patch 2nd-opinion removed
- Milestone changed from 2.0 to Future Release
#7
@
7 years ago
- Keywords trac-tidy-2018 added
We're closing this ticket because it has not received any contribution or comments for at least two years. We have decided that it is better to close tickets that are good ideas, which have not gotten (or are unlikely to get) contributions, rather than keep things open indefinitely. This will help us share a more realistic roadmap for BuddyPress with you.
Everyone very much appreciates the time and effort that you spent sharing your idea with us. On behalf of the entire BuddyPress team, thank you.
If you feel strongly that this enhancement should still be added to BuddyPress, and you are able to contribute effort towards it, we encourage you to re-open the ticket, or start a discussion about it in our Slack channel. Please consider that time has proven that good ideas without contributions do not get built.
For more information, see https://bpdevel.wordpress.com/2018/01/21/our-awaiting-contributions-milestone-contains/
or find us on Slack, in the #buddypress channel: https://make.wordpress.org/chat/
A few thoughts on the proposal:
bp_get_group_name
filter is for *the group name*; you are changing it to add markup, which is something beyond the name itself. I know that BP is not making it very easy for you to work here :), but hopefully the changes in #5173 will make it easier (you can then do.sticky-group .item-title a
in your CSS, or something like that).What do you think?