WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )apply_filters( "hook_name", "what_to_filter" ).Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
| Line | Code |
|---|---|
| 270 | // Clean links |
| 271 | $wpdb->query("DELETE FROM $wpdb->links WHERE link_owner = $id"); |
| 272 | } else { |
| 273 | $reassign = (int) $reassign; |
| 274 | $wpdb->query("UPDATE $wpdb->posts SET post_author = {$reassign} WHERE post_author = {$id}"); |
| 275 | $wpdb->query("UPDATE $wpdb->links SET link_owner = {$reassign} WHERE link_owner = {$id}"); |
| 276 | } |
| 277 | |
| 278 | // FINALLY, delete user |
| 279 | do_action('delete_user', $id); |
| 280 | |
| 281 | $wpdb->query("DELETE FROM $wpdb->users WHERE ID = $id"); |
| 282 | $wpdb->query("DELETE FROM $wpdb->usermeta WHERE user_id = '$id'"); |
| 283 | |
| 284 | wp_cache_delete($id, 'users'); |
| 285 | wp_cache_delete($user->user_login, 'userlogins'); |
| 286 | |
| 287 | return true; |
| 288 | } |