wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren
update_user_caches › WordPress Function
Seit3.0.0
Veraltetn/v
› update_user_caches ( $user )
| Parameter: |
|
| Gibt zurück: |
|
| Definiert in: |
|
| Codex: |
Updates all user caches.
Ähnliche Funktionen: update_site_cache, update_term_cache, update_post_caches, update_meta_cache, update_page_cache
Quellcode
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_nicename, $user->ID, 'userslugs' );
if ( ! empty( $user->user_email ) ) {
wp_cache_add( $user->user_email, $user->ID, 'useremail' );
}
}