Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
04/28/2015 03:50:50 PM (10 years ago)
Author:
r-a-y
Message:

Groups: Streamline last activity update meta calls.

This commit:

  • Removes the hardcoded 'last_activity' call in groups_join_group() and uses the groups_update_last_activity() on the 'groups_join_group' hook. This mirrors last activity update calls on other group actions (leave, created).
  • Removes the hardcoded 'last_activity' call in groups_create_group(). The last activity is already updated on the 'groups_created_group' hook. No need to update twice!

Props jreeve.

Fixes #6158.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-groups/bp-groups-activity.php

    r9450 r9815  
    401401    groups_update_groupmeta( $group_id, 'last_activity', bp_core_current_time() );
    402402}
     403add_action( 'groups_join_group',           'groups_update_last_activity' );
    403404add_action( 'groups_leave_group',          'groups_update_last_activity' );
    404405add_action( 'groups_created_group',        'groups_update_last_activity' );
Note: See TracChangeset for help on using the changeset viewer.