wp_get_user_contact_methods

Advertisement

Summery Summery

Set up the user contact methods.

Syntax Syntax

wp_get_user_contact_methods( WP_User $user = null )

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

Return Return

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

Source Source

File: wp-includes/user.php

 * @return string[] List of user keys to be populated in wp_update_user().
 */
function _get_additional_user_keys( $user ) {
	$keys = array( 'first_name', 'last_name', 'nickname', 'description', 'rich_editing', 'syntax_highlighting', 'comment_shortcuts', 'admin_color', 'use_ssl', 'show_admin_bar_front', 'locale' );
	return array_merge( $keys, array_keys( wp_get_user_contact_methods( $user ) ) );
}

/**
 * Set up the user contact methods.
 *
 * Default contact methods were removed in 3.6. A filter dictates contact methods.
 *
 * @since 3.7.0
 *
 * @param WP_User $user Optional. WP_User object.
 * @return string[] Array of contact method labels keyed by contact method.
 */
function wp_get_user_contact_methods( $user = null ) {
	$methods = array();
	if ( get_site_option( 'initial_db_version' ) < 23588 ) {

Advertisement

Changelog Changelog

Changelog
Version Description
3.7.0 Introduced.

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.