[wp-trac] [WordPress Trac] #63230: Correct expiration time documentation for `wp_set_auth_cookie()`

WordPress Trac noreply at wordpress.org
Fri Apr 4 15:54:18 UTC 2025


#63230: Correct expiration time documentation for `wp_set_auth_cookie()`
------------------------------------+---------------------
 Reporter:  peterwilsoncc           |       Owner:  (none)
     Type:  defect (bug)            |      Status:  new
 Priority:  normal                  |   Milestone:  6.9
Component:  Login and Registration  |     Version:
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch needs-docs    |     Focuses:  docs
------------------------------------+---------------------

Comment (by johnbillion):

 There's two "expiration" values for this cookie. The `$expiration`
 variable is how long the value of the hash in the cookie remains valid
 (which is either 14 or 2 days depending on `$remember`). The `$expire`
 variable is how long the cookie remains valid in the browser, which is 14
 days when `$remember` is set or 0 if not, meaning it's a session cookie in
 the latter case.

 https://github.com/WordPress/wordpress-
 develop/blob/07bf0f91117629fb382ad09b6de1d138baea15e0/src/wp-
 includes/pluggable.php#L997-L1007

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/63230#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list