Skip to:
Content

BuddyPress.org

Ticket #6207: 6207-01.patch

File 6207-01.patch, 801 bytes (added by hnla, 10 years ago)
  • src/bp-blogs/bp-blogs-loader.php

     
    153153                }
    154154
    155155                // Add 'Sites' to the main navigation
     156                $count = (int)bp_get_total_blog_count_for_user();
     157                $class = ( 0 === $count )? 'no-count' : 'count';
    156158                $main_nav =  array(
    157                         'name'                => sprintf( __( 'Sites <span>%d</span>', 'buddypress' ), bp_get_total_blog_count_for_user() ),
     159                        'name'                => sprintf( __( 'Sites <span class="%s">%s</span>', 'buddypress' ), $class, number_format_i18n($count) ),
    158160                        'slug'                => $this->slug,
    159161                        'position'            => 30,
    160162                        'screen_function'     => 'bp_blogs_screen_my_blogs',