apply_filters( 'auth_cookie_expiration', int $length , int $user_id , bool $remember )
Filters the duration of the authentication cookie expiration period.
Description Description
Parameters Parameters
- $length
-
(int) Duration of the expiration period in seconds.
- $user_id
-
(int) User ID.
- $remember
-
(bool) Whether to remember the user login. Default false.
Source Source
Changelog Changelog
Version | Description |
---|---|
2.8.0 | Introduced. |
User Contributed Notes User Contributed Notes
You must log in before being able to contribute a note or feedback.
An example of how to extend time in your WordPress session by a year, simply enter this code into your `functions.php` or plugin. Other durations have been added to show different times hat can be set.
Extension of the example, only extending expiration if $remember and low privelege.