Make WordPress Core

Changeset 61188

Timestamp:
11/10/2025 02:11:24 AM (4 months ago)
Author:
peterwilsoncc
Message:

Docs: Clarify behavior in wp_set_auth_cookie().

Clarifies how long authentication cookies are set for when setting the $remember parameter.

Props johnbillion, khoipro, rollybueno, shailu25, siliconforks, wildworks, zodiac1978.
Fixes #63230.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/pluggable.php

    r61179 r61188  
    10481048if ( ! function_exists( 'wp_set_auth_cookie' ) ) :
    10491049    /**
    1050      * Sets the authentication cookies based on user ID.
    1051      *
    1052      * The $remember parameter increases the time that the cookie will be kept. The
    1053      * default the cookie is kept without remembering is two days. When $remember is
    1054      * set, the cookies will be kept for 14 days or two weeks.
     1050     * Sets the authentication cookies for a given user ID.
     1051     *
     1052     * The `$remember` parameter controls cookie persistence:
     1053     * - If true, the cookie is persistent (default 14 days, filterable via {@see 'auth_cookie_expiration'}).
     1054     * - If false, the cookie is a browser session cookie (expires when the browser closes).
     1055     *   Internally, {@see 'auth_cookie_expiration'} is still applied, to expire the login after
     1056     *   two days or when the browser is closed, whichever occurs first.
    10551057     *
    10561058     * @since 2.5.0
Note: See TracChangeset for help on using the changeset viewer.