Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
07/25/2019 01:54:40 PM (5 years 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-messages/bp-messages-filters.php

    r12164 r12416  
    135135 *
    136136 * @since 4.0.0
     137 * @since 5.0.0 adds an `exporter_bp_friendly_name` param to exporters.
    137138 *
    138139 * @param array $exporters  An array of personal data exporters.
     
    141142function bp_messages_register_personal_data_exporter( $exporters ) {
    142143    $exporters['buddypress-messages'] = array(
    143         'exporter_friendly_name' => __( 'BuddyPress Messages', 'buddypress' ),
    144         'callback'               => 'bp_messages_personal_data_exporter',
     144        'exporter_friendly_name'    => __( 'BuddyPress Messages', 'buddypress' ),
     145        'callback'                  => 'bp_messages_personal_data_exporter',
     146        'exporter_bp_friendly_name' => _x( 'Private Messages', 'BuddyPress Messages data exporter friendly name', 'buddypress' ),
    145147    );
    146148
Note: See TracChangeset for help on using the changeset viewer.