get_user_metavalues()
Deprecated from version 3.3.0. It is no longer supported and can be removed in future releases. It is recommended to replace this function with the same one.
Perform the query to get the $metavalues array(s) needed by _fill_user and _fill_many_users
No Hooks.
Return
Array
. of arrays. The array is indexed by user_id, containing $metavalues object arrays.
Usage
get_user_metavalues( $ids );
- $ids(array) (required)
- User ID numbers list.
Changelog
Since 3.0.0 | Introduced. |
Deprecated since | 3.3.0 |
get_user_metavalues() get user metavalues code WP 6.7.1
function get_user_metavalues($ids) { _deprecated_function( __FUNCTION__, '3.3.0' ); $objects = array(); $ids = array_map('intval', $ids); foreach ( $ids as $id ) $objects[$id] = array(); $metas = update_meta_cache('user', $ids); foreach ( $metas as $id => $meta ) { foreach ( $meta as $key => $metavalues ) { foreach ( $metavalues as $value ) { $objects[$id][] = (object)array( 'user_id' => $id, 'meta_key' => $key, 'meta_value' => $value); } } } return $objects; }