WP_User::to_array() WordPress Method
The WP_User::to_array() function is used to convert a WP_User object into an array. This is useful for getting an array of user data that can be used in conjunction with the various WordPress user functions.
WP_User::to_array() #
Returns an array representation.
Return
(array) Array representation.
Source
File: wp-includes/class-wp-user.php
public function to_array() { return get_object_vars( $this->data ); }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
3.5.0 | Introduced. |