[buddypress-trac] [BuddyPress] #5173: Allowing plugin to style group rows in directory & widget loops and in admin ui
buddypress-trac
noreply at wordpress.org
Sat Sep 14 09:55:45 UTC 2013
#5173: Allowing plugin to style group rows in directory & widget loops and in
admin ui
-------------------------+-----------------------------
Reporter: imath | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Groups | Version: 1.8.1
Severity: normal | Keywords:
-------------------------+-----------------------------
Hi,
This request is relative to #2242 . I've built a plugin to stick groups in
the groups directory. So far i'm filtering the bp_get_group_name tag to
style the sticky groups. But that's definitely a very bad idea i had. The
reason is that bp_get_group_name is used in select box options, in group
edit field, and in link titles (i think another non filterable function
should be used for these cases, i'll post a suggestion in a next ticket).
So to avoid breaking the html, i've temporarly encapsulated the filters
between the 'bp_before_groups_loop' and 'bp_after_groups_loop', but as
soon as a theme will for example use {{{title="<?php
bp_group_name();?>"}}} in the link tag, that will break the html :( and
will populate the support of the bp-sticky-groups plugin ;)
I've noticed that since 1.7, there was an interesting template tag :
{{{bp_group_class()}}}. But it isn't use by default in bp-legacy or bp-
default groups-loop.php templates. I imagine this tag is there to help
theme designers to include it in their templates. Well, in the case of bp-
sticky-groups, if this tag was used by "default", it would help me a lot
!!
So, in the attached diff, i'm suggesting to use it and i also suggest to
allow plugins to filter group admin ui row class as it will help in my
case to also style the sticky groups in the admin listing.
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5173>
BuddyPress <http://buddypress.org/>
BuddyPress
More information about the buddypress-trac
mailing list