Changes between Version 4 and Version 5 of Ticket #4454, comment 5
- Timestamp:
- 10/30/2012 10:15:41 PM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #4454, comment 5
v4 v5 1 does not work. the tab text and count needs some sort of separation. currently it's pushed as one string. New item in array 'count' when registering nav items? 1 EDIT: 2 2 3 This works, but you have to specify the arg. if you just put the specifier it out puts %s. So options are to add a count key to item array for nav items creation or create a new function that is a catch all for tab counts. It's a trivial though. 3 4 4 5 {{{ 6 $count = messages_get_unread_count(); 7 8 $man_nav[] = array( 9 'name' => __( 'Inbox', 'buddypress' ), 10 'slug' => 'inbox', 11 'parent_url' => $messages_link, 12 'parent_slug' => $this->slug, 13 'screen_function' => 'messages_screen_inbox', 14 'position' => 10, 15 'count' => $count, 16 'user_has_access' => bp_is_my_profile() 17 ); 18 19 20 }}} 5 $bp->bp_nav['messages']['name'] = sprintf( 'New name <span>%s</span>' , bp_get_total_unread_messages_count() ) ;
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)