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

    r12396 r12416  
    667667 *
    668668 * @since 4.0.0
     669 * @since 5.0.0 adds an `exporter_bp_friendly_name` param to exporters.
    669670 *
    670671 * @param array $exporters  An array of personal data exporters.
     
    673674function bp_xprofile_register_personal_data_exporter( $exporters ) {
    674675    $exporters['buddypress-xprofile'] = array(
    675         'exporter_friendly_name' => __( 'BuddyPress Extended Profile Data', 'buddypress' ),
    676         'callback'               => 'bp_xprofile_personal_data_exporter',
     676        'exporter_friendly_name'    => __( 'BuddyPress Extended Profile Data', 'buddypress' ),
     677        'callback'                  => 'bp_xprofile_personal_data_exporter',
     678        'exporter_bp_friendly_name' => _x( 'Extended Profile information', 'BuddyPress Extended Profile data exporter friendly name', 'buddypress' ),
    677679    );
    678680
Note: See TracChangeset for help on using the changeset viewer.