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 |
|---|---|
| 311 | $user = new WP_User(0, $user_login); |
| 312 | |
| 313 | // If the user can't edit posts, send them to their profile. |
| 314 | if ( !$user->has_cap('edit_posts') && ( empty( $redirect_to ) || $redirect_to == 'wp-admin/' ) ) |
| 315 | $redirect_to = get_option('siteurl') . '/wp-admin/profile.php'; |
| 316 | |
| 317 | if ( wp_login($user_login, $user_pass, $using_cookie) ) { |
| 318 | if ( !$using_cookie ) |
| 319 | wp_setcookie($user_login, $user_pass, false, '', '', $rememberme); |
| 320 | do_action('wp_login', $user_login); |
| 321 | wp_redirect($redirect_to); |
| 322 | exit(); |
| 323 | } else { |
| 324 | if ( $using_cookie ) |
| 325 | $errors['expiredsession'] = __('Your session has expired.'); |
| 326 | } |
| 327 | } |
| 328 | |
| 329 | if ( $_POST && empty( $user_login ) ) |