update_user_caches( WP_User $user )
Update all user caches
Description Description
Parameters Parameters
- $user
-
(WP_User) (Required) User object to be cached
Return Return
(bool|null) Returns false on failure.
Source Source
File: wp-includes/user.php
function update_user_caches( $user ) { if ( $user instanceof WP_User ) { if ( ! $user->exists() ) { return false; } $user = $user->data; } wp_cache_add( $user->ID, $user, 'users' ); wp_cache_add( $user->user_login, $user->ID, 'userlogins' ); wp_cache_add( $user->user_email, $user->ID, 'useremail' ); wp_cache_add( $user->user_nicename, $user->ID, 'userslugs' ); }
Expand full source code Collapse full source code View on Trac
Changelog Changelog
Version | Description |
---|---|
3.0.0 | Introduced. |