Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/08/2011 01:14:31 AM (9 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-blogs/bp-blogs-functions.php

    r5248 r5301  
    411411
    412412    if ( !$user_id )
    413         $user_id = ( $bp->displayed_user->id ) ? $bp->displayed_user->id : $bp->loggedin_user->id;
     413        $user_id = ( bp_displayed_user_id() ) ? bp_displayed_user_id() : $bp->loggedin_user->id;
    414414
    415415    if ( !$count = wp_cache_get( 'bp_total_blogs_for_user_' . $user_id, 'bp' ) ) {
Note: See TracChangeset for help on using the changeset viewer.