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 |
|---|---|
| 2847 | $current_user = wp_get_current_user(); |
| 2848 | if ( $current_user->ID === $user_id ) { |
| 2849 | if ( isset( $plaintext_pass ) ) { |
| 2850 | /* |
| 2851 | * Here we calculate the expiration length of the current auth cookie and compare it to the default expiration. |
| 2852 | * If it's greater than this, then we know the user checked 'Remember Me' when they logged in. |
| 2853 | */ |
| 2854 | $logged_in_cookie = wp_parse_auth_cookie( '', 'logged_in' ); |
| 2855 | /** This filter is documented in wp-includes/pluggable.php */ |
| 2856 | $default_cookie_life = apply_filters( 'auth_cookie_expiration', ( 2 * DAY_IN_SECONDS ), $user_id, false ); |
| 2857 | |
| 2858 | wp_clear_auth_cookie(); |
| 2859 | |
| 2860 | $remember = false; |
| 2861 | $token = ''; |
| 2862 | |
| 2863 | if ( false !== $logged_in_cookie ) { |
| 2864 | $token = $logged_in_cookie['token']; |
| 2865 | } |