diff --git bp-friends/bp-friends-loader.php bp-friends/bp-friends-loader.php
index 7527eb7..6c8ec66 100644
|
|
class BP_Friends_Component extends BP_Component { |
112 | 112 | $bp = buddypress(); |
113 | 113 | |
114 | 114 | // Add 'Friends' to the main navigation |
| 115 | $count = friends_get_total_friend_count(); |
| 116 | $class = ( 0 == $count ) ? 'no-count' : 'count'; |
115 | 117 | $main_nav = array( |
116 | | 'name' => sprintf( __( 'Friends <span>%d</span>', 'buddypress' ), friends_get_total_friend_count() ), |
| 118 | 'name' => sprintf( __( 'Friends <span class="%s">%s</span>', 'buddypress' ), $class, number_format_i18n( $count ) ), |
117 | 119 | 'slug' => $this->slug, |
118 | 120 | 'position' => 60, |
119 | 121 | 'screen_function' => 'friends_screen_my_friends', |
diff --git bp-groups/bp-groups-loader.php bp-groups/bp-groups-loader.php
index 95ce647..766e31c 100644
|
|
class BP_Groups_Component extends BP_Component { |
341 | 341 | public function setup_nav( $main_nav = array(), $sub_nav = array() ) { |
342 | 342 | |
343 | 343 | // Add 'Groups' to the main navigation |
| 344 | $count = bp_get_total_group_count_for_user(); |
| 345 | $class = ( 0 == $count ) ? 'no-count' : 'count'; |
344 | 346 | $main_nav = array( |
345 | | 'name' => sprintf( __( 'Groups <span>%s</span>', 'buddypress' ), bp_get_total_group_count_for_user() ), |
| 347 | 'name' => sprintf( __( 'Groups <span class="%s">%s</span>', 'buddypress' ), $class, number_format_i18n( $count ) ), |
346 | 348 | 'slug' => $this->slug, |
347 | 349 | 'position' => 70, |
348 | 350 | 'screen_function' => 'groups_screen_my_groups', |
diff --git bp-messages/bp-messages-loader.php bp-messages/bp-messages-loader.php
index 20ead8b..e19abcb 100644
|
|
class BP_Messages_Component extends BP_Component { |
102 | 102 | */ |
103 | 103 | public function setup_nav( $main_nav = array(), $sub_nav = array() ) { |
104 | 104 | |
105 | | $name = sprintf( __( 'Messages <span>%s</span>', 'buddypress' ), bp_get_total_unread_messages_count() ); |
106 | | |
107 | 105 | // Add 'Messages' to the main navigation |
| 106 | $count = bp_get_total_unread_messages_count(); |
| 107 | $class = ( 0 == $count ) ? 'no-count' : 'count'; |
108 | 108 | $main_nav = array( |
109 | | 'name' => $name, |
| 109 | 'name' => sprintf( __( 'Messages <span class="%s">%s</span>', 'buddypress' ), $class, number_format_i18n( $count ) ), |
110 | 110 | 'slug' => $this->slug, |
111 | 111 | 'position' => 50, |
112 | 112 | 'show_for_displayed_user' => false, |
diff --git bp-notifications/bp-notifications-loader.php bp-notifications/bp-notifications-loader.php
index 2ad277e..495117d 100644
|
|
class BP_Notifications_Component extends BP_Component { |
105 | 105 | |
106 | 106 | // Add 'Notifications' to the main navigation |
107 | 107 | $count = bp_notifications_get_unread_notification_count( bp_loggedin_user_id() ); |
| 108 | $class = ( 0 == $count ) ? 'no-count' : 'count'; |
108 | 109 | $main_nav = array( |
109 | | 'name' => sprintf( __( 'Notifications <span>%d</span>', 'buddypress' ), number_format_i18n( $count ) ), |
| 110 | 'name' => sprintf( __( 'Notifications <span class="%s">%s</span>', 'buddypress' ), $class, number_format_i18n( $count ) ), |
110 | 111 | 'slug' => $this->slug, |
111 | 112 | 'position' => 30, |
112 | 113 | 'show_for_displayed_user' => bp_core_can_edit_settings(), |