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 |
|---|---|
| 83 | return $error; |
| 84 | } |
| 85 | |
| 86 | $userdata = get_userdatabylogin($username); |
| 87 | |
| 88 | if ( !$userdata ) { |
| 89 | return new WP_Error('invalid_username', sprintf(__('<strong>ERROR</strong>: Invalid username. <a href="%s" title="Password Lost and Found">Lost your password</a>?'), site_url('wp-login.php?action=lostpassword', 'login'))); |
| 90 | } |
| 91 | |
| 92 | $userdata = apply_filters('wp_authenticate_user', $userdata, $password); |
| 93 | if ( is_wp_error($userdata) ) { |
| 94 | return $userdata; |
| 95 | } |
| 96 | |
| 97 | if ( !wp_check_password($password, $userdata->user_pass, $userdata->ID) ) { |
| 98 | return new WP_Error('incorrect_password', sprintf(__('<strong>ERROR</strong>: Incorrect password. <a href="%s" title="Password Lost and Found">Lost your password</a>?'), site_url('wp-login.php?action=lostpassword', 'login'))); |
| 99 | } |
| 100 | |
| 101 | $user = new WP_User($userdata->ID); |