bp_last_activity( int $user_id )
Output the “active [x days ago]” string for a user.
Description
See also
- bp_get_last_activity(): for a description of parameters.
Parameters
- $user_id
-
(Required) See bp_get_last_activity().
Source
File: bp-members/bp-members-template.php
function bp_last_activity( $user_id = 0 ) { /** * Filters the 'active [x days ago]' string for a user. * * @since BuddyPress 1.0.0 * * @param string $value Formatted 'active [x days ago]' string. */ echo apply_filters( 'bp_last_activity', bp_get_last_activity( $user_id ) ); }
Changelog
Version | Description |
---|---|
BuddyPress 1.0.0 | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.