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-members/bp-members-template.php

    r7328 r7334  
    869869            $user_id = bp_displayed_user_id();
    870870
    871         $last_activity = bp_core_get_last_activity( bp_get_user_meta( $user_id, 'last_activity', true ), __('active %s', 'buddypress') );
     871        $last_activity = bp_core_get_last_activity( bp_get_user_last_activity( $user_id ), __('active %s', 'buddypress') );
    872872
    873873        return apply_filters( 'bp_get_last_activity', $last_activity );
Note: See TracChangeset for help on using the changeset viewer.