groups_update_last_activity( int $group_id )
Update the last_activity meta value for a given group.
Description
Parameters
- $group_id
-
(Optional) The ID of the group whose last_activity is being updated. Default: the current group's ID.
Return
(false|null) False on failure.
Source
File: bp-groups/bp-groups-functions.php
function groups_update_last_activity( $group_id = 0 ) { if ( empty( $group_id ) ) { $group_id = buddypress()->groups->current_group->id; } if ( empty( $group_id ) ) { return false; } groups_update_groupmeta( $group_id, 'last_activity', bp_core_current_time() ); }
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.