Skip to:
Content

BuddyPress.org

Changeset 4266


Ignore:
Timestamp:
04/23/2011 08:06:19 PM (13 years ago)
Author:
boonebgorges
Message:

Decrement unread messages count before nav is rendered when reading a private message. Fixes #574

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-messages/bp-messages-actions.php

    r4240 r4266  
    3737    // Mark message read
    3838    messages_mark_thread_read( $thread_id );
     39   
     40    // Decrease the unread count in the nav before it's rendered
     41    if ( $count = messages_get_unread_count() )
     42        $name = sprintf( __( 'Messages <strong>(%s)</strong>', 'buddypress' ), $count );
     43    else
     44        $name = __( 'Messages <strong></strong>', 'buddypress' );
     45   
     46    $bp->bp_nav[$bp->messages->slug]['name'] = $name;
    3947
    4048    do_action( 'messages_action_view_message' );
Note: See TracChangeset for help on using the changeset viewer.