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

    r12159 r12416  
    1414 *
    1515 * @since 4.0.0
     16 * @since 5.0.0 adds an `exporter_bp_friendly_name` param to exporters.
    1617 *
    1718 * @param array $exporters  An array of personal data exporters.
     
    2021function bp_settings_register_personal_data_exporter( $exporters ) {
    2122    $exporters['buddypress-settings'] = array(
    22         'exporter_friendly_name' => __( 'BuddyPress Settings Data', 'buddypress' ),
    23         'callback'               => 'bp_settings_personal_data_exporter',
     23        'exporter_friendly_name'    => __( 'BuddyPress Settings Data', 'buddypress' ),
     24        'callback'                  => 'bp_settings_personal_data_exporter',
     25        'exporter_bp_friendly_name' => _x( 'Personal settings', 'BuddyPress Settings Data data exporter friendly name', 'buddypress' ),
    2426    );
    2527
Note: See TracChangeset for help on using the changeset viewer.