Alert: 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.

_get_additional_user_keys() WordPress Function

The get_additional_user_keys() function is used to retrieve an array of additional user keys (i.e. user_nicename, user_url, etc.) for a given user.

_get_additional_user_keys( WP_User $user ) #

Returns a list of meta keys to be (maybe) populated in wp_update_user().


Description

The list of keys returned via this function are dependent on the presence of those keys in the user meta data to be set.


Top ↑

Parameters

$user

(WP_User)(Required)WP_User instance.


Top ↑

Return

(string[]) List of user keys to be populated in wp_update_user().


Top ↑

Source

File: wp-includes/user.php

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 ) ) );
}


Top ↑

Changelog

Changelog
VersionDescription
3.3.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