Opened 10 months ago
Last modified 5 weeks ago
#21466 new enhancement
Allow post password cookie expiry to be customized
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | lowest | Milestone: | Future Release |
| Component: | General | Version: | 3.4.1 |
| Severity: | minor | Keywords: | has-patch needs-refresh 3.7-early |
| Cc: |
Description
It'd be nice if you could customize the expiry time for the post password cookie that is set in wp-login.php?action=postpass.
The only solution right now is pretty ugly.
Attachments (1)
Change History (9)
comment:1
Viper007Bond — 10 months ago
Viper007Bond — 10 months ago
time() should be added to the filter arg too, so that it's possible to set a session cookie too, see #21517.
comment:3
in reply to:
↑ 2
Viper007Bond — 10 months ago
We should just make the cookie expire at the end of the session. See #21517
comment:5
in reply to:
↑ 4
Viper007Bond — 10 months ago
Agreed, considering this feature has been cookie dependent for so long many users may have built their themes/sites around it and cookie mode should then either be deprecated gracefully with backwards compability for a while, or included as a possibility for them in general.
comment:7
in reply to:
↑ 6
Viper007Bond — 10 months ago
It would still use cookies but rather than expiring after X hours/days, it would expire when the user closed their browser.
So no actual functionality change or removing the cookie, just an expiry change.
comment:8
SergeyBiryukov — 5 weeks ago
- Keywords has-patch needs-refresh 3.7-early added
- Milestone changed from Awaiting Review to Future Release

Didn't have time to write a more detailed ticket before now and I didn't want to forget to file this. :)
Someone came up to me at the WCSF Happiness Bar and wanted to make the expiry time on the post password cookies shorter. There's no filter to control the current 10 day value and work arounds are ugly.
A simple filter on the value should do the trick.