[buddypress-trac] [BuddyPress Trac] #5774: Groups no-count

buddypress-trac noreply at wordpress.org
Thu Jul 24 01:48:33 UTC 2014


#5774: Groups no-count
-----------------------------------------+------------------------------
 Reporter:  SGr33n                       |       Owner:
     Type:  defect (bug)                 |      Status:  new
 Priority:  normal                       |   Milestone:  Awaiting Review
Component:  Groups                       |     Version:  2.0
 Severity:  normal                       |  Resolution:
 Keywords:  needs-refresh needs-testing  |
-----------------------------------------+------------------------------
Changes (by boonebgorges):

 * keywords:  has-patch => needs-refresh needs-testing


Comment:

 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.

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5774#comment:2>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list