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

WordPress Trac noreply at wordpress.org
Fri Apr 4 12:04: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
------------------------------------+---------------------
Changes (by zodiac1978):

 * keywords:  has-patch => has-patch needs-docs


Comment:

 As the one who posted his rant on Twitter/X which was the reason for this
 ticket I just want to say thanks for the ticket and the patch.

 Additionally, I want to add, that this should be better documented. Maybe
 adding this lifetime information to this page:
 https://developer.wordpress.org/advanced-administration/wordpress/cookies/

 Many articles are still saying wrongly the cookie lifetime is 48 hours (or
 2 days) and with "Remember me" modified to 14 days.

 Especially this sentence should be changed:
 > The cookies lifetime can be adjusted with the auth_cookie_expiration
 hook. An example of this can be found at what’s the easiest way to stop wp
 from ever logging me out.

 The filter does only affect the lifetime if "Remember me" was checked.
 Otherwise not. This should be added to the docs.

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


More information about the wp-trac mailing list