wp_get_user_contact_methods( WP_User $user = null )

Set up the user contact methods.


Description Description

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


Parameters Parameters

$user

(WP_User) (Optional) WP_User object.

Default value: null


Top ↑

Return Return

(array) Array of contact methods and their labels.


Top ↑

Source Source

File: wp-includes/user.php

function wp_get_user_contact_methods( $user = null ) {
	$methods = array();
	if ( get_site_option( 'initial_db_version' ) < 23588 ) {
		$methods = array(
			'aim'    => __( 'AIM' ),
			'yim'    => __( 'Yahoo IM' ),
			'jabber' => __( 'Jabber / Google Talk' )
		);
	}

	/**
	 * Filters the user contact methods.
	 *
	 * @since 2.9.0
	 *
	 * @param array   $methods Array of contact methods and their labels.
 	 * @param WP_User $user    WP_User object.
	 */
	return apply_filters( 'user_contactmethods', $methods, $user );
}

Top ↑

Changelog Changelog

Changelog
Version Description
3.7.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

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