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-activity/bp-activity-filters.php

    r12393 r12416  
    819819 *
    820820 * @since 4.0.0
     821 * @since 5.0.0 adds an `exporter_bp_friendly_name` param to exporters.
    821822 *
    822823 * @param array $exporters  An array of personal data exporters.
     
    825826function bp_activity_register_personal_data_exporter( $exporters ) {
    826827    $exporters['buddypress-activity'] = array(
    827         'exporter_friendly_name' => __( 'BuddyPress Activity Data', 'buddypress' ),
    828         'callback'               => 'bp_activity_personal_data_exporter',
     828        'exporter_friendly_name'    => __( 'BuddyPress Activity Data', 'buddypress' ),
     829        'callback'                  => 'bp_activity_personal_data_exporter',
     830        'exporter_bp_friendly_name' => _x( 'Activity Data', 'BuddyPress Activity data exporter friendly name', 'buddypress' ),
    829831    );
    830832
Note: See TracChangeset for help on using the changeset viewer.