有没有一种可能的方法可以使受密码保护的帖子在使用后过期?
如何让受密码保护的帖子在使用后过期?
1 个回复
SO网友:dado
试试这样的
add_filter( \'post_password_expires\', \'my_cookie_time\' );
function my_cookie_time( $time ) {
return 600; // 600 = 10 minutes. Use 0 to expire the cookie at the end of the current browsing session.
}