W3cubDocs

/WordPress

WP_User::to_array(): array

Returns an array representation.

Return

array Array representation.

Source

public function to_array() {
	return get_object_vars( $this->data );
}

Changelog

Version Description
3.5.0 Introduced.

© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_user/to_array