Skip to:
Content

BuddyPress.org

Changeset 10231


Ignore:
Timestamp:
10/10/2015 03:48:47 PM (9 years ago)
Author:
djpaul
Message:

Messages: single conversation thread missing count class

Fixes #6458

Props johnjamesjacoby

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-messages/bp-messages-screens.php

    r10139 r10231  
    128128
    129129    // Decrease the unread count in the nav before it's rendered
    130     $bp->bp_nav[$bp->messages->slug]['name'] = sprintf( __( 'Messages <span>%s</span>', 'buddypress' ), bp_get_total_unread_messages_count() );
     130    $count    = bp_get_total_unread_messages_count();
     131    $class    = ( 0 === $count ) ? 'no-count' : 'count';
     132    $nav_name = sprintf( __( 'Messages <span class="%s">%s</span>', 'buddypress' ), esc_attr( $class ), bp_core_number_format( $count ) );
     133
     134    $bp->bp_nav[ $bp->messages->slug ]['name'] = $nav_name;
    131135
    132136    /**
Note: See TracChangeset for help on using the changeset viewer.