[buddypress-trac] [BuddyPress Trac] #9308: Risky: bp-groups-template.php adds ".hidden" class.

buddypress-trac noreply at wordpress.org
Wed Nov 5 14:39:24 UTC 2025


#9308: Risky: bp-groups-template.php adds ".hidden" class.
--------------------------+-----------------------------
 Reporter:  t.schwarz     |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Groups        |    Version:
 Severity:  normal        |   Keywords:
--------------------------+-----------------------------
 In line 730 of bp-groups-template.php a status class is added to a listed
 group.


 {{{
                 // Group type - public, private, hidden.
                 $classes[] = sanitize_key( $groups_template->group->status
 );
 }}}

 A class like "hidden" is so generic it may be affected by theme or plugin
 CSS that may define, rightly or wrongly, a broadly scoped ".hidden"-class
 that, in turn, may have the unintentional effect of visually hiding groups
 that should be visible to the user.

 I suggest adding a prefix to the status class like "status-" to avoid this
 problem.


 {{{
                 // Group type - public, private, hidden.
                 $classes[] = 'status-' . sanitize_key(
 $groups_template->group->status );
 }}}

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/9308>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list