Changeset 12416
- Timestamp:
- 07/25/2019 01:54:40 PM (5 years ago)
- Location:
- trunk/src
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-activity/bp-activity-filters.php
r12393 r12416 819 819 * 820 820 * @since 4.0.0 821 * @since 5.0.0 adds an `exporter_bp_friendly_name` param to exporters. 821 822 * 822 823 * @param array $exporters An array of personal data exporters. … … 825 826 function bp_activity_register_personal_data_exporter( $exporters ) { 826 827 $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' ), 829 831 ); 830 832 -
trunk/src/bp-friends/bp-friends-filters.php
r12160 r12416 53 53 * 54 54 * @since 4.0.0 55 * @since 5.0.0 adds an `exporter_bp_friendly_name` param to exporters. 55 56 * 56 57 * @param array $exporters An array of personal data exporters. … … 59 60 function bp_friends_register_personal_data_exporters( $exporters ) { 60 61 $exporters['buddypress-friends'] = array( 61 'exporter_friendly_name' => __( 'BuddyPress Friends', 'buddypress' ), 62 'callback' => 'bp_friends_personal_data_exporter', 62 'exporter_friendly_name' => __( 'BuddyPress Friends', 'buddypress' ), 63 'callback' => 'bp_friends_personal_data_exporter', 64 'exporter_bp_friendly_name' => _x( 'Friends', 'BuddyPress Friends data exporter friendly name', 'buddypress' ), 63 65 ); 64 66 65 67 $exporters['buddypress-friends-pending-sent-requests'] = array( 66 'exporter_friendly_name' => __( 'BuddyPress Friend Requests (Sent)', 'buddypress' ), 67 'callback' => 'bp_friends_pending_sent_requests_personal_data_exporter', 68 'exporter_friendly_name' => __( 'BuddyPress Friend Requests (Sent)', 'buddypress' ), 69 'callback' => 'bp_friends_pending_sent_requests_personal_data_exporter', 70 'exporter_bp_friendly_name' => _x( 'Friend Requests (Sent)', 'BuddyPress Friend Requests data exporter friendly name', 'buddypress' ), 68 71 ); 69 72 70 73 $exporters['buddypress-friends-pending-received-requests'] = array( 71 'exporter_friendly_name' => __( 'BuddyPress Friend Requests (Received)', 'buddypress' ), 72 'callback' => 'bp_friends_pending_received_requests_personal_data_exporter', 74 'exporter_friendly_name' => __( 'BuddyPress Friend Requests (Received)', 'buddypress' ), 75 'callback' => 'bp_friends_pending_received_requests_personal_data_exporter', 76 'exporter_bp_friendly_name' => _x( 'Friend Requests (Received)', 'BuddyPress Friend Requests data exporter friendly name', 'buddypress' ), 73 77 ); 74 78 -
trunk/src/bp-groups/bp-groups-filters.php
r12163 r12416 371 371 * 372 372 * @since 4.0.0 373 * @since 5.0.0 adds an `exporter_bp_friendly_name` param to exporters. 373 374 * 374 375 * @param array $exporters An array of personal data exporters. … … 377 378 function bp_groups_register_personal_data_exporters( $exporters ) { 378 379 $exporters['buddypress-groups-memberships'] = array( 379 'exporter_friendly_name' => __( 'BuddyPress Group Memberships', 'buddypress' ), 380 'callback' => 'bp_groups_memberships_personal_data_exporter', 380 'exporter_friendly_name' => __( 'BuddyPress Group Memberships', 'buddypress' ), 381 'callback' => 'bp_groups_memberships_personal_data_exporter', 382 'exporter_bp_friendly_name' => _x( 'Group Memberships', 'BuddyPress Group Memberships data exporter friendly name', 'buddypress' ), 381 383 ); 382 384 383 385 $exporters['buddypress-groups-pending-requests'] = array( 384 'exporter_friendly_name' => __( 'BuddyPress Pending Group Membership Requests', 'buddypress' ), 385 'callback' => 'bp_groups_pending_requests_personal_data_exporter', 386 'exporter_friendly_name' => __( 'BuddyPress Pending Group Membership Requests', 'buddypress' ), 387 'callback' => 'bp_groups_pending_requests_personal_data_exporter', 388 'exporter_bp_friendly_name' => _x( 'Pending Group Membership Requests', 'BuddyPress Pending Group Membership Requests data exporter friendly name', 'buddypress' ), 386 389 ); 387 390 388 391 $exporters['buddypress-groups-pending-received-invitations'] = array( 389 'exporter_friendly_name' => __( 'BuddyPress Pending Group Invitations (Received)', 'buddypress' ), 390 'callback' => 'bp_groups_pending_received_invitations_personal_data_exporter', 392 'exporter_friendly_name' => __( 'BuddyPress Pending Group Invitations (Received)', 'buddypress' ), 393 'callback' => 'bp_groups_pending_received_invitations_personal_data_exporter', 394 'exporter_bp_friendly_name' => _x( 'Pending Group Invitations (Received)', 'BuddyPress Pending Group Invitations data exporter friendly name', 'buddypress' ), 391 395 ); 392 396 393 397 $exporters['buddypress-groups-pending-sent-invitations'] = array( 394 'exporter_friendly_name' => __( 'BuddyPress Pending Group Invitations (Sent)', 'buddypress' ), 395 'callback' => 'bp_groups_pending_sent_invitations_personal_data_exporter', 398 'exporter_friendly_name' => __( 'BuddyPress Pending Group Invitations (Sent)', 'buddypress' ), 399 'callback' => 'bp_groups_pending_sent_invitations_personal_data_exporter', 400 'exporter_bp_friendly_name' => _x( 'Pending Group Invitations (Sent)', 'BuddyPress Pending Group Invitations data exporter friendly name', 'buddypress' ), 396 401 ); 397 402 -
trunk/src/bp-messages/bp-messages-filters.php
r12164 r12416 135 135 * 136 136 * @since 4.0.0 137 * @since 5.0.0 adds an `exporter_bp_friendly_name` param to exporters. 137 138 * 138 139 * @param array $exporters An array of personal data exporters. … … 141 142 function bp_messages_register_personal_data_exporter( $exporters ) { 142 143 $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' ), 145 147 ); 146 148 -
trunk/src/bp-notifications/bp-notifications-filters.php
r12158 r12416 15 15 * 16 16 * @since 4.0.0 17 * @since 5.0.0 adds an `exporter_bp_friendly_name` param to exporters. 17 18 * 18 19 * @param array $exporters An array of personal data exporters. … … 21 22 function bp_register_notifications_personal_data_exporter( $exporters ) { 22 23 $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' ), 25 27 ); 26 28 -
trunk/src/bp-settings/bp-settings-filters.php
r12159 r12416 14 14 * 15 15 * @since 4.0.0 16 * @since 5.0.0 adds an `exporter_bp_friendly_name` param to exporters. 16 17 * 17 18 * @param array $exporters An array of personal data exporters. … … 20 21 function bp_settings_register_personal_data_exporter( $exporters ) { 21 22 $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' ), 24 26 ); 25 27 -
trunk/src/bp-settings/bp-settings-functions.php
r12272 r12416 317 317 * 'exporter_friendly_name' key, which is meant for the admin area. 318 318 * 319 * @todo We should look for a custom key like 'exporter_frontend_name' if available. 320 * 321 * @since 4.0.0 319 * @since 4.0.0 320 * @since 5.0.0 Looks for a potential exporter's BP/custom friendly name. 322 321 */ 323 322 function bp_settings_data_exporter_items() { 324 323 /** This filter is documented in /wp-admin/includes/ajax-actions.php */ 325 $exporters = apply_filters( 'wp_privacy_personal_data_exporters', array() ); 324 $exporters = apply_filters( 'wp_privacy_personal_data_exporters', array() ); 325 $custom_friendly_names = apply_filters( 'bp_settings_data_custom_friendly_names', array( 326 'wordpress-comments' => _x( 'Comments', 'WP Comments data exporter friendly name', 'buddypress' ), 327 'wordpress-media' => _x( 'Media', 'WP Media data exporter friendly name', 'buddypress' ), 328 'wordpress-user' => _x( 'Personal information', 'WP Media data exporter friendly name', 'buddypress' ), 329 ) ); 326 330 327 331 ?> 328 332 <ul> 329 333 <?php foreach ( $exporters as $exporter => $data ) : 334 // Use the exporter friendly name by default. 335 $friendly_name = $data['exporter_friendly_name']; 336 330 337 /** 331 * Filters the data exporter name for display on the "Settings > Data" page. 338 * Use the exporter friendly name if directly available 339 * into the exporters array. 340 */ 341 if ( isset( $data['exporter_bp_friendly_name'] ) ) { 342 $friendly_name = $data['exporter_bp_friendly_name']; 343 344 // Look for a potential match into the custom friendly names. 345 } elseif ( isset( $custom_friendly_names[ $exporter ] ) ) { 346 $friendly_name = $custom_friendly_names[ $exporter ]; 347 } 348 349 /** 350 * Filters the data exporter friendly name for display on the "Settings > Data" page. 332 351 * 333 352 * @since 4.0.0 353 * @since 5.0.0 replaces the `$name` parameter with the `$friendly_name` one. 334 354 * 335 * @param string $ nameData exporter friendly name.336 * @param string $exporter Internal exporter name.355 * @param string $friendly_name Data exporter friendly name. 356 * @param string $exporter Internal exporter name. 337 357 */ 338 $item = apply_filters( 'bp_settings_data_exporter_name', esc_html( $ data['exporter_friendly_name']), $exporter );358 $item = apply_filters( 'bp_settings_data_exporter_name', esc_html( $friendly_name ), $exporter ); 339 359 ?> 340 360 -
trunk/src/bp-xprofile/bp-xprofile-filters.php
r12396 r12416 667 667 * 668 668 * @since 4.0.0 669 * @since 5.0.0 adds an `exporter_bp_friendly_name` param to exporters. 669 670 * 670 671 * @param array $exporters An array of personal data exporters. … … 673 674 function bp_xprofile_register_personal_data_exporter( $exporters ) { 674 675 $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' ), 677 679 ); 678 680
Note: See TracChangeset
for help on using the changeset viewer.