Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
08/02/2013 06:29:06 PM (11 years ago)
Author:
boonebgorges
Message:

Introduces bp_*_user_last_activity() functions

User last activity data is currently stored as usermeta, with BuddyPress
making multiple calls directly to the usermeta table to get that data. These
new functions provide a central, standardized way to update and fetch
last_activity information. This makes it easier for plugins to update user
activity programatically in a future-compatible way.

Having this set of functions will facilitate any changes associated with #5128,
whose goal is to move last_activity data out of usermeta altogether.

File:
1 edited

Legend:

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

    r7311 r7334  
    778778        $this->avatar_thumb = bp_core_fetch_avatar( array( 'item_id' => $this->id, 'type' => 'thumb', 'alt' => sprintf( __( 'Avatar of %s', 'buddypress' ), $this->fullname ) ) );
    779779        $this->avatar_mini  = bp_core_fetch_avatar( array( 'item_id' => $this->id, 'type' => 'thumb', 'alt' => sprintf( __( 'Avatar of %s', 'buddypress' ), $this->fullname ), 'width' => 30, 'height' => 30 ) );
    780         $this->last_active  = bp_core_get_last_activity( bp_get_user_meta( $this->id, 'last_activity', true ), __( 'active %s', 'buddypress' ) );
     780        $this->last_active  = bp_core_get_last_activity( bp_get_user_last_activity( $this->id ), __( 'active %s', 'buddypress' ) );
    781781    }
    782782
Note: See TracChangeset for help on using the changeset viewer.