Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
02/11/2012 03:21:00 AM (13 years ago)
Author:
johnjamesjacoby
Message:

Replace direct references to $bp user fullname and user_login with their functional equivalents, and kill off some $bp global usage in the process. See #3994, #3989.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-activity/bp-activity-loader.php

    r5704 r5705  
    111111     */
    112112    function setup_nav() {
    113         global $bp;
     113
     114        $sub_nav = array();
    114115
    115116        // Add 'Activity' to the main navigation
     
    227228
    228229            // Unread message count
    229             if ( $count = bp_get_total_mention_count_for_user( bp_loggedin_user_id() ) ) {
    230                 $title = sprintf( __( 'Mentions <span class="count">%s</span>', 'buddypress' ), $count );
     230            $count = bp_get_total_mention_count_for_user( bp_loggedin_user_id() );
     231            if ( !empty( $count ) ) {
     232                $title = sprintf( __( 'Mentions <span class="count">%s</span>', 'buddypress' ), number_format_i18n( $count ) );
    231233            } else {
    232234                $title = __( 'Mentions', 'buddypress' );
     
    312314                    'alt'     => sprintf( __( 'Profile picture of %s', 'buddypress' ), bp_get_displayed_user_fullname() )
    313315                ) );
    314                 $bp->bp_options_title  = $bp->displayed_user->fullname;
     316                $bp->bp_options_title  = bp_get_displayed_user_fullname();
    315317            }
    316318        }
Note: See TracChangeset for help on using the changeset viewer.