Opened 10 years ago
Last modified 10 years ago
#5774 new defect (bug)
Groups no-count
Reported by: | SGr33n | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Contributions | Priority: | normal |
Severity: | normal | Version: | 2.0 |
Component: | Groups | Keywords: | needs-testing needs-patch |
Cc: |
Description
Hi,
On the user profile page, even if he/she have no groups, the count bubble class is count (should be no-count).
Attachments (1)
Change History (4)
#2
@
10 years ago
- Keywords needs-refresh needs-testing added; has-patch removed
There's some double formatting happening here. bp_get_total_group_count_for_user()
is run through bp_core_number_format()
. Your patch then strips the formatting, only to re-add it on line 333. This won't work right, because I believe intval()
does not properly handle commas (as in "1,000 groups"). I suggest something like the following:
$count = bp_get_total_group_count_for_user(); $class = 0 === intval( groups_total_group_for_user() ) ? 'no-count' : 'count'; $nav_name = sprintf( __( 'Groups <span class="%s">%s</span>', 'buddypress' ), esc_attr( $class ), $count );
This could probably use some testing, and probably needs to happen across all components too.
Hi SGr33n
Thanks for your feedback. Suggesting 5774.patch.