Changeset 7966 for trunk/bp-messages/bp-messages-loader.php
- Timestamp:
- 02/22/2014 09:21:21 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-messages/bp-messages-loader.php
r7758 r7966 103 103 public function setup_nav( $main_nav = array(), $sub_nav = array() ) { 104 104 105 // Only grab count if we're on a user page and current user has access 106 if ( bp_is_user() && bp_user_has_access() ) { 107 $count = bp_get_total_unread_messages_count(); 108 $class = ( 0 === $count ) ? 'no-count' : 'count'; 109 $nav_name = sprintf( __( 'Messages <span class="%s">%s</span>', 'buddypress' ), esc_attr( $class ), number_format_i18n( $count ) ); 110 } else { 111 $nav_name = __( 'Messages', 'buddypress' ); 112 } 113 105 114 // Add 'Messages' to the main navigation 106 $count = bp_get_total_unread_messages_count();107 $class = ( 0 === $count ) ? 'no-count' : 'count';108 115 $main_nav = array( 109 'name' => sprintf( __( 'Messages <span class="%s">%s</span>', 'buddypress' ), esc_attr( $class ), number_format_i18n( $count ) ),116 'name' => $nav_name, 110 117 'slug' => $this->slug, 111 118 'position' => 50,
Note: See TracChangeset
for help on using the changeset viewer.