Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/08/2011 01:14:31 AM (12 years ago)
Author:
johnjamesjacoby
Message:

Use bp_displayed_user_id() rather than reference the $bp->displayed_user->id global var directly. First step at consolidating user ID checks to use WP_User class later. See #3738.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/bp-core-template.php

    r5153 r5301  
    200200        $youtext = bp_core_ucfirst($youtext);
    201201
    202     if ( $bp->displayed_user->id == $bp->loggedin_user->id ) {
     202    if ( bp_displayed_user_id() == $bp->loggedin_user->id ) {
    203203        if ( $echo )
    204204            echo apply_filters( 'bp_word_or_name', $youtext );
     
    10831083    global $bp;
    10841084
    1085     if ( is_user_logged_in() && $bp->loggedin_user->id == $bp->displayed_user->id )
     1085    if ( is_user_logged_in() && $bp->loggedin_user->id == bp_displayed_user_id() )
    10861086        $my_profile = true;
    10871087    else
     
    10941094    global $bp;
    10951095
    1096     if ( !empty( $bp->displayed_user->id ) )
     1096    if ( bp_displayed_user_id() )
    10971097        return true;
    10981098
Note: See TracChangeset for help on using the changeset viewer.