wp_privacy_additional_user_profile_data filter-hookWP 5.4.0

Filters the user's profile data for the privacy exporter.

Usage

add_filter( 'wp_privacy_additional_user_profile_data', 'wp_kama_privacy_additional_user_profile_data_filter', 10, 3 );

/**
 * Function for `wp_privacy_additional_user_profile_data` filter-hook.
 * 
 * @param array    $additional_user_profile_data An array of name-value pairs of additional user data items.
 * @param WP_User  $user                         The user whose data is being exported.
 * @param string[] $reserved_names               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.
 *
 * @return array
 */
function wp_kama_privacy_additional_user_profile_data_filter( $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.

Default: empty array

  • 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'.
$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_user_personal_data_exporter()
wp_privacy_additional_user_profile_data
wp-includes/user.php 3846
$_extra_data = apply_filters( 'wp_privacy_additional_user_profile_data', array(), $user, $reserved_names );

Where the hook is used in WordPress

Usage not found.