Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
05/25/2024 04:47:42 AM (18 months ago)
Author:
imath
Message:

Groups: improve group membership management functions

  • Make the functions handling the 5 available group membership actions (promote, demote, ban, unban, remove) usable outside of the BuddyPress Web version. Doing so, the BP REST API will be able to use them so that current hooks used to perform custom code/clear group cache are still fired within this specific context.
  • In BP Nouveau, the group members management interface (which is using the BP REST API) will soon benefit from this work once the BP REST API has been updated. The hook used to notify a group member has been promoted will then be fired and BP Nouveau behavior will be consistent with the BP Legacy one about group membership management.
  • Deprecate some misleading hooks, which were firing even if the group membership action had failed, in favor of new ones which do fire at the right "place".

Props needle

Fixes #9158

File:
1 edited

Legend:

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

    r13808 r13873  
    301301    bp_send_email( 'groups-member-promoted', (int) $user_id, $args );
    302302}
    303 add_action( 'groups_promoted_member', 'groups_notification_promoted_member', 10, 2 );
     303add_action( 'group_member_promoted', 'groups_notification_promoted_member', 10, 2 );
    304304
    305305/**
     
    10561056    }
    10571057}
    1058 add_action( 'groups_demoted_member', 'bp_groups_delete_promotion_notifications', 10, 2 );
     1058add_action( 'group_member_demoted', 'bp_groups_delete_promotion_notifications', 10, 2 );
    10591059
    10601060/**
Note: See TracChangeset for help on using the changeset viewer.