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.
This hook occurs 2 times in this file.
Line | Code |
---|---|
1080 | * @param int $expire The time the login grace period expires as a UNIX timestamp. |
1081 | * Default is 12 hours past the cookie's expiration time. Zero when clearing cookies. |
1082 | * @param int $expiration The time when the logged-in authentication cookie expires as a UNIX timestamp. |
1083 | * Default is 14 days from now. Zero when clearing cookies. |
1084 | * @param int $user_id User ID. Zero when clearing cookies. |
1085 | * @param string $scheme Authentication scheme. Values include 'auth' or 'secure_auth'. |
1086 | * Empty string when clearing cookies. |
1087 | * @param string $token User's session token to use for this cookie. Empty string when clearing cookies. |
1088 | */ |
1089 | if ( ! apply_filters( 'send_auth_cookies', true, $expire, $expiration, $user_id, $scheme, $token ) ) { |
1090 | return; |
1091 | } |
1092 |
|
1093 | setcookie( $auth_cookie_name, $auth_cookie, $expire, PLUGINS_COOKIE_PATH, COOKIE_DOMAIN, $secure, true ); |
1094 | setcookie( $auth_cookie_name, $auth_cookie, $expire, ADMIN_COOKIE_PATH, COOKIE_DOMAIN, $secure, true ); |
1095 | setcookie( LOGGED_IN_COOKIE, $logged_in_cookie, $expire, COOKIEPATH, COOKIE_DOMAIN, $secure_logged_in_cookie, true ); |
1096 | if ( COOKIEPATH !== SITECOOKIEPATH ) { |
1097 | setcookie( LOGGED_IN_COOKIE, $logged_in_cookie, $expire, SITECOOKIEPATH, COOKIE_DOMAIN, $secure_logged_in_cookie, true ); |
1098 | } |
Line | Code |
1108 | function wp_clear_auth_cookie() { |
1109 | /** |
1110 | * Fires just before the authentication cookies are cleared. |
1111 | * |
1112 | * @since 2.7.0 |
1113 | */ |
1114 | do_action( 'clear_auth_cookie' ); |
1115 |
|
1116 | /** This filter is documented in wp-includes/pluggable.php */ |
1117 | if ( ! apply_filters( 'send_auth_cookies', true, 0, 0, 0, '', '' ) ) { |
1118 | return; |
1119 | } |
1120 |
|
1121 | // Auth cookies. |
1122 | setcookie( AUTH_COOKIE, ' ', time() - YEAR_IN_SECONDS, ADMIN_COOKIE_PATH, COOKIE_DOMAIN ); |
1123 | setcookie( SECURE_AUTH_COOKIE, ' ', time() - YEAR_IN_SECONDS, ADMIN_COOKIE_PATH, COOKIE_DOMAIN ); |
1124 | setcookie( AUTH_COOKIE, ' ', time() - YEAR_IN_SECONDS, PLUGINS_COOKIE_PATH, COOKIE_DOMAIN ); |
1125 | setcookie( SECURE_AUTH_COOKIE, ' ', time() - YEAR_IN_SECONDS, PLUGINS_COOKIE_PATH, COOKIE_DOMAIN ); |
1126 | setcookie( LOGGED_IN_COOKIE, ' ', time() - YEAR_IN_SECONDS, COOKIEPATH, COOKIE_DOMAIN ); |