[英]How can I change the login time cookie in a password protected page in wordpress?
I know its usually set up for 10 days and would like it to be about 15 minutes. 我知道它通常设置为10天,希望大约15分钟。 I've seen a lot of answers on the internet about a certain wp-pass file but it appears that the file doesn't exist anymore in wordpress 3.5 我在互联网上看到了很多有关某个wp-pass文件的答案,但似乎该文件在wordpress 3.5中不再存在
Would anyone know how to change this ? 有人知道如何更改吗?
thanks, 谢谢,
if your using the latest wordpress you can use the auth_cookie_expiration
filter. 如果您使用的是最新的wordpress,则可以使用auth_cookie_expiration
过滤器。 something like this would do it: 这样的事情可以做到:
add_filter('auth_cookie_expiration', function($expiration){
return 900; /*15 minutes*/
});
You'd have to add that to a plugin. 您必须将其添加到插件中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.