wp_privacy_additional_user_profile_data filter-hook . WP 5.4.0
Filter to extend the user's profile data for the privacy exporter.
Usage
add_filter( 'wp_privacy_additional_user_profile_data', 'filter_function_name_4870', 10, 3 ); function filter_function_name_4870( $additional_user_profile_data, $user, $reserved_names ){ // filter... return $additional_user_profile_data; }
- $additional_user_profile_data(array)
An array of name-value pairs of additional user data items.
-
name(string)
The user-facing name of an item name-value pair,e.g. 'IP Address'. - value(string)
The user-facing value of an item data pair, e.g. '50.60.70.0'.
Default: empty array
-
- $user(WP_User)
- The user whose data is being exported.
- $reserved_names(string[])
- An array of reserved names. Any item in $additional_user_data that uses one of these for its name will not be included in the export.
Changelog
Since 5.4.0 | Introduced. |
Where the hook is called
wp_privacy_additional_user_profile_data
wp-includes/user.php 3245
$_extra_data = apply_filters( 'wp_privacy_additional_user_profile_data', array(), $user, $reserved_names );