Ticket #5413: 5413.01.patch
File 5413.01.patch, 2.3 KB (added by , 11 years ago) |
---|
-
bp-groups/bp-groups-loader.php
class BP_Groups_Component extends BP_Component { 347 347 public function setup_nav( $main_nav = array(), $sub_nav = array() ) { 348 348 349 349 // Add 'Groups' to the main navigation 350 $count = bp_ get_total_group_count_for_user();350 $count = bp_is_user() ? bp_get_total_group_count_for_user() : 0; 351 351 $class = ( 0 === $count ) ? 'no-count' : 'count'; 352 352 $main_nav = array( 353 353 'name' => sprintf( __( 'Groups <span class="%s">%s</span>', 'buddypress' ), esc_attr( $class ), number_format_i18n( $count ) ), -
bp-messages/bp-messages-loader.php
class BP_Messages_Component extends BP_Component { 103 103 public function setup_nav( $main_nav = array(), $sub_nav = array() ) { 104 104 105 105 // Add 'Messages' to the main navigation 106 $count = bp_ get_total_unread_messages_count();106 $count = bp_is_user() && bp_user_has_access() ? bp_get_total_unread_messages_count() : 0; 107 107 $class = ( 0 === $count ) ? 'no-count' : 'count'; 108 108 $main_nav = array( 109 109 'name' => sprintf( __( 'Messages <span class="%s">%s</span>', 'buddypress' ), esc_attr( $class ), number_format_i18n( $count ) ), -
bp-notifications/bp-notifications-loader.php
class BP_Notifications_Component extends BP_Component { 105 105 public function setup_nav( $main_nav = array(), $sub_nav = array() ) { 106 106 107 107 // Add 'Notifications' to the main navigation 108 $count = bp_ notifications_get_unread_notification_count( bp_displayed_user_id() );108 $count = bp_is_user() && bp_user_has_access() ? bp_notifications_get_unread_notification_count( bp_displayed_user_id() ) : 0; 109 109 $class = ( 0 === $count ) ? 'no-count' : 'count'; 110 110 $main_nav = array( 111 111 'name' => sprintf( __( 'Notifications <span class="%s">%s</span>', 'buddypress' ), esc_attr( $class ), number_format_i18n( $count ) ),