Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
08/12/2019 08:42:30 PM (6 years ago)
Author:
dcavins
Message:

Introduce BP_Invitation and BP_Invitation_Manager.

  • Add BP_Invitation, a new class describing generic invitation objects with methods for adding, updating and deleting invitations and membership requests.
  • Add a creation routine for the new table that will contain invitations data.
  • Add BP_Invitation_Manager, a new class that offers helper functions for managing BP_Invitation objects. For most use cases, this class will be extended for new invitation types, like group invitations.
  • Add unit tests for the new classes.

See #6210.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/bp-core-cache.php

    r11864 r12428  
    380380    return wp_cache_delete( 'incrementor', $group );
    381381}
     382
     383/**
     384 * Resets all incremented bp_invitations caches.
     385 *
     386 * @since 5.0.0
     387 */
     388function bp_invitations_reset_cache_incrementor() {
     389    bp_core_reset_incrementor( 'bp_invitations' );
     390}
     391add_action( 'bp_invitation_after_save', 'bp_invitations_reset_cache_incrementor' );
     392add_action( 'bp_invitation_after_delete', 'bp_invitations_reset_cache_incrementor' );
Note: See TracChangeset for help on using the changeset viewer.