_wp_get_user_contactmethods( WP_User|null $user = null ): string[]

In this article

This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

The old private function for setting up user contact methods.

Description

Use wp_get_user_contact_methods() instead.

Parameters

$userWP_User|nulloptional
WP_User object.

Default:null

Return

string[] Array of contact method labels keyed by contact method.

Source

* @param string $email    Optional. The user's email. Default empty.
* @return int|WP_Error The newly created user's ID or a WP_Error object if the user could not
*                      be created.

Changelog

VersionDescription
2.9.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.