Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
06/04/2018 08:52:12 PM (7 years ago)
Author:
boonebgorges
Message:

Add data exporters for Groups component.

See #7820.

File:
1 edited

Legend:

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

    r11970 r12163  
    7474add_filter( 'bp_core_avatar_default',       'bp_groups_default_avatar', 10, 3 );
    7575add_filter( 'bp_core_avatar_default_thumb', 'bp_groups_default_avatar', 10, 3 );
     76
     77// Personal data export.
     78add_filter( 'wp_privacy_personal_data_exporters', 'bp_groups_register_personal_data_exporters' );
    7679
    7780/**
     
    363366}
    364367add_filter( 'bp_user_can', 'bp_groups_user_can_filter', 10, 5 );
     368
     369/**
     370 * Registers Groups personal data exporters.
     371 *
     372 * @since 4.0.0
     373 *
     374 * @param array $exporters  An array of personal data exporters.
     375 * @return array An array of personal data exporters.
     376 */
     377function bp_groups_register_personal_data_exporters( $exporters ) {
     378    $exporters['buddypress-groups-memberships'] = array(
     379        'exporter_friendly_name' => __( 'BuddyPress Group Memberships', 'buddypress' ),
     380        'callback'               => 'bp_groups_memberships_personal_data_exporter',
     381    );
     382
     383    $exporters['buddypress-groups-pending-requests'] = array(
     384        'exporter_friendly_name' => __( 'BuddyPress Pending Group Membership Requests', 'buddypress' ),
     385        'callback'               => 'bp_groups_pending_requests_personal_data_exporter',
     386    );
     387
     388    $exporters['buddypress-groups-pending-received-invitations'] = array(
     389        'exporter_friendly_name' => __( 'BuddyPress Pending Group Invitations (Received)', 'buddypress' ),
     390        'callback'               => 'bp_groups_pending_received_invitations_personal_data_exporter',
     391    );
     392
     393    $exporters['buddypress-groups-pending-sent-invitations'] = array(
     394        'exporter_friendly_name' => __( 'BuddyPress Pending Group Invitations (Sent)', 'buddypress' ),
     395        'callback'               => 'bp_groups_pending_sent_invitations_personal_data_exporter',
     396    );
     397
     398    return $exporters;
     399}
Note: See TracChangeset for help on using the changeset viewer.