Skip to:
Content

BuddyPress.org

Changeset 5705


Ignore:
Timestamp:
02/11/2012 03:21:00 AM (15 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.

Location:
trunk
Files:
20 edited

Legend:

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

    r5684 r5705  
    131131 * @param string $format 'string' to get a BuddyBar-compatible notification, 'array' otherwise
    132132 *
    133  * @global object $bp BuddyPress global settings
    134133 * @uses bp_loggedin_user_domain()
    135134 * @uses bp_get_activity_slug()
     
    142141 */
    143142function bp_activity_format_notifications( $action, $item_id, $secondary_item_id, $total_items, $format = 'string' ) {
    144         global $bp;
    145143
    146144        switch ( $action ) {
     
    149147                        $poster_user_id   = $secondary_item_id;
    150148                        $at_mention_link  = bp_loggedin_user_domain() . bp_get_activity_slug() . '/mentions/';
    151                         $at_mention_title = sprintf( __( '@%s Mentions', 'buddypress' ), $bp->loggedin_user->userdata->user_nicename );
     149                        $at_mention_title = sprintf( __( '@%s Mentions', 'buddypress' ), bp_get_loggedin_user_username() );
    152150
    153151                        if ( (int)$total_items > 1 ) {
    154                                 $text = sprintf( __( 'You have %1$d new activity mentions', 'buddypress' ), (int)$total_items );
     152                                $text = sprintf( __( 'You have %1$d new activity mentions', 'buddypress' ), (int) $total_items );
    155153                                $filter = 'bp_activity_multiple_at_mentions_notification';
    156154                        } else {
     
    13121310                // Recursively delete all children of this comment.
    13131311                if ( $children = BP_Activity_Activity::get_child_comments( $comment_id ) ) {
    1314                         foreach( (array)$children as $child )
     1312                        foreach( (array)$children as $child ) {
    13151313                                bp_activity_delete_children( $activity_id, $child->id );
     1314                        }
    13161315                }
    13171316                bp_activity_delete( array( 'secondary_item_id' => $comment_id, 'type' => 'activity_comment', 'item_id' => $activity_id ) );
     
    16241623        bp_activity_update_meta( $id, $cachekey, $cache );
    16251624}
     1625
    16261626?>
  • 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                }
  • trunk/bp-activity/bp-activity-screens.php

    r5704 r5705  
    287287                        <tr id="activity-notification-settings-mentions">
    288288                                <td>&nbsp;</td>
    289                                 <td><?php printf( __( 'A member mentions you in an update using "@%s"', 'buddypress' ), bp_core_get_username( bp_displayed_user_id(), $bp->displayed_user->userdata->user_nicename, $bp->displayed_user->userdata->user_login ) ) ?></td>
     289                                <td><?php printf( __( 'A member mentions you in an update using "@%s"', 'buddypress' ), bp_core_get_username( bp_displayed_user_id() ) ) ?></td>
    290290                                <td class="yes"><input type="radio" name="notifications[notification_activity_new_mention]" value="yes" <?php checked( $mention, 'yes', true ) ?>/></td>
    291291                                <td class="no"><input type="radio" name="notifications[notification_activity_new_mention]" value="no" <?php checked( $mention, 'no', true ) ?>/></td>
  • trunk/bp-activity/bp-activity-template.php

    r5684 r5705  
    142142                }
    143143
    144                 $this->full_name = $bp->displayed_user->fullname;
     144                $this->full_name = bp_get_displayed_user_fullname();
    145145
    146146                // Fetch parent content for activity comments so we do not have to query in the loop
     
    324324                // determine which user_id applies
    325325                if ( empty( $user_id ) )
    326                         $user_id = ( bp_displayed_user_id() ) ? bp_displayed_user_id() : bp_loggedin_user_id();
     326                        $user_id = bp_displayed_user_id() ? bp_displayed_user_id() : bp_loggedin_user_id();
    327327
    328328                // are we displaying user specific activity?
     
    360360                                        break;
    361361                                case 'mentions':
    362                                         $user_nicename    = ( bp_displayed_user_id() ) ? $bp->displayed_user->userdata->user_nicename : $bp->loggedin_user->userdata->user_nicename;
    363                                         $user_login       = ( bp_displayed_user_id() ) ? $bp->displayed_user->userdata->user_login : $bp->loggedin_user->userdata->user_login;
    364                                         $search_terms     = '@' . bp_core_get_username( $user_id, $user_nicename, $user_login ) . '<'; // Start search at @ symbol and stop search at closing tag delimiter.
     362
     363                                        // Start search at @ symbol and stop search at closing tag delimiter.
     364                                        $search_terms     = '@' . bp_core_get_username( $user_id ) . '<';
    365365                                        $display_comments = 'stream';
    366366                                        $user_id = 0;
     
    371371
    372372        // Do not exceed the maximum per page
    373         if ( !empty( $max ) && ( (int)$per_page > (int)$max ) )
     373        if ( !empty( $max ) && ( (int) $per_page > (int) $max ) )
    374374                $per_page = $max;
    375375
     
    385385
    386386        // If specific activity items have been requested, override the $hide_spam argument. This prevents backpat errors with AJAX.
    387         if ( !empty( $include ) && 'ham_only' == $spam )
     387        if ( !empty( $include ) && ( 'ham_only' == $spam ) )
    388388                $spam = 'all';
    389389
     
    22902290                        return false;
    22912291
    2292                 return apply_filters( 'bp_get_send_public_message_link', wp_nonce_url( bp_loggedin_user_domain() . bp_get_activity_slug() . '/?r=' . bp_core_get_username( bp_displayed_user_id(), $bp->displayed_user->userdata->user_nicename, $bp->displayed_user->userdata->user_login ) ) );
     2292                return apply_filters( 'bp_get_send_public_message_link', wp_nonce_url( bp_loggedin_user_domain() . bp_get_activity_slug() . '/?r=' . bp_core_get_username( bp_displayed_user_id(), bp_get_displayed_user_username(), $bp->displayed_user->userdata->user_login ) ) );
    22932293        }
    22942294
  • trunk/bp-activity/feeds/bp-activity-mentions-feed.php

    r5394 r5705  
    3636        <?php do_action('bp_activity_mentions_feed_head'); ?>
    3737
    38         <?php if ( bp_has_activities( 'max=50&display_comments=stream&search_terms=@' . bp_core_get_username( bp_displayed_user_id(), $bp->displayed_user->userdata->user_nicename, $bp->displayed_user->userdata->user_login ) ) ) : ?>
     38        <?php if ( bp_has_activities( 'max=50&display_comments=stream&search_terms=@' . bp_core_get_username( bp_displayed_user_id() ) ) ) : ?>
    3939                <?php while ( bp_activities() ) : bp_the_activity(); ?>
    4040                        <item>
  • trunk/bp-activity/feeds/bp-activity-personal-feed.php

    r5394 r5705  
    2929        <atom:link href="<?php self_link(); ?>" rel="self" type="application/rss+xml" />
    3030        <link><?php echo bp_displayed_user_domain() . bp_get_activity_slug() . '/feed' ?></link>
    31         <description><?php printf( __( '%s - Activity Feed', 'buddypress' ), $bp->displayed_user->fullname ) ?></description>
     31        <description><?php printf( __( '%s - Activity Feed', 'buddypress' ), bp_get_displayed_user_fullname() ) ?></description>
    3232        <pubDate><?php echo mysql2date('D, d M Y H:i:s O', bp_activity_get_last_updated(), false); ?></pubDate>
    3333        <generator>http://buddypress.org/?v=<?php echo BP_VERSION ?></generator>
  • trunk/bp-blogs/bp-blogs-loader.php

    r5704 r5705  
    104104                        return false;
    105105
     106                $sub_nav = array();
     107
    106108                // Add 'Sites' to the main navigation
    107109                $main_nav =  array(
     
    197199                                        'alt'     => sprintf( __( 'Profile picture of %s', 'buddypress' ), bp_get_displayed_user_fullname() )
    198200                                ) );
    199                                 $bp->bp_options_title = $bp->displayed_user->fullname;
     201                                $bp->bp_options_title = bp_get_displayed_user_fullname();
    200202                        }
    201203                }
  • trunk/bp-core/bp-core-filters.php

    r5683 r5705  
    11<?php
     2
    23// Exit if accessed directly
    34if ( !defined( 'ABSPATH' ) ) exit;
     
    5556 */
    5657function bp_core_allow_default_theme( $themes ) {
    57         global $bp, $wpdb;
     58        global $wpdb;
    5859
    5960        if ( !bp_current_user_can( 'bp_moderate' ) )
     
    141142 */
    142143function bp_core_filter_user_welcome_email( $welcome_email ) {
    143         /* Don't touch the email if we don't have a custom registration template */
     144
     145        // Don't touch the email if we don't have a custom registration template
    144146        if ( '' == locate_template( array( 'registration/register.php' ), false ) && '' == locate_template( array( 'register.php' ), false ) )
    145147                return $welcome_email;
     
    165167 */
    166168function bp_core_filter_blog_welcome_email( $welcome_email, $blog_id, $user_id, $password ) {
    167         /* Don't touch the email if we don't have a custom registration template */
     169
     170        // Don't touch the email if we don't have a custom registration template
    168171        if ( '' == locate_template( array( 'registration/register.php' ), false ) && '' == locate_template( array( 'register.php' ), false ) )
    169172                return $welcome_email;
     
    265268
    266269        // Displayed user
    267         if ( !empty( $bp->displayed_user->fullname ) && !is_404() ) {
     270        if ( bp_get_displayed_user_fullname() && !is_404() ) {
    268271
    269272                // Get the component's ID to try and get it's name
  • trunk/bp-core/bp-core-template.php

    r5668 r5705  
    207207
    208208function bp_word_or_name( $youtext, $nametext, $capitalize = true, $echo = true ) {
    209         global $bp;
    210 
    211         if ( $capitalize )
    212                 $youtext = bp_core_ucfirst($youtext);
     209
     210        if ( !empty( $capitalize ) )
     211                $youtext = bp_core_ucfirst( $youtext );
    213212
    214213        if ( bp_displayed_user_id() == bp_loggedin_user_id() ) {
    215                 if ( $echo )
     214                if ( true == $echo ) {
    216215                        echo apply_filters( 'bp_word_or_name', $youtext );
    217                 else
     216                } else {
    218217                        return apply_filters( 'bp_word_or_name', $youtext );
     218                }
    219219        } else {
    220                 $fullname = (array)explode( ' ', $bp->displayed_user->fullname );
     220                $fullname = bp_get_displayed_user_fullname();
     221                $fullname = (array) explode( ' ', $fullname );
    221222                $nametext = sprintf( $nametext, $fullname[0] );
    222                 if ( $echo )
     223                if ( true == $echo ) {
    223224                        echo apply_filters( 'bp_word_or_name', $nametext );
    224                 else
     225                } else {
    225226                        return apply_filters( 'bp_word_or_name', $nametext );
     227                }
    226228        }
    227229}
  • trunk/bp-forums/bp-forums-loader.php

    r5704 r5705  
    11<?php
     2
    23/**
    34 * BuddyPress Forums Loader
     
    119120                if ( bp_displayed_user_domain() ) {
    120121                        $user_domain = bp_displayed_user_domain();
    121                         $user_login  = $bp->displayed_user->userdata->user_login;
    122122                } elseif ( bp_loggedin_user_domain() ) {
    123123                        $user_domain = bp_loggedin_user_domain();
    124                         $user_login  = $bp->loggedin_user->userdata->user_login;
    125124                } else {
    126125                        return;
     
    183182
    184183                        // Setup the logged in user variables
    185                         $user_domain = bp_loggedin_user_domain();
    186                         $user_login  = $bp->loggedin_user->userdata->user_login;
    187                         $forums_link = trailingslashit( $user_domain . $this->slug );
     184                        $forums_link = trailingslashit( bp_loggedin_user_domain() . $this->slug );
    188185
    189186                        // Add the "My Account" sub menus
     
    241238                                        'alt'     => sprintf( __( 'Profile picture of %s', 'buddypress' ), bp_get_displayed_user_fullname() )
    242239                                ) );
    243                                 $bp->bp_options_title  = $bp->displayed_user->fullname;
     240                                $bp->bp_options_title  = bp_get_displayed_user_fullname();
    244241                        }
    245242                }
  • trunk/bp-friends/bp-friends-loader.php

    r5704 r5705  
    9191                global $bp;
    9292
     93                $sub_nav = array();
     94
    9395                // Add 'Friends' to the main navigation
    9496                $main_nav = array(
     
    146148
    147149                        // Pending friend requests
    148                         if ( $count = count( friends_get_friendship_request_user_ids( bp_loggedin_user_id() ) ) ) {
    149                                 $title   = sprintf( __( 'Friends <span class="count">%s</span>',          'buddypress' ), $count );
    150                                 $pending = sprintf( __( 'Pending Requests <span class="count">%s</span>', 'buddypress' ), $count );
     150                        $count = count( friends_get_friendship_request_user_ids( bp_loggedin_user_id() ) );
     151                        if ( !empty( $count ) ) {
     152                                $title   = sprintf( __( 'Friends <span class="count">%s</span>',          'buddypress' ), number_format_i18n( $count ) );
     153                                $pending = sprintf( __( 'Pending Requests <span class="count">%s</span>', 'buddypress' ), number_format_i18n( $count ) );
    151154                        } else {
    152155                                $title   = __( 'Friends',             'buddypress' );
     
    200203                                        'alt'     => sprintf( __( 'Profile picture of %s', 'buddypress' ), bp_get_displayed_user_fullname() )
    201204                                ) );
    202                                 $bp->bp_options_title  = $bp->displayed_user->fullname;
     205                                $bp->bp_options_title = bp_get_displayed_user_fullname();
    203206                        }
    204207                }
  • trunk/bp-groups/bp-groups-loader.php

    r5704 r5705  
    252252         */
    253253        function setup_nav() {
    254                 global $bp;
    255254
    256255                // Define local variables
    257                 $main_nav = $sub_nav = array();
     256                $sub_nav = array();
    258257
    259258                // Add 'Groups' to the main navigation
     
    295294                if ( bp_is_groups_component() && bp_is_single_item() ) {
    296295
    297                         unset( $main_nav ); unset( $sub_nav );
     296                        // Reset sub nav
     297                        $sub_nav = array();
    298298
    299299                        // Add 'Groups' to the main navigation
     
    475475                                        'alt'     => sprintf( __( 'Profile picture of %s', 'buddypress' ), bp_get_displayed_user_fullname() )
    476476                                ) );
    477                                 $bp->bp_options_title  = $bp->displayed_user->fullname;
     477                                $bp->bp_options_title = bp_get_displayed_user_fullname();
    478478
    479479                        // We are viewing a single group, so set up the
     
    488488                                        'alt'        => __( 'Group Avatar', 'buddypress' )
    489489                                ) );
    490                                 if ( empty( $bp->bp_options_avatar ) )
     490                                if ( empty( $bp->bp_options_avatar ) ) {
    491491                                        $bp->bp_options_avatar = '<img src="' . esc_attr( $group->avatar_full ) . '" class="avatar" alt="' . esc_attr( $group->name ) . '" />';
     492                                }
    492493                        }
    493494                }
  • trunk/bp-members/bp-members-actions.php

    r5704 r5705  
    117117 *
    118118 * @package BuddyPress Core
    119  * @global object $bp Global BuddyPress settings object
    120119 */
    121120function bp_core_action_delete_user() {
    122         global $bp;
    123121
    124122        if ( !bp_current_user_can( 'bp_moderate' ) || bp_is_my_profile() || !bp_displayed_user_id() )
    125123                return false;
    126124
    127         if ( 'admin' == $bp->current_component && 'delete-user' == $bp->current_action ) {
     125        if ( bp_is_current_component( 'admin' ) && bp_is_current_action( 'delete-user' ) ) {
     126
    128127                // Check the nonce
    129128                check_admin_referer( 'delete-user' );
     
    133132
    134133                if ( bp_core_delete_account( bp_displayed_user_id() ) ) {
    135                         bp_core_add_message( sprintf( __( '%s has been deleted from the system.', 'buddypress' ), $bp->displayed_user->fullname ) );
     134                        bp_core_add_message( sprintf( __( '%s has been deleted from the system.', 'buddypress' ), bp_get_displayed_user_fullname() ) );
    136135                } else {
    137                         bp_core_add_message( sprintf( __( 'There was an error deleting %s from the system. Please try again.', 'buddypress' ), $bp->displayed_user->fullname ), 'error' );
     136                        bp_core_add_message( sprintf( __( 'There was an error deleting %s from the system. Please try again.', 'buddypress' ), bp_get_displayed_user_fullname() ), 'error' );
    138137                        $errors = true;
    139138                }
  • trunk/bp-members/bp-members-buddybar.php

    r5704 r5705  
    1313if ( !defined( 'ABSPATH' ) ) exit;
    1414
    15 // **** "Notifications" Menu *********
     15/**
     16 * Notifications Menu
     17 */
    1618function bp_adminbar_notifications_menu() {
    17         global $bp;
    1819
    1920        if ( !is_user_logged_in() )
     
    104105 *
    105106 * @package BuddyPress XProfile
    106  * @global $bp BuddyPress
    107107 */
    108108function bp_members_adminbar_admin_menu() {
    109         global $bp;
    110109
    111110        // Only show if viewing a user
     
    124123                        <?php if ( bp_is_active( 'xprofile' ) ) : ?>
    125124
    126                                 <li><a href="<?php bp_members_component_link( 'profile', 'edit' ); ?>"><?php printf( __( "Edit %s's Profile", 'buddypress' ), esc_attr( $bp->displayed_user->fullname ) ) ?></a></li>
     125                                <li><a href="<?php bp_members_component_link( 'profile', 'edit' ); ?>"><?php printf( __( "Edit %s's Profile", 'buddypress' ), esc_attr( bp_get_displayed_user_fullname() ) ) ?></a></li>
    127126
    128127                        <?php endif ?>
    129128
    130                         <li><a href="<?php bp_members_component_link( 'profile', 'change-avatar' ); ?>"><?php printf( __( "Edit %s's Avatar", 'buddypress' ), esc_attr( $bp->displayed_user->fullname ) ) ?></a></li>
     129                        <li><a href="<?php bp_members_component_link( 'profile', 'change-avatar' ); ?>"><?php printf( __( "Edit %s's Avatar", 'buddypress' ), esc_attr( bp_get_displayed_user_fullname() ) ) ?></a></li>
    131130
    132131                        <?php if ( !bp_is_user_spammer( bp_displayed_user_id() ) ) : ?>
    133132
    134                                 <li><a href="<?php echo wp_nonce_url( bp_displayed_user_domain() . 'admin/mark-spammer/', 'mark-unmark-spammer' ) ?>" class="confirm"><?php printf( __( "Mark as Spammer", 'buddypress' ), esc_attr( $bp->displayed_user->fullname ) ); ?></a></li>
     133                                <li><a href="<?php echo wp_nonce_url( bp_displayed_user_domain() . 'admin/mark-spammer/', 'mark-unmark-spammer' ) ?>" class="confirm"><?php printf( __( "Mark as Spammer", 'buddypress' ), esc_attr( bp_get_displayed_user_fullname() ) ); ?></a></li>
    135134
    136135                        <?php else : ?>
     
    140139                        <?php endif; ?>
    141140
    142                         <li><a href="<?php echo wp_nonce_url( bp_displayed_user_domain() . 'admin/delete-user/', 'delete-user' ) ?>" class="confirm"><?php printf( __( "Delete %s's Account", 'buddypress' ), esc_attr( $bp->displayed_user->fullname ) ); ?></a></li>
     141                        <li><a href="<?php echo wp_nonce_url( bp_displayed_user_domain() . 'admin/delete-user/', 'delete-user' ) ?>" class="confirm"><?php printf( __( "Delete %s's Account", 'buddypress' ), esc_attr( bp_get_displayed_user_fullname() ) ); ?></a></li>
    143142
    144143                        <?php do_action( 'bp_members_adminbar_admin_menu' ) ?>
  • trunk/bp-members/bp-members-functions.php

    r5700 r5705  
    244244                }
    245245
    246                 // Pull an audible and use the login over the nicename
    247                 if ( bp_is_username_compatibility_mode() )
    248                         $username = $user_login;
    249                 else
    250                         $username = $user_nicename;
     246                // Pull an audible and maybe use the login over the nicename
     247                $username = bp_is_username_compatibility_mode() ? $user_login : $user_nicename;
    251248
    252249        // Username found in cache so don't update it again
  • trunk/bp-members/bp-members-loader.php

    r5704 r5705  
    182182                                'alt'     => sprintf( __( 'Profile picture of %s', 'buddypress' ), bp_get_displayed_user_fullname() )
    183183                        ) );
    184                         $bp->bp_options_title  = $bp->displayed_user->fullname;
     184                        $bp->bp_options_title = bp_get_displayed_user_fullname();
    185185                }
    186186
  • trunk/bp-members/bp-members-template.php

    r5704 r5705  
    837837}
    838838        function bp_get_user_firstname( $name = false ) {
    839                 global $bp;
    840839
    841840                // Try to get displayed user
    842841                if ( empty( $name ) )
    843                         $name = $bp->displayed_user->fullname;
     842                        $name = bp_get_displayed_user_fullname();
    844843
    845844                // Fall back on logged in user
    846845                if ( empty( $name ) )
    847                         $name = $bp->loggedin_user->fullname;
    848 
    849                 $fullname = (array)explode( ' ', $name );
     846                        $name = bp_get_loggedin_user_fullname();
     847
     848                $fullname = (array) explode( ' ', $name );
    850849
    851850                return apply_filters( 'bp_get_user_firstname', $fullname[0], $fullname );
  • trunk/bp-messages/bp-messages-loader.php

    r5704 r5705  
    9292         */
    9393        function setup_nav() {
    94                 global $bp;
    9594
    9695                $sub_nav = array();
     
    248247                                        'alt'     => sprintf( __( 'Profile picture of %s', 'buddypress' ), bp_get_displayed_user_fullname() )
    249248                                ) );
    250                                 $bp->bp_options_title = $bp->displayed_user->fullname;
     249                                $bp->bp_options_title = bp_get_displayed_user_fullname();
    251250                        }
    252251                }
  • trunk/bp-messages/bp-messages-template.php

    r5704 r5705  
    237237}
    238238        function bp_get_message_thread_from() {
    239                 global $messages_template, $bp;
     239                global $messages_template;
    240240
    241241                return apply_filters( 'bp_get_message_thread_from', bp_core_get_userlink( $messages_template->thread->last_sender_id ) );
     
    571571}
    572572        function bp_get_send_private_message_link() {
    573                 global $bp;
    574573
    575574                if ( bp_is_my_profile() || !is_user_logged_in() )
    576575                        return false;
    577576
    578                 return apply_filters( 'bp_get_send_private_message_link', wp_nonce_url( bp_loggedin_user_domain() . $bp->messages->slug . '/compose/?r=' . bp_core_get_username( bp_displayed_user_id(), $bp->displayed_user->userdata->user_nicename, $bp->displayed_user->userdata->user_login ) ) );
     577                return apply_filters( 'bp_get_send_private_message_link', wp_nonce_url( bp_loggedin_user_domain() . bp_get_messages_slug() . '/compose/?r=' . bp_core_get_username( bp_displayed_user_id() ) ) );
    579578        }
    580579
  • trunk/bp-xprofile/bp-xprofile-loader.php

    r5704 r5705  
    108108         */
    109109        function setup_nav() {
    110                 global $bp;
    111110
    112111                $sub_nav = array();
     
    228227                                        'alt'     => sprintf( __( 'Profile picture of %s', 'buddypress' ), bp_get_displayed_user_fullname() )
    229228                                ) );
    230                                 $bp->bp_options_title = $bp->displayed_user->fullname;
     229                                $bp->bp_options_title = bp_get_displayed_user_fullname();
    231230                        }
    232231                }
Note: See TracChangeset for help on using the changeset viewer.