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 |
---|---|
57 | $now = gmdate('Y-m-d H:i:s'); |
58 | $user_level = get_settings('new_users_can_blog'); |
59 | $password = substr( md5( uniqid( microtime() ) ), 0, 7); |
60 |
|
61 | $result = $wpdb->query("INSERT INTO $wpdb->users |
62 | (user_login, user_pass, user_nickname, user_email, user_ip, user_browser, user_registered, user_level, user_idmode, user_nicename) |
63 | VALUES |
64 | ('$user_login', MD5('$password'), '$user_nickname', '$user_email', '$user_ip', '$user_browser', '$now', '$user_level', 'nickname', '$user_nicename')"); |
65 |
|
66 | do_action('user_register', $wpdb->insert_id); |
67 |
|
68 | if ($result == false) { |
69 | die (sprintf(__('<strong>ERROR</strong>: Couldn’t register you... please contact the <a href="mailto:%s">webmaster</a> !'), get_settings('admin_email'))); |
70 | } |
71 |
|
72 | $stars = ''; |
73 | for ($i = 0; $i < strlen($pass1); $i = $i + 1) { |
74 | $stars .= '*'; |
75 | } |