WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

wp_xmlrpc_server::_prepare_user() WP 1.0

Prepares user data for return in an XML-RPC object.

Это метод класса: wp_xmlrpc_server

Хуки из метода
Возвращает

Массив. The prepared user data.

Использование

$wp_xmlrpc_server = new wp_xmlrpc_server();
$var = $wp_xmlrpc_server->_prepare_user( $user, $fields );
$user(WP_User) (обязательный)
The unprepared user object.
$fields(массив) (обязательный)
The subset of user fields to return.

Код wp xmlrpc server:: prepare user: wp-includes/class-wp-xmlrpc-server.php WP 5.2.3

<?php
protected function _prepare_user( $user, $fields ) {
	$_user = array( 'user_id' => strval( $user->ID ) );

	$user_fields = array(
		'username'     => $user->user_login,
		'first_name'   => $user->user_firstname,
		'last_name'    => $user->user_lastname,
		'registered'   => $this->_convert_date( $user->user_registered ),
		'bio'          => $user->user_description,
		'email'        => $user->user_email,
		'nickname'     => $user->nickname,
		'nicename'     => $user->user_nicename,
		'url'          => $user->user_url,
		'display_name' => $user->display_name,
		'roles'        => $user->roles,
	);

	if ( in_array( 'all', $fields ) ) {
		$_user = array_merge( $_user, $user_fields );
	} else {
		if ( in_array( 'basic', $fields ) ) {
			$basic_fields = array( 'username', 'email', 'registered', 'display_name', 'nicename' );
			$fields       = array_merge( $fields, $basic_fields );
		}
		$requested_fields = array_intersect_key( $user_fields, array_flip( $fields ) );
		$_user            = array_merge( $_user, $requested_fields );
	}

	/**
	 * Filters XML-RPC-prepared data for the given user.
	 *
	 * @since 3.5.0
	 *
	 * @param array   $_user  An array of user data.
	 * @param WP_User $user   User object.
	 * @param array   $fields An array of user fields.
	 */
	return apply_filters( 'xmlrpc_prepare_user', $_user, $user, $fields );
}