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 |
|---|---|
| 179 | } else { |
| 180 | $cookie_login = wp_get_cookie_login(); |
| 181 | if ( ! empty($cookie_login) ) { |
| 182 | $using_cookie = true; |
| 183 | $user_login = $cookie_login['login']; |
| 184 | $user_pass = $cookie_login['password']; |
| 185 | } |
| 186 | } |
| 187 | |
| 188 | do_action('wp_authenticate', array(&$user_login, &$user_pass)); |
| 189 | |
| 190 | if ( $user_login && $user_pass ) { |
| 191 | $user = new WP_User(0, $user_login); |
| 192 | |
| 193 | // If the user can't edit posts, send them to their profile. |
| 194 | if ( !$user->has_cap('edit_posts') && ( empty( $redirect_to ) || $redirect_to == 'wp-admin/' ) ) |
| 195 | $redirect_to = get_settings('siteurl') . '/wp-admin/profile.php'; |
| 196 | |
| 197 | if ( wp_login($user_login, $user_pass, $using_cookie) ) { |