_get_additional_user_keys

The timeline below displays how wordpress function _get_additional_user_keys has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 5.4

/**
 * Returns a list of meta keys to be (maybe) populated in wp_update_user().
 *
 * The list of keys returned via this function are dependent on the presence
 * of those keys in the user meta data to be set.
 *
 * @since 3.3.0
 * @access private
 *
 * @param WP_User $user WP_User instance.
 * @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)));
}

WordPress Version: 4.9

/**
 * Returns a list of meta keys to be (maybe) populated in wp_update_user().
 *
 * The list of keys returned via this function are dependent on the presence
 * of those keys in the user meta data to be set.
 *
 * @since 3.3.0
 * @access private
 *
 * @param WP_User $user WP_User instance.
 * @return array 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)));
}

WordPress Version: 4.7

/**
 * Returns a list of meta keys to be (maybe) populated in wp_update_user().
 *
 * The list of keys returned via this function are dependent on the presence
 * of those keys in the user meta data to be set.
 *
 * @since 3.3.0
 * @access private
 *
 * @param WP_User $user WP_User instance.
 * @return array 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', 'comment_shortcuts', 'admin_color', 'use_ssl', 'show_admin_bar_front', 'locale');
    return array_merge($keys, array_keys(wp_get_user_contact_methods($user)));
}

WordPress Version: 4.4

/**
 * Returns a list of meta keys to be (maybe) populated in wp_update_user().
 *
 * The list of keys returned via this function are dependent on the presence
 * of those keys in the user meta data to be set.
 *
 * @since 3.3.0
 * @access private
 *
 * @param WP_User $user WP_User instance.
 * @return array 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', 'comment_shortcuts', 'admin_color', 'use_ssl', 'show_admin_bar_front');
    return array_merge($keys, array_keys(wp_get_user_contact_methods($user)));
}

WordPress Version: 4.1

/**
 * Return a list of meta keys that wp_insert_user() is supposed to set.
 *
 * @since 3.3.0
 * @access private
 *
 * @param WP_User $user WP_User instance.
 * @return array
 */
function _get_additional_user_keys($user)
{
    $keys = array('first_name', 'last_name', 'nickname', 'description', 'rich_editing', 'comment_shortcuts', 'admin_color', 'use_ssl', 'show_admin_bar_front');
    return array_merge($keys, array_keys(wp_get_user_contact_methods($user)));
}

WordPress Version: 3.7

/**
 * Return a list of meta keys that wp_insert_user() is supposed to set.
 *
 * @since 3.3.0
 * @access private
 *
 * @param object $user WP_User instance.
 * @return array
 */
function _get_additional_user_keys($user)
{
    $keys = array('first_name', 'last_name', 'nickname', 'description', 'rich_editing', 'comment_shortcuts', 'admin_color', 'use_ssl', 'show_admin_bar_front');
    return array_merge($keys, array_keys(wp_get_user_contact_methods($user)));
}