Timeline for Change the default 10-day expiration for the password protected pages cookie
Current License: CC BY-SA 3.0
13 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Mar 11, 2021 at 11:46 | answer | added | J J Strik | timeline score: 0 | |
Feb 26, 2018 at 17:16 | vote | accept | Zocios | ||
Feb 26, 2018 at 10:11 | answer | added | Dave Romsey | timeline score: 1 | |
Feb 26, 2018 at 6:55 | comment | added | Sally CJ | Good catch @DaveRomsey! :D | |
Feb 26, 2018 at 3:14 | comment | added | Dave Romsey |
You should be using add_filter('post_password_expires', 'custom_post_password_expires'); not apply_filters('post_password_expires', ...
|
|
Feb 26, 2018 at 3:10 | comment | added | Beee | Or what if you add a very low priority... something like 99 (just suggesting what I would try). | |
Feb 26, 2018 at 3:09 | comment | added | Beee | Looking at the documentation, your code appears to be ok. What if you add an 'hardcoded integer'. Just print the current timestamp somewhere, add 120 (or so) and return that result hardcoded in the function. Does that change anything ? Just for test... | |
Feb 26, 2018 at 2:02 | comment | added | Zocios | Again, thanks, but nope. I also tried changing the return time to 0 – return time () + 0; – but that made no difference, either. The cookie remains active. Is my syntax correct? | |
Feb 26, 2018 at 1:23 | comment | added | Sally CJ |
If increasing the priority doesn't work, then how about making it the lowest/last? E.g. The default priority is 10; now let's change it to 11 or any higher values. So, apply_filters('post_password_expires', 'custom_post_password_expires', 11); .
|
|
Feb 26, 2018 at 1:04 | comment | added | Zocios | Thanks much for the reply, but nope, adding the priority of 1 made no difference at all. | |
Feb 26, 2018 at 0:04 | comment | added | Beee |
What if you hook it sooner ? Add a priority of 1 as such apply_filters( 'post_password_expires', 'custom_post_password_expires', 1 );
|
|
Feb 25, 2018 at 23:03 | review | First posts | |||
Feb 26, 2018 at 8:35 | |||||
Feb 25, 2018 at 23:01 | history | asked | Zocios | CC BY-SA 3.0 |