user_contactmethods WordPress Filter Hook

The user_contactmethods hook can be used to add or remove contact methods from a user's profile. This can be useful for providing extra fields for users to input their contact information, or for removing unwanted fields.

apply_filters( 'user_contactmethods', string[] $methods, WP_User|null $user ) #

Filters the user contact methods.


Parameters

$methods

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

$user

(WP_User|null)WP_User object or null if none was provided.


Top ↑

More Information

Customize the contact information fields available to your WordPress users. Edits the available contact methods on a user’s profile page. Contact methods can be both added and removed.


Top ↑

Source

File: wp-includes/user.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
2.9.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More
Show More