apply_filters( 'post_password_expires', int $expires )
Filters the life span of the post password cookie.
Description
By default, the cookie expires 10 days from creation. To turn this into a session cookie, return 0.
Parameters
-
$expires
int -
The expiry time, as passed to setcookie().
Source
File: wp-login.php
.
View all references
$expire = apply_filters( 'post_password_expires', time() + 10 * DAY_IN_SECONDS );
Changelog
Version | Description |
---|---|
3.7.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.
Allows you to limit the cookie validity time either to a value passed as a parameter or to the session itself.