How to expire session after 2 hours and also expire when browser closed?
It is the correct hook. I often also add a bit of javascript, to active the checkboxes inside the form. In your case it would not be necessary to use the $accepted_args parameter – 3 – of the add_filter() hook, because you’re not using any parameters, and simply work with a return value as integer, … Read more