WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )
apply_filters( "hook_name", "what_to_filter" )
.Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
Line | Code |
---|---|
3022 | * An array of name-value pairs of additional user data items. Default empty array. |
3023 | * |
3024 | * @type string $name The user-facing name of an item name-value pair,e.g. 'IP Address'. |
3025 | * @type string $value The user-facing value of an item data pair, e.g. '50.60.70.0'. |
3026 | * } |
3027 | * @param WP_User $user The user whose data is being exported. |
3028 | * @param string[] $reserved_names An array of reserved names. Any item in `$additional_user_data` |
3029 | * that uses one of these for its `name` will not be included in the export. |
3030 | */ |
3031 | $_extra_data = apply_filters( 'wp_privacy_additional_user_profile_data', array(), $user, $reserved_names ); |
3032 |
|
3033 | if ( is_array( $_extra_data ) && ! empty( $_extra_data ) ) { |
3034 | // Remove items that use reserved names. |
3035 | $extra_data = array_filter( |
3036 | $_extra_data, |
3037 | function( $item ) use ( $reserved_names ) { |
3038 | return ! in_array( $item['name'], $reserved_names, true ); |
3039 | } |
3040 | ); |