Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: set_logged_in_cookie

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
881       *
882       * @param string $logged_in_cookie The logged-in cookie.
883       * @param int    $expire           The time the login grace period expires as a UNIX timestamp.
884       *                                 Default is 12 hours past the cookie's expiration time.
885       * @param int    $expiration       The time when the logged-in authentication cookie expires as a UNIX timestamp.
886       *                                 Default is 14 days from now.
887       * @param int    $user_id          User ID.
888       * @param string $scheme           Authentication scheme. Default 'logged_in'.
889       */
890      do_action( 'set_logged_in_cookie', $logged_in_cookie, $expire, $expiration, $user_id, 'logged_in' );
891
892      setcookie($auth_cookie_name, $auth_cookie, $expire, PLUGINS_COOKIE_PATH, COOKIE_DOMAIN, $secure, true);
893      setcookie($auth_cookie_name, $auth_cookie, $expire, ADMIN_COOKIE_PATH, COOKIE_DOMAIN, $secure, true);
894      setcookie(LOGGED_IN_COOKIE, $logged_in_cookie, $expire, COOKIEPATH, COOKIE_DOMAIN, $secure_logged_in_cookie, true);
895      if ( COOKIEPATH != SITECOOKIEPATH )
896           setcookie(LOGGED_IN_COOKIE, $logged_in_cookie, $expire, SITECOOKIEPATH, COOKIE_DOMAIN, $secure_logged_in_cookie, true);
897 }
898 endif;
899