Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
07/25/2019 01:54:40 PM (4 months ago)
Author:
imath
Message:

BP Settings: Introduce a new BP friendly name key into data exporters

The name of this key is exporter_bp_friendly_name. It is added to BP & WP exporter arrays to adapt the existing exporter_friendly_name for a non Administrator role context. If this new key is provided it will be used to output the friendly name of the exported items, otherwise it will use the existing exporter_friendly_name key.

For example, into the items list of the site.url/username/settings/data page of the logged in user, "WordPress Comments" will be replaced by "Comments" and so on for every built-in WordPress and BuddyPress items.

Props sbrajesh, r-a-y, boonebgorges

Fixes #8013

File:
1 edited

Legend:

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

    r12158 r12416  
    1515 *
    1616 * @since 4.0.0
     17 * @since 5.0.0 adds an `exporter_bp_friendly_name` param to exporters.
    1718 *
    1819 * @param array $exporters  An array of personal data exporters.
     
    2122function bp_register_notifications_personal_data_exporter( $exporters ) {
    2223    $exporters['buddypress-notifications'] = array(
    23         'exporter_friendly_name' => __( 'BuddyPress Notifications Data', 'buddypress' ),
    24         'callback'               => 'bp_notifications_personal_data_exporter',
     24        'exporter_friendly_name'    => __( 'BuddyPress Notifications Data', 'buddypress' ),
     25        'callback'                  => 'bp_notifications_personal_data_exporter',
     26        'exporter_bp_friendly_name' => _x( 'Notifications Data', 'BuddyPress Notifications data exporter friendly name', 'buddypress' ),
    2527    );
    2628
Note: See TracChangeset for help on using the changeset viewer.