mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-03-31 02:34:38 +00:00
Allow passing stdClass and WP_User to wp_insert_user() and wp_update_user(). Introduce WP_User::to_array(). Eliminate uses of get_object_vars() when passing to wp_*_user(). fixes #21429
git-svn-id: https://develop.svn.wordpress.org/trunk@21496 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -665,6 +665,17 @@ class WP_User {
|
||||
return $this->__isset( $key );
|
||||
}
|
||||
|
||||
/*
|
||||
* Return an array representation.
|
||||
*
|
||||
* @since 3.5.0
|
||||
*
|
||||
* @return array Array representation.
|
||||
*/
|
||||
function to_array() {
|
||||
return get_object_vars( $this->data );
|
||||
}
|
||||
|
||||
/**
|
||||
* Set up capability object properties.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user