Changeset 7966 for trunk/bp-groups/bp-groups-loader.php
- Timestamp:
- 02/22/2014 09:21:21 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-groups/bp-groups-loader.php
r7840 r7966 347 347 public function setup_nav( $main_nav = array(), $sub_nav = array() ) { 348 348 349 // Only grab count if we're on a user page 350 if ( bp_is_user() ) { 351 $count = bp_get_total_group_count_for_user(); 352 $class = ( 0 === $count ) ? 'no-count' : 'count'; 353 $nav_name = sprintf( __( 'Groups <span class="%s">%s</span>', 'buddypress' ), esc_attr( $class ), number_format_i18n( $count ) ); 354 } else { 355 $nav_name = __( 'Groups', 'buddypress' ); 356 } 357 349 358 // Add 'Groups' to the main navigation 350 $count = bp_get_total_group_count_for_user();351 $class = ( 0 === $count ) ? 'no-count' : 'count';352 359 $main_nav = array( 353 'name' => sprintf( __( 'Groups <span class="%s">%s</span>', 'buddypress' ), esc_attr( $class ), number_format_i18n( $count ) ),360 'name' => $nav_name, 354 361 'slug' => $this->slug, 355 362 'position' => 70,
Note: See TracChangeset
for help on using the changeset viewer.