Function: wp_get_user_contact_methods

wp_get_user_contact_methods( WP_User $user )

Set up the user contact methods.

Default contact methods were removed in 3.6. A filter dictates contact methods.

Parameters

Name Type(s) Default Value Description
$user WP_User null

Optional. WP_User object.

Returns

array

Array of contact methods and their labels.

WordPress Developer Newsletter

Stay on top of the latest WordPress API changes, developer tool updates, security alerts and more.