wp_get_user_contact_methods
Set up the user contact methods.
Description
(array) wp_get_user_contact_methods( (null) $user = null );
Default contact methods were removed in 3.6. A filter dictates contact methods.
Returns (array)
Array of contact methods and their labels.
Parameters (1)
- 0. $user — Optional. (null) =>
null
-
WP_User
object.
Usage
if ( !function_exists( 'wp_get_user_contact_methods' ) ) { require_once ABSPATH . WPINC . '/user.php'; } // Optional. WP_User object. $user = null; // NOTICE! Understand what this does before running. $result = wp_get_user_contact_methods($user);
Defined (1)
The function is defined in the following location(s).
- /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.
- */
- return apply_filters( 'user_contactmethods', $methods, $user );
- }