clean_user_cache [ WordPress Function ]
clean_user_cache ( $user )
| Parameters: |
|
| Defined at: |
|
Soorgelijke functies: clean_term_cache, clean_page_cache, clean_post_cache, clean_category_cache, clean_comment_cache
Clean all user caches
Source
<?php
function clean_user_cache( $user ) {
if ( is_numeric( $user ) )
$user = new WP_User( $user );
if ( ! $user->exists() )
return;
wp_cache_delete( $user->ID, 'users' );
wp_cache_delete( $user->user_login, 'userlogins' );
wp_cache_delete( $user->user_email, 'useremail' );
wp_cache_delete( $user->user_nicename, 'userslugs' );
}
?>
Examples [ wp-snippets.com ]
Top Google zoekresultaten
- PHPXRef 0.7 : WordPress : Function Reference: clean_user_cache()
Function and Method Cross Reference. clean_user_cache(). Defined at: /wp- includes/user.php -> line 1138. Referenced 6 times: /wp-admin/includes/ms.php ...
phpxref.ftwr.co.uk - clean_user_cache() WordPress function reference, arguments and ...
function clean_user_cache($id) { $user = WP_User::get_data_by( 'id', $id ); wp_cache_delete($id, 'users'); wp_cache_delete($user->user_login, 'userlogins') ; ...
queryposts.com - #20460 (Notice with clean_user_cache when deleting a user ...
Description. I just got the following error when deleting a user in a network setup site / multisite setup: Notice: Trying to get property of non-object in ...
core.trac.wordpress.org - Docs for page user.php
Whether the same key should not be added. clean_user_cache (line 1145). Clean all user caches. since: 3.0.0. void clean_user_cache (WP_User|int $user) ...
phpdoc.wordpress.org